Archive for August, 2007

The Ultimate Boot Disk

Friday, August 24th, 2007

Back in the days when I was using Windows 95 and 98 a DOS boot disk was my knight in shining armor. Always saving the day from my haphazard blunders and general windows screw-ups.

Unfortunately these days most computers don’t come with the standard DOS boot disk, yet alone a 3.5′ floppy drive to put it in.

We’re left with CDs, which generally hold a lot more data – about 486 times as much – but are much more difficult to make a boot disk for. Or so the story goes.

The truth is it’s easy to make a bootable CD. You just need an image file (.ISO). And therein lies the problem. Most people don’t know how to make a bootable ISO file, and the tutorials I’ve found online aren’t easy to follow. Getting them to work – that’s the trick.

The thing is you don’t need to make an ISO file. You don’t need to struggle with getting the right files and burning hundreds of CDs testing it to see if it works. You don’t need to do any of this because there are plenty of people online who have already done this for you. And they keep doing it. Moreover I can guarantee their ISO files are better than yours.

I had upgraded to XP for a couple of months when I screwed up my boot files. Try as I might, I couldn’t fix the problem, and I realized that though I had upgraded my operating system many of the old problems remained. Namely that I still made stupid mistakes now and then that cost me a lot of time and data to fix. In the end I had to reinstall windows completely and came to the sudden realization that I needed a boot disk.

So I went to bootdisk.org to see if they had an ISO of DOS. And wouldn’t you know it, they did. Unfortunately the bootdisk I made couldn’t detect the hard drive. I had an utterly useless boot disk. What good is it if I can get on DOS but can’t access the files I need to fix?

I’ll tell you, it’s no good. But there is another alternative. A better alternative. Technology has come a long way since the days of Windows 9x and quite frankly DOS is rather dated. It was my knight in shining armor, but that armor was getting pretty rusty. I had found the new hotness.

So without further ado may I introduce you to the ultimate boot disk. Linux!

You’ve heard of that, you say? Of course you have, and where DOS was the knight in shining armor, Linux is an unbeatable fortress of saving your (and my) butt. It is a sysadmin’s dream. Corrupted boot files? Not a problem. Need to recover data? Ok!

All you need is a Linux Live CD. It is an entire operating system that boots from CD. Just pop it in and it’ll work, regardless of what went wrong in Windows. If it doesn’t then you have a hardware problem.

I have tried GoblinX and Knoppix and they both look nice and work well, but by far my favorite is Kubuntu. Get the Live CD image, burn it to a CD, and you will have a boot disk that puts DOS to all sorts of shame.

Kubuntu comes with a browser (Konquerer) so you can get info on your problem, as well as a media player, text editor, graphics software and just about everything else you could possibly want. The downside is that like my old DOS boot disk you can’t access the hard drive. At least, not right away, and this is the catch that got me at first.

I kept thinking it was useless if I couldn’t fix the problem, although at least I could still get online. But the catch is you have to mount the hard drive. Don’t worry, it won’t do anything to the files, and in future releases of Live CDs this should be completely automatic.

For now though, you have to do it manually through the terminal. In Kubuntu it is a program called Konsole, which resembles DOS quite a bit. In fact it is a shell terminal (SSH) and if you’re familiar with SSH or Telnet on a linux server then this should be a piece of cake, but I’ll tell you how to do this anyway. In SSH many of the commands are the same as DOS.

To mount your drive in Kubuntu open up Konsole and type:

ls /media/windows

If you get a response that no such directory exists then you can go ahead as follows, but if it exists you may have to use a different directory (one that doesn’t exist yet) because we’re about to make it. To make this directory type:

sudo mkdir /media/windows

This will make the directory /media/windows. It will be created within the RAM of your computer where Kubuntu is running and not on your hard drive. Now you need to mount your hard drive.

Normally the hard drive can be found at /dev/hda1 on Linux, but you can’t access that. It’s off limits because it needs to be mounted. But before you can mount it you have to know what type of file system it is. Mine is NTFS so I typed the following:

sudo mount /dev/hda1 /media/windows/ -t ntfs -o nls=utf8,umask=0222

For a VAT32 system you would type something like this:

sudo mount /dev/hda1 /media/windows/ -t vfat -o iocharset=utf8,umask=000

And poof, it’s done. You can now go into Konquerer and type /media/windows to view your Windows partition.

For more information on working with Ubuntu (and Kubuntu) visit the guide.
Manual: Ubuntu:Feisty

FizzBuzz

Thursday, August 23rd, 2007

I came across an interesting article today on weeding out weak programmers. Simply ask them to program FizzBuzz.

Using FizzBuzz to Find Developers who Grok Coding

FizzBuzz is a game children play in the UK where they each sit is a circle and begin to count. The catch is that if the number is a multiple of 3 you have to say ‘Fizz‘, if it’s a multiple of 5 you say ‘Buzz‘, and for multiples of both 3 and 5 you have to say ‘FizzBuzz‘.

Supposedly many computer science majors and other applicants for programming jobs can’t do this simple task.

On occasion you meet a developer who seems like a solid programmer. They know their theory, they know their language. They can have a reasonable conversation about programming. But once it comes down to actually producing code they just don’t seem to be able to do it well.

You would probably think they’re a good developer if you’ld never seen them code. This is why you have to ask people to write code for you if you really want to see how good they are. It doesn’t matter if their CV looks great or they talk a great talk. If they can’t write code well you probably don’t want them on your team.

After a fair bit of trial and error I’ve come to discover that people who struggle to code don’t just struggle on big problems, or even smallish problems (i.e. write a implementation of a linked list). They struggle with tiny problems.

FizzBuzz sets out such a simple task that anyone who can program should be able to write up a code that can do this in a couple of minutes. It’s amazing to hear that many of the applicants who apply for a programming job aren’t able to do this.

Perhaps the question is too easy. At first I thought there had to be some sort of catch to it. A trick question. But no, it is that easy. Simply write a program that will count from 1 to 100 replacing multiples of 3 with ‘Fizz‘, multiples of 5 with ‘Buzz‘, and multiples of both with ‘FizzBuzz‘. No tricks. No hidden catches.

So naturally as a programmer myself I immediately had to set out to prove my competence by writing FizzBuzz in PHP. While my design is far from elegant, I assure you that it works, which puts me in that club of programmers who can program.

// SET TWO VARIABLES
$multiplesofthree = 1;
$multiplesoffive = 1;

for ($i=1;$i<=100;$i++) {
if ($multiplesofthree==3 AND $multiplesoffive==5) {
$tehprintout=”FizzBuzz”;
$multiplesofthree=0;
$multiplesoffive=0;

} elseif ($multiplesofthree==3) {
$tehprintout=”Fizz”;
$multiplesofthree=0;

} elseif ($multiplesoffive==5) {
$tehprintout=”Buzz”;
$multiplesoffive=0;

} else {
$tehprintout = $i;
}
$multiplesofthree++;
$multiplesoffive++;

echo “$tehprintout
“;
}

Article: Why can’t programmers.. Program?

Online Economics and those who oppose it

Wednesday, August 22nd, 2007

Firefox is endorsing a new plugin called adblock plus. This one little plugin is causing a stir amongst internet advertisers and those who would block them.

From WhyFirefoxisBlocked.com.

The Mozilla Foundation and its Commercial arm, the Mozilla Corporation, has allowed and endorsed Ad Block Plus, a plug-in that blocks advertisement on web sites and also prevents site owners from blocking people using it. Software that blocks all advertisement is an infringement of the rights of web site owners and developers. Numerous web sites exist in order to provide quality content in exchange for displaying ads. Accessing the content while blocking the ads, therefore would be no less than stealing. Millions of hard working people are being robbed of their time and effort by this type of software. Many site owners therefore install scripts that prevent people using ad blocking software from accessing their site. That is their right as the site owner to insist that the use of their resources accompanies the presence of the ads.

The argument from the surfers is that the advertising on the internet is intrusive at best and malicious at worst. So a plugin has been developed which allows Firefox users who have it installed to block ads. Software like this has been in existence for years, but certain advertisers have taken up arms against adblock plus because not only is Mozilla endorsing this plugin, but they have no means to block the visitors who are using this plugin.

Some have gone so far as to completely block users who are surfing with Firefox.

Completely blocking Firefox users from visiting your website is ridiculous. For one, it is too easy to circumvent. Another plugin would allow Firefox users to mask their user agent – the variable that tells your site what browser the visitor is using – so that they could appear to be using any browser. Or they could use IE Tab, another plugin for Firefox, which would make the browser load a page using the Internet Explorer engine and thus make the user appear to be surfing with Internet Explorer. There is no way to prevent users of adblock plus from accessing your content – at least not 100%.

On the other hand, completely blocking ads is ridiculous too. Some things, like aggressive popups and malicious ads, need to be blocked. Otherwise they compromise your computer and put you at risk. Firefox already does this though, and it does it well. There is no real value in the plugin adblock plus. Except, of course, if you want to be smug.

‘The internet is free’ some would argue. But not for the publishers. There are costs to putting a website on the internet. Time, and money. And as we all know Time equals Money. Any website that gets more then 10,000 hits a day would need it’s own server. The average server costs about $100 a month. Then there is the cost of the scripts and web design. Programmers can do these things themselves, but it takes them Time – which equals money. Then there is the maintenance of the site. It takes time and dedication to get a good website off the ground, and to keep it going.

And this is all over the internet. Most of the sites you see online are either funded by ads or, if it hasn’t broken even yet, out of the publisher’s pocket. The internet is sustained by the revenue generated by advertising it and without this revenue the internet would fail. Myspace would not be online if there was no money being brought in to support it’s massive growth. Neither would Digg or Fark. These sites are supported by the ads they serve.

Some ads do need to be blocked. The same ads Firefox is already blocking. But to use
adblock plus to block ads like Google Adwords or a banner or two on somebody’s blog for the sake of being smug and righteous is naive at best. You may not click on the ads you see online, but at least understand the economics behind it.

Whitespace Graphic
Quick Buttons Navigation
Tabbed Buttons Navigation
Subscribe to Four Points Cardinal's RSS Feeds Foponet Services F.A.Q. Traffic Exchange Mods Open Source Contact Me About Me FopoNet Blog