Sunday, April 24, 2011

Ubuntu’s Video Support is Lacking

 

I’ve been an avid Windows user for a long, long time. But after reading up on how Ubuntu and Linux makes life easier as a programmer and how Windows is so terrible, I decided to give it a try. Could an operating system really have such a large affect?

I downloaded version 10.10 and slapped it on a cd and began formatting my Windows 7 drive and installing Ubuntu. No problems with the installation - so far so good.

Once I got booted into Ubuntu for the first time, I began playing with video drivers. Ubuntu had a problem displaying the desktop on my triple monitor display. No problem, I figured I could get it up and running in no time.

Linux Video Support for Multiple Displays isn’t so Great

Two days later and many frustrated hours of playing with display drivers, I finally gave up and reinstalled Windows 7 (which took an hour or two to get everything up and running).

Ubuntu (and Linux in general) has some seriously lacking support in the video department. Even with using the non-open source drivers that ATI provides, I was still unable to get the setup to work exactly like I wanted to.

I spent several hours trying to set-up the xorg.conf file to properly display on each monitor, and allow windows to be moved between each of the monitors. More often than not, I would try to restart the user interface, and then see some new exception about how the latest change I did was unable to be loaded up.

This leaves me stuck in the Linux shell. This is great, if you know exactly what commands you need to use. However for new users, good luck figuring out what that command may be. If you don’t have another computer handy to look up commands for the shell, you may wind up having to reinstall Ubuntu entirely just to get back to the default settings.

For these types of problems, the Ubuntu forums are your best bet for finding a solution. With a simple Google search, you may find someone else who has a similar problem.

Crawling back to Windows

Unless you have a ton of free time to debug and research problems that are easily solved in Windows, Ubuntu may not be as great as it sounds. You may actually wind up appreciating Microsoft for a job well done. For now, I’ll stick with the guys up in Redmond.

Saturday, April 23, 2011

Hadoop Debugging Pains

Hadoop is an open source Map Reduce framework. On paper, it allows you to create a very scalable distributed program by filling in only a handful of functions. Its benefit lies in solving problems with very large datasets. By shaping a problem into Mappers and Reducers, a program can be divided up on any number of computers. Sounds pretty easy right? At least that’s what I thought going in.

Debugging Hadoop jobs can be a nightmare, as I have seen in the last few weeks. But I have learned a great deal about distributed programming, and how to go about using Hadoop in general.

When I started working on this project, I first began designing how I was going to transform a normal sequential program into a Map Reduce style program with key/value pairs. Looking back now, this really wasn’t the best place to start the process. The first thing I should have looked into was ensuring the Hadoop installation I was looking to use was completely stable. This would have saved me a ton of time.

Most of my debugging time was trying to decipher whether or not the error I was seeing was due to a fault with the Hadoop framework, or a fault within my own program. If I could have eliminated this program at the starting, I could have saved myself many hours of frustration. Looking back on the process now, I would advise anyone looking to play with Hadoop should first ensure the Hadoop File System (HFS) is completely stable.

Once the framework is stable and ready to go, the focus now shifts to the details of the Hadoop jobs themselves. Before jumping into the Hadoop programming, I was given two language options to use: Java or Python via Hadoop Streaming.

Since Hadoop is written using Java, it would only make sense to use Java to actually create the application itself. But by picking Java, you have to deal with Java’s faults. Making sure the inputs and outputs of multiple jobs are correct can be time consuming in itself, and they are unnecessary in Python.

With Python, all that’s needed is a simple script for the Mapper and the Reducer. Everything else is taken care of. The time required to develop the application itself is drastically decreased.

I painfully learned a few other lessons during my Hadoop time.

  • A reducer can receive multiple groups of keys, not necessarily just one
  • Most problems will require many Hadoop jobs to solve. Try to think in terms of transforming the data into a more suitable format with each job.

These are just some words of wisdom regarding Hadoop and Map/Reduce programming. By knowing these ahead of time, many hours can be saved.

Saturday, April 16, 2011

Starting a Programming Blog

After much talk and procrastination, I finally started a blog. Over the past few months or so I have considered starting one. I really like the idea of putting my thoughts down on paper to see my progression as a software engineer. What better time to start then right when I graduate college?

But I have to answer one main question before I start…

Why blog? Well, I can think of a few reasons: to better myself as a programmer and as a communicator. I can’t count the number of times where I have explained some concept or problem to colleagues and then found that I understood the topic a bit better by explaining it (regardless of if they understood me or not). My hope is that by jotting down some problems and solutions that I come across, I will be able to save the next person who has the same problem a bit of time.
So this blog has three goals:
  1. Improve my programming skills
  2. Improve my communication skills
  3. Help out fellow programmers that run into similar problems
After poking around online, I stumbled across this blog post about, well, creating blogs. This post made starting up a blog look simple enough. We’ll see how long it takes me to get everything up and running!