Tomorrow, Microsoft Will Bet Its Farm On Apple!!!

Will the next version of Microsoft’s Windows Phone OS be codenamed blackberry? or apple? 😛 Should Ballmer call it Microsoft apple, it will be my first time to own an apple. Hehehe. And one can imagine a news headline saying, millions and millions of Microsoft users now use apple! That would be bedlam. Then we probably hear Mac fanatics or Steve Jobs saying apple sucks! Ahh … that would surely perk up my day!


Expertise Bug Leads to Major Database Design Blunder

Often, we hear software developers (myself included) say, “yeah … we can definitely do that!” or “yeah … you have come to the right place, anything you want .. we can build it for you”! Then often, we too hear stories of software projects fail here and there. And now I begin to wonder how things could be worked out properly so problems, or worst case, failures can be avoided.

What happened to me recently could probably be one of the reasons why software projects fail. For the past several months, I have been working on a system that concerns the health of people. The system is intended for use by doctors, dentists, physical therapists, nurses, or any practice or profession that deals with people’s health, etc. The system, when done, will handle quite an extensive amount of data gathered from a good number of processes and sources that are realized every minute of the day.

For the past several months, there was a good amount of communication between my group and those potential users of the system. A lot of time were spent in requirements discovery and gathering, analysis, and everybody even subject a lot of items to questions just to sort things out clearly so things come out fine. A near functional prototype has been established for several months and it looks like everybody is happy of everyone’s progress … including the state of the system. Beta testing was conducted, had 6 major beta builds in the last few months, and seemed not a thing was amiss. In fact, it is almost done that the potential users are so eager to have the system deployed already and pioneered as soon as possible (that would have been like last month). I was into the finishing touches and was like in the process of putting icing on the cake.

Then … it was KABLAAAAAAMMMMMM!!! As the project’s database designer, I thought of something that hurled everything back into the drawing board. I miss identifying one piece of information that should have been in the database design from the very start. With the set of people contributing to make this happen … this one thing never had any manifestation of being thought out. The medical guys involved in the project never thought of the item. The software development guys never had any clue. I never had any clue. And I have contemplated so deeply to analyze how I could miss something this important. People who played the analyst role came short in thinking about this (I am one of those). But I, being the database designer, am blaming of missing something so important.

After gathering myself, I came to a conclusion that the only time that I’d be able to easily identify or come across such piece of information, is probably when I am a doctor, a practicing one, and at the same time a database designer who had lots of databases and experience tucked under my belt. I caught the missing piece from a totally unrelated event, not even related to what I am doing.

To cut the story short, what happened thereafter was 1 table was added to the database structure with 1 new column that would serve as a reference for 70% of other tables. With the change, 70% of sql code were re-written, 50% of critical UI got revamped and lots of time lost and gained lots of sleepless nights.

The moral of my story, though completely lacking of juicy technical details as I cannot divulge those for fear of legal ramifications and of ridicule (ano ako hilo? hahahha), software development / technical expertise can only bring us to certain extents and domain expertise is clearly a desirable attribute one can have, especially if you are a database designer. The reality and funny thing though is that, I can’t picture myself as a doctor and a database person so I can eliminate this problem in the future and this is probably the reason why there are just too many software project that have failed. And I can still hear myself saying “yeah … of course, anything you want, I can build it for you!”.

The system I talked about here is almost done and is looking really good! And I don’t think I have missed some more that would screw up my day. How about you? Do you say, being considered as an expert, can do of anything that is asked of you? 😛

1.5Terabytes of Photography Gone and Back, and How Windows 7 Installs and Fixes Itself!

Last Thursday morning, Windows 7 popped an ugly message … cannot read Drive S: and after I closed the message, I immediately opened Windows Explorer and there was no more drive S:. Suddenly, a rush of panic engulfed my senses. It was in that drive that I recently consolidated all my photos, and yeah …. 1.35TB of RAW files since I got into the digital photography madness. I load up event viewer and one item says, “The device, \Device\Harddisk1\DR1, has a bad block.”. Loaded up Disk Management and Drive S just wasn’t there. I rebooted and my PC’s BIOS telling me I had a bad disk.

After a fresh restart, I immediately opened Windows Explorer to check on drive S:. Thankfully it was there but it cannot be opened and accessed. I immediately went on recovery mode. First thing I did was to test if my chances for recovery is high. I ran an old Sandisk tool RescuePro and recovered files without subjecting the faulty hard disk of any write operation. Though very effective, RescuePro just went on and dumped every file it can recover in a single folder with the recovered files named as 00001.cr2, 00002.cr2 …. xxxxx.cr2. After a few files recovered, I realize it would be a nightmare trying to check each file for its content. I cancelled RescuePro and run TestDisk which I had used with my faulty CF and SD cards before. This tool is very advanced in terms of disk/file recovery but its UI is as old as those character based DOS apps of the 80s. Running TestDisk, I was able to peer into the folder structure of the faulty hard drive, and have each recovered to another disk 1.5TB disk. It took me almost 24 hours to have everything recovered. Yeah … ALL files were recovered.

Just as I thought my woes are over, while verifying each folder if it indeed been recovered, Windows 7 PC blue screened. If you are just a street away from me that time, you could have been deaf by the curses you have heard from me. I restarted the PC and it says something about a missing BootMgr. What the !@#$!!!!! Upon further scrutiny, I realized the problem started some couple of years ago when I had this PC freshly formatted when I added some new hard drives. I remember when I had the first HDD upgrade, I set the BIOS to boot on the new 1.5TB HD instead of the switching cables so that boot order would match corresponding disk ports. What happened was I had the following setup:

  • BIOS Boot Order on Device 1
  • Device 0, 320GB, Active Primary D:\, …
  • Device 1, 1.5TB, System, Boot, C:\, ….

Earlier this year, I replaced the old 320GB with another 1.5TB and forgot to reset what was in the BIOS all these times. So I had the following setup:

  • BIOS Boot Order on Device 1
  • Device 0, 1.5TB (new)
  • Device 1, 1.5TB (old)

Without this HDD crash incident, I could not have known that Windows 7 did the following when I had it reformatted right after installing the new 1.5TB HDD some months back.

  • BIOS Boot Order on Device 1
  • Device 0, 1.5TB (System, C:\, C:\Windows)
  • Device 1, 1.5TB (Boot)

As you can see, BIOS tells the PC to boot from Device 1. Since it has crashed, it could NOT find the necessary boot info, thus I got the “BOOTMGR is missing” message. I attempted to BCDEdit, but the app hangs as it accessed the faulty drive. I have tried Windows repair and all to no avail. Windows repair only managed to fix the partition issue but it does not repair BOOT miscue. All these until I got Hanselman’s blog on BCDBoot where he happen to be in a similar situation.

I immediately ran BCDBoot and restarted the PC, changed BOOT Order to Device 0 and it just wont boot properly.

Thinking, BCDBoot had already corrected the BOOT miscue, I thought Windows Repair could do things differently this time. I popped the Windows 7 installer and went on Repair mode and voila … the PC booted normally. Checking on Disk Management, my rig now says:

  • BIOS Boot Order on Device 0
  • Device 0, 1.5TB (System, Boot, Primary Partition, C:\, C:\Windows)
  • Device 1, 1.5TB (Active, Primary Partition)

I then physically removed the faulty hard drive for one last reboot … and everything just are back, all 1.35terabytes of RAW files and some new knowledge on how Windows 7 installs and fixes itself!