Job interview

>job interview
>white board walks in
>asked to sum the primes to two million in rust
>think he's memeing about spinning rust(HDDs) epic gee meem
>call him a CIA nigger and say white men use storage where they wrote the controller with their own fucking compiler
>gets visibly uncomfortable
>turns out it's some reddit numale language

Oh well I only know java and can't sum the primes to five hundred, let alone two million. Bullet dodged being denied the job on the spot.

...

Keep me safe tech doggo

keep me safe tech doggo

Hello nerd.
I see you aren't using the Sieve of Eratosthenes or Sieve of Atkin.
I also see that you can't use memory management or create a data structure to hold 2^128 in numbers.
Get back to me when you're really ready to program.

keep me safe tech doggo

Keep me safe tech doggo

Keep me safe tech doggo

Keep me safe tech doggo

keep me doggo tech safe

Keep me safe tech doggo

Keep me safe tech doggo

Scottish school children who take computing are expected to regurgitate a bubble sort onto paper from age 14. If you are a grown adult trying to get a programming job and you can't do this then pass your CV into McDonald's instead.

I had a find and return all primes under a given number question in my interview for my current job. I didn't know either sieve algorithm but I optimised where I could and figured something out that would work. They only ask these questions to see how you deal with problems not to test your memory.

you mean national 4 or national 5? I've seen both courses and the sqa have not put bubble sort on even national 5.

Keep me safe tech doggo

Keep me safe tech doggo

All memes aside, what was expected of you ?
Write a code in rust (thats even a language ?), to sumarize all prime numbers in interval 0-2 000 000 on a white board ?

>tfw had the white board interview
>told them I can't do this because I feel so pressured.
>asked if I could just get a one week with them
>they granted me that
>had a great week and after the week they hired me since I fitted perfectly in the team

Feels good, best advice my university professor mentioned

Keep me safe tech doggo

That's actually amazing. When did you bring up the week with them idea? Not literally in the room with the whiteboard right?

Keep me safe tech doggo

Thanks Mr shark

No I did bring it up when they mentioned some problems and wanted me to do it on the whiteboard. I am just happy they accepted my proposal, since just thinking about doing it on a whiteboard makes my mind go blank and I don't like that.
Plus the problem wasn't. They wanted me to show how to handle input in a certain way, aka regex and then how would I "approach" some other stuff that I don't recall.

Keep me safe tech doggo

Keep me safe tech doggo

Keep me safe tech doggo

int size = 2000000;
long sum = 0;
boolean[] isPrime = new boolean[size];
Arrays.fill(isPrime, true);
isPrime[0] = false;
isPrime[1] = false;

for(int i = 2; i

Keep me safe tech doggo

Replying to yourself won't give you your missing chromosome back. Neither will "memes". Stop doing it.

Keep me safe tech doggo

you have have to go to the sqrt(size)

>number of posters = 27

Keep me safe tech doggo

>His bright idea was declaring 2 loops

[citation needed]
t. extra chromosome down-syndromer

>new boolean[size]
Java was a mistake

What kind of program saves images as IMG_#### ?
I suddenly see a lot of people with images named like this, what sort of meme is this?

>new boolean[size]
>New array, with elements of the boolean type, the size of the variable 'size'
What the fuck is there not to get you acoustic guitar

the fact that an array can not extend its size once set.
the fact that you initialize arrays with type[] and not [type] or array
the fact that it needs the 'new' keyword
it's ok pajeet, once you are done with your online coding bootcamp you will see that java is not the holy grail you think it is.

You don't even know shit about java.
[] is used for C like arrays, if you want a list you can use new ArrayList which resizes automatically.

iDevices

>Using weak languages

>using languages
>not coding with only ones and zeros

>the fact that an array can not extend its size once set.
You're a dumb monkey who has no idea how memory works and even then you could have just googled "Array that changes its size in java" to learn about linkedlists and arraylists.
>the fact that you initialize arrays with type[] and not [type] or array
Your personal view on how arrays should be initialized is not needed in this thread.
>the fact that it needs the 'new' keyword
Refer to poibt #1 and read about java for 10 minutes to understand why
>it's ok pajeet, once you are done with your online coding bootcamp you will see that java is not the holy grail you think it is.
Not even whiteknighting java you're just mentally handicapped

>>His bright idea was declaring 2 loops
What did he mean by this?

Keep me safe tech doggo

so the iFag indicator is not image.jpg anymore?

That there's significantly better ways to generate the primes from 1 to 20k.
But doesn't know them either (neither do I, sadly)

It's somewhat simple to google though, and if they expect you to know them on top of your head, they are retarded.

>the fact that an array can not extend its size once set.
t. monkey whose only experience programming is with Python

It's worth taking 30 seconds to learn a sieve algorithm in case you ever need to generate primes for whatever reason

Keep me safe tech doggo

I wanted to do sieve by hand using its theory. This was intentional.

Keep me safe tech doggo'

keep me safe tech doggo

Thank you java whiteknight. I am code poster and this gives me hope in my degree

...

keep me safe tech doggo

>talking shit about Rust
>onlys knows Java
hypocrisy at its finest.
learn a language that isn't utter ass.

1999997 is divisible by 19

Keep me safe tech doggo.

Keep me safe tech doggo

Keep me safe tech doggo

Keep me safe tech doggo

Keep me safe tech doggo

keep me safe tech doggo

>be me
>job interview
>asked to sum primes to 2 million on whiteboard
>start writing code
>finish
>turn for validation
>all of a sudden whiteboard moves
>faster and faster
>spinning out of control around its fulcrum
>interviews get mad and ask me to leave
>you won't be hearing from us

mfw wrote infinate loop