» Currently browsing: Coding principles
Speaking at NDC 2010
Number of Comments » 1I’m very proud to announce that I will be speaking at the Norwegian Developers Conference 2010 (track 6, day 3, 16:20).
My talk is named “A Style of programming”:
“This talk describes a set of coding principles that constitutes a style of programming that focuses on ease of coding, ease of changing the code, and ease [...]
Tell, don’t ask
Number of Comments » 0Tell, don’t ask is a way of thinking when you’re programming software, a mindset. It is something that should be in the back of your head every time you write a line of code, or a chunk of code that describes some functionality. It is not something you merely apply when trying to solve a [...]
Understand, don’t just follow
Number of Comments » 1It still surprises me, and scares me, how many people in our industry that just follow ideas and practices just because “someone” says it is the way to go, and how those same people do not understand why they are actually doing it.
Let me give you an example.
When Kent Beck and his extreme programmers started [...]
The importance of code that communicates
Number of Comments » 1One of the major reasons that our industry produces software that is full of bugs, with a massive cost of change and with a short life expectancy is that developers do not understand the importance of writing code that communicates. Yes, one of the most important aspects of software development is to write code that [...]
Refactoring
Number of Comments » 0To make it clear: “Refactoring” (as the term made famous by Martin Fowler in his great book with the same name), means to change the code without changing its behavior. Too many people talk about refactoring when changing some of the behavior of a system. This interpretation is just plain wrong.
This distinction is not just [...]
Looping collections in C#
Number of Comments » 3In this post I want to demonstrate that with a few nice language features in C# we can do more with less when working with collections, meaning expressing more with less code.
There are a couple of points I want to make here. First I care about writing code that can be easily understood after it [...]
The Declarative Mindset
Number of Comments » 2I’ve been playing around with web-programming lately, and it’s interesting to see how a little declarative thinking can help improve your code.
The declarative mindset
First, let me specify my viewpoint: My interest in declarative programming is not primarily from a programming language point of view (at least not in this context). I care about it [...]
Reusability is not an issue
Number of Comments » 1Reuse is one of the often mentioned features, or advantages, of object oriented programming (OOP). Although I am a diehard fan of OOP, I must admit: We failed with reusability. It doesn’t work the way we were promised. Implementing reusability the way people traditionally tend to think of reuse, is very hard and time [...]
Trustworthy methods
Number of Comments » 0What constitutes a great method? It’s a method you can trust, a method that you understand by looking at its name, and it doesn’t have nasty side effects. It’s about software quality, and about spending less time coding defensively. Our methods should be trustworthy so that writing code gives us “least surprise, least paranoia” (coined [...]
Keep it Simple, Stupid!
Number of Comments » 2Did you hear the story where NASA spent millions of dollars inventing a pen that would work in space, while the Russians simply used the pencil? (if not, read it here: The billion-dollar space pen myth). Allthough Nasa made a technologicaly extremely advanced pen (probably with all the hottest new technologies), and the russians didn’t really make a [...]

