Category Technology

Apologize for technical difficulties

If you’ve had problems getting to this site in the past couple of days, it is because I recently switched providers for domain name services (DNS). My previous provider had been purchased by another company, and I was no longer happy, and so I’ve switched to Network Solutions. They do a terrific job, but of course when you switch your provider, there’s a bit of inevitable chaos as the records settle down and stabilize. I also forgot a couple of aliases (e.g., blog.mmadsen.org instead of just plain www). But things ought to be stabilizing now. If you continue to see plain text without any images, you’re (a) likely viewing this site from a Windows box which hasn’t been rebooted lately (since Windows holds onto DNS records well beyond their timeout values, it seems), or (b) you need to flush your browser’s cache.

If difficulties persist, please leave me a comment or email.

Happy Programmer’s Day

Just yesterday my friend Andy, who apparently reads this site, was complaining that I hadn’t written anything since late August. So here’s a post – though not as meaty or substantive as normal. Today is “Programmer’s Day,” traditionally celebrated on the 256th day of each year (programming….binary code….2 to the 8th power….yeah, it’s a nerd thing).

Actually, no programmers I know (including myself) actually celebrate Programmer’s Day, but it seems like one of those silly nerd memes to get in while real estate on the ground floor is still cheap. So a shout out to TimH, Bryan, Alx, another TimH, Alex, Carl, the OpsMgr gang at MS, Laird, Glomph, and the Ashworth crowd.

My favorite five programmer excuses. ‘Cause we’ve all said one of these at some point….

  1. That’s weird, It’s never done that before
  2. It worked yesterday.
  3. It works on my machine.
  4. I only changed a comment.
  5. It’s 90% done.

Regularly scheduled programming will resume shortly. I promise.

Reflections on complexity on the occasion of diagnosing computer problems

At least twice in the last two days, I’ve had friends or neighbors pose computer problems to me. At least one was my own fault, having given a friend a (fully licensed, purchased from the MS Store) copy of Windows XP to “fix” their laptop via reinstallation. The other is a gentleman here on the island, from whom I’m in the process of buying a small boat to putt around between the islands. In the latter case I answered the usual questions about occupation and history, and since I nearly always answer that question with something about software or computers, I guess being involved in the second incident was my fault, too.

In the first case, the problem was that my friend tried to reinstall XP Pro SP2 over a Dell OEM installation of Windows Media Center, and got an error saying that the product key was invalid. It only took one email for my friend, who’s probably accustomed to folks like me asking seemingly simplistic questions like “did you mistype the code?” to convince me that, indeed, this was a real error. In the second case, a neighbor here on the island knew I was in the software business and asked me why his HP inkjet printer didn’t seem to install and work correctly on his Mac running OS X.

In both cases I was initially stymied. In the second case, I’m still stymied, but I’m buying the guy’s boat so I might help him figure it out tomorrow.

In the first case, a quick Google on the problem revealed that other people have exactly the same problem. Reinstalling a personal (i.e., non-Enterprise) license key for XP Pro over Media Center seems to reject perfectly valid license keys. Of course, even though I worked at Microsoft and have worked with Windows since the 3.1 days, I have absolutely no clue why it does this. I just know enough about the complexity of the Windows code base and have enough anecdotal experience not to be shocked in the slightest. Similarly, I’m not shocked that I could have a serious amount of experience with computers and code and still not have a clue.

I suspect the reason for this is that software engineers actually have two core skills, not one. Sure, software engineers are extremely good at abstraction: the skill of looking at a set of particulars, and creating a model of generalizations to represent any other set of particulars that share all or some of the relationships we imagine to exist within the original case. That task of abstraction is the same one shared by mathematicians, physicists, population geneticists, and other creators of mathematical models. But software engineers, and systems administrators, as opposed to pure computer scientists, have a second skill which is equally crucial. The ability to catalog a large number of actual cases, their causes, and their solutions. In other words, the skill to capture and contextualize and apply the lore of computing.

The first ability, I think, is what people expect when they ask me what might be causing their technology to have a problem. The ability to see a rational abstraction behind the seemingly random behavior that’s occurring, and thus to diagnose what’s wrong. But in reality, the extent of one’s command of lore — of detail, contextualized by situation and software version and architecture — governs one’s ability to solve such problems, particularly remotely — without the computer in question in your hands. The reason is the fundamental complexity of the situation. On top of the hardware runs an operating system, with a specific set of rules. That operating system can be tiny, like MS-DOS 3.3, or utterly massive, like the 60+ million lines of C code that purportedly make up Windows XP. On top of this midgit (or giant), rests a layer of drivers — bit of the operating system contributed typically by hardware vendors that allow the whole thing to work on their hardware. And on top of this three-layer cake runs your applications, today often themselves multi-million line pieces of software code. Code that might also depend critically on being able to communicate to other computers, across a network, to gather data via HTML or other “protocols,” which are essentially small languages that all computers must speak fluently in order to not misunderstand one another.

Complexity is the enemy of things “just working.” And it’s the enemy of even computer professionals being able to understand the systems they build. We can visualize a few interactions; we can even visualize a few histories of interactions. But nobody can visualize all of the interactions and possible states that even a moderately large piece of software (forget Microsoft Office, Windows, the Linux kernel, or Mac OS X) can display. Heck, human beings can’t visualize the geometry of a vector with more than three dimensions! How are we possibly going to understand the state space (i.e., possible behavior) of a piece of software with 66 million lines of code and megabytes of internal state variables?

We can’t, in detail. We do so statistically. We test things over partial ranges of their possible behaviors. Hopefully the important range of their behaviors, in terms of how often users can get their system into the same state. Even understanding the scope of the range of possible behaviors is a massive challenge, witnessed by the continued research into code coverage, automated testing, and the like. The current popularity of unit testing probably represents a programmer-driven effort to simply reduce the dimensionality of the state space. Unit testing reduces, by pursuing automated means of verifying the lowest level of “contracts” within the software itself, the size of the state space by large factors.

But what’s left after good, serious modern testing and QA is still a lot of possible behavior, and only some key pathways, the deepest, most intentional valleys through the overall “landscape” of behaviors, are documented or recorded. Much of the state space of a modern commercial software program is still deeply terra incognita, as a simple consequence of the overall complexity and coupling present in our systems.

Thus, I was encouraged by this post about Erlang on Lambda the Ultimate, a prominent blog about programming languages and the associated computer science. The designer of Erlang, Joe Armstrong, has this to say:

The Erlang flagship project (built by Ericsson, the Swedish telecom company) is the AXD301. This has over 2 million lines of Erlang.

The AXD301 has achieved a NINE nines reliability (yes, you read that right, 99.9999999%). Let’s put this in context: 5 nines is reckoned to be good (5.2 minutes of downtime/year). 7 nines almost unachievable … but we did 9.

Why is this? No shared state, plus a sophisticated error recovery model. You can read all the details in my PhD thesis.

Interesting. And impressive. It’s possible that there’s an approach here for reducing complexity to manageable, understandable, plannable levels. Objects, aspects, and other recent software innovations aim to reduce dimensionality, allowing more of the total state of a program to be explicitly designed, rather than showing up as emergent run-time behavior.

It seems clear, though, that getting a handle on complexity in software is critical — if we’re going to be able to diagnose what goes on inside our software, and thus if we’re going to be able to trust it. For commerce. For security. For privacy. And for exercising our rights in a democracy, since more and more, software is involved when we vote and make decisions.

Invertebrate Democrats and “Warrantless Wiretapping”

As the details of precisely what the "Protect America Act of 2007" contains start to be analyzed, it’s pretty clear that Congress ought to be ashamed of itself.  Moving beyond the Newspeak name of the bill itself, it’s pretty clear that this law violates the Fourth Amendment. 

Marty Lederman, writing at Balkinization, analyzes the key ambiguities in the Senate version of the bill:

The key provision of S.1927 is new section 105A of FISA (see page 2), which categorically excludes from FISA’s requirements any and all "surveillance directed at a person reasonably believed to be located outside of the United States."

For surveillance to come within this exemption, there is no requirement that it be conducted outside the U.S.;no requirement that the person at whom it is "directed" be an agent of a foreign power or in any way connected to terrorism or other wrongdoing; and no requirement that the surveillance does not also encompass communications of U.S. persons. Indeed, if read literally, it would exclude from FISA any surveillance that is in some sense "directed" both at persons overseas and at persons in the U.S.

There are many aspects of electronic surveillance which present serious constitutional "grey" areas, and as a society we haven’t even begun to discuss these issues seriously.  But one issue is not grey, and I highlighted it in bold in Lederman’s analysis.  The Fourth Amendment requires that people (by which we can read "citizen" or "legal resident" although it’s not clear whether the Founders wished that distinction to be made) be immune from search (which now includes electronic search or surveillance) without a due process requirement that demonstrates the "reasonableness" of the search, which hundreds of years of Anglo-American legal tradition, American constitutional law, Congressional and state statute, and Federal case law says means probable cause, judicial consideration and issuance of warrants

Congress, in its second most spineless act in quite awhile (the Military Commissions Act and restriction of habeas corpus was worse), has ratified the Administration’s previous warrantless wrongdoings and gutted the Fourth Amendment in a wide variety of situations.  So why did a Congress cut the Judicial Branch out of the loop and give the Executive Branch the power not only to legally conduct surveillance on U.S. citizens, but also to be the arbiter of when it was acceptable to conduct such surveillance?

My guess is that Congress has shown yet again that the "potential attack on American soil" trump card works every time:  no rational discussion of threats and potential courses of action is possible when the opposing side can shout you down with the simple mention of 9/11.  The major challenge we face in American politics today is getting beyond sloganeering so we can have a rational national discussion about how we are conducting the defense of the Republic against criminal and military threats we face.  Congress will not do this by itself:  right now the 16 Democrats in the Senate (and others in the House) that voted for this unconstitutional bill likely did so because they’re afraid for their re-election prospects if they don’t vote to give the President every power he asks for, should something happen.

iPhone Impressions

After a couple of days, here are some iPhone impressions, though for deep analysis of each app, I pretty much agree with John Gruber at Daring Fireball (except that I haven’t had any crashes, lockups, or weirdness at all yet).

The user interface is incredibly well-designed, as you’d expect. I keep scrolling through my email just to see the smooth scroll, and the “bounce” effect when you hit the top of the list. Gruber’s right, Helvetica has found its rightful place in the iPhone: normally I dislike too much san-serif text but the gorgeous high-resolution screen makes it work here. Typing does take a bit of getting used to, especially with the keyboard in portrait rather than landscape mode. This is probably my #1 issue: the Mail application doesn’t rotate to landscape mode, which would sure be handy when composing. Reading, I’m less worried about, but when composing, the extra room seems like a no-brainer. I hope this comes in a software update at some point, since it would seem to require no hardware or firmware changes, nor anything on the sync’ing Mac.

Gruber is also completely right: Notes is useless. There’s nothing for the notes to sync to, although to-do items in iCal might be a good start. Speaking of which, to-do items in iCal don’t sync to the Calendar. Apple needs to fix this, and it’s my #2 issue. #3 is probably the uselessness of Notes for any kind of real workflow or to-do list, since the notes don’t make it onto my computer. Nor can I write out a shopping list on my laptop and have it show up as a Note on the iPhone, for use at the store.

Question for Apple: Precisely what were the use cases and scenarios for Notes anyhow?

A minor irritation also comes from the fact that the iPhone is a camera, and Image Capture recognizes it as such when you dock it to the laptop. In my case, Image Capture is designed to open Adobe Lightroom when I connect my “camera.” I finally had to disable this, since I don’t necessarily want Lightroom and iTunes starting up everytime I dock the phone to sync or charge the battery. This likely isn’t an iPhone issue at all, of course, but perhaps Apple might consider having richer preferences in Image Capture on a future release: per-camera settings would be nice. I’d like it if Lightroom were the chosen app when I connect my Nikon D50, and I’d like Image Capture to stay quiet when my iPhone is connected. Others may prefer iPhoto or some other option.

These are minor issues, compared to how terrific the iPhone design and experience have been thus far. Landscape mode for email composition is a big one, and I’m sure Apple will get the message once enough folks start using it. Notes and to-do items seem important as well, and I’d hope these are addressed sooner rather than later. Gruber suggests that the Notes sync issue might be connected with Leopard timing and a system-wide Notes facility in Leopard, so we’ll see.

The iPhone and the Future of Technology Products

My iPhone arrived today, and although it’s a wonderful device, I don’t want to focus here on the device itself. While fresh in my mind, I want to talk about the reason why the iPhone, along with its “predecessor” consumer device the iPod, is the future of high-tech products.

Last Friday, during the first-day frenzy (ok, at 6pm…) I ordered an iPhone from Apple’s online store. The delivery timeline was quoted as 2-4 weeks, which caused a bit of a stir. Apple clearly followed an “under-promise, over-deliver” strategy here, because Fedex actually attempted to deliver my phone yesterday afternoon, while I was running errands. The delivery came direct from Shenzhen, China, and arrived two days later, within a week of my original order. Given past problems with supply and Apple product introductions, and their quoted 2-4 weeks for delivery, I’m impressed. Thrilled, in fact.

The iPhone came in a small box, with a fully charged battery. Which meant that within minutes of the Fedex truck hitting the driveway, my phone was docked, I’d activated it within iTunes, started the process of transferring my existing mobile number from Verizon, and my contacts, email settings, and other basics had sync’d to the phone. Including my Google Calendar data, thanks to the great folks at Spanning Sync (i.e., via iCal sync).

Everything worked. Everything. In far less than 10 minutes after touching the device, I’d made a phone call (outgoing only, incoming will take a couple of hours given the phone number transfer), added my home wireless network (after it prompted me for the security key), checked my email, looked at calendar data, and was ready to sync a subset of my music over.

I know people have talked about problems activating or registering, but my experience was flawless. It’s hard to imagine how much faster I could get started with a device. And this is really the future of technology products: making it trivial to adopt and switch. Whatever else the future holds for my relationship with the device itself or AT&T as a service provider, the first-day experience Apple delivered here is a clear home run. They nailed it. And raised the bar for everyone else delivering technology hardware.