Category Archives: Uncategorized

Geek Dad’s Dream

0
Filed under Uncategorized

I got up this morning and was helping Gillian, my daughter (she’s almost 4) downstairs to get dressed, when she asked (quite out of nowhere, I might add):

“Daddy, can you help me built a giant robot butterfly that I can fly around on?”

Awesome.

Can I name a release like this?

0
Filed under Uncategorized

I’m working my way through the quite laborious installation of Visual Studio Team Foundation Server when I came across this gem (seriously, it’s in the TFSInstall-v071203.chm Team Foundation Server installation guide):

Before you install Visual Studio 2005 Team Foundation Server Service Pack 1,
you must first download and install the Visual Studio Team Foundation Server Quiescence GDR.

Now, I love big words as much as any logophile, but to name a service pack a Quiescence GDR? And what the hell is that, anyway? It means “At rest or still”. So… That SP is for all your machines that aren’t installed in motor vehicles, maybe?

I’m already waiting for agonizing install processes and prerequisites. Now MS is improving my vocabulary, too. Grrr.

Who said IT isn’t just one big wild and crazy ride!

Customizing Work Items in Team Foundation Server

0
Filed under Uncategorized

Tell me I’m missing something here.

Team Foundation Server is this massive, be-all behemoth from Microsoft that rolls defect tracking, worklists, source code control, and your mother’s favorite recipes all into one Visual-Studio integrated package.

Sounds good.

But is this for real?

Granted, the post is from 2005, but looking at the latest TFS 2008 docs online, there doesn’t appear to be any newer method.

Essentially, what it says is that to add a field to the bug tracking form, or the task form, or to change the lookup values in existing fields on those forms, or to edit a form in pretty much any way, you have to:

  1. Drop to a DOS box
  2. Run a command line app to EXPORT the bug form definition to an XML file
  3. Open the XML file and edit it with whatever editor you want.
  4. Save the XML
  5. run another command line util to IMPORT the xml definition back into TFS
  6. and finally, open up a few item to see it your change made it in

Did I just fall backwards into a Delorean and hit the ’85 button?

You can’t throw a Dilbert Doll these days without hitting a bug tracking solution and I haven’t seen one in recent memory that didn’t have some kind of integrated forms designer. Actually, I can’t say I’ve ever seen one that didn’t. Hell, Outlook has an integrated forms designer.

So, I’ve gotta be missing something, right?

Right?

Open-source CD Duplicator under Vista

0
Filed under Uncategorized

I recently had the need to burn several duplicates of a CD I made, and I’ve always used Nero Burning Rom for that in the past.

This time, however, I’d upgraded to Vista, and my copy of Nero (a version that came in the box with a DVD drive I bought some time ago) wouldn’t run any longer.

Strike 1

I fire up VMWare, thinking I could install it to a VM. Unfortunately, it doesn’t look like VMWare supports the virtualization of a DVD RW or CD RW drive yet.

Strike 2

So I start rummaging around the net for something.

What I found was a mountain of programs to do the job, but they all seemed lacking in one respect or another. Worse, they generally sell for 20-50$, which isn’t bad, but considering this is Vista, I’d have thought a decent CD/DVD package would have been in the box.

Eventually, I came across BurnAtOnce, www.burnatonce.net, a freeware front-end to the open source cdrdao and cdrtools programs (which are linux-bred command line apps, and not the friendliest things in the world to work with).

It’s a bit old, and from what I could gather, it’s not being actively developed anymore, but… it’s small, simple, free, and best of all, it seems to work great for grabbing images of a disk, no matter what the format, burning from the images, and in general, doing disk dupe and backup operations.

Good stuff.

I also found an app called DeepBurner. They do have a PRO version for 25$, but the freeware version (and better, the portable freeware version), seems to do everything with ISO files I’d need to do. Great for data only cd’s. And that portable version is just copy and go. No install necessary.

Creating IMG/IGZ Files for your own Ultimate Boot USB Key

1
Filed under Uncategorized

I’ve been doing a lot of experimenting lately with USB boot devices, Linux system and partition tools, etc.

MFSTools is certainly handy for working with TIVO drives

The Ultimate Boot CD is also quite handy for partitioning etc.

I’ve also been a long time user of SpinRite for testing disks, and it’s still going strong (although writing a pure assembly Windows App just seems like a little slice of hell to me).

In digging around the Ultimate Boot CD, though, I noticed that it uses a dynamic boot loader that essentially allows it to boot up images of boot disks. Most of the utilities included with the package are actually in the form of IGZ image files that the boot loader boots from a stripped down Linux Menu system.

It’s a pretty slick approach and it’s extensible too. You can actually create your own IGZ files, put them in place on the Ultimate Boot CD, add a few lines to the menu cfg files and reburn the CD. Then you can boot to basically any boot disk you want.

If you’re like me, you probably have an “emergency kit” of several CDs and floppies to resort to when things go bad. Many of my floppies are getting a bit long in the tooth, so I thought it might be a good idea to capture them as images, so that in case the floppy does fail, I could simply rewrite a new copy from the image.

But if I can boot directly from the image using the UBCD loader, well, even better. And if I get the UBCD moved to a bootable USB device? System recovery nirvana!

So, how to capture an image of a floppy?

There’s several commercial packages out there that sound like they’d do the job, including:

Of these, AllImage looked the most promising, but I really wasn’t wanting to spend money on something as trivial as this.

That led me to Windows DD.

This is a native Windows version of the Linux DD utility, which can do this job under linux.

To create an img of a floppy in Drive A, just use:

dd if=\\.\a: of=c:\temp\disk1.img bs=1440k

And to write the image back to a floppy:

dd if=c:\temp\disk1.img of=\\.\a: bs=1440k

The bs (block size) option is just a speed thing. You can leave it off and DD will work. It’ll just be a lot slower. If you’re creating an image of bigger disks (say, a CD), you might might use bs=1M (1 megabyte).

Pretty simply stuff. The only downside I’ve noticed so far is that it literally makes an image of the entire source drive, including sectors that don’t really contain data, but that do contain old data that’s been deleted. This has the effect of making the image MUCH bigger than it needs to be, and prevents it from compressing well. I’m not sure how to work around this yet.

For UBCD integration, however, what you really want is an IGZ file.

Turns out, an IGZ is just a GZIPed IMG file.

But Gzip is NOT WinZip. WinZip (and most other ZIP utilities) will read Gzip files, but you have to explicitly create a Gzip format file.

You can grab a copy of GZip for Windows here, or you can use the GUI-licious IZarc to do the heavy lifting. Just be sure to specify the TAR.GZIP format when compressing your image.

image

When it’s finished, rename the file *.IGZ (instead of the *.tar.gz) and you’re golden.

Final word of caution, DD can be a pretty nasty little bugger, as evidenced from the Anti-Examples on the DD Wikipedia page, but then, FORMAT can be nasty as well.

Just watch your typing, and you should be fine. But, if you doubt yourself, spend a few bucks and grab a copy of AllImage or WinImage.

Properly Manipulating the Selection in a Word Document

0
Filed under Uncategorized

The Word object model is an unbelievable rich hierarchy of objects devoted to letting you navigate just about every facet of a particularly complex chunk of data, namely a WYSIWYG document.

Still, there are right ways to use it and wrong. And when you do things wrong with Word, it usually doesn’t just erupt in a massive fireball. Instead, often, something seemingly completely unrelated will fail much farther on down the line, making for some thoroughly enjoyable debugging sessions.</sarcasm>

For instance. I’d been working on a Word Addin that processes the contents of a Word document. It does a pretty thorough job, so it basically hits just about every nook and cranny in the object model.

One technique I’d had to use involved selecting a field, and then pasting text over it, effectively replacing the field with plain text.

The code looked something like this:

fld.Select

Application.Selection.Copy

Application.Selection.PasteSpecial link:=False, DataType:=wdPasteMetafilePicture, Placement:=wdFloatOverText, DisplayAsIcon:=False


Basically, it SELECTed the field, then copied the selection, effectively converting the field to plain text.

And finally, it PASTEd the text back over the selection, wiping out the field with just the plain text content.

It may not be the ideal way to handle this, but other methods failed outright for a variety of reasons, and this technique worked quite nicely and consistently.

That is, until I added code (in a completely unrelated portion of the application), to enumerate all the bookmarks in the document and retrieve information on them.

When I did so, another loaded document  (i.e. not the current document I was working with) would have the contents of the clipboard pasted into its main body.

Needless to say, chasing down these two essentially unrelated pieces of code was no small chore.

But once I knew what was causing the problem, I needed to determine how to fix it.

The main problem was that the Word Document object doesn’t have a Selection property. Only the Application object does, which was global to all loaded documents, and was quite likely the source of the cross contamination.

However, a little digging turned up that the Document object contains an ActiveWindow property returning a Window object.

And the Window object does have a Selection property.

Changing the code to this solved the problem:

fld.Select

CurDoc.ActiveWindow.Selection.Copy

CurDoc.ActiveWindow.Selection.PasteSpecial link:=False, DataType:=wdPasteMetafilePicture, Placement:=wdFloatOverText, DisplayAsIcon:=False

The CurDoc object is the Document object I’m currently working with.

Essentially, instead of using the selection property of the Application object, I’m using the more specific one on the actual document I’m currently working on.

Under normal circumstances, the two approaches are identical, but, at least in this case, they aren’t.

When a RAID comes in handy

0
Filed under Uncategorized

image I was having a nice, uneventful Thanksgiving, got up, brewed up a pot of joe, (no, my coffee maker isn’t set up to grind it and brew it all 30 minutes before I wake up like in those commercials, I guess I’m a Luddite that way), and sat down to do a little TIVO HME API research when I get this:

Arghhh.

I crack open the case, and start looking around when I realize:

  1. The hard drives in the system are so hot, I can’t even touch them for more than a second or so
  2. The fan that draws air through the HD rack is stopped, because the cables apparently shifted and are now touching it.

Which leads me to two conclusions (and topics for future blogs, I suppose).

  1. Be sure to cable tie cables together and down so you know that won’t go where they aren’t welcome.
  2. Get some kind of system temp/harddrive temp/fan monitoring alarm program that goes all obnoxious on you if something like this happens

So, I powered off everything, let it all cool down and tried to bring it back up.

No dice. The RAID controller just won’t recognize the one HD that failed.

So I disconnect it from the RAID and hook it up to a spare SATA port (this Intel D975XBX2 mobo has 8 freakin’ SATA ports).

Good news! It’s visible, but of course it’s not readable.

So I fire up SpinRite and let it churn on the drive to validate it. Everything appears OK.

But I load up Partition Magic to repartition and reformat the drive as just one big NTFS volume and I get “Invalid Boot Signature” errors.

Hmm. I tried Partition Commander. It seemed like it worked, but when it finished and I rebooted, the drive hadn’t changed at all. The format didn’t take. Chuck Partition Commander.

Then I tried the free Ranesh Partition Manager (from the Ultimate Boot CD). No joy either. I even tried several boot sector editor/restore utilities, but to no avail.

In the end, I ordered a replacement from Newegg.com for 70$, and I’m still fully operational, even though I quite literally toasted a drive.

I’m still wondering why I only lost one drive. I’m guessing it was a little weak to begin with and this just put it over the edge.

But the real question is, by how much has the life of the other 3 drives been shortened by this little escapade?

With Western Digital now shipping a 1TB drive for ~250$ (yeah, that’s 1 terabyte), I may end up replacing them all in less than a year anyway.

Ah Spam, Wherefore Art Thou Progenitors?

0
Filed under Uncategorized

Grrrr. Today, suddenly, I’m seeing a literal torrent of spam response messages flooding my gmail box.

It’s pretty easy to get the source IP of the original email, and a quick check here can tell you approximately where that IP is.

In this case, the originals seem to be coming from Vienna and Puerto Rico, but they all are using depdarinhigginsgin@darinhiggins.com as a return address, which obviously isn’t an address I’d even use.

Why, oh, why do people setup autoresponders for this nonsense?

After slapping myself to keep me from setting up an autoresponder of my own (“Why the hell are you sending me messages that say I’ve spammed you without bothering to check domains, etc”), I just setup a file 13 for that address. Hint, don’t ever try to send me email using depdarinhigginsgin@darinhiggins.com!

I guess that’s a downside of having your own domains.

Is there any better way to fight email reply-to forgery? This really isn’t fighting it, it’s just more effectively ignoring it<sigh>

Laptops, love’em or leave’em?

0
Filed under Uncategorized

image There’s an article at computerworld.com now about the 10 things we hate about laptops.

It’s a nice read and it just reinforces the feelings I’ve had for laptops ever since, well, since I first lugged one through an airport.

To me, they’re just a huge pain in the ass. Drop the files you need onto a portable HD (or even better, a USB key drive) and go. Seems like a much better solution.

I know, I know, there’s plenty of cases where that’s not practical or even possible, but for typical developers?

Sure, there are days when it’s sunny and 72 outside, and I’d love to be coding via wifi out by the pool. But then, I’m in Texas, so those days number about 5 per year. And writing code at the local Starbucks? Puh-lease. It makes for a good sitcom site gag, but does anybody actually code that way?

Anyone have any thoughts on the subject? Am I missing out on something I just don’t see?

Setting up a Shortcut to Connect to a Server Console Via Remote Administration

2
Filed under Uncategorized

image It’s pretty trivial to setup a shortcut to an RDP file to allow you to connect to a remote desktop session in Vista (or XP for that matter).

But I needed to remotely connect to the console session.

No big deal, I thought, so I started checking out all the various options available when you EDIT an RDP file.

Nothing there to let you connect to the console.

A quick Google turned up a KB article with the command line switches for mstsc, but it looks like it’s not possible to specify the /CONSOLE option inside the rdp file.

Rats.

Then I thought, why not just create a shortcut to mstsc directly, no RDP file at all.

I ended up with a shortcut using this command line

C:\Windows\System32\mstsc.exe /v:myserver /console /w:1024 /h:768

Just make sure your current user (on your desktop) is a member of Remote Desktop users (and possibly administrators, which I know, would be a “bad thing”).

 

 

image  At that point, just double clicking on the shortcut should drop you right on the console of the server (kicking anyone that was on the console off, BTW, which might be a problem in some environments<g>).

In the end, Remote Admin via Terminal Services still isn’t near as good as UltraVNC, but it does seem to work pretty good. If I had to admin a system that was really remote, I’d probably stick with VNC, but since my server is in the closet, about 10 feet away, Remote Admin is good enough.