It's Black Friday! Get your 6 FREE MONTHS of Inoreader Pro when you upgrade for a year

Get offer

The Clean Code Blog - RSS Feed

Latest articles

Space War

For the last month I've been spending a lot of time working on Space War. I know, I know, I should have been working on Clean Code Episode 67: Legacy Code, and Euler 5, and Countest and Curmugeon 3. I should have been working on a blog, or a new book, or... But I couldn't let go of Space War. It kept calling me. The first time I wrote Space War...

Functional Duplications

I broke out my old Space War game a few days ago and decided to make a few changes to speed the game up and make it more fun to play. In so doing I discovered a very interesting bug. One of the changes I made was to populate the initial space with a few random bases scattered here and there. This would allow the player some extra resources with...

Roots

When I was 15 or so, my father would drive me, and my best friend, Tim Conrad, to the Digital Equipment Corporation (DEC) sales office each Saturday. This was a 30 min drive. My father would drop us off in the morning and pick us up in the late afternoon. He spend two hours in his car each Saturday hauling us around. Thanks Dad! Tim and...

More On Types

Recently I wrote a cute little program for doing Turtle Graphics. For those of you who don't know, turtle graphics were originally added to the LOGO language by Seymour Papert in the late 1960s. He built a robot that he called a "turtle" that could hold a pen. The robot had wheels and could move forwards and backwards, and could rotate left and right....

On Types

I wrote my first program in 1964. The name of the program was: Mr Patternson's Computerized Gate, and it was implemented on a little plastic computer named DIGICOMP-I, which was a cute little three bit finite state machine with 6 AND gates. The first electronic computer I ever wrote a program for was an ECP-18 in 1966. This was a 15 bit wide machine...

if-else-switch

A few days ago someone tweeted a question asking which of the following PHP snippets was better than the others, or whether there might be an even better approach. I tweeted my answer in the following cryptic paragraph. Place the if/else cases in a factory object that creates a polymorphic object for each variant. Create the factory...

Pairing Guidelines

Everybody pairs from time to time. It is a rare programmer who has not sat down with another programmer to look something over or help find a bug. Deep problems, that require much heavy thinking, do not often lend themselves to pairing. The interaction between the programmers tends to disrupt the necessary concentration. On the other hand, it...

Solid Relevance

Recently I received a letter from someone with a concern. It went like this: For years the knowledge of the SOLID principle has been a standard part of our recruiting procedure. Candidates were expected to have a good working knowledge of these principles. Lately, however, one of our managers, who doesn’t code much anymore, has questioned...

Loopy

The following is a segment of a journey. It has no obvious beginning point, nor does it actually end up anywhere. The value, if any, is in the journey itself. The code below is the standard solution to the Prime Factors Kata. public List<Integer> factorsOf(int n) { ArrayList<Integer> factors = new ArrayList<>(); ...

Conference Conduct

It was just a few years ago, at the height of the Me Too revelations, that codes of conduct began to prominently appear in Software Conferences. At the time I felt this was appropriate given the horror stories that had been circulating about sexual harassment and misbehavior at some of those conferences. I wrote a blog about it at the time. Since...

Discover, share and read the best on the web

Follow RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters! Get unfiltered news feeds or filter them to your liking.

Get Inoreader
Inoreader - Follow RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters!