Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

About 'Show me your Code'

by MishaMoose (Scribe)
on Oct 28, 2010 at 15:49 UTC ( #868065=perlquestion: print w/replies, xml ) Need Help??

MishaMoose has asked for the wisdom of the Perl Monks concerning the following question:

"Show me your code" I see this fairly often these days in job announcements. Over the course of my career the vasr majority of the code I have written is owned by my employeer. In the past it wasn't as much of an issue as it has become in recent years. I have rarly been asked for code in teh 30 years I ahev been programming.

The most interesting things I have written, expecially pertient to my Perl work are not things I can 'take home'. What does one do in this case?

self professed programmer with delusions of relevance

Replies are listed 'Best First'.
Re: About 'Show me your Code'
by Your Mother (Bishop) on Oct 28, 2010 at 16:44 UTC

    Someone in this industry who does no personal hacking, c.f. has no code of his/her own to show could be a good hacker but... the odds against are high. I think 80% of my skillset came from working on my own projects. At work there just isn't always time or chances to learn and explore and it's rare to get into a good mentorship where you're learing from a significantly superior hacker. (80% of my good practices came from hanging around the monastery, incidentally.)

    Now for the anecdote. Couple years ago I had a contract that was making me insane when a job that was exactly what I wanted appeared on the boards. I wrote and CPAN'd a module related to the position as my cover letter. I got the job and with the highest salary I'd ever had by a lot.

      I have personal hacking but not much in the last several years, and most of it is pretty ugly .. it was after all code I wrote to learn things. Maybe I should just rewrite my star-mapper solar system generator in GOOD perl 8^).

      The CPAN route sounds like excellent advice. Many thanks!

      self professed programmer with delusions of relevance
        This is a really good idea, and specifically noting in the changelog that you rewrote it to improve the code will score you points with people who believe in making things better and make the ones who never go back to improve old code uncomfortable -- which is how you'd want it!
      I wrote and CPAN'd a module related to the position as my cover letter.

      Could you explain? That sounds intriguing... do you mean that you created a module that would help you in the job you were trying to get, or was the module actually the cover letter itself?

      Thanks.... in my opinion, this outside-the-box creative thinking is so much more impressive to a prospective employer than the standard codejockey questions.

        It's been quite awhile but the cover letter paraphrased-

        I have X experience with Y but that doesn't really tell you what I'm capable of or what my work is like. Let's walk through developing a simple module for Y...

        • Terse problem space discussion.
        • List of concerns like system/coupling v unit testing.
        • Simple/direct way to get it into Y with terse code snippet.
        • Distribution/RCS concerns, pros of using standard CPAN style dists even at work.
        • Link to newly uploaded CPAN package!
        • Thank you for this opportunity!

        And since I sent the letter just a few hours after the job posting, it was, I hoped, obvious I could 1) perform quickly, 2) communicate, 3) write functional, testable code to community standards.

        It was fun. At the time I was actually really nervous and thinking it was a mistake; arrogant, a bundle of work for free on spec, too outside the box... I feel like I'm a very middle of the road hacker so it's hard for me to promote myself. Not that I don't do a good job, I definitely endeavor to. The thing about Perl is, the better I know it the more I feel like it's just so damn deep I can't make definitive statements like: I'm a Perl guru. So, I don't and I end up sounding like a clinker if I'm not careful. I try to talk code and how fun/productive Perl is instead of "me."

        Job hunting is, I've mentioned here before, a lot like dating. A positive attitude, confidence, love of Perl are very attractive to Perl employers.

Re: About 'Show me your Code'
by jethro (Monsignor) on Oct 28, 2010 at 16:05 UTC

    I don't think they are after your "most interesting things you have written", they want to see your style and expertise which for the most part can still be seen in your most boring and non-frontier-breaking work ;-).

    For example if you use an array instead of a hash to find duplicates of some strings in a 10 line script, I venture to guess you won't get the job. A hash and use strict might be already enough to get you into the top 5

    It probably still helps to add a list of the interesting things with remarks that you are not allowed to show that.

Re: About 'Show me your Code'
by talexb (Canon) on Oct 28, 2010 at 16:06 UTC

    You can still talk about which modules you've used, and you can still describe the system you've built, without having to show actual code samples.

    But if you're able to write some code of your own, or to contribute to CPAN in some small way, that helps as well. I heard that a fairly well-known CPAN contributor went in for a job interview, and because of his contributions to CPAN, they skipped right over the "Can you code" questions and went right to the "Here's the job we'd like you to do" discussion. That's an extreme example, but even if you've helped out here and there, that will go a long way to establishing your bona fides.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

      I wonder who that CPAN author is :-) Perhaps CPAN authors' job interview stories might make for some interesting thread.

        I was talking about someone specific who came and gave a talk at the Toronto Perlmongers a few years back, but I don't know him well enough to be able to quote him or his story directly.

        Alex / talexb / Toronto

        "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Re: About 'Show me your Code'
by jettero (Monsignor) on Oct 28, 2010 at 15:57 UTC

    Find some open source that helps you or that you're interested in. Collaborate or release on CPAN. What else can you do.

Re: About 'Show me your Code'
by raybies (Chaplain) on Oct 28, 2010 at 18:47 UTC

    I had this request once from Microsoft. They supplied the question/spec to code to, and wanted to see if I could code something, I suppose. Unfortunately before the interview I realized I wasn't a good fit and backed out, so I never heard any feedback on the code I'd submitted.

    IMO, don't stress and do what you normally do. The last thing you want to do is try to change styles or jump into some modules you're not at all familiar with, just because you think it'll impress someone.

    One approach might be if you Imagined yourself teaching a perl course, for example, what sorts of examples would you use to demonstrate the features of the language that most appeal to you.

    Also even if you can't take the code home, you should be able to capture a feel for what you've done. Then imagine yourself teaching those courses to a vendor. YOu wouldn't show them everyline of code, perhaps, but you'd probably show them the tricky parts. Write those into small subprograms that demonstrate the same principles.

    Good luck!

    PS> Code samples can be highly subjective to the opinions of the folks that work there. Don't take it personally if someone doesn't like your style. I've heard people criticize perl programmers, for example, for being "too clever" and at the same time, you get criticized if you're not "Perly" enough. So Again, don't go about attempting to become something you're not.

      Excellent advice.

      I generally am not offended by people's comments on my coding style. I have been doing it long enough that it is just how I work. I can adjust as necessary to whatever coding stanards or style requirements they have. I also realize it is bit 'C'ish for most principally perl programmers. These days I am more interested in enhance maintainablity than 'cool style' 8^)

      thanks again

      self professed programmer with delusions of relevance
Re: About 'Show me your Code'
by planetscape (Chancellor) on Oct 28, 2010 at 22:34 UTC
Re: About 'Show me your Code'
by ambrus (Abbot) on Oct 29, 2010 at 10:02 UTC

    Even if you don't own the code you've written, you can ask your employer in advance for permission to show your code to they potential future employer. If that helps, you can make the future employer agree that they must not actually use the code you show them for commercial purposes, they may only use it to evaulate your application, and must delete it later. Maybe the past employer is more likely to give you permission under that condition. Similarly, you may want to show only some selected short but interesting parts of the code, not the whole huge thing you wrote. Of course, all of this depends on your past employer: if they're an asshole and don't care at all about you once you've left, you can't really do anything.

Re: About 'Show me your Code'
by afoken (Canon) on Oct 29, 2010 at 06:49 UTC
Re: About 'Show me your Code'
by zentara (Archbishop) on Oct 28, 2010 at 19:52 UTC
    It goes something like this:

    I'll show you mine, but you have to show me yours first. :-)

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh
Re: About 'Show me your Code'
by sundialsvc4 (Abbot) on Oct 30, 2010 at 11:53 UTC

    It is actually pretty straightforward to “come up with something” that is not revealing of any employer’s intellectual property, but that clearly demonstrates what you can actually do.

    It’s pretty basic that, if you have something to sell, you need to be able to demonstrate something.   You need to have “good references,” and some kind of basic “brochure” (so to speak).   That would be equally true whether you are peddling very expensive professional services (as, in fact, you are...), or home remodeling or the service of cutting tree-limbs.

    “Selling” is a basic skill, and it’s actually fun.   It is really important in this case, because you know that you are up against “closet hacks” and (heaven help us all...) recruiters.     :-D     If you’ve actually got it, learn how to sell it effectively.

    And if you don’t (yet...) have a long and impressive pedigree built up, then learn to sell what you do have.   Most of us “old timers” taught ourselves, and as we earn our daily bread, that’s very much what we continue to do.   (The very first computer program I ever wrote was eight lines long, took me six months to write,and had a bug in it.   One of my latest ones has 350,000 lines, took fifteen years to write and has lots of bugs in it.)   Continue always to teach yourself.   Always have a very clear notion of what you are confident that you can do, and always work to be able to express those skills in a way that truly inspires confidence.   Know what balls you can hit, and hit every one of them out of the park, every time.   Word gets out fast.

      First Greetings to Nashville. I am a native currently in Ohio on a contract.

      This is good advice. It's not that I do not know how to sell myself. In the 30 years I have been programming I have gotten offers from about half the interviews I have had. I don't have too much trouble selling what I can do in person. Of course at this point in my career and new to contracting it is a little different story and the 'show me your code' thing is new to me. I can understand why prospective employers are interested. But now i have several excellent suggestions on what to show and how.

      many thanks to all!

      Misha/Michael - Russian student, grognard, bemused observer of humanity and self professed programmer with delusions of relevance

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://868065]
Approved by talexb
Front-paged by planetscape
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2020-12-01 16:02 GMT
Find Nodes?
    Voting Booth?
    How often do you use taint mode?

    Results (12 votes). Check out past polls.