125 karma · joined July 8, 2019
???
It starts at 0 and keeps multiplying itself with integers, which should always result in 0.
EDIT: My bad, it is explained after the code snippet, but not immediately after so I didn't catch it at first.
Having tough coursework across diverse esoteric subjects (where you cannot easily stack overflow your way into a solution) was easily the best learning experience of my life. Standing before massive "walls" that looked impossible to climb, and being forced to figure out how to do it on my own, is the most important skill I have. Some CWs which I thought were particularly tough and taught me a lot:
- Kernel for target non-widespread platform (where all you have is the processor's manual), capable of IPC, written from scratch in C.
- Both a pathtracer and a rasterizer without using a graphics library. (you can read about the advantages or disadvantages of each one, but writing both makes you appreciate each technique independently)
- Some sort of compiler or interpreter (parser too).
- HPC problem that requires non-trivial parallelisation and vectorisation.
- Some sort of adversarial attack on a target "real world" platform that uses deprecated encryption (i.e. RSA).
- Individual research project.
ALL of these tasks are possible to do by yourself, independently, but very hard to see them through the end without solid infrastructure and support staff surrounding you. I imagine it takes a very highly motivated individual to do the same things outside of academia.
The biggest benefit of attending uni is learning how to learn and tackle complex problems.
I'm saying that ALL top 10-20% of CS grads will be able to answer questions at this difficulty level in an interview scenario (accounting for nerves and so on). I'm not limiting it to them (i.e. the "only" quantifier).
I know people in the bottom of CS grads (judging by GPA) that worked remote jobs or worked on personal projects during uni that are very talented and would be able to solve this in less than five minutes. But there are also people that merely "got by".
> I’d guess I was getting a random selection of candidates.
I stand by my opinion that if you were recruiting for a software eng role (and not some random front-end position), then blacklisting anyone who failed this problem would be reasonable.
If so, then the company you're interviewing for must not be attractive to first-class CS grads (top 10-20% I think) from any non-online university.
As a comparison, any FAANG + Palantir/Jane Street/Two Sigma in the UK have tougher questions as their FIRST phone interview for INTERNSHIPS. (Palantir requires you to go through 6-8? interviews before getting an offer)
If this is a job that requires actual software engineers, I think rejecting everyone that failed this question would be perfectly reasonable.
How do you define bright? Assuming bright to mean able to achieve post-grad honors:
I feel like you could easily distinguish if someone is bright or not within a few minutes of chatting.
I think that regardless of the subject of discussion, there are a number of strong indicators in the way a person speaks. One example is confidence: very rarely have I met a person I'd call intelligent that is also absurdly confident in their beliefs.
I realise my above statement is highly interpretable. What I mean is intelligent people seem to allow for their assumptions to be flawed, and be open to being proven wrong, about stuff that they can be proven wrong on (i.e. belief about a mathematical postulate versus belief in an objective truth such as global warming is real).
I had a similar experience. Luckily, due to reading many definitions of the basic things (such as monoids), I reached a more complete? intuition of the concept if you will. I think that given enough definitions, people will converge to the same intuition of abstract concepts.
> To new learners I suggest to think of “objects” as the number of dots on domino tiles, or the poles of magnets, they describe where things may, or may not, compose, nothing more
Wouldn't a simpler intuition of circles and arrows be easier?
I think that the best way forward in your case is simply googling terms that the writers took for granted and which you don't understand (a monoid, for example), because the book material is one of the best I've seen on category theory.