Hacker News new | ask | show | jobs
Ask HN: 15 lines of code to represent yourself
3 points by samBergeron 3242 days ago
A friend of mine was recently asked in an interview process to provide 15 lines of code, that he wrote, that represents him. After thinking about it I wondered what I would have submitted. Do you choose lines from an old side-project? Do you write 15 fresh lines? Do you provide a fancy algorithm? What if you're a web developer? I assume these lines are going to be "judged" by other developers that would potentially end up working with you.

Is this something you've had to do before, if so, what did you send?

1 comments

Never done before, but this is roughly what is currently in my clipboard:

function digest(s) --return crc32(s)..adler32(s) --return hmac_sha1(pass,s) return sha1(s) end

function phe_encode(s) t = {} for i = 1, #s do t[i] = digest(s:sub(1,i)) end return t end