Submitting source code to companies

When a company asks you for sample code (this is asked in an online form, not from a particular person), how do you know how much code to send to them? It actually asks for two different examples- one of any work and one of your BEST work.

For management reasons out of my control, I have only done PHP work in relation to existing CMSes and frameworks. I do not consider that all of my code. For example skinning an e-commerce website by modifying the view code. Would submitting this view code be a good example for you? How much of a risk is there for them stealing and reusing your code?

That’s silly. Probably, you’re gonna regret to work for such client. Sounds like too much micromanaging there. If they have another IT guy there, let him interview you. Good programmers can spot good programmers.

i think it depends upon the type of contract and the company you are dealing with(and its reputation…)

Lots of things are clear through your online portfolio i guess…if that company is not thinking of something else

what they may be interested is,may be they want to see your coding style,snipplet of code can tell lots of a developer…
in that case put yourself in their shoe and think how much code would be sufficient for you to evaluate a programmer
if u ask me page or two of the major operation may be CRUD…

Yeah, a friend also told me that this company is likely to just want more code monkeys. Luckily I hardly come across companies that ask for this, but the place I was applying for seems promising. I’m just broadening my horizons more after 4 months of unemployment.

i think it depends upon the type of contract and the company you are dealing with(and its reputation…)

Lots of things are clear through your online portfolio i guess…if that company is not thinking of something else

I usually don’t give employers portfolios- usually I let my resume speak for itself, since I am not looking for a designer position anyways.

I gave about 500 lines of code to the last company. It was all written and planned out by me but it’s also controller code for a third party MVC framework. Don’t know if that would be considered a knock at my coding skills but I feel it’s just as good to adapt to other peoples’ code as it is making standalone functions/applications.

a good programmer can learn lots of things from viewing the site itself…and make lots of guesses and investigations…

so if i was employer and really serious i wont hire any one seeing just 500 lines of code,rather firstly i will view the sites created by her/him(portfolio…)and make some investigations…
then look at that code to confirm and decide either to go forward or now…

but i also agree that 500lines code can also tell lot of developer but i would also want his completed work list…