There’s too much code. I say this not because I’ve got too much on my hard drive, which I do — stuff I’ve written, the software I use — or too much code on clients’ servers, which there probably is. Rather, I say this because we face a serious global problem with how the internet works: It’s too easy to “write code” nowadays.
I’m going to focus a series of missives on this topic, because I think many (especially young) coders, and certainly most non-coders, don’t think much about it. It will be a way for me to procrastinate, goad people, provide general advice, and maybe mitigating our looming code bubble. Please feel free to share your thoughts or experiences on LinkedIn, or by emailing me (hand.eye.design@gmail.com).
Perhaps the original enabler of the great code bloat is the very neutral technology of copying and pasting. No one can deny that the “clipboard” of the computer is a genius thing, but conveniences always seem to have weird side-effects. Along with the mouse, “cutting and pasting” (named after the layout process of old newspapers) was one of the coolest innovations created at Xerox in the 1970s (by Larry Tesler) and got incorporated into the first Macintosh in 1984. But little did Mr. Tesler know that his “clipboard” would become a dump truck. The RAM of the first Mac was 128k, which was a lot then. Today you can copy the equivalent of 128 Macs in a keystroke — and paste, paste, paste.
Adding five thousand lines of PHP to a project is shockingly and delightedly easy. Someone else’s effort can be your non-effort. Today you can find just about any component, or an entire framework, with a quick GitHub search, all the way into the realms of artificial intelligence. You hardly need to write any code at all — or even know how to write a function from scratch. Your “paste” will get the job done, like magic, but it won’t necessarily have been written well, or be bug-free. Importantly, you won’t have had to look at it closely. But the downstream consequences of this enormous convenience are massive — respecting sheer code volume, efficiency, maintainability, security, speed, and more. You simply don’t get something for nothing.
Somehow, we have to start resisting this tendency. Coding needs to involve a practice of restraint, of saying no. I’m not suggesting you never copy and paste someone else’s cool function. But perhaps there are ways we can slowly shift. While we benefit — hugely — from software, its hidden nature becomes a magnet for human weaknesses and misconceptions — and chaos that grows like credit card debt. The structures of code undergird our economy and infrastructure. It’s “everything” in a way. How will it the code of critical applications be maintained in 20 years, when versions of JavaScript or Python are far different? Who will understand it? I think many developers will say, off the record, that some kind of “code-apocalypse” is bound to happen.
This is just a quick introduction to what I’ll focus on here — with the hope that you’ll consider the very distinct possibility that with code, often less is more. Some topics I’ll be discussing:
- wtf: code that modifies / writes itself ?
- sausage factory: behind the scences of a page load
- the increasing obsolescence of “writing” code
- code is a like biological life, but has the problem of not rotting