read


read
or learn more

My favorite interview question

Apr 26, 2011

Whenever I interview a candidate I always work in some variation of a very simple question:

How would you change your favorite programming language to make it better?

I don’t really care what the answer is (that is, I don’t mind if we disagree). However, I care very much that people think critically about the tools that they use and love. You would be surprise how many people are stymied by this question.

:F

16 Comments, Comment or Ping

  1. Thank you. You give good idea. I will remember this question.

  2. Mark C

    But how can you answer this question if your favorite is (a) Lisp?

  3. @markc

    Lisp is the family, there are bound to be things that you can think of improving for any given implementation. :-)

  4. shf

    @markc

    Wow, if I were asked about the things I would change in the Lisp implementations I use, I’d probably take the whole day to answer :)

  5. knobo

    More and better libs.

  6. I would spend the rest of my life getting rid of all these half baked frameworks and bring everyone into the fold of the one true zend.

  7. I use Smalltalk so this question never comes up.

  8. I’d like a better story for runtime and compile-time metaprogramming in Haskell.

  9. Cody

    Good interview question. I think most people you’d want to hire probably have an answer on the tip of their toungue.

    For me, it would be the ternary syntax in Python; it’s ugly and confusing. Every where else, ternary syntax is some variation of:

    condition ? val-if-true : val-if-false

    That’s the way it works, with minor syntax variations, in C, Lisp, PHP, Perl, Ruby, PL/SQL, VB, etc.

    In python, it’s:

    val-if-true if condition else val-if-false

    Which is 1) a different order than every other ternary operator you’ve ever seen and 2) not even a logical way to think about flow for anyone used to normal if/else control flow constructs. You spend your entire career in python writing “if this is true then do foo otherwise do bar”. Then you decide to condense one to a ternary, and you switch to “do foo if this is true otherwise do bar”.

    There is no justifiable reason for reversing the syntax of ternary structures relative to the languages own if/else structures.

  10. The mathematician in me came up with two questions after reading those: How would your favorite programming language change you to make you better? How would you change your favorite programming language to make it worse?

    Answers to all three for me: a. Better clojure docs and advanced books, via a stonger ecosystem. I came to clojure with very little concrete programming background. I have to leave the ecosystem to learn the basics of new topics. For understanding functional programming, I went to Haskell. For learning backend web programming, I am turning to Rails. In the future, I imagine I will come back to clojure once I have attained some mastery over the basics but I don’t think I will ever program with it for a living. No internships are really available that involve clojure and if I were to make my own way in life, I would probably rationalize and pick a more widely used technology like python or rails.

    b. Taking the anthropomorphic route, I would imagine that clojure would want me to be more enlightened so I could use it more. Like a scorned lover, clojure gets inadvertently abused by me whenever I find the time and energy to pay attention to it. For one project, I wrote up a shitty version of transpose that made me feel guilty about not being able to remember the clean half liner used in contrib.

    c. I am honestly pretty flummoxed by namespaces. Coming from javascript in the browser gave me the advantage of understanding anonymous functions and throwing anything you want into anywhere, but it also made me reliant on global variables. Namespaces make sense in theory, but I still spend at least 2 minutes every project trying to figure out where all my functions have gone in the repl. I would degrade clojure by throwing everything back into the global namespace.

  11. @jamesladd

    I suspect I know the answer, but here goes the question: does it simply not come up, or is it an irrelevant question because Smalltalk is perfect?

  12. Tj Gabbour

    Good question! By the same token, I’m very forthcoming to applicants about any flaws/critiques I perceive about my company. I’m always a wee bit saddened that applicants are conditioned to never ask such a politically incorrect question, even when I offer to answer it. I wish the situation were reversed and that all workers — as a matter of course — confidently drilled companies demanding to know how good they are.

    @markc One cute technique in answering this question: if you know two lisps, play each off the other! Simply list the things that your favorite Lisp doesn’t do as well as the other. Especially those which don’t violate the spirit of your favorite one.

    This technique has a couple advantages. For one thing, maybe you don’t get to use Clojure every day. So you might mentally blank on the non-obvious annoyances. (Like wishing that clojure.set reversed the order of a couple functions’ parameters, for smoother interop with ->> in the usual case.) Doing a diff between two lisps (filtering out silly answers) might be a lot faster and more reliable.

  13. I made my own flavor of C/C++ for LoseThos. http://www.losethos.com/doc/Differences.html has all the changes.

    1) Parens are optional with no args ur just default args.

    2) Default args for more than just last args.

    3) Instructions outside functions execute … in order.

    void Main1() { }

    void Main2() { }

    Main1; Main2;

    4) if (18<=age<30)

    5) Strings beginning statements get sent to STDOUT.

  14. Adrian Mouat

    I’m not convinced by this question – I think it might say more about your interests and preferences than the candidates ability.

    I can think of several people that might struggle to come up with a good answer to this yet I would happily work with/employ.

    Then again, if the candidate jumps at the question, they clearly spend time thinking about programming languages which is pretty definitely a good sign.

    I guess it depends exactly what kind of development post you are interviewing for.

  15. Rubix

    If your favorite language is Lisp… Well you could wish for a syntax, to begin with.

  16. Not Ken

    In the spirit of Ken’s classic “I’d spell creat with an E”, I’ll say:

    I’d spell “makunbound” with an “E” and a hyphen.

Reply to “My favorite interview question”