Even if I know that I will end up building something extremely complex, I never start there.When we get a complex problem to solve, we are taught to decompose that into pieces. But often that is not enough to get something sophisticated to work corre...
“One of these things is not like the others” -- Sesame StreetSymmetry is an often ignored property of code that is incredibly helpful when editing or debugging. It is part of readability, along with naming and structuring.If you do a quick visual...
In software development, we create a lot of variables and data structures for our code that we toss around all over the place.Into these we put data, lots of it.Some of that data originates from far away. It is not our data. Some of that data is a re...
“Premature optimization is the root of all evil” -- Donald KnuthCode generally implements a series of steps for the computer to follow. I am using a slightly broader definition than just an ‘algorithm’ or ‘heuristic’, which are usually de...
One of the keys to getting good quality out of software development is to control the scope of each line of code carefully.This connection isn’t particularly intuitive, but it is strong and useful.We can loosely define the scope of any piece of cod...
The idea is to express the instructions to the computer that you’ve crafted in a succinct but entirely verifiable way.If the expression is huge, the size itself will cripple your ability to verify that the instructions are correct.If the expression...
I’ve seen many, many variations of programmers reacting to what they believe is over-complexity.A common one is if they are working on a massive system, with a tonne of rules and administration. They feel like a little cog. They can’t do what the...