Slashdot Log In
How To Show Code Samples?
Posted by
Soulskill
on Fri Jul 11, 2008 06:56 PM
from the ethics-code dept.
from the ethics-code dept.
Todd writes "I've been looking around at 'help wanted' advertisements for programming jobs, and almost all of them demand that you not only have professional experience, but also that you show samples of your work. This got me wondering; with the work product, trade secret, and non-disclosure laws/agreements, how exactly can you show work that you've done in a professional capacity to a prospective employer without violating the privacy of the company for which the code was written? For instance, I can't say I've written many BASH scripts (at least, not large ones) for myself personally, but the assortment of such scripts written for my current job is wide and varied indeed. I can't very well just deliver these scripts, or even small portions thereof, to third parties to help demonstrate my scripting prowess. With that in mind, what am I supposed to show them?"
Related Stories
Submission: How to show code samples? by Anonymous Coward
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Be smart (Score:5, Funny)
what am I supposed to show them?
Someone else's code
Re:Be smart (Score:5, Insightful)
Parent
Re:Be smart (Score:5, Insightful)
Parent
Re:Be smart (Score:5, Insightful)
Parent
Re:Be smart (Score:5, Interesting)
What would asking those questions tell the interviewer anyway? Almost nothing. The strength of the engineer's ability to create an algorithm does not indicate their ability to do the job. Why? Because creating algorithms is a miniscule part of the job with all the other technologies currently being used.
Take the server-side Java example. An engineer needs to know how to put together a SQL script, Hibernate XML, Java business class, JUnit test, Struts entry, and JSP page with JSTL code. Add to that the ability to document in Word and Visio. Add to that the ability to create high-level architecture. The interview question to implement quicksort has no bearing on the job, particularly when that solution can be looked up in less than a minute anyway.
Parent
Re:Be smart (Score:5, Interesting)
Last time I interviewed, Intuit and Microsoft mostly asked me ridiculous problems like string word reversals and such, as if I had the C string library committed to memory. I was particularly amused with the Microsoft questions because I had to write a replacement for their CString library four years earlier because it didn't handle DBCS well at the time.
nVidia asked me higher level problems that required much more thought, and was actual problem solving rather than how recently I had used the particular library that the interviewer was working on that day. I wasn't really surprised, but was somewhat amused when I received an offer from nVidia, but not from MS or Intuit.
I ended up taking a better offer elsewhere, but I found the difference in interview styles very striking.
Parent
Re:Be smart (Score:5, Interesting)
I refuse to comply with interview bullshit. I push back when asked to do things that I think are ridiculous, and have on occasion walked out. It's harsh, but the only way that they'll learn... or at least the only way to keep your self-respect.
Hasn't cost me anything either. I was voluntarily unemployed once for a two-week period. Other than that, 28 years fully employed. So don't assume you have to put up with that crap in order to get a job.
Parent
Re:Be smart (Score:5, Interesting)
I have found that asking interviewees to do some (simple) coding tasks has been useful, but it's not necessarily about whether they succeed or fail at the task.
We set up a computer running Linux and projector in the room and asked candidates to write code. Many of the candidates turn out to have no idea how to use the Linux command line, or don't know what a man page is, or how to run the compiler (and this is after extensive screening of their CVs already for a job which specifies Linux skills). This becomes very obvious in the practical test, and such people can be quickly rejected.
Without the practical test we'd have to rely on CVs giving reliable answers to these things ["10 years experience with Linux" etc] and on asking the candidates what they know and relying on honest answers back.
Rich.
Parent
Re:Be smart (Score:5, Insightful)
Parent
Re:Be smart (Score:5, Insightful)
Parent
Re:Be smart (Score:5, Insightful)
Which is how any real developer on the job worth his salt would code! I don't want any of my developers wasting their time writing code that they could find that easily on the web. Their job is to integrate and polish that code (same thing they did for the interview) and to write only code that is really unique and proprietary.
(Obviously in practice there are a lot of cases where its just faster to write something that to find the exact right code scavenging the web, but I think the theory stands)
Parent
Re:Be smart (Score:5, Insightful)
The question was "show me some of your code, something you programmed", not "show me some of the code you reused, with attributions taken away and your name on top" to show off your time saving skills. Also, the guys who do this, they're not exactly..uhm..code polishers if you catch my drift.
Parent
Good Point (Score:5, Funny)
Like the other day, i was interviewing for a job and i said, "Well you know i did all the coding for Amazon.com right? but you see i can't show any of it to you because of the non-disclosure agreement"
For some reason i still haven't gotten a call back...
Re:Good Point (Score:5, Funny)
Parent
Re:Good Point (Score:5, Funny)
That is so going on my resume within the next 5 minutes. Thanks for the tip!
Parent
brainfuck? (Score:4, Funny)
Just translate everything to brainfuck, and send that sourcecode. Problem solved.
(Some people claim that this brilliant---nay, genius---solution will just make things harder for you, but you can never tell until you try, right?)
Re:brainfuck? (Score:4, Insightful)
being able to properly translate anything large to brainfuck will either guarantee you the job, or get you tossed out of the office by the interviewer, depending on the job.
Parent
Re:brainfuck? (Score:5, Funny)
If you really want to throw them in a tizzy, do it in Whitespace [wikipedia.org] (BF implemented using spaces, tabs, and carriage returns.)
Of course, turn it in as a printed copy.
Parent
Re:brainfuck? (Score:5, Interesting)
Yeah! And I always liked Tupper's self-referential formula: http://mathworld.wolfram.com/TuppersSelf-ReferentialFormula.html [wolfram.com]
Parent
Ask for a test problem (Score:5, Informative)
I usually explain that various NDAs prevent me from disclosing code I've written of significance, and suggest that I be asked to complete a programming exercise.
Most employers have a set at the ready these days, and I usually respond with the 1 hour answer and the 1 day answer, the later showing an evolution of the former, with polish and usually a more generic solution.
Re:Ask for a test problem (Score:5, Interesting)
just tell them the request in not appropriate.
since it ISN'T! would THEY like you to show work you did for them, later on, to OTHER employers?
maybe that's the best answer you can give.
[soap]
the next programming test I take, I'm insisting I bring a laptop, have emacs and gcc at my disposal. I mean, I do NOT write code on whiteboards with markers in my real job, why should I have to put up with that in an interview? I am more than happy to sit down at emacs, have my indent checker, my syntax-colorizer extensions, have my tools at hand (like a normal work day would be like) and THEN see if I can solve the quiz or routine. but in all my years, I've never seen any employer show that level of wisdom in the interview process. sad, as writing on whiteboards is not something everyone is good at and I hate being judged by such artificial criteria. gimme emacs and lemme show you how I really edit/create code in real life. if I fail that, then I'll accept whatever decision you make.
[/soap]
Parent
Re:Ask for a test problem (Score:5, Insightful)
I also hate whiteboard coding. I love using whiteboards for drawing diagrams, though. Probably the only code I'll normally do on a whiteboard is an interface or syntactical illustration anyways.
Of course another issue I have is that I tend to get quite nervous during interviews, whether or not I have a reason to be, and that probably makes matters worse. Standing up there shaking while sweating in a suit and trying to code something on a whiteboard... Lets just say I'll come across like a stumbling idiot on something I could do trivially in a normal environment.
Parent
Dress and accessorize for your interview (Score:5, Funny)
Show some confidence - don't wear a suit to the interview.
A good-quality shirt if you're a PC, a turtleneck if you're a mac, a T-shirt if you're linux, or a leather jacket if you're *bsd.
Slacks if you're a PC, black jeans if you're a mac or *bsd, blue jeans if you're linux.
Dress shoes if you're a PC, loafers if you're a mac, runners if you're linux, boots or sandals if you're *bsd.
No hat if you're a PC, a kepi if you're a mac, a ballcap if you're linux (a red one if you're Fedora/RHEL), and a shaved head if you're *bsd.
A briefcase if you're a PC, a leather portfolio if you're a mac, a softsider if you're linux, and a pull-behind carrying a 4u server if you're *bsd.
A crackberry if you're a PC, an iPhone if you're a mac, any flip-phone if you're linux, Chuck Norris if you're *bsd.
Your resume in Word if you're a PC, as a video clip if you're a mac, in openoffice if you're linux, and 7-bit clean ASCII if you're *bsd.
Hide your Zune if you're a PC, subtly show off your iPod if you're a mac, wow them with streamripper if you're linux, and run a script to make the sound of the drive heads seeking play "Take this job and shove it!" if you're *bsd.
A business card if you're a PC, a mini-dvd if you're a mac, a bootable distro dvd with customized splash screen, borwser, etc., if you're linux, your phone number and email address on the back of a beer coaster if you're *bsd.
Coca-cola if you're a PC, bottled water if you're a mac, real beer (not that 5% piss) if you're linux, shots if you're *bsd.
Parent
Re:Dress and accessorize for your interview (Score:5, Funny)
It's funny that you mention that because I've noticed a similar trend in IT where I am.
Wear a tie, and you're generally not going to be taken seriously no matter how good you are. The best approach here seems to be a polo, nice sweater, or button up depending on the weather, slacks or khakis (occasionally jeans, depending on the place), and presentable shoes (nothing too fancy. Half the time, plain black tennis shoes work perfectly).
I used to do the suit and tie thing because that's what everyone tells you to do and because I occasionally like them (yes, I'm weird. It's what I get for some of the things in my past.).
Now I just walk in wearing a nice polo shirt and khakis and get taken a heck of a lot more seriously because I "look more like a technical person". The irony is that the change came because I got tired of getting dressed up just to end up getting jerked around, so I started walking into interviews wearing what I do on an average day.
I've occasionally wondered what would happen if I walked into an interview in medieval style clothing. lol
Parent
Re:Ask for a test problem (Score:5, Insightful)
You're not weeding out candidates who "exaggerate" about their skills. You're removing the engineers who haven't recently seen the problem you're asking.
Further, with all the various knowledge of technology required to do software engineering from SQL to ORM to business code to frameworks to front-end code to test code to documentation to design and architecture, having your main requirement be the ability to implement a single algorithm from CS 101 is stupid. Coming up with a new algorithm is a miniscule part of an engineering position. If you're weeding out candidates because of that, then you're the moron.
Parent
Some won't actually mind... (Score:4, Informative)
would THEY like you to show work you did for them, later on, to OTHER employers?
Some company won't actually mind.
Not every single line of code a developper may write while working in a place is of utmost strategic importance and has to remain secret or otherwise the company will go bankrupt.
The developer should ask his/her supervisors for proper clearance to show some code that isn't a vital part for the company's survival on the market place. i.e.: Maybe you can't show the source code of the product the company is selling, but you can show the source code to tools you have developed to simplify your work.
In fact some places even authorize you to release such non-critical side project under open-source licenses.
Of course this is much easier when you work in a small company. If there are 10'000 developers in you company it's hard to check everyone's code for clearances.
...
Of course as other /.ers have said, the home projects are much better candidates to be shown in an interview.
Unless you work for a paranoid "sell your soul" companies which insist everything developer while under contract belongs, even home projects.
Parent
Re:Ask for a test problem (Score:5, Insightful)
The correctness of the code you write in an interview on a whiteboard isn't what you are being judged on. Rather, the interviewer is trying to gather insight into your problem solving skills (or at least that's what I'm looking for when I interview someone).
In a problem solving exercise like this, I don't care if you miss a semicolon, put a bracket in the wrong place, or can't remember the exact name/argument list for a function (though depending on what the problem is I'll probably end up telling you the function isn't available). I can teach a smart person how to write better code, but I can't teach someone to be smart.
Some of the basic things I ask myself about the whiteboard question after the interview is over include:
- did you ask questions about the requirements?
- what did you do if I give you a requirement that contradicts an assumption or previously defined requirement?
- did you just start writing some code or did you take some time to consider multiple solutions?
- if I asked you to come up with an alternative/better way to solve the problem, were you able to?
- if not, and I describe an alternate way to solve the problem, are you able to implement it?
- did your solution consider boundary conditions?
- does your solution scale?
- do you show a fundamental understanding of programming theory?
- can you communicate your ideas and solution effectively?
The next time you get a whiteboard question, remember that correctness isn't necessarily the most important criteria -- it's the problem solving that matters. The best way to succeed with this type of problem is to think out loud and interact with the interviewer.
As a side note, getting a good back and forth going with the interviewer is also the easiest way to "forget" that you are nervious, and you might relax enough to have a bit of fun...
Parent
Re:Ask for a test problem (Score:5, Insightful)
That's really a better way. We have some people come in (for a HW job, but same restrictions) bringing in PCBs they've designed in other places, etc. In addition to the obvious potential theft question, it's not appropriate to even look at designs done by another company.
It's really not that helpful as an interviewer to ask someone to show work they may or may not have done anyhow, you want to be sure they presently have the capacity to do so.
Another alternative that meets the interviewers demands, however is to design something of your own that solves a relevant problem in your field, and present that. It doesn't have the be huge. Point to GPL work you've done, or a pet project you worked hard on. I personally think it's not as practical, again I want to be sure the person sitting in front of me is the good problem solver.
I'd never dream of even "testing" someone by asking him to bring in work done for another employer, even one that's relatively permissive. I wouldn't want even the appearance of impropriety. If it's brought in, especially with all the crackdowns going on in large corporations wrt licensing...it will only count against you.
Parent
Open source (Score:5, Insightful)
Work on an open-source project, and use that code.
Re:Open source (Score:4, Insightful)
being able to direct them to a search on a repository and start pulling up your code all over the place definitely looks good.
Parent
Re:Open source (Score:4, Insightful)
This extremely good advice. The impact of having your name on a well-known open source project to many people cannot be overestimated. Won't work on everyone, but to many, you'll acquire a slight glow.
And yes, you can show your code.
Parent
Good example (Score:5, Insightful)
use educational examples (Score:5, Interesting)
i.e. for bash scripting:
give yourself some common tasks:
create scripts for them...
i.e. create a script to fetch updates and notify you via mail(or some other means) when they are downloaded and ready for installation.
create a script that analyzes log files(yes these things have all been done by many others and you can download them in tool-kits...but that's not the point)
create a script that updates other scripts dynamically based on what they find out...
And this is why... (Score:5, Insightful)
You should have side projects.
The big win with side projects that are entirely under your control is that the code is entirely your style. Almost all of the code that you write for work will have some legacy or shortcut warts, but your self-made utility code can be entirely of your own style and principles. This can be good or bad.
If you don't have any code that you can show, ask your prospective employer to concoct a reasonable example.
If you don't have any code of your own to show them, that tells them something. If they can't come up with a reasonable task for you to demonstrate your abilities, that tells you something.
jedi (Score:4, Funny)
If you don't write software at home... (Score:5, Insightful)
Generally, when looking for software engineers or system administrators, I try to find the people who enjoy what they do enough that they don't mind doing it when they get off of work. If you haven't written anything interesting outside of work, and you're completely uninterested in doing so, then this automatically drops you down a notch among those that I would hire.
Beyond that, though, you can't show prospective employers things that you've done for other companies unless you own the source code. On the other hand, the company you wrote it for absolutely cannot bar you from producing derivative works from memory. That would result in devaluating your skill set, which is considered an unconscionable harm by our courts. Write something similar but less ambitious at home and present that instead.
Re:If you don't write software at home... (Score:5, Insightful)
This is on the right track, but I think that there's another aspect of any candidate that could be gleaned in a half-hour ... their ability to *think*. Being able to write code is only half the job (the easy half). Give them a goal, and ask them to describe on the board their thought processes as they analyse the problem, and how they'd go about doing the data design, the code, etc.
You'll get a feel for whether they're agile on their feet, enthusiastic, can grok something quickly and come up with some useful ideas, etc., without actually having them sit a a computer and write code. If they get lost at this stage, there's no need to see any code.
It also lets you see if they're a "I know this particular "hammer", so everything looks like a nail that's best whacked with that particular hammer" type of dev., or whether they actually have a grounding in more than one solution.
It's a LOT more accurate than a written test at weeding out the "I can write the code if you hold my hand" types. You'll *know* if they're enthusiastic or not.
Alternatively, just ask for their slashdot user id, or just say "CowboyNeal". (Don't laugh - it works).
Parent
Re:If you don't write software at home... (Score:5, Insightful)
After spending 8+ hours in a cubicle writing code, the last thing I'd want to do at the end of the day is come home and write more code.
The same is true if I spend the entire day opening up computers and repairing them, setting up networks, etc.
Parent
Re:If you don't write software at home... (Score:5, Interesting)
Oh please.
There are some of us that enjoy our jobs and the tasks we do there but have other interests outside of work. I'm a Sys Admin. It was my "dream job" from the time I took my first comp sci class. I love what I do, I love the challenges I am presented with. But I don't run my own Solaris boxes at home so that I can play around even more when I get off work. I have too many other interests; other things I enjoy doing. That doesn't make me bad at my job. In fact I think it protects me from a lot of the burnout that I see happen in I.T.
Parent
Re:If you don't write software at home... (Score:4, Insightful)
That is far too idyllic for the real world. As true as it may be, doing something I love for a living would mean having little to no income. It simple is not feasible.
And so I suffer through 8-10 hours a day of writing code and putting up with my coworkers. It isn't fun - but I get paid to do it. I get paid pretty well, too. Enough that I stay.
At least I can pursue something I do enjoy in my free time. Currently looking into a Wildlife Rehabilitation license.
Parent
Re:If you don't write software at home... (Score:4, Funny)
You know, you're right.
Incidentally, I'm looking for a job that includes reading scifi books, drinking diet soda, and driving sports cars. I don't have any code to show you, but to demonstrate my qualifications, I'd be happy to offer commentary on the books I've read, show you the mountain of empty cans in my recycle bin, and get the state to verify my clean driving record.
Parent
Re:If you don't write software at home... (Score:5, Interesting)
Work to live, don't live to work.
I love programming. I really do. It's interesting, exciting and challenging.
But when I leave the office, I have a wife, a kid, a house and 2 pets. They need me, and I need them. And if I'm hiring & employing someone, I want to make sure that they're maintaining a good work/life balance and not burning themselves out doing just one thing.
My bosses & co-workers insist that I not stay late on a regular basis. They don't want me on-call (I told them I thought I needed a pager due to a system I support; they disagreed). When I'm on vacation, they yell at me if they find out I've been checking email or voicemail. When I leave the office each day, they want me living my own life outside the bounds of what my job description says.
And as a result my overall quality of life is far, far better than it was at my previous place of employment.
Parent
Re:If you don't write software at home... (Score:5, Insightful)
If you don't love writing code so much that you want to do it when you get home, maybe you just shouldn't be writing code.
I disagree here.
I'm a coder. Sure, I have shitty projects or shitty clients sometimes, but overall, I love my job. It's great that I get paid to do something I enjoy and am good at.
But, you know? A lot of the time, 40 or so hours of it in a week is enough. It's possible to love something in moderation and have room for other interests in your life. I wouldn't want to do any of the other things I enjoy for more than about a third of my waking time in a week, either.
Parent
Use basic CS test material (Score:5, Interesting)
Grab a couple computer science tests, some Knuth books, or ACM programming contest sheets.
Find a simple problem (one that'll take 10-30 minutes to code) and write it up nicely in a couple different languages. Use at least one OO language if you know one.
Discuss the projects you worked on, but tell them it was work for hire and stress that you respect the privacy of the other companies, but you brought other code samples for them to see.
Been there (Score:4, Informative)
I've been in that situation. My potential future employer asked to see some of my code. What I did was:
1) I directed them to some open-source code I'd written.
2) I told them that I could not show them the code I was working on at my current job, but I said they could ask my colleague about the quality of that code.
One good thing about 2) is that it also tells the future employer that you're not going to show *their* code around after you leave. Oh, and I got the job, although I chose to go to another company.
1000 lines of good code (Score:5, Funny)
I used to ask applicants for 1000 lines of C++ they were proud of. Sometimes you get something really beautiful. Something that's at least decently designed and looks reliable is essential.
I've been known to send such samples back with "Your first buffer overflow is on line 42. Thank you for your interest." I couldn't afford to deal with sloppy coders in a hard real time environment.
I've already done my share of "code samples," thx (Score:4, Insightful)
Oh yes, let me rush to burn up 4-8 hours of my time doing some contrived, over-specified programming exercise for each job application. I have a medium-sized stack of bug fixes and improvements to open-source projects I can point to, but that's not good enough for some companies: I have to do their extra-special lame example program, because I might not be uber enough to work at their uber-elite programming company.
Once upon a time I thought code samples might be a good idea, but now I'm starting to think that it makes a good lameness filter for my next job search. IMHO they just use up everybody's time for very little benefit; you'd almost be better off just hiring them at a low probationary pay rate and see how they actually perform in your work environment.
Do some contract work (Score:4, Insightful)
I did some smaller contract work on the cheap with the stipulation that I could use the code I wrote however I wanted. That's where most of my code samples come from. Smaller shops are often willing to compromise in ways bigger corps aren't, especially when it's possible for them to save money.
You could also just whip up a reasonably professional sample app and explain that your "real" code is locked up with your old employers. Companies worth working for, and recruiters worth talking to, will understand your situation. They probably have clauses in their standard employment contracts that restrict their employees in the same way, after all.
By the way, this is another good reason to contribute to Free Software.
Why don't you have anything? (Score:5, Insightful)
On behalf of the people that are the ones asking for code samples, your response answers 50% of what the employer is looking for.
We're not necesarily looking for someone with tons of open source experience, or who does lots of other work at home.
But for the sort of positions where you DO ask for sample code, you are intentionally looking for people who ARE programmers, not that just DO programming.
For high level positions, I generally ask for 5,000 lines.
The really top notch people are going to have SOMETHING they can provide. This could be work on an open source project, or some insane project they only do at home, or even some shareware tool they make some money off on the side.
But there's generally something.
If you don't have the code, then the question is no longer one about assesing your programming skills, it's now about assessing your personality and profressionalism. Will you make excuses? Will you write something just for the request? Will you offer to program something?
I've even had one guy who came to us from a bank that responded, "I can't show you the code, but I could give you the header files and documentation?" (he was hired)
Since you obviously don't have the code, bear this mind.
In India (at least until recently) it's fairly easy to hire people cheaply that can't afford or doesn't use a computer at home, for whom programming is something they were only trained for an just do at Their Job.
If someone is asking for code samples, at that point they DON'T want people of that calibre. They want GOOD people that they can give responsibility to and trust the decisions of safely.
Your job is to demonstrate that.
Re:Strategy (Score:4, Informative)
I am corrected, Previously I responded that something was the dumbest post, but you win.
Really, do you think that you are so awesome that the crappy little code sample that you are showing me is going to blow my mind. Do you realize how unlikely it is that your sample code is even remotely related to the problem I am working on at that moment?
I want to see an example of what you have written in the past for a few reasons:
1. It shows me your style. Do you design before coding? this is usually evident by simple elegant solutions. An experienced programmer/engineer can tell alot from a small sample.
2. This is much more fair than me presenting you with some problem out of the blue. I am giving you as much time as you want to compose your solution. This is the audition part of the process.
3. I will be asking you questions about this example code to determine that it was in fact you who designed/wrote it, and to understand the thought process that you followed. This has 2 purposes.
a. I figure out if you are trying to bs me.
b. You get a chance to see what the caliber of your peers will be based upon the quality of my questions ( and I am working on the spot, without a net).
Interviewing should not be considered combat. I want to like you, and I want to hire you. I am asking 4-8 of my staff to take an hour out of their day to talk with you and see if you will be an asset to our organization.
A great interview is a conversation, not an interrogation. We both have something that the other wants and we are conversing to see if we are a mutual fit.
Parent