The Daily Parker

Politics, Weather, Photography, and the Dog

Sad week in politics

Four stories from past week (two of them today) sadden all of us who love American democracy.

First, and most importantly, the President revealed today that he authorized secret surveillance of Americans because of—wait for it—9/11:

"This authorization is a vital tool in our war against the terrorists. It is critical to saving American lives. The American people expect me to do everything in my power, under our laws and Constitution, to protect them and their civil liberties and that is exactly what I will continue to do as long as I am president of the United States," Bush said.

So, he authorized violating our laws and Constitution, compromising our civil liberties, "under our laws and Constitution, to protect [our] civil liberties" then? Is he channeling Nixon? If so, maybe he'll end his presidency the same way. One can hope, anyway.John Spencer, 1946-2005

Notice, by the way, that he dropped this bombshell on Saturday morning, when people are listening to Wait Wait! Don't tell me instead of reading actual newspapers. This tactic is described in The West Wing episode "Take Out the Trash Day," which has special poingiancy this morning.

Second and third, former Wisconsin Senator William Proxmire died Thursday at the age of 90, and former Minnesota Senator Eugene McCarthy died last Saturday at age 89.

And finally, Emmy-winning West Wing star John Spencer also died, at 58. (Photo: NBC)

A brief history of the Inner Drive webcam

For a couple of years, Inner Drive has had a webcam pointing out the window. We've moved twice since the webcam first went online. From time to time, we've adjusted the webcam slightly. And, every so often, the webcam adjusts itself.

For example, the first cam image is from when we left the office last night, and the second from when I woke up this morning:
Webcam image showing actual stuff Webcam image is completely black except for the time stamp
(The images are displayed at half-size, but you can view them at full-size by saving them from your browser. You'll notice that they have timestamps, which are in Universal time.)

The poor webcam was lying on the floor of the office covered by the box upon which it had previously sat. See how it sits precariously in this photo? Imagine it now in a heap under the chair by the window.
Photo of the Inner Drive office

So, since we had to move it anyway, we decided to rotate it south 90 degrees, to this angle:
New webcam image pointing southeast

For those interested in history, here is what the image looked like yesterday during the day, and at 6, 12, and 18 months ago, respectively:
Webcam image from December 2005 Webcam image from June 2005
Webcam image from December 2004 Webcam image from June 2004

And finally, here is what the Inner Drive Technology World Headquarters looked like in October 2004 and October 2003:
Inner Drive office October 2004 Inner Drive office October 2003
(Yes, the image on the right is of my living room.)

Note: I didn't realize when I started this post that today is the second anniversary of the Webcam. As a special bonus, here is the very first Inner Drive Cam picture ever, from 17 December 2003 at 1:28 pm CST (19:28 UTC):
Webcam image from December 2005

I mean, who <i>didn't</i> know that?

The San Francisco Chronicle today ran a long-overdue correction:

A story Nov. 15 about mathematical references on "The Simpsons" TV show mistakenly said that 1,782 to the 12th power plus 1,841 to the 12th power equals 1,922 to the 12th power. Actually, 1,782 to the 12th power plus 1,841 to the 12th power equals 2,541,210,258,614,589,176,288,669,958,142,428,526,657, while 1,922 to the 12th power equals 2,541,210,259,314,801,410,819,278,649,643,651,567,616.

(Linked from today's Romanesko. In the "Anne" category because she actually does know this kind of thing.)

Code smells

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:

  1. It does the same thing four times.
  2. 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.
  3. 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.
  4. 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.

Sunsets are getting later

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.