How to Kill GRUB?

December 12th, 2007

No, I’m not talking about those worms in the yard – this is a computer problem!

While experimenting with different Linux OS versions to install on my old laptop, the GRUB bootloader was installed. Actually it was installed by DSL (Damn Small Linux). I loved DSL by the way, but it would not recognize my wireless network card.

Slackware 12 did work well with my card. I had tried it out before DSL, but it ran slowly do to the limited RAM on the laptop.

After I got over the disappointment of discovering that DSL would not work with my wireless network card, I decided to reload Slackware again and use Blackbox or Fluxbox as my GUI. At the very end of the Slackware install is the LILO installation. It failed. I am sure because GRUB was already installed there.

No problem, I’ll just uninstall GRUB – simple enough – or so I thought…

After hours and hours or failure, I decided to research this online. There was no straight forward way to do this. I saw tons of others with the same problem, but only a few solutions. I tried every recommendation I could find (short of using a Win98 boot disk – who still has one of those any way?)

24 hours later, I finally removed that nasty GRUB. Here’s how:

1. Downloaded the Ultimate Boot CD 4.1.1
2. Burned the CD from an ISO file using NTI CD Maker Gold on my Windows computer.
3. Used the MBRTool found in the Partition Tools menu option.

I don’t remember the exact options I used but I run several commands using the MBRTool. I just ran every command that had Wipe in the name or description. I wanted that sucker clean – no fooling around this time! I would advise to use more caution if you are determined to save any of the data on the drive.

When I rebooted, it could not find a bootable drive. Perfect, no GRUB left over. Finally a clean fresh drive to start from.

Now, back to the Slackware install…

The moral of the story: Linux is not for those who lack temperment control or determination. Best just to leave it to the geeks!

Adventures in Linux

December 12th, 2007

I have this old laptop sitting around collecting dust. I paid good money for this thing 5 or 6 years ago, but now it can’t run the latest Windows software. Otherwise, it works just fine. So what should I do with it?

Problem 1: My old laptop works fine and still has some life in it, but technology has passed it by.
Problem 2: My garage needs to be cleaned and organized in a major way, but I am not that motivated to spend a lot of time out there.
Solution: Maybe I can load Linux on the laptop and use it to play music and videos (and work on my much negleted Myspace page) while I work on the garage.

Next step, see if I can cram a version of Linux onto my Compaq Presario 1700 (P3, 64MB Ram, 6GB HDD)!

IE6 Object Impotent

July 9th, 2007

Internet Explorer is object impotent. Recently I have started using more advanced Javascript objects structures in my web applications. This beautifies and simplifies the code. Its the right thing to do — except that IE just can’t their objects to propagate, if you know what I mean :) It took me a while to figure this out, so maybe I can save someone else some valuable time.

IE can import objects into a child window, but it cannot pass an object back to the parent/opener window. When this happens, you will run into the following error:

The callee (server[not server application]) is not available and disappeared; all connections are invalid. The call did not execute.

To fix the problem, create functions in the opener.window or parent.window to build/rebuild/set the objects there. Then call the functions from the child window.

My Scenario:
Main application window trackes times of different events. These times are stored as date objects in a single object called TIMESTAMPS.

When user clicks a button, a new window to verify the times pops up. The window will modify the value of the Date objects in the TIMESTAMPS object in the opener.window.

When the dates are verified, the child window with create new date objects to replace the existing opener.window.TIMESTAMPS objects.

You don’t notice the problem right away, but the next time you try to access these new date objects, you will recieve the error above.

This only happens in IE, all other browsers operate correctly.

Solution:
Instead of passing the new date objects created in the child window, I created a function in the opener.window to build the objects there. I call the opener function from the child window. This works well.

Here is the JavaScript function in the opener window:

function setTimestampObject(objName, jsEpoch)
{
TIMESTAMPS[objName] = new Date(jsEpoch);
}

To set the new date objects I create the date object locally in the child window, but pass the Javascript Epoch timestamp to the opener.setTimestampObject() function like this:

opener.window.setTimestampObject('starttime', newStart.getTime());
opener.window.setTimestampObject('endtime', newEnd.getTime());

This will create new starttime and endtime date objects in opener.TIMESTAMPS. So now we can successfully change the values of opener.TIMESTAMPS.starttime and opener.TIMESTAMPS.endtime from the child popup window.

Summary:
IE is impotent. This is just another way that IE is far behind the pack. Urge your friends and colleagues to switch to a standands compliant browser like Firefox. Until Microsoft really makes an effort to fully implement standards, remove security flaws, and fix their existing functionality quirks, their browser should be rightly considered an inferior product.

IE6 Must Die

July 9th, 2007

It is very unfortunate that the most handicapped browser is the most ubiquitous. It is a situation that I am usually acquiesent about. But I am now fed up. I am ready to move on to the future of web. All of the other browsers are on board, but Microsoft is in no hurry. So we all must suffer.

Us web programmers are forced to turn beautiful code that works in all real browsers (standards compliant) into bastardized frankenstein-like code to work in Internet Explorer. They are increasingly the only browser that has to have special code to work.

It is time for a revolt! I am calling on all good web users to not use their Microsoft Internet Explorer browser. Please, for the sake of my fellow programmers’ sanity and your personal security, always use a different browser. Choose a standards compliant browser like Firefox, or my personal favority Opera.

While I hold Microsoft responsible, it is really up to us to fix the problem. Because their browser is installed on all of their Windows machines, many users just use it instead of make a better choice. Since the majority of Internet surfers use their Internet Explorer browser, Microsoft is in no hurry to correct its security problems or standards compliance. When they start lossing market share, they will finally do something about it.

Lets all send a clear message to Microsoft that we want a secure browser that implements the accepted web standards. If they refuse to provide it, we’ll use their competitors – like Firefox (or my personal favorite Opera!)

If your bank or favorite web sites don’t (or won’t) work with Firefox, call them an request that they fix their site!

Mayday Catch Phrases

May 21st, 2007

I have just returned from our crazy Mayday trip with my brother Steven and friend Travis. I barely survived but made it back with a few catch phrases to remember this trip by:

  1. “I should have brought my triangle.”
  2. “Hey Opie!”
  3. “Porchwalking”
  4. “This S#$t is getting outta hand. I need a rescue.”
  5. “If I was 20 years younger and looked like Barbie…”

Mayday 2007

April 16th, 2007

I am looking forward to my yearly journey to Canton Lake. It never fails to be a good time. Nothing like hanging out on the beach – consuming my favorite beverage and forgetting about everything for a few days.

This year it’ll be May 17-20 during the annual Walleye Rodeo fishing tournament. It’s about the biggest thing that happens in a sleepy little town.

Hopefully I’ll run into a few old friends down there. “Hey – old friends. Clear your calendar and give me a call!”

Past Years’ Highlights:

  • 2004: Big Snake; Huge Bon Fire (to scare away snake); Hearing 49 Pow-Wow from across the lake; Lounging on The Couch in the Sand
  • 2005: 8 hour Horseshoe/Beer drinking tournament; Blind-sided lake tackle
  • 2006: Limosine tour/VIP treatment; Tracey Little Raven; Seeing a 49 Pow-Wow in person

Oh Deer!

January 16th, 2007

Christmas vacation was not really all that relaxing. We had a lot of fun visiting family. Everything was going fine until – “Oh Jesus – A DEER!”

A deer looks much less cute and cuddly when its head is in your lap…

Oh Deer!

Quiet Christmas with family: $Priceless
Suicidal deer on the highway: $3875

Mya Baby Christmas 2007

December 16th, 2006

Mya Christmas 2006

Bird Flu

April 22nd, 2006

Lately I have been spending a lot of time on my new pet project. In December I launched Fluplan.com. Last year I began to hear a lot the bird flu in the news. All of the information I found was focused on the doom-and-gloom. I wanted to find out the real facts of the matter. I spend a lot of time researching about the H5N1 avian bird flu virus.

I put together a nice little report on the subject. I saw other web sites out there selling similar information for $15 to $25. I just couldn’t bring myself to profit from information of this type. Fear is a purchase motivator, but I didn’t think it was ethical to make money from people who were afraid of dying from the virus. So I dedided to offer the report for free instead.

In addition to the report I have been spending a lot of time maintaining a free newsletter on the topic. I have receive a lot of great comments from people who appreciate the free information and the good suggestions I have provided.

It has been a rewarding experience (emotionally, not financially!)

Calculate Business Hours

April 16th, 2006

Don’t you hate it when customers ask for one thing; then a week after they get it they want something else – and you knew it all along?

Yeah me too. Just like when working on a data management application the customers said they wanted reporting. They agreed that the reporting would be based on normal calendar days. That was fine.

About a week after implementation they decided that since they didn’t operate 24×7, their reports should be by business hours. [Oh, that's just great...]

The application was written in Perl. So I figured there was something is CPAN just for the occasion. Sure enough there was.

First I tried the Date::Calc module. I liked the idea that it would work with Date::Manip to automatically handle company holidays.

It worked, but ran waaay too slow. It was fine for a single calculation, but this had to be performed for hundreds or thousands of records. It took several minutes to complete on the old server we had to use.

So instead of wasting more time testing other modules, I just jumped in and wrote one myself.

To my surprise, my homemade version worked extremely fast – at least compared to the Date::Calc version.

To be fair I did not test the Business::Hours module. After looking at the source code, it takes a similar approach to my version – but does not currently exclude holidays.

Here is my solution. One of these days I might make it Object Oriented and turn it into an official module. If I ever get time…

Note: It assumes workday is 08:00 – 17:00 (8am – 5pm). It does not currently have a way to set this dynamically. [If I ever get time... blah blah blah - you know]
Read the rest of this entry »