The Eternal Optimism of the Spotless Repository

We’re programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand…It’s important to remember that when you start from scratch there is absolutely no reason to believe that you are going to do a better job than you did the first time.

Joel Spolsky in Things You Should Never Do, Part 1

There is a fleeting moment in every software project when it is absolutely perfect. It is the time between clicking “New” and “Save” in your code editor. In that brief interval, limitless potential and beauty. In every moment that follows, compromise and doubt (but working software, too!). Thus rule #24:

The original sin of code is writing it.

Me

No wonder the siren song of rewriting from scratch is so hard to resist. It’s a chance at redemption. But what about an entire programming language? The creator of JSON thinks it’s a dandy idea:

The best thing we can do today to JavaScript is to retire it. Twenty years ago, I was one of the few advocates for JavaScript. Its cobbling together of nested functions and dynamic objects was brilliant. I spent a decade trying to correct its flaws…But since then, there has been strong interest in further bloating the language instead of making it better. So JavaScript, like the other dinosaur languages, has become a barrier to progress. We should be focused on the next language…

Douglas Crockford

Replace JavaScript with the name of whatever you’re working on, and this conversation happens everywhere software is being made all the time. The causal disdain for “dinosaur languages” is a nice touch. Joel has something to say about that too:

Before Borland’s new spreadsheet for Windows shipped, Philippe Kahn, the colorful founder of Borland, was quoted a lot in the press bragging about how Quattro Pro would be much better than Microsoft Excel, because it was written from scratch. All new source code! As if source code rusted.

We all know how that worked out for Borland.

Of course, JavaScript is terrible. Is it scalable? No. Is it maintainable? No. Is it portable? Not really. But to paraphrase Winston Churchill, JavaScript is the worst web programming language, except for all the others that have been tried. As bad as it is, it’s pitfalls and shortcomings are thoroughly documented and understood. It is ubiquitous. As a working software developer, you’re almost certainly better off spending your time getting better at the language you’re using than jumping to a trendy new one. With JavaScript you may not enjoy the journey, but you will reach your destination. If you have the time and money to chase utopia, by all means please create the perfect language. If you have to ship a product to put food on your table, choose the devil you know over the one you don’t every time. And thus rule #17:

Legacy == proven

Also me

Recommended Reading

Early in my career, I read everything I could find trying to become a better programmer. Over time I realized the most helpful material didn’t deal with a specific language or trendy workflow, but instead dealt with the psychology and philosophy of software development. Eventually I collected the ones that made the biggest impact on me and offered them to new team members as recommended reading. They reflect my problem solving and management philosophy pretty well.

The Old Testament – Joel Spolsky

The New Testament – Jeff Atwood

Apocrypha – Ted Dziuba, Nikhil Suresh

UI Wins #0 – Retool FTW

Noticed this gem trying out the Retool quickstart demo. Retool looks like a web version of MS Access, which I think is long overdue because not everyone wants or needs mocks and models and interfaces and tests and controllers and an api and dependency injection and my eyes glazeth over just to add a record to a fucking table that no outside user is ever going to see. Rock on Retool.

How not to SQL #2

Previously, we established SQL is not a modular language. Brent Ozar would like to point out it’s not a programming or scripting language either.

In a programming language like C# or Java, you tell the computer what to do, in order… SQL, on the other hand, is a declarative language where you declare the shape of your result set… You’re declaring the output that you want, not the methods the database server uses to build it. Oh sure, you CAN use SQL to declare the shape of your query plan, but generally that leads to heartbreak and despair…”

Click through to read all the reasons why, and when you should and should not force things.

Rule 9 – Even in space, temporary==forever

An entertaining conversation with a colleague gave me reason to revisit the source code for the Apollo 11 flight computer…the one that landed the first humans on the moon. The comments are all too relatable.

Image stolen from MIT/NASA

An ABC News article runs through the best Easter eggs and comments. The full source code is available on GitHub, natch. If there is a lesson to be learned for modern software developers, maybe it’s this: you may not think much of your “temporary” solution, but often the first thing that works is good enough. This was good enough to put 12 people on the moon and bring them home. What’s the most enduring thing your temporary fix accomplished?

You might be in management now if…

…you know the Jira schema better than the project your team is building. And that’s ok. Karl Hughes explains why, and why the transition from contributor to manager is so hard for developers in What you give up when moving into engineering management.

As a leader, you’re no longer expected to write the most code, solve the hardest technical problems, or fix the trickiest bugs. Instead, you’re responsible for ensuring that your team can do these things. It’s hard for great engineers to move into management because they like being deeply focused on challenging technical problems, not hopping in and out of a dozen meetings every day.

Your job is to develop the developers.