Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I solved the problem, but before doing the real work of updating my CV -- could you please write a little bit about the job, to avoid wasting time for us both? :-)

(And I know, it is not really a waste to update your CV.)

Edit: For instance, are Europeans and other aliens a possibility?

Edit 2: Thanks. But I've probably forgotten too much math. :-( And you should get enough people anyway, sounds like a cool place.



We have an automated trading system which plays the stock market and makes us a bunch of money. The job consists of extending the trading system, developing new strategies (note: strategy == code), and some maintenance work (making our FIX talk to their FIX, tax calculations, etc). You should be ready to be involved in all aspects of the company - specialization is for insects . Yesterday I did numerical optimization, today I'm trying to make trac work with apache.

Bug reports tend to start off very vague: "We haven't made any money this month on $SET_OF_SECURITIES" or "We seem to lose $BIGNUM in $SHORT_TIME several times a day, WTF!"

We don't much care about your experience with any particular technologies. We are a Java/Ruby shop, but my resume has neither Java nor Ruby written on it (I last used Java in college in 2001). We also aren't looking for managers (with 4 people management is irrelevant) or interface designers (we are all happy with the command line).

Aliens are cool, but you will need to move here (I'm the only USian here).


Java / Ruby is an odd choice for trading particularly HFT, everyone else I have seen seems to be using C++ / C.

Though its not as odd as compared to a quant [from a large bank which held an info session at my unive] who I met last week and told me that he uses VBA + Perl (for research not trading though).


So you didn't solve it?


I can email the code, if you insist. :-)

(I thought about what the job would mean and it's too long since I studied, I just don't have the math self confidence to go halfway around the planet for a job. To do the green card dance etc, I'd need to feel confident about job fit.)

Edit: Too late, will sleep now. I'll try to remember and check this if you answer, when I wake up.


I understand. How long did it take you to solve it?


Less than 40 lines total for the subproblems, including white space. Less than an hour (if you don't count checking email in the middle).

Would have been slightly faster if I had thought less and brute forced a bit more. A crazy old friend used to say "Don't underestimate brute force and ignorance"! :-)


I had about the same LoC for my ruby solution. Time was way longer because I had to read at least three wikipedia articles on various aspects of modulo arithmetic after I was so ashamed of my brute force solutions.

Wonder if anyone tried frequency analysis since that should work well on an affine transform...


I thought about that inverse modulo thing too, and then I remembered what Falken said...

I hope yummyfajitas posts some of the answers.


I though about a more elegant approach and then just brute-forced it too when I realized a brute-force solution wasn't really very expensive. cloc shows 7 lines of perl code for my part 1 solution and 22 lines for part two.

[edit] time for my part 1 solution was 7.8 seconds on an old Dell 2650


Totally different number of lines. Also Perl. 24 lines part 1 (OK, with some diagnosis printing) and 15 for part 2. (That includes use strict;/use warnings; and a few empty lines for both.)

For part 1, with 'time' got real 0m2.865s, user 0m2.780s on a T60 Lenovo/"IBM". I used a few minutes to think about the brute force, which probably saved me half the execution time.

In pure percentage of loss/earn, those minutes for three seconds was probably the worst business of my life... :-) You can take the C/C++ compiler from the old nerd, but you can't stop him from doing premature optimization. :-)


How many people have solved it so far?


So far I've received 11 emails, but 4 were some variant of "nice puzzle, happy where I am right now, but I'll write to you next time I'm looking for work."

A few more were "I solved the puzzle, but tell me more before I bother to update my resume." Such people are certainly in the right ballpark - if you jump into a puzzle without even thinking about whether you want the prize, that's a win.


Thanks. I wondered if the puzzle might encourage more responses in addition to filtering out the send-a-resume-to-everything ones. The puzzle differentiates you from most of the open positions.


It definitely did. I'm working on a blog post discussing this.


Are you replying to people? I sent in the answer on Friday but I haven't heard anything back. Now I'm worried I messed up somewhere. I don't see how though, all the math works out.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: