

Ask HN: Sample of code ? - cake

Some job ads mention to provide a sample of code.
I find it extremely hard to provide a sample of code that would represent how I work. (I'm a web developper).
When trying to find an example, I was always unable to dig out something without giving 130 pages worth of code...<p>How would you do that ? What do you show when asked ? What is working ?
======
rchiniquy
Code is not always requested just for the purpose of representing the
applicant. Sometimes interviewers (like me) just want to have code to hand
which you are guaranteed to be familiar with; It's nicer to reference code
you've actually written to ask specific questions about, say, stack vs heap
usage or OO design.

------
cperciva
"Here's my website, go look at some of the open source code I've published"
tends to work well. The more code you throw at people the better -- that way
it's clear that you're not hiding a large volume of garbage while showing them
a few good lines of code.

------
defunkt
This is where contributing to open source really comes in handy. For one of my
earlier jobs I was unable to show any code from previous employers but had a
project on SourceForge. From what I heard, it helped land me the job.

------
suhail
Perhaps you can just say "here's something I've built, completely by me."--I
don't seen how a few lines of code is going to say much, writing neat code is
like comp sci. 101.

