News for hackers. Stuff that matters.
Re:Reddit is hiring by jacquesm on Thursday August 19, 2010 @06:07PM (#1618816)
Let's hope they don't need to do a DNS update or they're going to have to allow multiple 'good' answers.

Very funny way of weeding out the non-coders. I also hope it will stay secret long enough and that the reddit repository can handle the traffic ;)

Re:Reddit is hiring by StavrosK on Thursday August 19, 2010 @06:27PM (#1618865)
You don't have to check out the repo (I didn't). It takes five minutes or so to solve, so it's not that time-consuming if you are at least a bit technical.
Re:Reddit is hiring by wwortiz on Thursday August 19, 2010 @07:09PM (#1618977)
I had no idea what the hell the \a character was, I do now, so I just checked out the repo (only 19M).

But I'm glad they gave a way to check if you got it right without applying.

Re:Reddit is hiring by StavrosK on Thursday August 19, 2010 @07:11PM (#1618988)
I only suspected what it was, but 30 seconds of Googling were enough even if you didn't know it...
Re:Reddit is hiring by eru on Thursday August 19, 2010 @06:48PM (#1618910)
Yes, you can just use the alternative clue for that.
Re:Reddit is hiring by StavrosK on Thursday August 19, 2010 @07:09PM (#1618978)
Yep, easier to find, too.
Re:Reddit is hiring by blhack on Thursday August 19, 2010 @08:09PM (#1619086)
But sooo much less fun. When I started, I was doing the following:

ryan@newslily /tmp/reddit $ find . |grep |xargs grep $foo |wc -l

ryan@newslily /tmp/reddit $ find . |grep |xargs grep $bar |wc -l

etc. etc.

But the nerd in me went "Well I wonder how many times each character occurs?", so I wrote a python script to find each unique character, then count how many times it occurs. (Somebody in the comments pointed out that I could have done this with awk, but still: much less fun to use a canned solution).

The most common character in the html files is the letter "e", which occurs 32880 times.

If you take the top 8 characters from them, in descending order, they spell "etinsaor", which I assume is some sort of alien dinosaur.

If you take them in ascending order, it is "roasnite", which I assume is some sort of radioactive material from another planet that they use to power the servers.

Re:Reddit is hiring by tptacek on Thursday August 19, 2010 @10:57PM (#1619387)
Google "ETAOIN SHRDLU" to see the principle you just rediscovered. =)

Actually still handy in cryptanalysis.

Re:Reddit is hiring by tptacek on Thursday August 19, 2010 @07:48PM (#1619056)
I don't know why they gave away the \a clue; you'd think they'd want to select for people who want the job bad enough to actually have a Reddit checkout.
Re:Reddit is hiring by jacquesm on Thursday August 19, 2010 @07:55PM (#1619063)
Two out of the four terms are things that a seasoned programmer would know by heart, one selects for either IBM mainframe programmers or people that know how to use git, the first is an easy lookup.

All in all not that much of a stumbling block for anybody determined enough, but I think it will drastically cut down on the number of unusable applicants as long as the answer isn't leaked.

Alternatively they could leak a false answer themselves and disqualify anybody that sent mail to the false answer.

Re:Reddit is hiring by shrikant on Thursday August 19, 2010 @08:23PM (#1619117)
Not a seasoned programmer by any means, have only heard of (and seen) people using git, and not an IBM mainframe programmer by any stretch of the imagination. Heck, not even a programmer, really - I'm a "business" dude.

Everything was an easy lookup though - and a quick Googling of the answer turns up a few anonymous nobs who've already put it up on various Pastebin-type places already!

And one not-so-anonymous non-nob HNer who seems to have deleted a tweet, but The Google Never Forgets (tm) :) You know who you are!

[Edit: on second thoughts, removing link to screenshot, even though it was heavily edited to avoid spoilers.]

Re:Reddit is hiring by studer on Thursday August 19, 2010 @08:35PM (#1619136)
Bonus exercise: find the shortest string fragment in that screenshot that returns the mail address if typed into Google. My best out of three quick tries is 14 letters, but I'm sure that's possible to beat.
Re:Reddit is hiring by shrikant on Thursday August 19, 2010 @08:55PM (#1619166)
Well, I can just search for the Pastebin id, which is is 8 characters long, and it works.

Curiously, no results show up on Bing though - even for the answer string.

Re:Reddit is hiring by jedberg on Thursday August 19, 2010 @06:52PM (#1618926)
Or we just update it so it evals to the same answer. :)
Re:Reddit is hiring by jacquesm on Thursday August 19, 2010 @07:03PM (#1618957)
Interesting sub-problem, work out how many possible combinations there are given that SOA serial numbers have to be monotonically increasing and you need the same number of '1' bits in them.

Hey, there is actually a slight ambiguity in the specification there, after all you could be referring to the serial number as used in the DNS or the ascii characters representing that serial number in the record.

Those would have different numbers of '1' bits. Are there two valid solutions or just one?

Re:Reddit is hiring by tptacek on Thursday August 19, 2010 @08:01PM (#1619070)
2,380,770 (ie, "enough"). Most of the wiggle room is in the less-significant bits, so the SOA serial is easy to fit to the requirement.
Re:Reddit is hiring by jacquesm on Thursday August 19, 2010 @08:52PM (#1619162)
Hm, I get 22,540,845.

Now you have me worried :)

Re:Reddit is hiring by tptacek on Thursday August 19, 2010 @09:24PM (#1619199)
The serial number is 31 bits long. I brute forced it, with the dumbest ruby one-liner ever (it involved 'count("1")').
Re:Reddit is hiring by jacquesm on Thursday August 19, 2010 @09:44PM (#1619238)
Serial numbers are unsigned 32 bit numbers as per http://www.ietf.org/rfc/rfc1035.txt aren't they?
Re:Reddit is hiring by tptacek on Thursday August 19, 2010 @10:47PM (#1619367)
No; the RFC says the largest serial is 0x7fffffff.
Re:Reddit is hiring by jacquesm on Friday August 20, 2010 @04:35AM (#1619855)
Hm, that's confusing, the one RFC linked above says:

"SERIAL The unsigned 32 bit version number of the original copy of the zone. Zone transfers preserve this value. This value wraps and should be compared using sequence space arithmetic. "

Whereas the other says:

"Serial numbers may be incremented by the addition of a positive integer n, where n is taken from the range of integers [0 .. (2^(SERIAL_BITS - 1) - 1)]. For a sequence number s, the result of such an addition, s', is defined as

                   s' = (s + n) modulo (2 ^ SERIAL_BITS)
"

and

" Addition of a value outside the range [0 .. (2^(SERIAL_BITS - 1) - 1)] is undefined."

Where SERIAL_BITS apparently is the 32 from the other RFC.

So you can add serial numbers as long as they're below or equal to 0x7fffffe but the result of the addition is still a valid serial number, and you can happily increment past 0x7ffffffe only you're no longer allowed to add that number to another serial number.

http://tools.ietf.org/html/rfc1982

Interesting.