Women can't cod-

>women can't cod-

Attached: file.png (1668x920, 1.64M)

Other urls found in this thread:

softschools.com/math/topics/the_divisibility_rules_3_6_9/
youtube.com/watch?v=JoSEonil9Yo
twitter.com/NSFWRedditImage

>mysogyny
no thx incel

Attached: Alaska-Pacific-Cod-Fishing-in-Whittier.jpg (450x338, 76K)

at least she can do basic math desu

cringed

ohnonono

model, software developer, cookie master, philosofer, astronaut, scientist, kickbox champ.

>kickbox champ
This one is especially impressive, is this true? Does she hold any titles?

Better than 90% of Jow Forums

I laugh when I hear about women getting raped and murdered. These modern whores deserve everything horrible that befalls them and more.

Attached: 405603006C6C428BB97399279AFE5F82.jpg (884x1200, 110K)

>not knowing basic algorithmics
Here is how to actually implement this:

def divisible_by_three(n):
n = sum(map(int, list(str(n))))
if n < 10:
return n in [0,3,6,9]
else:
return divisible_by_three(n)

cheeky

Attached: gaucho.png (890x670, 88K)

>I laugh when I hear about women getting raped and murdered
Seek sunlight

is this the incel thread

NameError (undefined local variable or method `num' for main:Object)

I love this. Wouldn't it actually be fairly fast too if programmed in another language (say, C)?

Back to your reddit containment board

post more of these please

...

i don't have many

Attached: 1459037180949.png (694x801, 82K)

sum(map(int, list(str(n)))) is bounded by 10*log_10(n) so basically it's iterated logarithms.

def divisible_by_three(n, steps):
n = sum(map(int, list(str(n))))
if n < 10:
return (n in [0,3,6,9], steps)
else:
return divisible_by_three(n, steps+1)

divisible_by_three(sys.maxsize,0)
Out[2]: (False, 2)


I.e. it only takes 2 steps for the largest integer python can represent. Of course nowhere near using % which I assume corresponds to a hardware instruction but still pretty fast.

I'd give Karlie my kock.

cd
..
..
cd
..
cd

Rate my kode

[kode]
divisivle_by_three x = x `elem` [0, 3..]
[/kode]

Pretty Klossy.

I don't think maxsize would necessarily be the number taking the highest time to compute(there's actualky a fun math problem to be solved here now that I think about it), but fair enough. I wonder what's the complexity of %. But yeah, hardware instruction trumps all I'd guess.

>haskell is so elite it doesn't even have a modulus operator
neat

(defgeneric divisible-by-three (x) (:method ((x number)) (zerop (mod x 3)))))))))))

It does have a mod function

>I don't think maxsize would necessarily be the number taking the highest time to compute
No, you are right. But I am not a number theorist so I don't know how to solve this (it seems to be fairly "chaotic" in the sense that base 10 is arbitrary so the digit sum for base 10 is arbitrary which is again represented in arbitrary base 10 and so on).

cringe

The only good response to this kind of thread

This one can't, unlike Corine Yu, Carol Shaw etc..

how would that run
like what would the haskell compiler actually be doing if you wrote it in c

elem x [] = False
elem x (y:ys) = if x == y then True else elem x ys

>never returns anything other than true
Your quote is correct.
I'm glad other stupid persons are taking her 'knowledge' as truth.

for (int i = 0; ; i += 3) {
if (i == x) {
return true;
}
}
return false;

Woman here. I have been working as a software engineer for ten years now. I have worked on game engines, machine learning, data science, pretty much anything fun.


There’s a push because it honestly is a lot harder grtting into tech as a woman. There’s all these weird hoops like I have to be “one of the guys” to fit in and any sign of femininity is taken as a weakness. For example, most women who have worked in nonfrontend programming I’ve seen over the years avoid makeup or use minimal. They also speek like an octave deeper around teammates than around me. Most women just weren’t encouraged like a lot of men are to get into tech when they do show an interest. I know like some men I had to fight tooth and nail to get where I am today—there’s a disparity here with how accessible tech is made to men vs women. Heck, even on IRC most of the women I know on freenode and the like go to great lengths to conceal the fact that they’re women because people will automatically treat them with less respect.


I have a trans woman friend who confirmed what she experienced as a male in tech and what she experiences passing as a woman in tech. Its very interesting how insecure or jusf plain shitty men get about women doing intellectual things, almost as if it threatens some of them.


All in all I’ve worked with mostly pleasant people but its stupid to pretend this reality doesnt exist and that women have less opportunity to succeed in tech than men om average.


Like my male friend who I just taught to code just got a high paying job which took me years ro get to that point when i was on my own.


Yes there are womens reachout orgs that help women get into tech, but the reason they exist is because texh is currently an extremely masculine space. I know that sounds absurd but if uve ever worked with a mostly female team vs a mostly male team ull notice differences. I wish tech to be more accessible and pleasant for all.

nice pasta

Attached: 1477515759978.png (3302x2109, 94K)

How else would you do this if not
if (x>=y)
return true
else
return false

Can a non memer give me the source for this so I know if it's photoshopped or not?

for (int i = 0; i

return x >= y

def is-divisible-by-three(int n):
return (n % 3 == 0);

>the absolute state of Jow Forums

cd ..
cd ..
cd code

is this actually more efficient or just idiot programmer? because in C some people unroll buckles and multiple other things because compilers sometimes wont optimize code to the max

Hobby programmer here who majored in EE. What exactly is wrong with this code other than missing a return false?

>no return value if not divisible by free
-e.

A woman wrote it.

> return num % 3 == 0;
does the same thing and has a defined return type

More like Karlie FLOSS

If the goal is just determining if something is even couldn't you just divide by 2 until = 2 or =/= 2?

What is "num", and where do she enter it?

Attached: 1539442984259[1].jpg (1668x920, 299K)

If your function name is longer than the code needed to complete the function, then your function is useless.

(((lisp)))

return if(!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!((x)

having that many if evaluations is undoubtedly slower than x % 2 in any possible situation

Always get a good laugh out of Klossy attempts. Thanks user

Your missing one !

lol I thought you were being serious and scratched my head until I saw another user reply with this Again I know you were joking but I hope you do realize you can use list comprehension instead of sum(map( which leads to )))) lol yikes

That's a valid algorithm to find divisibility by 3

softschools.com/math/topics/the_divisibility_rules_3_6_9/

Attached: 1512275715055.gif (190x190, 1.98M)

>mfw the ugly thot in my 3rd year class does this and calls it coding

i don't know if i should be crying or laughing, that dumb bitch should've been kicked out a long time ago, but she uses her fat fucking face to appease the nerds to do the work for her

Superior implementation coming through
def divisible_by_3(num):
return re.match(
'^([6309]|[582][6039]*[147]|([741]|[852][0936]*[582])'
'([6390]|[741][9036]*[852])*([528]|[741][6039]*[417]))*$',
str(num)) is not None

This is objectively the superior woman

Took me quite a while to understand this code I have to admit. What is interesting about this code is that you could rewrite into a function that you can check for any number n (as a string) if it is divisible by 3 or not. By using even more recursion and tricks.

Gratz user most brilliant piece of code I have seen this far in Jow Forums lately.

What the actual fuck

Apparently this also works in hexadecimal

int divisible_by_three(int n) {
n = n < 1 ? -n : n;
int sum;
const int f = 15;
while (n > f) {
sum = 0;
for (; n > 0; n >>= 4) {
sum += n & f;
}
n = sum;
}
switch (n) {
case 0:
case 3:
case 6:
case 9:
case 12:
case 15:
return 1;
}
return 0;
}

What's the matter, user? Never seen a regex before?

memes:

Won't the compiler optimize the code so that both implementations result in the same end result?

Oh wow I can't believe I didn't see that.

Actually if this program were in python it would end up returning None if not divisible by 3, which evaluates to False when treated as a bool.

Code golf anyone?
divisible_by_three=lambda n:n%3==0

except she "forgot" to set parameters for the function, so 'num' is undefined and the program doesn't even runs.

nice joke

Just a single if is faster than an x % 2 == 0 whenever the branch prediction fails.

>> Python syntax

>no specification of arguments
>returns true if the condition is true
>returns who the fuck knows if it isn't

Attached: 1533151114374.png (384x390, 153K)

>function header for doing a simple modululululu
women can't code

it would be if compilers didn't optimize the fuck out of modulu vs if statements being listed as they are.

return x>=y?true:false;

I can understand being appeased by a fat ass but not by a fat face

>>> divisible_by_three(-5)
Traceback (most recent call last):
File "", line 1, in
File "", line 2, in divisible_by_three
ValueError: invalid literal for int() with base 10: '-'

>mfw I write my code like this sometimes to debug.

Attached: dog shake.gif (250x250, 281K)

def divisible_by_three(num)
if num < 0
divisible_by_three(-num)
elsif num > 0
if num == 3
true
elsif num == 2
false
elsif num == 1
false
else
return(divisible_by_three(num - 3))
end
else
divisible_by_three(3)
end
end

why not returning true in the last else block? save you 1 call stack.

*KODE

>WOMYN IN TECH

OH NO NONONONO

Since she's engaged to Jared Kushner's brother what does that make her in relation to Trump? Ivanka becomes her sister-in-law but I don't think Trump becomes her father-in-law

but of course she wears the ultimate attention whoring colour

>smol saggy tits

Attached: barf.jpg (140x135, 4K)

How much does it actually matter? I'm supposed to ignore the fact that she's one of those people saying "there are too many white men in tech" while ignoring the flood of Indian men crowding everyone, including wahmen, out of tech just because she's a C-list celebrity with a 3rd degree connection with Donald Trump?

This

5:03 I MADE A RAINBOW
youtube.com/watch?v=JoSEonil9Yo

That has literally nothing to do with what I was asking. I didn't even express any political opinion so the fact you inferred that is all on you

>pay thousands of dollars to go through codeacademy and wix with a z list celeb

> wh*Te “women”
no wonder yall crackas dying out lmao

This is so bad, fml.