The Daily Parker

Politics, Weather, Photography, and the Dog

Because they're the phone company

We were dark for over 6 hours today because someone at SBC did something, though no one seems to know who or what. The result was that the Inner Drive Technology World Headquarters had no phone or Internet service from 9:15 am CT/15:15 UTC until 3:30 pm CT/21:30 UTC.

Sadly, this came on the first day of our Weather Now beta launch, which shows off some of our coolest stuff ever. (At this writing it's still a few hours behind, with weather from lunchtime today, but it's catching up as fast as it can.)

One of my friends asked, "How can they do that?" Well, like I said...they're the phone company.

Use property accessor methods, even inside your classes

Genius Boy here just spent ten minutes debugging a class because I used the private field directly inside the class, instead of the property accessor method.

Here's what the property looked like:

public string FileSpec
{
	get { return _fileSpec; }
}
private string _fileSpec;

Notice there's no set method. The file spec is set only in the constructor, and is immutable at runtime. That means that throughout the class I had code like this:

if (File.Exists(_fileSpec))
{
	_cache.Load(_fileSpec);
}

The problem? Well, the private data could contain any number of tokens representing disk or remote folders, which wasn't a requirement when the class was first built.

The solution? C# 2.0 gives you the power to create an accessors of different visibilities, like this:

public string FileSpec
{
	get { return _fileSpec; }
	private set
	{
		_fileSpec = DeTokenize(value);
	}
}

The constructor now looks like this:

public MyClass(string fileSpec)
{
	FileSpec = fileSpec;
}

And then the code that uses the value can do this:

if (File.Exists(FileSpec))
{
	_cache.Load(FileSpec);
}

All better.

Two slightly related items before going back to work

First, New York Times columnist Bob Herbert has a great column today (sub.req.):

[The President's] breathtaking arrogance is exceeded only by his incompetence. And that's the real problem. That's where you'll find the mind-boggling destructiveness of this regime, in its incompetence. ... [T]he plain truth is that he is the worst president in memory, and one of the worst of all time.

Second, I've been ambivalent about the Times charging $49.95 per year to read most of its content, but I think more and more that it's fair. I don't know, though. I pay it, because I read Krugman and Dowd every week, and I like occasionally reading the Magazine. What are other people's thoughts on this?

Why regulation was a good idea

Another thing government does better than business: make businesses play nicely with each other.

Cable companies and telephone companies are fed up with the free Internet because they have to carry it on their backbones for free. So they're looking for ways to charge for use, including creating premium access for a fee.

One of the easily foreseen ways this "premium access" could manifest, as the Washington Post reports, looks like this:

[Y]ou may one day discover that Yahoo suddenly responds much faster to your inquiries, overriding your affinity for Google. Or that Amazon's Web site seems sluggish compared with eBay's.
...For the first time, the companies that own the equipment that delivers the Internet to your office, cubicle, den and dorm room could, for a price, give one company priority on their networks over another.

Perhaps it's time to re-regulate telecommunications? Or maybe I'm wrong, and we should de-regulate further. How about letting the Post Office charge more to deliver mail from certain buildings? Or how about letting electric utilities charge differential rates by political affiliation?

More on Google

Adam Sharp, of Maryland-based Sharp SEO, actually read through the Justice Deptartment's Google subpoena. He posted a blog entry excerpting and linking to the actual Google subpoena which is, in turn, hosted on Ziff-Davis' website:

In Google’s understanding, Defendant would use the one million URLs requested from Google to create a sample world-wide web against which to test various filtering programs for their effectiveness. Google objects to Defendant’s view of Google’s highly proprietary search database—the primary reason for the company’s success—as a free resource that Defendant can access and use, some levels removed, to formulate its own defense.

Now here's my take on Internet privacy.

Astute readers may notice that Sharp's blog has no link to biographical information, nor does his "under construction" corporate site. Really astute readers will notice that he has a link to my blog entry on this topic and figure out how I knew about his blog.

When Sharp linked his blog to mine, our blog engines shook hands, and my blog engine made a log entry commemorating the event. I saw the log entry and clicked on the referring link to find out who was linking to me. I expect he's going to do exactly the same thing in reverse shortly after I hit the "Post to Weblog" button.

Since I wanted to link back to his blog, I wanted to give him proper attribution. I haven't written for a newspaper since college, but I like to think I still retain some journalistic sense about sourcing my material. So I first looked on his blog for an "About" page or some other identifying material. Finding none, I browsed to his corporate website and found the "under construction" page. No info there.

Next, I ran a WHOIS query on his domain name, and got exactly what I wanted: his name and state of residence, which is sufficient for proper attribution.

(I also found out, in preparing this post, that my own registration is quite out-of-date. My apologies to any stalkers who have wasted time lurking in the wrong place.)

My point is this: Privacy on the Web is difficult to maintain. You have to take active steps to limit what people can find out about you, especially where public databases like the Internet registry are concerned. And, every Website you visit logs your IP address, browser, referring page (where you were when you clicked on the Website's own link), and click-stream (how much time you spent viewing each page, and in what order you viewed them).

That said, if someone wants to find you, they will. The Internet doesn't really make that any easier than it was 30 years ago when most people could be found by calling 411. Oh wait: most people can still be found through 411. Never mind then.

We as a people have always given up certain kinds of privacy as a cost of having an open society. Ours was the first country where land records were made public, the better to have good title to property, which helps everyone. Corporate documents, including personal information about coporate ownership, is public information: it encourages corporate responsibility, among other things.

The Internet is the same. You get all this information at your fingertips, but in order to give it to you, the provider needs to know where to send it (your IP address) and how (your browser type). If you want to have your own piece of the Internet, you need to tell some registrar somewhere who you are—at the very least so you can pay the registrar.

This is a complicated topic on which I will write more after I shovel the walk.

Tribune news roundup

The Chicago Tribune had several stories of interest this morning.

Meterologist Tom Skilling noticed more daylight, possibly because he reads my blog. Unfortunately, he got the number of minutes more daylight a little wrong, because he only looked at half the equation, and even still didn't subtract correctly. First, the difference between 4:23 and 4:50 is 27 minutes, not 28; second, sunrises got later before getting earlier, so we actually have 9 hours 35 minutes of daylight now, which is 26 minutes longer than December 21st's 9 hours 9 minutes.

Technology writer Steve Johnson has a primer on starting a blog, which wasn't any more or less than expected except it had a notice about the Chicago Blogger Meetup on February 21st. (Of course, http://www.chicagobloggers.com/ has nothing about the meetup, and Meetup.com mentions it for February 15th. I've emailed the author about the discrepancy.)

Finally a news item about a high-schooler expelled for a doodle, showing that McHenry County schools exemplify the Peter Principle in action:

The drawing is of a cross, with a spider web on one side and a crown at the top. In the middle of the cross are the initials "D.L.K." The teen, whose full name is Derek Leon Kelly, said the initials are his. School officials have alleged that they could stand for "Disciples Latin King," his mother said. The Latin Kings and Latin Disciples are rival gangs.

Forgetting Occam's Razor for a moment, I must ask, what's going on here? Even if he was drawing gang symbols, that's not the same as being in a gang--which is actually irrelevant, because freedom to assemble is in the same amendment as freedom of speech. Sure, expel him if he brings a weapon to school, or gets into an actual gang fight. But for drawing? That's just stupid.

Update, 11:26 CST/17:26 UTC: Steve Johnson replied as follows:

Suspect what you saw may have been an earlier, tentative date (or maybe a different meeting, but I don't think so).
Hey, if you blog about my piece (and I hope you'll take into account the severe restrictions of a 100-line limit), maybe I'll blog about the blogging. And so on, until the whole Internet crashes under the strain of extreme self-reference.

So, to clarify, any implicit criticism of his column I may have had should be directed rather at Tribune Co. for imposing an unrealistic size restriction on it, rather than at the writer, who did a good job with the space he had.

Let's hope the Internet can keep up with us...

Second thoughts about framework classes

The Inner Drive Extensible Architecture™ contains a very useful namespace called Quantitative that contains classes and interfaces to use in measuring things. Essentially, there is a trio of interfaces, IQuantity, IUnit, and IPhenomenon, that allow you to create and convert any kind of measurements. The principal implementation of IQuantity is the Numeric structure.

To convert feet to meters, you do this:

IQuantity feet = new Numeric(100, new Foot());
IQuantity meters = quantity.ConvertTo(new Meter());

Even though that looks simple, it has always troubled me. I've realized in the last couple of days that I got the abstractions wrong.

In any object model, you want to work with the most convenient abstractions. It helps if the resulting code looks like English (or whatever your native language is). Quantity, Unit, and Phenomenon are, indeed, abstractions, but they're not the right ones. Here's how I know.

First, the following compiles fine, but throws an InvalidOperationException when executed:

Numeric feet = new Numeric(100, new Foot());
Numeric fahrenheit = new Numeric(100, new Fahrenheit());
Numeric hotFeet = feet + fahrenheit;

Numeric is too abstract, you see.

Also, getting feet to display as, say, kilometers becomes very annoying:

Numeric feet = new Numeric(10000, new Foot());
Numeric meters = (Numeric)feet.ConvertTo(new Meter());
Console.WriteLine(meters.ToString());
// "3048 m" displayed

// Numeric.Unit exposes a Unit which may or may not be metric
IExponential exponent = (IExponential)meters.Unit;
exponent.Exponent = MetricExponent.Kilo;

Console.WriteLine(meters.ToString());
// "3.048 km" displayed

The Numeric structure doesn't care about the metric exponent of its Unit member. Why should it? It contains a value and a unit, and if you add two Numeric objects that use the same Unit, you get exactly what you'd expect.

But why should the Unit care what its exponent is? Now, when converting to or from other Units, it has to take that extra piece of information into account, or the conversions will be off by orders of magnitude.

There are many other problems and annoyances with the Quantitative namespace, which took me months to tease out. But this morning, on the El, I cracked the code (as my dad would say).

Tell me, doesn't this make a lot more sense?

Length meters = new Length(3000, new Meter());
// Alternate syntax using the implicit operator:
// Length meters = 30;
Console.WriteLine(feet.ToString());
// "3000 m" displayed

Length feet = meters.ConvertTo(new Foot());
Console.WriteLine(feet.ToString());
// "9842.52 ft." displayed

Console.WriteLine(feet.ToString(MetricExponent.Kilo));
// "9842.52 ft." displayed; no exception; simply ignored the exponent
Console.WriteLine(meters.ToString(MetricExponent.Kilo));
// "3 km" displayed

And, of course, our earlier example wouldn't even compile:

Length meters = 30;
Temperature fahrenheit = meters.ConvertTo(new Fahrenheit());
// Won't compile

I'll be refactoring this soon. Everything else I'm building depends on it. Watch this blog for a link to the new demo.

Cross your fingers: the new Webcam works

A while ago we at Inner Drive attempted to install a new Webcam which, in short order, stopped working. Logitech promptly sent a replacement, which so far works fine.

So the Inner Drive Webcam is now much sharper, and less prone to falling, than it used to be:

The only disadvantage is that it doesn't work in Terminal Server mode, so if the server kicks over unexpectedly, the Webcam will be static until we can get to a terminal and fix it. (We'll experiment with that later on.)

Also: The camera, a Logitech QuickCam Orbit MP, is adjustible--so it will change angles every so often.

We are very happy.

Write to sell

Hired Wrist, one of my clients, has a new Craigslist post:

Write to Sell
"Writing is easy; all you do is sit staring at a blank sheet of paper until the drops of blood form on your forehead."—Gene Fowler
Take it from someone who knows. I've been bleeding professionally for years.
If you are writing (or even thinking of writing) a screenplay, teleplay or novel, I can now offer you professional strength one-on-one consultation, analysis, guidance and instruction designed to dramatically and significantly improve the quality of your work. With over thirty years of remarkably successful professional writing experience, I will personally guide you through the complicated and often unforgiving landscape of the writer's world. If you want to write to sell, if you want to write better or even if you’ve never written before and have a burning desire to do so, let me help you get started. Together we can stop the bleeding.
Check out my qualifications, credits, achievements, awards and fees at http://www.hiredwrist.com

Share and enjoy.