Over time, I’ve adopted several coding patterns that have lead to cleaner, more testable, more expressive code. Now, I am sharing these patterns with you.
I wrote about the first pattern — “RORO” — in the article below. Don’t worry if you haven’t read it, you can read these in any order.
Today, I’d like to introduce you…
Long ago a wise old developer gave me a piece of advice that I didn’t fully appreciate until very recently.
We were in a code review looking at some feature that required the program to output a list of letters from A-Z (think of a list of contacts with a set of buttons that allow you to skip down to names starting with a certain letter — that kind of thing).
So, along came some young hot-shot. (OK — it was me.) I decided that rather than just hard-coding an array of all the letters, it would be easier to…
I do hereby pledge to only produce trustworthy software that respects its users.
Such software will:
Stop me if you’ve heard this one before…
“Good code is self-documenting.”
In 20+ years of writing code for a living, this is the one phrase I’ve heard the most.
And like many clichés, it has a kernel of truth to it. But this truth has been so abused that most people who utter the phrase have no idea what it really means.
Is it true? Yes.
Does it mean you should never comment your code? No.
In this article we’ll look at the good, the bad, and the ugly when it comes to commenting your code.
Tabs or spaces? Curly brace on the same line or a new line? 80 character width or 120?
Coders love to argue about this kind of stuff. The tabs vs. spaces debate even made it into a famous episode of the HBO show Silicon Valley.
Well in this article, I will finally give you the definitive answers you seek.
Early in my career, I engaged in all kinds of holy wars. I would read some article about why a particular convention was correct, while another was totally wrong. …
Have you ever shipped a system completely free of technical debt? An application where no corners were cut and no compromises were made in service of deadline or budget? Small personal projects aside, over a 20+ year career, I have never seen such an application in a professional setting.
Author’s Note: This post is an excerpt from my weekly Dev Mastery newsletter. It was originally sent to Dev Mastery subscribers on December 8, 2016.
Check out this article from Tech Crunch about strategically planning your technical debt so that it can be managed and leveraged for maximum benefit.
I’ve shared some pretty awesome links and resources through the Dev Mastery newsletter this year. Here are my top 5 favourites.
Here is a video where the inimitable “Pragmatic Dave” Thomas shouts at you for almost an hour with really amazing advice that will help you improve your code. If you’re impatient, just skip to 4:52
Martin Klepmann makes the following provocative statement and provides a fascinating alternative model for Databases whose time I think has come.
“Databases are global, shared, mutable state. That’s the way it has been since the…
Have you heard of serverless architecture? Have you experimented with it? I have and I’m a big fan.
Serverless architecture lets you concentrate on code and not have to worry about anything else. Your logic just runs in this ephemeral, stateless container that comes and goes on demand. All the big cloud companies now support this; Amazon has AWS Lambda, Azure has Azure Functions, and Google has Google Cloud Functions.
Author’s Note: This post is an excerpt from my weekly Dev Mastery newsletter. It was originally sent to Dev Mastery subscribers on December 1, 2016.
One of the most thorough…
I have to make an embarrassing confession…
Many years ago (around 2002) I built a website in PHP. It was for a — now defunct — theatre company and included some basic functionality like a calendar and some lightweight content management features in a custom admin module I built. It was a small side project that I took on, in part, to learn PHP.
I came away from that experience thinking PHP was a steaming pile of garbage and I would tell anyone that would listen to me how terrible I thought PHP was. Here’s the embarrassing part; despite trashing…