656 karma · joined October 30, 2014
I like to split my interview to the following steps:
- introduction, small talk about the company or the candidate - level 1 write a function that flips a bit that is represented as a single digit integer: (0 -> 1, 1 -> 0) flip two variables (int) without a third one: (a,b -> b,a)
- level 2 what is the runtime complexity of a nested loop (assuming n == m) lease write a function that returns the list of numbers (in a string representation) that are permutation of N digits, where digits are 0..9. (1 -> 0..9, 2 -> 00 01....98 99 etc.) please explain recursion
- level 3 99% of the candidates do not make it to here I guess I should just make them flip that binary tree over the phone. :)
This is basics I think, so most of the software engineers should be able to solve these, even with a little hint.
On the top of these artificial tasks I usually ask them what is the biggest system they contributed code to, what was the contribution. What tools are they using. What is the favorite language and why. How do you to performance profiling for your code. What was the last problem that you solved in production, what was the problem and what is the solution.
And few others.
OCaml is not my cup of tea either, but it is really interesting to learn it. If you have any ML like experience than I guess it is less interesting though. The toolchain is great this was one reason I decided to try it out.
I am hiring engineers (systems, software and security) in the last 5 years, got trained up on recruiting by Amazon, so I would say I have a pretty good understanding on hiring.
The right approach with these interviews to find out the best of the candidate. In order to achieve that you always start with simple questions like what is a variable, what sort of data is out there, do you use version control etc. After that you switch gears.
On the subject of inverting binary trees on a whiteboard. Is this the core of your business? How many times did you need to do that last week? If it is irrelevant for your daily operations than why are you asking this question?
The problem is that (especially companies like Google) like to hire Stanford graduates and those guys think after being in the job for few months that the best way on interviewing is to measure how well the candidate would have done during the last semester in theoretical CS class at the university. While we probably all know that running a service for millions of users in production in a distributed environment requires many other skills that are not represented too much in the interviews, yet this is what you can run into during the interview loops.
I think at certain extent this is known to the Google recruiting team and they are ok with it. The way to beat the interview is to read books like Cracking the Coding Interview and train up extremely well on those trees and search algos and all, if you are really committed to work there. There are several very senior guys turned down by Google simple because they failed one or two of these ridiculous questions.
I think the last incident kind of a good example of this:
https://twitter.com/mxcl/status/608682016205344768
Now I get back to my read about how the heck I am inverting a binary tree.
"In mathematics and computer science, computer algebra, also called symbolic computation or algebraic computation is a scientific area that refers to the study and development of algorithms and software for manipulating mathematical expressions and other mathematical objects."
Now obviously if you have types in your language that make this easier than it is a win. I thought algebraic data types makes this easier. I might be wrong. On the pattern matching side, you are not concerned about the actual value of the variables in your expressions rather the patters those are matching to. That was my intention to show with the second URL in the previous comment, but again I might be wrong on that too.
http://en.wikipedia.org/wiki/Algebraic_data_type
The other feature that I personally think is great in OCaml is pattern matching. This can help you expressing computation on symbols, where usually you have few options for the input. See following:
https://github.com/facebook/infer/blob/master/infer/src/chec...
^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
Well yes, I can just live without imperative libraries because it is so natural to have single assignment (in the same scope) that I do it even in other languages. Accessing imperative libraries is possible though, just think about the C libs. What would you implement in Erlang the imperative way or which library do you miss exactly? The ecosystem is definitely smaller, but you can get support, some of the smartest software guys hang out on the mailing lists and IRc as well. I got absolutely amazing help from both when we worked on a Erlang project.
> It kind of depends what your priorities are, if > it's correctness or development speed.
Yeah and also how much fun you want to have. :)
Using Erlang is great but not many devs out there for hire, on the other side you have two seasoned Erlang devs they can do a lot. Contractors FTW!
Btw. what about using ASN.1 with Erlang? How does that change the correctness / development speed?
Languages with small clean syntax do not require that much IDE usage, at least this is my experience. I never thought my Erlang workflow could be improved with something like IntelliJ. I guess having a REPL helps a lot.
https://functionwhatwhat.com/go%E2%80%99s-type-system-is-an-...
If I would like to teach something smart to software engineers I use OCaml, if I want to teach how simple things can achieve a lot I use Go. (They gonna end up programming in Java or Python anyways :)) )
I am curious if somebody could mitm the https layer with rogue ca and append more JS to the content. The problem I see as a non-expert with dynamic content that it can't be signed. If we use HTTP as it was intended we could just name the content after the sha(content). That way the client could validate the integrity. The problem with shipping computation to the client side that you lost the integrity verification and opened up the platform to all sorts of vulnerabilities. I guess we should just create a brand new protocol that supports stateful clients, it is network efficient and security is part of the design.