I've finally added an explanation of Evolutionary Delivery to my corporate site. I wrote this as part of a proposal to a client in September, and for reasons that passeth understanding, I neglected to publish it online.
By the way, I write software for a living, so if you're reading this and realize you need a small, agile development team for a .NET project, send
us a message.
A code smell happens when a piece of software code looks like there might
be something wrong with it, but you can't quite tell what. You use the smell to
figure out where the bad code is hiding. Martin
Fowler has devotes an entire chapter of
Refactoring to code smells.
Here is an example, from a class that returns configuration information:
public string Read() { ... }
public double ReadD() { ... }
public int ReadN() { ... }
public string ReadString() { ... }
What's wrong with this code? Several things:
- It does the same thing four times.
- Having two similar methods that appear to return exactly the same data raises a
red flag, because you don't know from looking at them why they differ but you feel
like they differ for a reason.
- Despite the code's appearance, it actually offers no guarantee that the data requested
will be of the correct type, only that the data will have a particular type.
- if some random piece of code requires a data type it doesn't support, you'll have
to add yet another method to the class, or change the returned data to suit what
you need, neither of which makes a lot of sense.
This code came from an ancient, functional-procedural outlook in which the type
of data returned actually matters. Object-oriented design cares more about what
the data represents. In other words, this code is like multiple different filler
tubes on your car, one for each grade of gasoline.
There's more. A little farther on, we find these methods:
public int ReadArray(string, ref String[]) { ... }
public int ReadArray(string, ref int[]) { ... }
public int ReadIntArray(string, ref ArrayList) { ... }
In all, there are 14 "Readtype" methods on this class, some that
return the data sought, others that return a status indication and pass the data
back through a by ref parameter.
And, of course, since this is in a fundamental class, none of these methods has
fewer than 5 references to it in the application, and some (like ReadN) have
34, making refactoring unusually difficult. I'll post again when I figure out how
I'm going to do that.
Addendum to my previous reading list.
I'm now reading Microsoft's Framework Design Guidelines, written by the guys who wrote the .NET Framework.
Add this to my list of recommended books.
The Poynter Institute today sent around a link to the best newspaper corrections of 2005.
Since they also linked to the 2005 plagiarism roundup, I thought it best to give Poynter proper attribution.
I've just finished Edward Tufte's essay, "The Cognitive Style of PowerPoint." It is now on the Inner Drive Technology required reading list:
Explanations of these choices to follow shortly.
In the Northern hemisphere, yesterday's was the earliest sunset of the year. Kieron Taylor, writing for the Sheffield Astronomical Society in the U.K., has a pretty good explanation of why this is so. Suffice to say, it's because the earth's orbit around the sun is elliptical.
Here, then, is a quick chart of the shortest days of the year, for Evanston, Illinois:
Date |
Significance |
Sunrise |
Sunset |
Daylight |
4 Dec |
Earliest sunsets start |
07:02 |
16:19 |
9:16 |
13 Dec |
Sunsets get later |
07:10 |
16:20 |
9:09 |
21 Dec |
Solstice, 18:35 UTC |
07:16 |
16:22 |
9:06 |
30 Dec |
Latest sunrises start |
07:19 |
16:28 |
9:09 |
8 Jan |
Sunrises get earlier |
07:18 |
16:37 |
9:18 |
28 Jan |
5pm sunset |
07:07 |
17:00 |
9:53 |
4 Feb |
7am sunrise |
07:00 |
17:09 |
10:09 |
You can get sunrise information for your location at wx-now.com.
I have never, as far as I can remember, in all my years, seen a traffic report like this. I can't imagine it's accurate, showing as it does five hours from Northbrook to the Loop (a distance of 40 km, 25 mi.):
As I mentioned earlier this week, my friend Danielle is returning today from Peace Corps duty in the Republic of Kiribati. For her entire tour she has lived in a place that almost never gets below 30°C (86°F). At this writing she's waiting at LAX for her flight home.
Here is what home looks like as of 15 minutes ago:
The airline claims her flight is on-time. I guess I'll find out later tonight...
Update, 3:56pm CST/21:56 UTC: The airline now reports a two-hour delay, so technically Danielle won't be getting home today.
Late update: The airline cancelled her flight after all. Still waiting...
Yesterday at the gym's coat check, I got claim check 404.
The coat-check guy didn't find this nearly as funny as I did.
Even more funny—to a software nerd, anyway—was that when I gave him check #404 after working out, he found my coat.
One can imagine other possibilities. But 404 is the best, I think.