Live data from Hacker News

Gaming CS Interviews

transitivebullsh.it

151–160 of 163 posts

Re: Gaming CS Interviews

#151

Earlier quoted context omitted.

Bulbs nowadays are LED and don't get warm.

As an aside, this isn't really true. LEDs are way more efficient (more watts in visible light and not just heat), but not 100% so. They still get warm and need heat sinks and sometimes airflow, etc. or they can still overheat. If you leave a LED bulb on for a while next to one that's been off, you can definitely feel the heat difference with your bare hands. This is especially true at the higher end of lumen output,…

It's also the big reason why low price LEDs barely last longer than incandescent did. The LED itself is not burning out, but the heat it generated cooks the capacitor used to generate the correct power output, which dies pretty quickly under heat stress.

Re: Gaming CS Interviews

#152
post #6

I was already halfway through the article when I realized I'd misunderstood the title: It's not about about using games to interview people (Factorio style), which still might have made sense to test self-taught engineers, but about how to game the interview process.

Man I didn’t it read it as either of those. I was expecting it to be about interviewing at companies that make games (Blizzard, Rockstar, EA, etc.).

Re: Gaming CS Interviews

#153
post #47

Earlier quoted context omitted.

Not if you use a hash set. This is expected O(n) time to de-duplicate an array of integers while maintaining the original order (more explicitly written than I normally would in Rust for didactical purposes): let mut hash_set = HashSet::new(); let mut len = 0; for i in 0..arr.len() { if !hash_set.contains(&arr[i]) { hash_set.insert(arr[i]); arr[len] = arr[i]; len += 1; } } arr.truncate(len);

Good point but it's not exactly a free lunch. You're trading memory for the speedup. You can also use radix sort for what I'd like to call "fake" O(n) sort since physical hardware puts an upper limit on the hidden constant.

Radix sort generally places far more restrictions on the keys than a set would.

Re: Gaming CS Interviews

#154
post #128

Earlier quoted context omitted.

I've seen some very bad interviewers that will fault you for non-perfect solutions, but most will have some sort of reasonable leeway in what they will take as a solution.

Given your clear technical expertise here and on Twitter, I would argue that you might just be performing better than most people, so "most interviewers" are more reasonable with you specifically.

I appreciate the confidence in my abilities, but I meant this more as a “good interviewers are ok with you making syntax errors (I mean, you usually don’t have a compiler) and minor issues with your code”. In fact I actually prefer to ignore off by ones and other annoying bits to ensure the interviewer understands that I know what I’m doing with the general algorithm, then go back and do a pass where I ensure these are correct to preempt a “can you run this on some input for me/how would you test this/why do you think it is correct”. If you indicate what you’re doing as you do it “this might be off by one, I’ll fix this bound later” it has usually worked for me. Not to discount your point; I can’t speak for everyone’s experiences of course, but this has been mine.

Re: Gaming CS Interviews

#155

Earlier quoted context omitted.

The article is 5 years old. At the time, a lot of non-FAANG companies were moving away from this style of interview in favor of take home tests. That didn't last long.

Now they do take home tests and whiteboarding. Yippee!

Not to my knowledge, no.

Re: Gaming CS Interviews

#156
post #136

Earlier quoted context omitted.

The fact that the twitter interviewer introduced themselves as a xoogler is absurd.

You would be surprised how common this is. Lots of startup companies also love to brag about how many xooglers they have recruited. I once interviewed at a startup and the CTO introduced himself as "xoogler". After the interview I checked his Linkedin profile and he had a summer internship at Google 7 years ago.

Now I’m really curious if they pronounce it “zoogler” or an “exoogler”. Either way seems to be another “how do you know if a man went to Harvard or the Marines” type cliche.

Re: Gaming CS Interviews

#157

Earlier quoted context omitted.

Asking someone "how many prime numbers are there?" seems pretty valid to me. It's an easy question. The two valid answers are: "a lot" or "infinite" (with "more than 10" also being a fine answer IMO). I'm not sure the interviewer was expecting the actually correct answer here (infinite) - lots of programmers don't know that there are infinite prime numbers - I think he was trying to set up for an explanation of an al…

This was a ways in to the interview and I do not think I was being as asshole. I didn't say it in a mean way or anything. I was laughing about it and said I had no clue and wasn't something I was interested in. He came in ready to grill me and I did not then, nor do I now, see any benefit to adversarial interviews. I said I knew nothing when he asked about number theory. I never tried to cover up anything in my gaps.…

I assume you were flustered by that point due to a previous interview, and feeling a little frustrated or defeated. I've been there, when I think it's not going well but they still want to talk.

Nevertheless, it appears to me that those were setup questions for his real problem to figure out how to explain it. If you had approached it with a more open mind, you may have gotten the job. You would have at least heard the question.

I know that most people here hate the Google-style algorithm problem, but I think the question he was going to ask would be about computing the nth prime or counting the primes less than k.

I will also point out that many people who know nothing about number theory know that there are infinite prime numbers. It's not necessarily redundant.

Re: Gaming CS Interviews

#158

Earlier quoted context omitted.

I guess the idea is you turn both on for a while, then turn one off. The hottest one is the one that was recently turned off

but then wouldn't one of the switches still be on? therefore one of the lights would be on, so you could correlate which switch was on with the on light?

You'd turn off the second switch right before entering, so that the bulb associated with it would be hotter.

Re: Gaming CS Interviews

#159

Earlier quoted context omitted.

This is roughly true. Obviously with UTF-8 or UTF-16 you'll have O(n) access times for an arbitrary code point, but you can always convert to UTF-32 and that encoding is just an array of code points so you get O(1) random access back.

UTF-32 !== UCS-2 and makes no guarantees about fixed code point size like UCS-2 did (and is considered deprecated because of that). There's an encoding issue with UTF-16 extending past the current "Astral Plane", but neither UTF-8 nor UTF-32 have that problem. We have no current idea at all what we might ever think to encode past the "Astral Plane", but that doesn't mean you should ever assume UTF-32 is UCS-2 and fre…

You gave me enough doubt that I went and looked this up.

> UTF-32 is a fixed-length encoding used to encode Unicode code points that uses exactly 32 bits per code point... The main advantage of UTF-32 is that the Unicode code points are directly indexed. Finding the Nth code point in a sequence of code points is a constant-time operation.

https://en.wikipedia.org/wiki/UTF-32

> The [UTF-32] Unicode encoding form that assigns each Unicode scalar value to a single unsigned 32-bit code unit with the same numeric value as the Unicode scalar value.

> Because surrogate code points are not included in the set of Unicode scalar values, UTF-32 code units in the range 0000D80016..0000DFFF16 are ill-formed.

https://www.unicode.org/versions/Unicode5.0.0/ch03.pdf (page 40)

> As a consequence, UCS-4 can now be taken effectively as an alias for the Unicode encoding form UTF-32, except that UTF-32 has the extra requirement that additional Unicode semantics be observed for all characters.

https://www.unicode.org/versions/Unicode5.0.0/appC.pdf (page 7)

Re: Gaming CS Interviews

#160

I've seen people ask questions they can't answer on their own. Always ask self if you really want to work in a place that have this type of people in commanding positions. Also given the saturation of the market with job offers YOU choose not they EMPLOYER. This might change in future but be aware of this current balance, you can game it. Also even if you have infinite skill you might be not liked by random reason. T…

There may a saturation of job offers but the offers aren’t not good. I’m not getting staff offers for $500k+/yr from random enterprise IT consultancy. I’d be lucky if I even got granted stock at many of these companies - let alone a $200k+ salary.

where do I apply for 500k USD/year job ?
Post reply on HN