ThoughtFactory.CreateThought()

A random collection of thoughts from an easily bored developer

RSS Feed


Fast Food Development

5 January, 2009 (05:25) | Career in IT, Consulting | No comments

The idea of trust within a software development team is an interesting one. Jeff Atwood argues that a lack of trust between management and the development team can lead to “micromanagement zombies” who mindlessly follow anything management tells them without contributing creatively. I believe that the issue is much more complex than this, as demonstrated by the following comment from the post:

OK, what do you do if:

  • Your team regularly commits errors to make the editors of Daily WTF blush?
  • They’ve been doing it that way their entire career and aren’t very interested in changing?
  • They’re above average coders in the SE Asian nation you live in?

At least you can shoot zombies.

What we have here are two totally different approaches to software development: Fast Food and Gourmet.

The Fast Food approach delivers a bland product that is frequently prepared incorrectly, but it does it fast, cheap and using unskilled resources. The Gourmet approach delivers a higher quality product, but may take longer, will certainly cost more and requires a more experienced resource to prepare.

Successful fast food chains invest millions in making meal preparation as idiot proof as possible. Flashing lights and screeching sirens tell their employees are told when to wash their hands, when to flip the burgers and when to change the oil in the fries. They are micro-managed to the hilt simply because management do not trust their employees and expect them to fail if left to their own devices.

In contrast, a gourmet establishment has higher expectations of their staff. At the very least, they expect them to know how to cook as opposed to how to follow a checklist of specific orders. Most restaurants have to trust their staff to be able to perform their jobs to a certain level without specific instructions.

This parallel exists in many industries; for example, a master luthier would be trusted by his or her management more than the employee working the line in a factory that produced cheap, mass production guitars. Each has a place: some people want to spend $10,000 on a quality custom guitar, where as others would prefer to spend $150 on a cheap hunk of plywood that sort of looks like a guitar. To each their own.

The software development industry is no different. As much as some people would hate to admit it, there is a market for horribly written software that is impossible to maintain but was developed for minimum wage. It may be cheaper to produce a quality product using quality resources and best-of-breed practices, but that is irrelevant when the customer simply does not care about, or cannot afford, quality. These are the same customers who consider Access a viable solution, and who would have never been able to afford custom software before the advent of VB6.

To service these clients it may be necessary to use inexperienced or low-skilled workers and use management practices similar to those found in fast food restaurants. If you know that your resources are incapable of developing a product without guidance then all you can do is hope that they follow instructions and review, review, review.

I’m fortunate enough to work in an environment where high quality resources are the norm, but I have also consulted in the small business market and seen first hand just how common Fast Food Development is out there in the “real world”. Regardless of developer idealism, cheap, dodgy software development is the oil that keeps the wheels of business running. As a quality developer you may not want to work in environments such as this, but that is no reason to stick your head in the sand and pretend that they do not exist or are not an important part of the software development landscape.

Awesome cuff links are awesome

4 January, 2009 (09:25) | Toys | 1 comment

I’ve never been a fan of “bling”. I don’t wear watches, necklaces, rings, earrings or anything of that sort. If my shirt requires cuff links then I’ll usually wear the standard “monkeys fist” style silk knot cuff links that come with some French cuff shirts.

Transformers cufflinks Ctrl & Esc key cufflinks

Saying all that, I love these cufflinks. They were a birthday present from my better half, and are sufficiently geeky without being overly garish.

They aren’t exactly “hey, look at me, I’m totally unique and quirky!” items, unlike, for example, the 8-bit tie, which I could never wear to work with a straight face. Perhaps if it came in a colour that wasn’t bright blue or red?

Update: I’ve had a few people ask me where I got these from. I’ve been informed that they came from http://www.benjamincufflinks.com.au/.

Flashdance

28 December, 2008 (05:03) | General Computing, Linux | No comments

Until recently, Adobe’s support for Flash in 64 bit Linux environments has been pretty much non existent. Those of us who have made the jump have had to make do with nspluginwrapper, which enables the Netscape plugins to run on architectures (such as x64) that they were not written for. The experience offered by this solution was seriously sub par, and was almost a show stopper issue for me when deciding whether or not to make the switch to Linux.

This all changed when Adobe started releasing Alphas of the Flash 10 player for x64 linux distros. Finally we can run the flash plugin natively, ditching the horrid performance and “gray screen of death” that was commonly associated with nspluginwrapper.

It took me about 20 seconds to set up the new plugin using this guide from Softpedia. I uninstalled nspluginwrapper, created a plugin directory as instructed and copied in the libflashplayer.so file. Then I reboot firefox and….

Argh! The performance was even worse than before! What was going on?

A quick scan of top told me that a process called gtk-gnash was eating 100% of one of my 4 CPU cores. I had found the culprit. Unfortunately Ubuntu comes with a horrible open source flash implementation called gnash. The nspluginwrapper implementation had successfully kept it at bay, but now that was gone, leaving me exposed to the CPU usage equivalent of Unicron that is gnash.

After uninstalling everything to do with gnash and giving the system a quick restart for good measure, seeing as gnash had successfully crashed ALSA and a few other core systems, and I was up and running. Finally I can enjoy watching mind numbing Youtube videos and playing benign Flash games at a speed more befitting of my Quad Core box with 8 Gb of RAM!

DataDude for All

23 December, 2008 (21:58) | Coding | No comments

Picking an appropriate version of Visual Studio Team System for your team to use has always been an interesting proposition. The full Team Suite edition is outside the price range of most projects, and you have to make sure that the majority of your team will be able to see all of the artifacts with minimal trouble. Using features such as the infrastructure diagramming tools or database projects can often mean that you have one machine capable of performing that function, which can act as an annoying bottleneck for your team.

The choice of product becomes an even tougher question if you are a Microsoft Gold Partner (with ISV or CDS competency), as Gold Partners have traditionally gotten a certain number of VSTS Developer Edition licenses as part of their partner pack. This is great, but it makes it really hard to justify the cost of another version of VSTS. Other versions are now $4000 dollars more expensive than Developer edition, rather than all of the editions being the same price.

I have always maintained that, bang for buck, VSTS Database Edition is the best value for money out of all the VSTS editions, and, given a choice, I would pick this for every member of the team so that they could all use the database source control feature. It’s the feature I always miss whenever I don’t have the full Team Suite edition of Visual Studio installed.

There was much rejoicing, then, when I found this lovely little tidbit on the MS Partner site.

Certified Partners who have earned either ISV and/or CDS Competency are upgraded to Microsoft Visual Studio Team System 2008 Development Edition with MSDN Premium Subscription. Starting 1 October, 2008, these Certified Partners will be able to download VSTS Database Edition from MSDN Subscriber Downloads as part of their upgrade to VSTS Development Edition with MSDN Premium Subscription.

It seems that we now get the choice between VSTS Developer Edition and VSTS Database Edition. I for one am extremely happy with this news. Test Edition and Architect Edition have some nice features (most notably the performance testing tools in Test Edition which run rings around the old Application Centre Test product that came with 2003), but for me these two products cover the majority of the Team Suite features that most development teams would need.

The Truth, The Whole Truth, and Nothing But The Truth

8 October, 2008 (09:49) | Consulting | No comments

There’s no denying that recruiters deliver a useful service to the IT consulting industry; without them we’d never be able to hire personnel with more than 2 or 3 degrees of separation from our current employees. However, the extended reach comes at a cost. The recruiters themselves are not IT consultants, and they also have limited time. This means that they need a way of placing candidates in positions that does not involve deep knowledge of the domain or a vast amount of time. A really effective way of doing this is through tagging.

The problem with tags, though, is that you can game the results if you know what people are searching for. The IT job market realised long ago that common industry buzz words and “hot technologies” form a large portion of the obvious tags that recruiters will be searching for. Since then candidates have been peppering their resumes with them in order to catch the eye of recruiters.

The good news is that job seekers usually won’t put in keywords that have nothing to do with their technology space, meaning that you still get .Net developers sent through for .Net jobs and Java developers interviewing for Java jobs. The bad news is that a lot of candidates are rather liberal in lacing their resumes with terms that they think the employer will be looking for rather than terms that actually reflect their experience and understanding. They also have a tendency to apply this focus on keywords to the other parts of the interview process. What they don’t realise is that no one involved in the actual hiring process cares about buzz words, so they are going to assume that you have experience with whatever you mention and treat you as such.

This is especially true at technical interviews. If you’ve indicated that you know all about XP, TDD, DDD, ORM and a bunch of other cool acronyms then you should expect to be asked questions about them. Questions like this usually carry much more weight, as you have set an expectation. To falter here indicates that you have either been dishonest or just don’t know what you’re talking about.

For example, if the interviewer asks you about a technology you know nothing about and you haven’t given them any reason to think that you know something about it then it’s perfectly acceptable to say “I don’t know”. If, however, you indicated that you knew of the technology in question then not giving a decent answer looks really bad.

It’s not uncommon for a potential employee to mention a technology that they know nothing about just because they might think that the interviewer wants to hear them say it. Pro tip: If a company wants you to mention random technologies you know nothing about just so they can tick it off on a list then that’s probably not a company any decent consultant would want to work for. Any company worth their salt should be looking to assess your current abilities and your potential to grow, not trying to check off a list of buzz words to see if you are “compliant” with their “technology stack”.

So please, next time you submit a resume or go for an interview just try and focus on your actual experience and aspirations rather than getting hung up on what you think the company expects you to mention. Remember that there’s a good chance the person interviewing you either does a similar job to the one you’re applying for or has done in the past, so they’re going to be able to call you out if you don’t know what you’re talking about.

Expand Your Mind

14 August, 2008 (16:51) | General Computing | No comments

After the recent release of Visual Studio 2008 SP1 and .Net 3.5 SP1 I thought it would be a good idea to upgrade my Windows development environment to take advantage of some of the cool new features. I do .Net development on my Ubuntu machine by using VirtualBox to run a Windows 2008 Virtual Machine. It works quite well, especially if you’re mainly doing server side stuff or Windows Forms. I’m not sure how it would handle the DirectX goodness of WPF, but I’m willing to live without that for the moment, and I can always install Vista x64 on another box if need be.

When I originally set up the VM, 20 gig sounded like a good size for the hard drive, so I set up a 20 gig dynamically expanding VDI file using VirtualBox and started installing. The dynamically expanding disks are cool in that they will only expand if need be, so if you create a 300 gig image and only use 20 gig of it, the VDI file for the drive only uses 20 gig of your actual disk space disk. I wasn’t planning on installing office or anything else, so I thought that the drive would be more than big enough. How wrong I was.

After installing the Windows 2008, Visual Studio 2008, SQL Server 2008 and Firefox 3.0  I had around 3 gig free. Where did all my drive space go??? “No matter”, I thought, “3 gig should be enough to work with for the moment, especially as I’m using network drives for all my data storage”. I continued working like this for a few months, right up until I went to install the VS 2008/.Net 3.5 Service Pack 1 updates.

Half way through the install I merrily discovered that the service packs require over 6 gig of free space just to install themselves. But.. but.. but… I don’t HAVE 6 gig of free space! It should be noted that the installation program says that it is merely “recommending” that you have this amount of free space, but it won’t let you continue unless you free up the “recommended” 6 gig. That’s a pretty definite recommendation.

My first thought was that to free up that amount of space I would have to uninstall either Visual Studio or SQL Server, which would sort of defeat the purpose of installing the service packs. Obviously this wouldn’t do, so I went looking for ways to save a few gig here and there, and quickly discovered that I had a 2 gig page file by default. I reduced this to 200 meg or so, but I still needed to free up more space to install the service packs.

At this point I gave up on the idea of trimming back my install to allow the service pack to continue. I went hunting for some free hard drive cloning software, and found the excellent (and free) HDClone. HDClone allows you to copy one hard drive to another, and it can also expand partition so that it takes up all the space on the new drive.

Screen Shot of HDClone Running on VirtualBox

I downloaded the free version of HDClone and mounted the ISO in VirtualBox, then I created a new 230 gig dynamically expanding VDI file which should be enough to install the service pack (cough). I mounted the new drive as the secondary master for my Windows 2008 Virtual Machine and mounted the ISO in the virtual CD-ROM drive.

A quick reboot of the machine presented me with the HDClone interface, and in 4 clicks I was ready to copy my drive. It even asked me if I wanted to covert the partition to take up all 230 gig of the new virtual drive. I let it do the conversion and left it to copy all my data.

An hour or so later it was done. HDClone asked me if it wanted me to automagically set up my partition data, so I let it do that and then reboot. “Yay!”, I thought, “finally I’ll be able to install the service pack!”.

Unfortunately it was not to be. When trying to boot off my new VDI file I discovered that it wouldn’t boot, even though it new the OS was on there. I dug around for my Win2k8 install media and went into repair mode. Sure enough, Windows was reporting my partition as being 0 meg. Something wasn’t quite right here.

I could have downloaded something like the Ultimate Boot CD to play around with the partitions, but it was late and quite frankly I couldn’t be bothered, so I booted back into HDClone again and redid the copy, this time making sure that I said “no” to its overzealous partition magic (no pun intended).

Once that was finished I removed the old 20 gig VDI, gave it a reboot and bingo, I now had Win2k8 installed on a 224 gig drive. This was more than enough space for the Service Pack 1 installer to work with. I might even have enough room to install MOSS 2007 now.

Coolest. Thing. Ever.

25 July, 2008 (09:54) | Toys | 3 comments

I honestly had no idea they made these. I saw them on display at the Target toy sale, but didn’t get a chance to make a purchase. Ah, to be 10 again..

Looking at these, I’m reminded of the all night Zone 3 sessions I used to frequent in my youth. It leads me to wonder how the Halo hardware compares to the commercial laser tag systems like they use at the modern Zone 3 equivalents like LaserCorps and DarkZone, as it would be pretty cool to have a LaserCorps style skirmish using the Halo gear. I somehow doubt they’re going to have the range required, though, and probably don’t have any concept of a central scoring system.

Wikipedia seems to have a nice writeup of all the different manufacturers of lasertag equipment, but it doesn’t mention very many consumer kits. No matter, at least they look cool.

Command and Conquer Pt 1: The Basics

16 July, 2008 (12:01) | General Computing | 2 comments

In the early years of public internet usage, before the days of PPP and SLIP (anyone else remember using a SLIP client to get IP connectivity??), one of the only ways to get connected from home was to dial in to a *NIX shell account using a Terminal Emulator application. To many people, their first exposure to the “internet” involved a blinking cursor and a plethora of confusion as their “dir” command refused to work.

That method of internet access hasn’t been popular in quite some time, but regardless, the ancient art of staring blankly at the command line is making somewhat of a comeback through another avenue. With the popularity of OSX, Linux-based ultra portables and “friendly” Linux distributions such as Ubuntu, more and more people are being exposed to environments where Bash is the most common way of performing non-GUI operations.

“What’s that?”, I hear you say, “Non-GUI Operations? But I’m using the latest version of Friendlynix, the friendliest Linux distribution in the world! Can’t I do everything through the GUI?”. For the most part, yes. However, there are going to be times when you need to peek “under the covers”, and it’s best to be prepared lest you be shocked and disturbed by what you find. *NIX variants may have lost a lot of their rough edges, but it’s not all icecream and cakes just yet.

So let’s start with the basics. A *NIX style file system is completely different to the C:\ drive orientated view found in Windows. Everything starts from a single root directory, which lives at “/”. All your devices, including DVD Drives, USB sticks, and hard drives,  live as branches of this directory. If you’re interested, you should look into device mounting, but for the sake of this conversation it’s enough to know that the top of your file system is always “/” and everything else can be found below it. Another thing to note is that most *NIX file systems are case sensitive. This means that, to the file system, “MySpecialFile.txt” is not the same as “myspecialfile.txt”.

One of the most important things you’ll need to do once you pop open your terminal of choice is get your bearings, as you won’t be comfortable until you get a feeling for where you sit in relation to everything else. Depending on your terminal setup, this may already be shown to you as part of the prompt, but if it is not then you’ll want to use a command called pwd, which means “print working dir”.
garrys@GAMBIT:~$ pwd
/home/garrys

Here it is telling me that I’m currently in the “/home/garrys” directory. This is my home directory, and is quite often your starting point for a new shell session. Don’t worry about the “garrys@GAMBIT:~$”. That’s my Bash prompt telling me who I’m logged on as, the machine that I’m logged on to and the current working directory. “~” is effectively a shortcut for your home directory, but I’ll get into that a little later.

Now that we know where we are, we’ll want to get a look at our surroundings. The ls command is the *NIX equivalent of good old dir, and the source of much confusion for recent DOS converts. It stands for “list directory contents”, and that’s exactly what it does.
garrys@GAMBIT:~$ ls
amsn_received Music squeak.image
argo.user.properties My GCompris SqueakV39.sources
autosave.xmi nautilus-debug-log.txt temp
Desktop paw.metafile Templates
Documents Pictures uml_generated_code
Examples Public Videos
GNUstep runtime-EclipseApplication workspace
gpodder-downloads squeak.changes

Now, there are a few arguments for ls that you should be aware of. The actual format of the ls command is:
ls [OPTIONS] [FILE]

where [OPTIONS] is, for the sake of this conversation, a string starting with “-” and [FILE] is a filter that you would like to apply to restrict your query. Both [OPTIONS] and [FILE] are optional. [OPTIONS] represents a series of options that you can apply to your command to affect the outcome. An important thing to note is that these options can be combined, which makes for a pretty powerful little tool.

One of the most useful options you can apply is the list option, “l”. It formats the output in a one item per row list, and also presents additional information on each entry, including file size. You would execute it as follows.
garrys@GAMBIT:~$ ls -l
total 16500
drwx------ 2 garrys garrys 4096 2008-05-13 20:10 amsn_received
-rw-r--r-- 1 garrys garrys 1439 2008-07-04 09:42 argo.user.properties
-rw------- 1 garrys garrys 18067 2008-07-14 20:34 autosave.xmi
drwxr-xr-x 15 garrys garrys 4096 2008-07-04 18:44 Desktop
drwxr-xr-x 8 garrys garrys 4096 2008-07-14 18:01 Documents
lrwxrwxrwx 1 garrys garrys 26 2007-12-02 09:07 Examples -> /usr/share/example-content
drwxr-xr-x 3 garrys garrys 4096 2008-07-13 21:10 GNUstep
drwxr-xr-x 5 garrys garrys 4096 2008-07-05 19:55 gpodder-downloads

ls in it’s base form tries to be helpful by hiding various files from you, such as those that start with a “.” character. If you’d like to see these, you can use the “a” option (think “all”, as in “show me all files”). Here we’ve combined the “a” and “l” options to show all files in a directory in an item per row list format:
garrys@GAMBIT:~$ ls -la
total 17868
drwxr-xr-x 138 garrys garrys 12288 2008-07-17 00:31 .
drwxr-xr-x 3 root root 4096 2007-12-02 09:07 ..
drwx------ 2 garrys garrys 4096 2008-04-20 23:58 .abuse
drwxr-xr-x 2 garrys garrys 4096 2008-02-22 20:17 .ActiveState
drwx------ 4 garrys garrys 4096 2008-05-30 23:57 .adobe
drwxr-xr-x 4 garrys garrys 4096 2008-01-04 13:50 .alien-arena
-rw-r--r-- 1 garrys garrys 224 2008-05-11 23:53 .alsamodular.cfg
drwx------ 9 garrys garrys 4096 2008-05-28 01:31 .amsn
drwx------ 2 garrys garrys 4096 2008-05-13 20:10 amsn_received
-rw-r--r-- 1 garrys garrys 657 2008-07-15 22:09 .amSynthControllersrc
-rw-r--r-- 1 garrys garrys 116060 2008-07-15 22:09 .amSynth.presets
-rw-r--r-- 1 garrys garrys 159 2008-07-15 22:09 .amSynthrc
-rw-r--r-- 1 garrys garrys 1439 2008-07-04 09:42 argo.user.properties

Notice all the files with full stops at the start? Normally we wouldn’t see these (and rightly so, as they are mostly settings files), but the “a” option makes them visible. There are many more useful options, such as “t” to sort by the modification time and “S” to sort by size, but those should be enough to keep you going for the moment.

After specifying all your options you are able to add an optional filter to limit your results. These filters can make use of wildcards. You will probably find yourself reaching for the “*” character more often than the others. It basically means “match anything and everything”, and is incredibly handy. Using this you could do something like the following to match all text files in a directory:
garrys@GAMBIT:~$ ls *.txt
nautilus-debug-log.txt

As you can see, only files ending in “.txt” were returned. Very useful.

Now that we can look at the contents of a directory, how do we move about? We use the cd command, which means “change directory”. cd is fairly straightforward, as the syntax is extremely simple:
cd [DIRECTORY]

There are a few special directories that you should be aware of. The aforementioned “/”, or root directory, is probably the most important. If you cd to here then you’ll be sitting at the top of your file system. As previously mentioned, “~” is a shortcut for your home directory. If you cd to here from anywhere in the file system then you will be taken straight to your home directory, usually /home/yourusername.

Every directory always contains two entries you can navigate to, “.” and “..”. The first, “.”,  refers to the directory itself, so if you cd to this then you’re not going to go anywhere. This is actually extremely useful, as you’ll find out later on, but for the moment we’ll ignore it. “..” refers to the parent directory (the directory “above” your current location in the file system). Technically you could cd to “..” until the end of time, as once you hit the root directory it becomes just like “.”, i.e. “..” in the root directory always refers to the root directory.
# Change directory to the root of your file system
cd /
# Change directory to your home directory
cd ~
# Stay in the current directory
cd .
# Move to the parent directory
cd ..

When moving to an actual directory you simply type the name of the path to that directory. You can either reference the directory from the root of the file system (an absolute path), or use a relative path, which is the location of the directory from your current position. For example:
# Move to the "etc" directory which lives directly under the root directory
cd /etc
# Move to the downloads/graphics directory which is in the directory I'm currently in. Note there's no leading "/" because we want the path to be relative
cd downloads/graphics

We can even get fancy and combine the parent directory “..” with other paths. This allows us to move up in the file system as well as down. For example:
# We're going to use two directories here: /etc and /bin. They both sit one level under the root directory.
garrys@GAMBIT:/$ cd /etc
#Then we can use a relative reference to move to /bin as follows
garrys@GAMBIT:/etc$ cd ../bin

You can also use wildcards with cd. It will pick the first matching path from the wildcard results and attempt to change directory to it.
# Get a list of all the directories starting with "D". The -d option on ls simply tells ls to only print the names of directories, rather than their contents
garrys@GAMBIT:~$ ls -d D*
Desktop Documents
# Change directory to the first wildcard match, which is going to be the Desktop directory
garrys@GAMBIT:~$ cd D*
# Show our full path, just to prove exactly where we are (even though it's shown in the Bash prompt)
garrys@GAMBIT:~/Desktop$ pwd
/home/garrys/Desktop

The most important thing you can ever be taught is how to learn, and the best way to learn about commands on *NIX systems is the man command. It presents manual pages on commands, describing exactly what they do and what syntax you need to use when calling them. Using this command you can find out more information about all those ls options I neglected to mention in the above text.
garrys@GAMBIT:~$ man ls
LS(1) User Commands LS(1)
NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
DESCRIPTION
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort.
Mandatory arguments to long options are mandatory for short options
too.
--SNIP--

The man command takes up the entire terminal, and pushing escape will not get you out of it, no matter how many times you try. “q” is the magic key to exit a man page. You can also use the arrow keys to move around, and space acts as a “page down” mechanism. One of the coolest things you can do is search within the man page. “/” followed by a character sequence will search the man page for that character sequence. Very handy if you’re hunting through a rather lengthy file for one pesky option.

One of the best things about *NIX based operating systems is the majority of the content on your file system is in plain text format. Storing things like this is actually a key part of the philosophy that UNIX was based on, as it enables programs to play nice with each other on the command line (among other things). So you have all these text files sitting on your computer; how do you get at them? Well, there are a few options, perhaps the simplest being the cat command.

cat is capable of concatenating multiple files together and printing them out to the command line. Technically it sends them a stream called stdout, but that’s a discussion for another day. Basically you give it one or more files (actually you don’t even need to give it a file, but once again that’s a little beyond our discussion here) and it will print the files out, one after another.
garrys@GAMBIT:~$ cat textfile1.txt
This is textfile 1
garrys@GAMBIT:~$ cat textfile2.txt
This is textfile 2
garrys@GAMBIT:~$ cat textfile1.txt textfile2.txt
This is textfile 1
This is textfile 2

That’s fine for small text files, but what about large files? Well, for that you can use less. It presents information page by page, much like man; in fact, it has almost the same syntax as man (q to quit, space to page, “/” to search etc). You can check out it’s man page for a full list of commands. You may also be interested in learning about more, which is basically the predecessor to less. It’s worth knowing simply because you may see it pop up on the web and wonder just exactly what it is.

Most of the commands you’ve executed up until this point have been in your PATH. This means that they are in designated parts of the system that Bash is aware of and knows to look for executables in. A slight problem arises when you try to run an executable file that may be sitting on your Desktop or in your home directory somewhere;  namely it won’t find the file you’re after.It can be incredibly frustrating for new users, as the file shows up when using ls. The thing is, for various security reasons you need to provide a full path to any executable that’s not in your PATH.
# List the executable I want, just to show that it's clearly in the local directory
garrys@GAMBIT:~/Desktop$ ls NVIDIA-Linux-x86_64-169.12-pkg2.run
NVIDIA-Linux-x86_64-169.12-pkg2.run
# Try to execute the file without providing a full path
garrys@GAMBIT:~/Desktop$ NVIDIA-Linux-x86_64-169.12-pkg2.run
#Bash tells me that this didn't work because it couldn't find the command
bash: NVIDIA-Linux-x86_64-169.12-pkg2.run: command not found
# The following will work, as I've specified a full command by using the magic "." directory that references the current directory. The added "./" at the start is the key to success here
garrys@GAMBIT:~/Desktop$ ./NVIDIA-Linux-x86_64-169.12-pkg2.run

This is a fairly big difference for people who are used to the Windows command line or DOS, but it’s one that’s extremely important to remember.

So now you can find out where you are, see what’s in your current directory, move about, find out more information about commands and check out the contents of text files. See, the command line is not so scary after all! Next time we’ll check out some basic file and directory manipulation commands and also explore the difference between Windows and *NIX style file permissions.

The Rumble In The Jungle

14 July, 2008 (08:53) | Gadgets | 6 comments

The technology industry is no stranger to brand wars, nor the fanboys that accompany them. For decades, battles have been waged in the school yard, workplace, arcade, any place where over-excited tech geeks gather, all over issues that seem inconsequential to the casaul observer. Whether it be Apple vs IBM, Amiga vs IBM, Microsoft vs everone else or Sonic vs Mario, opposing forces are willing to defend their claim to throne right down to the last soldier.

This sort of behaviour usually occurs when you make a significant financial outlay and have to choose between competing products that do essentially the same thing, either because it’s only practical to own one of the devices or because you can only afford one. It’s the reason that Ford and Holden owners don’t get along, and why the console wars are so intense. If you’d just spend $40,000 on a car or were 14 years old and had spent 3 years of savings on a games console then you’d want to justify the purchase when it came under fire. Computers and Gadgets are not exactly known for being cheap, so it’s no wonder that the industry is rife with commentators and consumers who are rather vocal about the choices they have made. After all, who would want to admit to being on the losing side of a technology war, especially after laying down a few hundred or thousand dollars on a new purchase?

N95 owners, of which I am one, are one of the latest groups to join in the self justification to avoid feeling like they have just purchased $800 of FAIL. The iPhone, with it’s fancy touch screen and vast amounts of media coverage, has become somewhat of an affront to everything an upstanding Nokia user should stand for, and a scourge that must be wiped from the face of the Earth. The only logical way to accomplish this feat is through the release of many “anything you can do, I can do better” YouTube videos. Now why didn’t I think of that?

Amidst all the kerfuffle, one of my close friends has said “why can’t I have both??”. He’s a recent N95 8Gb owner, and being a total gadget geek, simply had to have an iPhone 3G as soon as they launched in Australia. He’s started blogging about his experiences running both devices simultaneously, the N95 8Gb as a work phone and the iPhone for personal use. He’s a long time Nokia user but also an Apple fanboy, so it will be very interesting to see how it goes. Will he remain objective? Will he throw one of the devices out the window? Will he have to buy a whole new stylish wardrobe to accompany his new iPhone? Only time will tell!

Chasing the Heron – Part 2

7 July, 2008 (07:56) | General Computing | No comments

My recent switch to using Ubuntu 8.04 (Hardy Heron) as my primary machine for work and play hasn’t all been fun and games. I’ve had quite a few issues, almost all of them relating to hardware. One of the issues that took the longest to investigate and had the least satisfying outcome was related to the use of multiple monitors.

I’ve been a big fan of SLI motherboards for the last few years, though not  for the marginal increase in graphics performance given by SLI. My interest lies in their ability to run multiple graphics cards as seperate heads, hence allowing me to run more than 2 monitors from a single machine.

Both of my main desktop machines have SLI boards, and are set up with multiple graphics cards. My desk has two 17 inch LCDs, a 24 inch Dell widescreen LCD and a 19 inch CRT on it, and over time I’ve had these screens connected to various combinations of my Vista machine, the Linux box and a modded PowerMac Quicksilver G4 which I really should blog about one day.

In the past I’ve relied upon Synergy for sharing my keyboard and mouse. It’s great, with the only problem being you can’t use the keyboard to log in to one of the client machines, and games freak out unless you’re using the keyboard on the host machine. Eventually it became too much of a hassle and I decided that I needed to have all the monitors plugged into a single machine.

Before making the switch I had all 4 monitors plugged into the Vista machine. The large amount of desktop space and the ability to throw windows around as I please suits the way I work. I love having multiple tasks visible to me so I can shift between them as boredom dictates. It also allows me to assign priority to whatever I’m working on. Central screen for my main focus, mail on another screen, research browser on another and the last screen is usually reserved for an ebook or two.

Naturally I wanted a similar experience on the Ubuntu machine. I didn’t pay a premium for SLI motherboards on both my main desktops to have them only hooked up to one or two screens. Or maybe I did? It turns out that are some issues with multi monitor support on linux that are stopping me from realising the full potential of my machine.

The old way of getting multiple monitors going involved using Xinerama, an X Server extension that’s still present on most Linux installs. If you check out their Sourceforge site you’ll notice that the project is no longer under active development, but it will enable multiple monitors across multiple cards.

This is all very well, but the default X.Org version of Xinerama breaks when using Nvidia graphics drivers with Compiz-Fusion, the composite window manager that comes with Ubuntu. Compiz-Fusion is responsible for proving an OpenGL accelerated windowing environment with font smoothing, as well as a bunch of cool desktop effects. Unfortunately the bug is one of those issues where the Compiz guys blame Nvidia, and Nvidia blame Compiz, so it will probably never be resolved.

Luckily NVidia have a display architecture named TwinView that provides it’s own implementation of Xinerama which seems to get around this issue, allowing Compiz-Fusion to work normally. However, TwinView only works on a single GPU, meaning that for mere mortals who cannot afford Quad-head Quadro cards it is limited to running dual displays. Obviously not an ideal solution.

Like most Linux installs, my box uses X.Org, an implementation of the X Window System, to handle the nuts and bolts of displaying and moving windows on screen. The X Window System is implemented using a client-server architecture in which your X client makes a connection to the X server, effectively creating a “session” or sorts. The X server is capable of handling more than one connection at a time, and the connection does not necessarily have to be from a local source (one of it’s coolest features).

By making two connections to the X server I was able to get three monitors going. I used this in conjunction with the TwinView setup mentioned above, where one session was set up to use TwinView and the other was simply a separate session. Nvidia’s wonderful nvidia-config utility made setting this up a breeze.

Although this setup does support three monitors, it has a bunch of annoying downsides and bizarre issues associated with it. The biggest letdown is that, although you are free to move your mouse pointer between screens, you cannot drag windows between screens. There also seems to be a rather large lag in drawing the menus on my second X screen, which is the one with the TwinView setup. I’m sure this has something to do with the GNOME preferences, as only one of my X screens got the default panel launch items. There’s a configuration setting to change the menu lag time, but I couldn’t get it to take affect. It almost seems like one X screen is defaulting to a specific lag time, which the other is using the regular settings.

The final nail in the coffin is that Firefox can only be loaded on one X screen at a time. If you try and open it on both screens it complains that the process is already running but it can’t access it. This stops me from using one of my monitors as an IRC screen, because now I can’t click on any links that are pasted in channel. Granted this means that I’ll be rickrolled a lot less, but still… It’s not exactly an ideal solution to the problem.

The multi-monitor solutions that work with multiple GPUs, such as Xinerama and using a seperate X session, have a common problem that turns out to be fairly major; OpenGL only works on one of the GPUs. I’ve heard rumours that OpenGL will work on a two card setup as long as the cards are similar enough. The 7300GS and 8600GT I tried definately do not work, so I could only get it working on one, but they are from two completely different GPU generations. I could try the 7300GS with a 7600GT I’ve got in my Vista box (which I will soon be replacing with a 9600GT for the sake of my large collection of games from Steam), but that’s a job for another day.

After all that effort, there is some light at the end of the tunnel. XRandR, the project that has replaced Xinerama as the new display manager of choice, promises to solve all my problems and end world hunger at the same time, but it’s not going to support multiple GPUs until at least the Ubuntu 8.10 timeframe.

The way that multiple monitors are handled has changed considerably (as you have noticed) from back when Xinerama was used, to now with XRandR. Xinerama would have you create separate screens for each output, and then it would stitch them into a single desktop after; while this worked, its implementation was generally considered a bad hack, and so that was essentially discarded when Xrandr was introduced to the open source drivers.

Unfortunately, this forced us distros to make a hard choice between sticking with Xinerama (allowing for multi-card, >3 monitor setups), or moving on to Xrandr (which allows for hotpluggable projectors and monitors). For Ubuntu, we decided the latter use case was more prevalent and more important, with the added benefit of staying closer to upstream’s work. The downside is that currently using multiple graphics cards is not feasible. Dual-head can be done in Xrandr, if all the outputs are connected to the same card.

The good news is that much of the technical work required for enabling multiple cards properly in Xrandr is under way upstream. I am hopeful that we’ll be able to incorporate much of this for Intrepid. For a description of the current needs and status, I’ve written up https://wiki.ubuntu.com/X/KernelWishlist and https://wiki.ubuntu.com/X/Drivers, which I’d refer you to for further information.

XRandR is pretty impressive, as it patches some major holes in the X Window System functionality such as being able to change display characteristics without having to restart your X session. Once multiple GPU support has been baked in it will truly be the X Window Extension of Kings, but until then I’ll have to make do with current multiple GPU solution, which is to use two monitors on a single GPU… *cough* Once I get my Vista box back on it’s feet I’ll hook that up to make use of the other monitors, but I can’t say that I’m not counting the days till October and Ubuntu 8.10.

« Older entries

 Newer entries »