Archive for November, 2006

Fixing my missing ntldr problem for the second time

November 30, 2006 10:02 pm

This happened to me once before, and I didn’t write down how to fix it then. This time I will, just so I can look it up easily next time.

If your ntldr goes missing, here’s one way to fix it:

  • Boot from your Windows XP SP2 CD.
  • Choose the “R” option to repair using a recovery console.
  • copy ntldr and ntdetect.com from the i386 folder on the boot CD to the windows hard drive root.

 

  • Double check that the boot order of the hard drives in the BIOS is still how it should be (for some reason my order was messed up, so the system tried to boot from the wrong drive, which puzzled me quite a bit.)

That last point messed me up for a good twenty minutes this time around.

But now everything is good again.

Goodbye, old 120 MHz Pentium S network server, you’ve done your duty

9:56 pm

I guess it had to happen sooner or later. The PC I built about 10 years ago finally turned flaky and had to be replaced. It started out as my desktop machine originally. I can’t remember what I had running on it, but probably Windows 95 or Windows 98. It had a Pentium S processor (not Pentium II, not Pentium III) running at 120 MHz…

After a few years of service, I got a new machine and decided to put the old one to work as an Internet gateway server hooked up to my cable modem. I used an OS which was known at the time as “E-Smith”, a derivative of RedHat Linux, cut down to essentials and hardened to make a secure access point to the Internet. E-Smith has since been renamed “SME Server“, and my system was running the 5.5 release for about 5 years nonstop (okay, with an occasional reboot). It had 64 MB of RAM and a 4 GB hard drive to start out with. On that, it faithfully provided firewall, email, web, ftp, samba and ssh services.

I added a 20 GB drive at some point to have more room for music files, thinking I would use the machine as a central repository for a network jukebox. It never really took with the rest of the family, though, so that pretty much went unused.

Recently I started having problem with the box locking up and not providing Internet access any more. I looked into the logs and saw some attempts at hacking passwords. At that point I decided it was time to upgrade to version 7 of SME Server (for better security), and at the same time retire the old hardware.

I had a spare box prepared for just this purpose, got it out of the garage and upgraded the software to version 7 (I had prepared it a long time ago with version 6). Then I swapped out the boxes, did a little work and was up and running again. Okay, maybe it wasn’t that smooth, since I messed around with my wireless router and various other things at the same time.

Anyway, here are some pictures of the retired server “in memoriam”.

Booting up for the last time, part one Booting up for the last time, part 2 Dust around the CPU There sit the 64 MB of RAM Look at those five years of dust accumulated! An old SoundBlaster AWE32 ISA full length card

UPDATE: Since upgrading to version 7 of SME Server, my spam email count on the domain that server hosts has gone way down. This version has built-in spam filtering at the server level. I just hope normal emails go through. Come to think of it, I don’t think I’ve had a normal email come through yet. I’ll have to double-check that.

Getting wireless to work under Vista RTM on a Compaq nw8000

November 17, 2006 11:28 am

Since MSDN now has keys for Vista available, I started getting my developer laptop ready. One problem I ran into was that the built-in wireless adapter on the nw8000 wasn’t recognized by the RTM bits. On previous releases it worked just fine, so I don’t quite get what the issue is.

Anyway, I found that the in-box drivers for an “Atheros Wireless Network Adapter” seem to do the job.

Here’s the drill: Start Menu – Computer – Right click – Properties – Tasks: Device Manager – Find the device in the list - Right click – Update driver – Browse my computer… - Let me pick from a list… - Find “Atheros Communications Inc.” and pick “Atheros Wireless Network Adapter”.

Vista RTM bits on MSDN now (and keys, too)

November 16, 2006 9:24 pm

If you’re a lucky MSDN subscriber and have been waiting for the final Windows Vista bits, they’re available for download now.

What I’ve been waiting for is also ready: the ability to request a key for your Vista development system. I’ve got mine and am writing this from Windows Live Writer running on my shiny new Vista Ultimate work laptop. Yay!

Breaking all rules of software release management

November 13, 2006 11:01 pm

The project I’m currently working on is getting really close to being done, with Windows Vista having been “RTM”ed recently. We have a few more days to get last minute bugs ironed out and then it’s “off to the factories”… I can’t say much more about the project right now, but it’s a pretty significant and highly visible piece of software coming out somehwere around February 2007. I hope it does well. But I digress…

At this late a stage in a product’s delivery cycle it is common to make very few changes to the code in order not to create more bugs than one fixes. Ideally each change should be peer-reviewed and thouroughly tested before getting checked in (like with Windows Vista and the contortions people have to go through in the “shiproom” to get a bugfix approved). Too bad for me that I’m the only “peer” on the project (i.e. I’m the only developer). There’s nobody I can go to for a review.

And in the last few weeks I’ve broken the “as few changes as possible” rule a number of times. Why? Because I’m confident in the features that WPF provides. And because I do tend to run extensive tests before I check stuff in.

So what kinds of changes have I put in at the “last minute”? I’ve shuffled buttons around on the page, I’ve added code for drawing the user’s eyes to input fields containing invalid data, I’ve added data-bound and data-driven UI elements.

WPF has given me the confidence to be able to do this at the last minute. The fact that moving buttons around is a simple XAML markup change, for example, is just great for last minute UI adjustments.

But I’m not exactly proud of doing it. Oh well. So far everything seems to have worked out.

Software craftsmanship vs. “HighTech” jobs

10:40 pm

I recently read “Peopleware” by DeMarco and Lister, a book I highly recommend to anyone wanting to understand how to manage people who write software for a living.

They mention several times that most software writers don’t work in “HighTech” jobs. The ones who really do the “HighTech” stuff are the people who write the compilers and development frameworks or come up with other new technologies. I tend to agree.

I’ve long joked to my manager about giving up writing software and asking if he knows anyone who will take me on as a “carpenter’s apprentice”. This happens especially when I get stuck on hard-to-solve problems or when I find more bugs than I care to report in Microsoft’s platforms. And of course when the people who contract for us on software turn in one more drop in which old bugs re-surface.

But I realize more and more how what I do is actually more software “carpentry” than it is “HighTech” work. Seriously. I mean, it takes effort to learn about the latest technologies, such as WPF/Avalon, sure. You have to wrap your mind around how some other people want you to write programs. And you have to do it quickly, so your project can get done on time. But in the end it really comes down to being able to handle a set of tools that someone else makes. Handle them expertly, yes, but they’re someone else’s tools.

So that’s what I’m going to consider myself from now on. A software craftsman. Perhaps even an expert or master craftsman (depending on who I compare myself to or how I’m feeling when I consider it). But just a craftsman.

And I take a certain pride in the work I do. Like all real craftsmen do.

Office 2007 now available on MSDN

November 12, 2006 3:07 pm

For all of you who have access to MSDN online downloads, Office 2007 is now available.

WPF XBAP apps and UAC

November 4, 2006 12:40 pm

Here’s an interesting thing I learned the other day, which wasn’t obvious to me.

If you have an XBAP WPF application that tries to access files at the location identified by CSIDL_COMMON_APPDATA (Environment.SpecialFolders.CommonApplicationData in .Net 2.0/3.0) they need to be marked with Read/Write permissions for ”Everyone”. Otherwise File Virtualization kicks in and Vista creates copies of the files in the VirtualStore.

This shouldn’t be a problem per se, but if you have data integrity issues with your application reading/writing files it’s nice to eliminate the virtualization for troubleshooting.

Also, if your application needs to share the same data among users you don’t want virtualization, since that is a per-user thing, and you’d end up with one set of data files for each user.

If you’re installing some default data files for the application using Windows Installer (which will run elevated), you need to make sure you change the permissions on the data files so “Everyone” gets read/write permissions. This can be done using the LockPermissions table of Windows Installer.