Prove I'm really good at stuff they don't do?
January 11, 2011 2:13 PM   Subscribe

A company (Jane Street) has asked for a code sample. Please help me decide between two candidates: a recent one which I like and shows me off well but probably has very little to do with what Jane Street does, and a much older one that seems more relevant but shows me in an unfamiliar language quite a while ago.

I'm applying for a summer internship and just received a request to submit a code sample by tomorrow afternoon. Here are their guidelines:

"OCaml or another functional language would be preferable, but what's most important is that you send code that is your own and that you're proud of, have handy, and are at liberty to share."

Here are the two candidates:

1. Last quarter in Scientific Visualization, I was dissatisfied with my correct but extremely slow Python implementation of a 2D marching cubes algorithm, so I talked to the Professor and improved the runtime 285-fold with a combination of algorithmic and bit-twiddly optimizations he suggested. This involved porting the heavy work to Cython, which I learned over the weekend. Afterwards, I wrote up a little web page describing my methods and results, and I think it impressed him enough to ask me to finish the interactive portion over the summer for the next time the course was offered.

Pros: This shows initiative and fast learning and some understanding of algorithmic complexity/profiling/low level hacking.

Cons: Jane Street emphasizes how it likes functional programming with strong type systems (hence the OCaml), and this is extremely procedural, low-level code in a dynamically typed language. Also, I'm pretty sure they don't care about isocontours. Also, I'm not sure how they'll feel about someone dropping projects halfway through.

2. Several years ago, I implemented a min-max algorithm with alpha-beta pruning to play Mancala for a lab. It did well against my classmates' projects in the mock tournament, but it was my first Haskell project and I haven't progressed much farther in Haskell since then. I'm honestly worried I'd be showing off a bunch of newbie mistakes. On the other hand, I suspect it would be much more relevant to the kind of work they'll expect me to do.

Also, is it expected to give a little bit of background with the code sample (e.g., how it came it be, and whether that necessitated any questionable design choices, etc.)?

For background: I worked through half of SICP in high school, later took a course in Haskell, started teaching myself Common Lisp last summer, and am about to teach functional programming in Python to local high school students. Jane Street is a high frequency trading firm whose big shtick is that they're probably the only people in the world who write production code in OCaml, hook it up to their bank account, and let it run thousands of unsupervised transactions a second. Their blog recently described a cross-platform OCaml runtime that lets them use it as a scripting language, which makes me recoil and squee all at once. So I do want this internship.
posted by d. z. wang to Work & Money (10 answers total) 2 users marked this as a favorite
 
Response by poster: Oh, here's the writeup. I was thinking of linking to it if I submitted that as my code sample.
posted by d. z. wang at 2:18 PM on January 11, 2011


Any reason you can't send both with a brief.explanation of each?
posted by fshgrl at 2:18 PM on January 11, 2011


Best answer: what's most important is that you send code that is your own and that you're proud of

I'd go with #1 for two reasons: one, and possibly most important, it's the one you're proud of and passionate about. If they at all want to talk with you about it you don't want to be faking the enthusiasm. If you got the interview with me based on the Haskell thing and then sounded completely lukewarm on it when we discussed it that would turn me off big time.

Two, and this is showing my coder bias here, I'm wayyyyyy more interested in your algorithm/optimization work than I am your working in a specific language. Any marginally competent programmer can learn a new language well enough to push out a workable piece of software. It takes knowledge/skill/training to write good solutions.

But mostly I think you want to go for achievement.
posted by phearlez at 2:32 PM on January 11, 2011


Go with #1. If only because your "showing off a bunch of newbie mistakes" is an applicant reviewer's "Not very good." Always send your best work with an application.
posted by ErikaB at 3:27 PM on January 11, 2011


Best answer: Go with #1 but in your cover letter/ email say that you have done similar work in the past and would be happy to show that to them, though your current work is more advanced.
posted by rmless at 3:34 PM on January 11, 2011 [1 favorite]


I'm wayyyyyy more interested in your algorithm/optimization work than I am your working in a specific language.

This.
posted by Civil_Disobedient at 3:36 PM on January 11, 2011


Best answer: One point on your little writeup, I'd mention earlier what the run times are. I can't tell if saving 14 seconds is flat out awesome or a minor improvement without reading further into the document.

And I agree, go with #1.
posted by It's Never Lurgi at 4:25 PM on January 11, 2011


Jane Street is unusual and really wants FP stuff, from what I understand of them. If you can demonstrate how any part of it would be simpler / equivalent in, say, Scheme, that is a worthwhile addition.
posted by gregglind at 5:38 PM on January 11, 2011


Best answer: Another vote for No. 1. I've been a hiring manager, and I know that there will be a training period for all new employees -- I wouldn't expect anyone to be a perfect match. What I'm looking for is clarity of thought and code.

About your specific examples -- I would be much more impressed with the marching cubes because you didn't just do a problem, you thought about the results and how you could improve it, and you documented all that. That is the valuable thing, not the fact that you can implement some given algorithm in some functional language (even if the language is as cool as Haskell).
posted by phliar at 5:52 PM on January 11, 2011


Response by poster: Thanks for the advice, everyone. I ended up sending the Python optimization, and mentioning that if they strongly preferred a statically typed, functional example I also had the Mancala AI but that I did not consider it my best work.
posted by d. z. wang at 10:46 PM on January 11, 2011


« Older Song ID: "Carlos" trailer   |   What medications should I take with me to the... Newer »
This thread is closed to new comments.