Archive for April, 2007

tech: upgrading hard drives without spending a fortune on software tools

Running out of space on the c: drive that came with my PC, I knew it was time to upgrade. But to get all the data moved over, including the boot partition and the service partition would be a bit tricky. This is Windows, after all. And I wanted to do it without spending $100 on software tools like Norton Ghost and Partition Magic, which would be more than I spent on the drive. So here is what I did.

I temporary installed the new hard drive in my PC, leaving the original C drive there too. I gave a new drive letter assignment (such as “f:”) to this new drive. Then I used Ghost for Linux (G4L) to create partitions on the new hard drive that were exactly the same size as the old hard drive (using Linux fdisk), mark the boot partition as bootable, and do a byte-by-byte copy of data from the old partitions to the new partitions. G4L is a nice tool: download the ISO image, burn a CD, and then boot that CD to come up in Linux with the tool running. The undesirable thing here is that since the partitions on the new drive were exactly the same size as on the old drive, I didn’t have more usable space yet, as the the space improvement I wanted was sitting on the new drive as unallocated space. But I’ll fix that in a moment. If you have more than one partition on your c: drive (i.e., service partition, etc), make sure that the unpartitioned/unallocated space directly follows your main Windows partition (assuming that your main Windows partition is the one you want to grow). If you have another partition besides Windows on your c: drive such as a recovery partition, create those at the end of the new hard drive.

Next was to go into the Local Disk Manager in the Microsoft Management Console (“Manage My Computer”) and remove the drive letter assignment for the new drive, this leaves it with no drive letter. Shutdown the PC, leave the new drive connected, but disconnect the old drive. Simply disconnecting the SATA or IDE cable is fine, you can leave the power cable connected and leave it in the bracket. Then boot Windows. (Make sure your BIOS is configured to include the new drive in the list of bootable devices.) Windows will automatically assign the drive letter “c:” to the new drive, because at this point there is no “c:” drive: the new drive doesn’t have a drive letter assigned and the old drive is no longer visible because it is disconnected. So now I’m running on the new drive, but I haven’t yet been able to take advantage of the bigger capacity since the partitions had been created with the same size as the old drive.

Lastly, I bought a hard drive enclosure for 3.5 inch disks that would let me attach a hard drive via USB. I found this one for $25 that can handle both SATA and IDE hard drives. I removed the new hard drive from my PC and put it in the enclosure. Then I attached the enclosure via USB to another PC that has a valid license for Partition Magic. Even though the drive was externally attached via USB, Partition Magic recognized the drive and I was able to resize the Windows partition to use the adjacent unpartitioned free space on the drive. Partition Magic did its stuff to the partition table in just a couple seconds and now my Windows partition is much bigger and takes advantage of the bigger drive. Take the hard drive out of the enclosure and put it back in the PC. Boot and look at all the nice free space.

Although there is a Linux tool that appears to be an equivalent to Partition Magic, it was unclear to me if it has a good track record with NTFS partitions – I would love for it to do that. Since I had access to a machine with a valid license for Partition Magic, doing the external USB enclosure was easy. If you don’t have access to a valid license of Partition Magic then you probably want to give GParted or QtParted a try. Both of those are graphical front ends to the GNU Parted tool. If they don’t work, you still have the original drive with all the data and can try another tool.

If the drive I wanted to make bigger was not the c: drive, then I wouldn’t have needed G4L or Partition Magic. Just let Windows format the new drive and copy all the files/directories over via Windows Explorer, and change the drive letter. It’s the c: drive that is the tricky one.

I started out with two drives in my PC, one as c: for the operating system, but I immediately installed a d: drive for all the new applications I installed and data files. But with a new digital camera (not to mention 3 iPods in the family), we had an exploding amount of data, so I installed a 3rd drive as e: just for all the pictures as the d: drive got filled up. Now with half a terabyte of disk storage I hope we’ll be OK for another year at least.

(I’ll write a post soon on how I do off-site backups of my important files.)

tech tips marcelk 27 Apr 2007 No Comments

tools: curl

One of the most helpful tools I’ve come across to help debug client-server problems with HTTP applications is cURL. It handles SSL, BasicAuth, POSTs, and just about anything else you can think of when sending data from a client to a web application server. When you need to send carefully crafted HTTP requests and look in detail at the responses, it is a flexible and powerful tool. I use it from the command line. Consider adding it to your toolbox.

tech tips marcelk 23 Apr 2007 No Comments

working: get the bureaucracy to work for you instead of always pushing against it

Working at a large company, one of the first thoughts to enter many people’s mind is bureaucracy. Many people consider bureacracy as inherently bad, the term is often used in a negative way. I had a friend who said basically if you aren’t doing something every day that could get you fired, you aren’t taking enough risk. Although it is good to challenge the organization so that it ends up doing the right thing, that quote is a bit extreme for me especially for organizations that are stable. And implied in it is that you ought to always be pushing against the bureaucracy. You’ll find that you can burn a lot of physical and emotional energy if you are always pushing against the bureaucracy and view everyone else as a bunch of idiots. That isn’t healthy for your employer, your project, or yourself. If you are always pushing against the bureaucracy, that is a sign that something is wrong – it might be your organization, or it might be you.

Bureaucracy isn’t always bad. There are places where bureacracy can have positive effects. Rules and processes exist for a good reason: they help the organization to scale, and frankly they help to prevent problems that have occurred in the past so they aren’t repeated. Bureaucracy also needs to be balanced such that there isn’t so much of it that it removes the opportunity for personal judgement. There are places where it gets out of balance, but don’t assume that mere presence implies out-of-balance. On the flip side, we tend to be naive about how complex the world really is. Although simple is good, we shouldn’t oversimplify it to the point that we make poor decisions.

Large processes in an organization are often segmented into smaller processes which are carried out by individuals. So one of the side effects of a bureacracy is that certain people have responsibilty for parts of an organization’s process. If you can figure out who owns which part of the process, (this is the good part:) you can get the organization or those owners to do the process for you. Basically you can get other people to do things to help your project.

Here are some examples of that:

  • Write the product documentation all by yourself (most programmers are poor writers) vs. a trained Information Development staffer (technical writer) writes the documentation for you.
  • Be aware of and install all the patches for your operating system and application, do backups, manage licenses, etc. vs. use the servers provided by the I/T department.
  • Get sued vs. work with your organization’s lawyers to maintain intellectual property protection.

Now the part that many people have a difficult time swallowing is that the process usually needs to be done the way that the owner wants, not the way you want. That is probably because the owner has a lot of experience and knowledge for that process and has figured out how to minimize risk for that process, whereas if you were doing it you would want to minimize the effort instead of the risk. As I’ve mentioned before, there is a cost for everything. In this case the cost for someone else doing the process for you is that it needs to be done their way. And I’m going to propose that in most cases that cost is worth it. Get the bureacracy to work for you. Use your organization as an asset, not a liability. The cost may be some lost flexibility, but if in the end you get more done that applies the experience of experts, that is probably a cost worth paying.

things i wish i knew before working marcelk 23 Apr 2007 No Comments

tech: XSLT book

As I’ve been learning XSLT recently, I went hunting for a book to help me get up to speed. Based on the customer reviews on Amazon I bought Teach Yourself XSLT in 21 Days by Michael van Otegem. Although the title is lame, I’ve been quite pleased with the book. I was looking for something that was more tutorial than reference, and I got just what I wanted. XSLT itself is a different beast than the usual procedural or object-oriented programming, so it does take a bit of effort to wrap your head around the model. The author does a nice job of going into the right level of detail, without treating me like I’m dumb or leaving my head spinning. There are lots of examples which nicely demonstrate the topics. There is a quick reference list in the back of the book regarding elements and functions, but it is a bit hard to read due to the formatting. However, that is really the only wart I’ve found so far. I recommend this book to anyone who needs one on the topic.

tech tips marcelk 16 Apr 2007 1 Comment

tech: screen protectors

Lots of screens on mobile devices, how to protect them from getting scratched without spending a fortune? iPods, cell phones… heck, even the case for my iPod has a screen area that gets scratched. The best thing I’ve found so far is the Premium Screen Protector Multipack (SKU 3177WW) from Palm. I got mine at Staples for $20.

What the Palm website doesn’t tell you is that these are not custom fit just for Palm devices, you need to get a pair of scissors and cut them for the device you want, even if you have a Palm. The package comes with 13 sheets that are about 3.5 inches by 2.6 inches (after you trim off the printed info). This is more than big enough to cover any mobile device screen, and can handle about 3 iPod nanos from one sheet. No, you can’t do the entire face of a video iPod, but you can do the screen area (you do have a full body case, right?). At about a buck and a half a sheet, it’s pretty good deal, as long as you are patient with the scissors. Measure from the bottom right corner to stay away from the printed info, else you will have the printed info on your screen; I’m not sure why Palm actually printed stuff on the protector itself instead of just on the peel-off backing, but you lose only a quarter to half an inch of height and width. The protectors are quite strong with not too much glare, and appear to come off with just the right amount of effort. The package also comes with a cleaning cloth and a straightedge to help minimize air bubbles during application.

cool stuff that doesn't cost much &tech tips marcelk 09 Apr 2007 1 Comment

tools: core Firefox plug-ins

Yeah, everyone has their own list and none of them are the same. But it is helpful to look at what other people are doing because you may stumble across a livesaving gem that you didn’t know about (even though 90% of them you aren’t interested in). So for what it’s worth, here is my list:

tech tips marcelk 05 Apr 2007 1 Comment

web content debugger: Firebug

Doing Java development in Eclipse, I have learned how wonderful it is to have a good debugger. I had wished for something similar for the browser, to help debug HTML and Javascript. My desires have been answered as Firebug. Go to the Firebug home page and just browse through the list of features. It is a wonderful tool and a great debugger that runs as a plug-in to the Firefox browser. Being able to figure out what someone else’s code is doing by identifying the Ajax calls and looking at the HTTP requests and responses and headers has saved me a lot of time. If you are doing anything that is browser-based, Firebug is a must-have. And being free, there is no excuse not to have it.

tech tips marcelk 05 Apr 2007 No Comments