Blog
Things related to software development that I find interesting. I hope you will too. π
I try to write new stuff once a week. For particular topics, browse my blog posts by tag.
October 2024
Depth-first development π
Follow the original task for as long as it takes to complete it. Keep a list of everything else.
September 2024
Barricade + choke point π‘οΈ
Two design patterns that I’ve found helpful when designing systems to deal with untrusted data.
As little as possible πͺΆ
I believe smaller solutions lead to faster completion and higher quality.
August 2024
Algebraic data types π§©
·14 mins
Compose types and use them to represent complex data in a clean and type safe way.
Intrinsic motivation π₯
Is customer satisfaction or commercial success the ultimate measurement of the outcome of my work? Not for me.
My pre-commit routine β
Check code committed to version control for quality, and the code base will thank you.
Developers are emotional π
Are developers rational machines or just out of touch with our emotions?
July 2024
Same level of abstraction βοΈ
To make something easy to understand, its parts should be at the same level of abstraction.
Focused commits π
If you don’t know what message to write, it was too long since you last committed.
Just close all issues ποΈ
Has the backlog become longer than you can finish within a reasonable time frame?
Don't forget to play π
Developers sometimes underestimate the importance of doing things just for fun.
June 2024
Writing is thinking βοΈ
Don’t use AI to write text for you, or you’ll lose the opportunity to sharpen your thinking.
Abstractions as communication π£
Create abstractions to communicate intent to your fellow programmers.
Put uncertainty in a box π¦
I put stuff with too much uncertainty in a box and don’t think about it until I know more.
Local rules give global results β‘
It’s easy to think that large results require large changes. That is not necessarily true.
May 2024
There is no loop π₯
Learn to move from imperative
while
and for
loops to declarative collection functions like map
and filter
.
April 2024
Constructors and creation methods ποΈ
Use creation methods when a constructor fails to fully capture the programmer’s intent.
Twelve-year-old blog posts π°οΈ
I imported old posts from another blog of mine, surprised that they are still pretty good!
Why write unit tests? π§ͺ
·18 mins
A deep dive into unit testing looking to answer why, how much, and what.
Testable code is reusable code β»οΈ
Testability and reusability goes hand in hand. When you test a function, you run the code in another context than it was built for.
Remove temporal dependencies β°
How to avoid “temporal dependencies” where things must be done in a certain order.
AI is great for research π
Generative AI is bad at coming up with novel ideas, but really good remixing existing.
March 2024
Does this scale down? π
How come people never worry about whether technology scales down to a low number?
Kill two bugs with one type πͺ²
An example of how just a little typing can help avoid several real-world problems.
Functional foundations βοΈ
·23 mins
A selection of functional programming concepts that I feel are helpful to all developers.
February 2024
I can be wrong π€·
Even though you feel completely confident, there is always a slight chance you are wrong.
Will it be harder tomorrow? β³
A question which can help you both prioritize more effectively and design better systems.
Constraints are good π
While it may sound counter-intuitive, creativity often benefits from constraints.
January 2024
Risk-driven development π§¨
Identify the parts of your project with highest risk, and make sure to look at them early.
If you can't explain it, you don't understand it π‘
Teaching is a great way to determine if you truly understand a subject.
AI is the ultimate leaky abstraction πͺ£
What will you do when the AI abstraction inevitably leaks?
Time to prove it π
“If you are so smart, and know so much, show me what you have actually contributed!”
December 2023
Death by a thousand inconsistencies π
When you make an exception from a rule, you make the whole system harder to learn.
Use boring technology π₯±
In technology choices, sometimes “boring” can be better than “interesting”.
Generative AI as arbiter of "least astonishment" π€
Almost by definition, a suggestion by an LLM represents the least surprising solution.
September 2014
Convert guard clauses to value objects
How replacing validation functions with types can make your code safer and more expressive.
August 2012
See tests as living documentation
A few examples of how viewing tests as documentation can affect your test writing.
July 2012
Moving logic and data together [example]
An example of how moving logic and data together can result in a better design.
Donβt test private methods
The need to test a private method often indicates a new class waiting to get out.
June 2012
Find each bug once
For every bug you fix there should be an automated test which will fail if the bug reappears.
Extract the logic (whatβs left is glue)
To make code easier to understand and test, try to move complex logic away from code with many dependencies.
How unit testing changes your design
Most complexity should be in classes with few dependencies, and most dependencies should be in classes with little complexity.
How to unit test code calling a static method
Don’t try to test code which calls static methods, try to get rid of the static methods.