stereochrome

Latest inklings

I wish programmers could program

This post could also be called “Why I find pre-screening job applicants with simple puzzles depressing”.

We’ve an opening for a developer at work, so to weed out the chancers1, we ask applicants to solve a very simple programming exercise in the language of their choice and later submit it to us.

One of those programming exercises amounts to FizzBuzz, but rather than printing stuff you, they’re asked to sum the numbers. There are two main ways to do this: one is the obvious brute force way and the other is the more elegant mathematical way that solves the problem in constant time and involves realising that the problem is basically the sum of two arithmetic series less a third arithmetic series2. While I doubt anybody will cop the latter solution, all I’m expecting is the people supply the obvious brute-force solution to the problem as it demonstrates they know at least the basics of how to program.

Keep in mind that I’m not being especially picky about this. All I’m looking for is that the algorithm be correct and not obviously plagiarised.

The results so far have not been encouraging.

While we haven’t got anything so far that looked like plagiarism (such is the joy of simple puzzles), the many of applicants are fleeing at the idea of having to solve the puzzle, we had one guy who claimed to have done Linux kernel development (though not as a project contributor) who claimed the problem was “too difficult” (yes, his words) and another who didn’t even check their solution was correct though the algorithm itself was correctly implemented.

So far we’ve had only one correct solution. That guy is at least getting an interview.

What’s depressing about this is how effective it’s been. This is a problem that can be solved by brute force in Python in one line of code. Yes, one line. It’s something any barely competent developer ought to be able to write without even thinking and yet, even having been given the problem to do at their own convenience with no time pressure whatsoever3, the shoddiness of what we’re getting is astounding.

One of the problems I intended to pose was parsing a comma-separated list of numbers and range specifications. That’s hardly rocket science, but right now, I’m thinking that would’ve been akin to not advertising the job at all.

Another thing we do is ask for samples of the individual’s work. The idea here is just to get a feel for the kind of code the developer would typically write. A whole portfolio of work samples isn’t expected4, just a few code samples that show you can write something non-trivial. Let me say this once: providing us we some mostly IDE-generated code that you’ve plugged some bits of logic into is not acceptable. You didn’t right that, the IDE did. It’s a matter of proportion: IDE-generated code isn’t a bad thing, but we’re not looking to employ the IDE, we’re looking to employ you.

Moreover, when you submit sample code like this, you’re looking to put your best foot forward. Submitting sample code that looks like a pile of cut-and-pasted crap isn’t going to make a positive impression, it’s just going to make it look like you don’t care. It’s like walking into an interview with fresh stains down the front of your clothes. 90% of software development is maintenance, and given someday I might have to maintain your code, I’m not going to be encouraged if I see a bunch of near-identical conditional expressions repeated in a chunk of code unless it’s accompanied by a comment explaining why the loop that ought to have been there was unrolled. For somebody applying for a junior role, this is easily overlooked, but not so easily for a senior role.

Am I asking for too much here?


  1. Here in Ireland, a chancer is somebody who’s unable to do something, whether through lack of aptitude or just pure ineptitude, and yet attempts it anyway. It connotations are generally negative or, at best, humourous. 

  2. Hint: the series is Sn = (n2 + n) / 2, i.e., the sum of numbers between 1 and n inclusive. 

  3. It is, after all, a screening exercise so that we can avoid interviewing morons who interview well. It’d be better to leave the position unfilled than hire deadweight. 

  4. But if you can point us at one or more code repos online, I will be very tempted to bring you out for beer after the interview. :-) 

restkit

Restkit is an HTTP resource kit for Python. It allows you to easily access to HTTP resource and build objects around it. It’s the base of couchdbkit a Python CouchDB framework.

Interesting. Not much use to me currently, but definitely interesting.

OctoGit

A command-line interface for Github.

pandas

pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.

Dubstar: Stars

Just ‘cause.

Alain de Botton: Values Without Religion

The title’s a bit misleading. It’s worth watching whether you’re of a religious or non-religious persuasion.

Sentry

Sentry is a realtime event logging and aggregation platform. It specializes in monitoring errors and extracting all the information needed to do a proper post-mortem without any of the hassle of the standard user feedback loop.

There also raven, its Python client, and ports of raven for PHP and Ruby, though I have no idea how complete or up-to-date they are.

Salt

Salt is a distributed remote execution system used to execute commands and query data. It was developed in order to bring the best solutions found in the world of remote execution together and make them better, faster and more malleable. Salt accomplishes this via its ability to handle larger loads of information, and not just dozens, but hundreds or even thousands of individual servers, handle them quickly and through a simple and manageable interface.

The documentation is here.

Installing FreeBSD on Soekris net4801-48

My MiniITX box, etain, died today. I don’t think there’s much worth recovering from it (though I’ll keep it about just in case something occurs to me). Thus it looks like it’s time to replace it with something a bit more apt for what its duties were. I’m thinking a wee Soekris box and a NAS, but haven’t decided.

Using Redis Pub/Sub and IRC for Error Logging with Python

Interesting idea.

zmqc: netcat for ØMQ.

zmqc is a small but powerful command-line interface to ØMQ. It allows you to create a socket of a given type, bind or connect it to multiple addresses, set options on it, and receive or send messages over it using standard I/O, in the shell or in scripts. It’s useful for debugging and experimenting with most possible network topologies.

As an aside, text rendered using light fonts in grey is nigh-unreadable, especially against a white background. Don’t do that to your readers, it’s not nice.

tox

tox aims to automate state-of-the-art packaging, testing and deployment of Python software right from your console or CI server, invoking your tools of choice.

[It] is a generic virtualenv management and test command line tool you can use for:

  • checking your package installs correctly with different Python versions and interpreters
  • running your tests in each of the environments, configuring your test tool of choice
  • acting as a frontend to Continuous Integration servers, greatly reducing boilerplate and merging CI and shell-based testing.

git-sweep

git-sweep is a command-line tool that helps you clean up Git branches that have been merged into master.

You have to ask yourself: why doesn’t git support something like this in core already?

Gaia Machina

This kind of thing is proof positive that often knowing how something works doesn’t subtract from ones sense of wonder evoked by something, but can, in fact, add to it greatly. To a layperson, this demo’s pretty; to a software developer, it’s not just pretty, but mindblowing how the developers managed to fit all of that into a 64kB compressed executable. It’s an impressive piece of work.

How David Weber orders a pizza

A parody of the writing style of author David Weber. My favourite comment on the whole thing is this one:

Needs more husky contralto.

If you’ve read any of his books, you’ll know why. :-)

Mosh (mobile shell)

Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes.

Mosh is a replacement for SSH. It’s more robust and responsive, especially over Wi-Fi, cellular, and long-distance links.

It’s essentially SSH over UDP (the actual protocol’s name is SSP) with no need for a privileged daemon on the server. It looks very, very nice.

Getting Real About Distributed System Reliability

(To read)

The Little MongoDB Book (source)

Guilder: a limited-release condensed sans serif typeface family

The Remote Agent Experiment: Debugging Code from 60 Million Miles Away

Type Theory and Functional Programming by Simon Thompson

Yet another book currently out-of-print but freely available in electronic form. More writers (or, more to the point, publishers) should do this kind of thing. It makes things better.

Implementing functional languages: a tutorial

This book gives a practical approach to understanding implementations of non-strict functional languages using lazy graph reduction. The book is intended to be a source of practical labwork material, to help make functional-language implementations ‘come alive’, by helping the reader to develop, modify and experiment with some non-trivial compilers.

The unusual aspect of the book is that it is meant to be executed as well as read. Rather than merely presenting an abstract description of each implementation technique, we present the code for a complete working prototype of each major method, and then work through a series of improvements to it. All of the code is available in machine-readable form.

Build reliable, traceable, distributed systems with ZeroMQ

zerorpc

zerorpc is a flexible RPC implementation based on zeromq and messagepack. Service APIs exposed with zerorpc are called “zeroservices”.

zerorpc can be used programmatically or from the command-line. It comes with a convenient script, “zerorpc”, allowing to:

  • expose Python modules without modifying a single line of code,
  • call those modules remotely through the command line.

This is a really good idea! I can think of a good number of places I’d use this at work.

Stop Writing Classes

setuptools Tutorial

An excellent tutorial for setuptools that Dave stumbled across when I was figuring out how to package some stuff.

Mass Effect 3 - Shepard's Indoctrination

Don’t watch if you don’t want spoilers!

By itself, the Mass Effect 3 ending makes very, very little sense, but the Indoctrination theory is about the only reasonable explanation I’ve came across that ties everything together in a decent fashion.

The other, unreasonable, explanation is that the ME3 writers were idiots and pulled the ending out of their asses at the last minute, throwing away any trilogy arc material that may have existed.

Blasto 6: Partners in Crime (Mass Effect 3 Easter Egg)

This is hilarious if you’ve played the Mass Effect series!

Larry Wall on why Hobbits would make good programmers

From the doobly-doo:

The “Lord of the Rings” characters embody what Wall sees as the three virtues of good programmers: laziness, impatience, and hubris.

ShareMeNot:

Protecting against tracking from third-party social media buttons while still allowing you to use them.

Firefox plugin that allows you to block the likes of Facebook, &c. from tracking you on sites you visit.

Barbara Liskov 2010 Grace Hopper Celebration Keynote

Faster Javascript through Category Theory

Government plans to sell Cork to stabilise economy

:-)

Parsing multilingual email with Python

You think I’d remember this stuff by now. I needed to deal with a quoted-printable subject line in some new email processing code I’ve had to write and had forgotten the hoops needed deal with it.

Bret Victor - Inventing on Principle

SimpleID

Looks like a worthy replacement for phpMyID as my OpenID provider.

Niki & The Dove: The Fox

This is good!

Avería, the average font

"Stop SOPA Ireland" banner for non-WordPress users

If you’ve visted my site recently, you’ll have noticed the banner for Stop SOPA Ireland. There’s a banner you can use if your site runs on WordPress, but if, like me, you use something else, you’re out of luck.

<style type="text/css" media="screen">
#sopa_menubar {
    display: block;
    width: 100%;
    background: black;
    overflow: hidden;
    padding: 0.75ex 0;
}
#sopa_menubar ul, #sopa_menubar li {
    margin: 0;
    padding: 0;
    list-style: none;
}
#sopa_menubar a {
    color: silver;
    text-decoration: none;
    float: right;
    margin: 0 2ex;
    display: block;
    padding: 0.5ex 0;
}
#sopa_menubar li.sopa_title {
    float: left;
    margin: 0 2ex;
    padding: 0.5ex 0;
}
#sopa_menubar a.sopa_sign {
    background: #5F9B3F no-repeat;
    border-radius: 20px;
    color: white;
    padding: 0.5ex 3ex;
    box-shadow: inset 0 0 0 1px RGBA(0, 0, 0, 0.3),
                inset 0 0 0 2px RGBA(255, 255, 255, 0.2);
    background-image: -webkit-linear-gradient(top, #74b74a 0%, #5f9b3f 100%);
    background-image: linear-gradient(top, #74b74a 0%, #5f9b3f 100%);
}
#sopa_menubar a.sopa_sign strong {
    text-shadow: 1px 1px 1px RGBA(0, 0, 0, 0.5);
}
</style>
<div id="sopa_menubar">
<ul>
<li class="sopa_title"><strong>I SUPPORT STOP SOPA IRELAND!</strong></li>
<li><a class="sopa_sign" href="http://stopsopaireland.com/"><strong>Sign the petition</strong></a></li>
<li><a href="http://wordpress.org/extend/plugins/stop-sopa-ireland/">Download the menubar</a></li>
<li><a href="http://www.tjmcintyre.com/2012/01/irelands-sopa-faq.html">FAQ</a></li>
</ul>
</div>

Throw that in the top of your page under the <head> tag, and you should be good to go.

It’s not perfect, and your pre-existing CSS rules may interfere with it, but, with luck it should work just fine.

Brussels Hotels, Belgium | Venere.com

Keeping this here for future reference for the next time I go to FOSDEM. This time around, I’m staying at Scandic Grand Place, which was recommended to me by a trustworthy source, and I’m told it has decent Wi-Fi to boot!