Tuesday, February 24, 2009

Ubuntu and Eclipse and svn

In the last two months, I have been spending some time developing phone applications in JAVA and using Eclipse as the IDE. Not having ever written in JAVA before, I cannot even imagine how long the whole development process would have taken was it not for the IDE.

So far in my development life, all my C/C++ code writing has required:
- a Linux system (i.e 'grep')
- ssh access to the build server (with right kernel, glibc, gcc version)
- vim + ctags for source code
- valgrind for finding memory leaks
- gdb for deugging

So the whole Eclipse+JAVA experience got me thinking if I could get any benefit from using a Eclipse for a large C++ project that I am involved with at work. Maybe it will at least help prevent carpal-tunnel from having to grep the life out of the project.

It seems the default Eclipse install for Ubuntu 8.04 is version 3.2 which is fairly old. So, it is best to download the newest version rather than use apt-get.

Next challenge was to get Subversion plugin.

Apparently, trying to add the svn plugin kept giving me an error
An error occured during provisioning.
Cannot connect to keystore.

Fortunately, some google searching pointed me to the fix. The plugin install needs Java 1.6 or newer. Also, the Java 1.6 has to be the default JRE which most likely it wont' be even after doing:

sudo apt-get install sun-java6-bin sun-java6-jdk

The Ubuntu Java Installation documentation explains how to select the default Java version on your system.

You could use
update-java-alternatives -l
manually pick the java-6-sun using sudo update-alternatives --config java

Oh well, I now finally have the C++ project under Eclipse pulled in from svn, I can at least browse the code.

Also, if anybody is looking for suggestions on what other developers perfer when doing C++ coding, check out this stackoverflow link.

Friday, February 20, 2009

testing software systems with a GUI

I am not a QA engineer or play one in my professional life, but I read/heard this somewhere recently and it makes sense.

If you are testing a software or a system with a GUI, don't test the software or the system functionality using the GUI. Develop alternate methods to do that. Just devote separate efforts to testing the GUI itself, since there is enough logic and code to build the GUI itself that need to be tested.

I believe a "Unix way of software development" is to build a command line interface as a first step to any future GUI enhancements. That gives you a perfect seperation between functionality and GUI and gives you a good avenue to do testing.

Also part of that same note was this nice line where the author said, the Unix-way of development does has its con in that it does not necessarily lead to a great app, because the GUI almost follows the comamnd line. The solution; if you disabled the command line access for all Unix programmers in the world, you will have a substantial imporvement in the GUI quality of those applications.

Thursday, February 19, 2009

open source venture funding

Since I am a sucker for all things open source, I found a recent post by Mark Cuban on his blog challenging anybody with an idea to submit a business plan and be funded instantly very interesting.

As he puts it.....
You must post your business plan here on my blog where I expect other people can and will comment on it. I also expect that other people will steal the idea and use it elsewhere. That is the idea. Call this an open source funding environment.

Pretty cool challenge. I expect a lot of phone applications that will meet the 13 criterias listed.

grub error 17

I finally managed to free up an old system at work and put it in the lab so that others on my team can start getting comfortable using a Linux desktop.

I installed 8.04 since I am still a little wary of 8.10.

A very simple install with just a single root partition and a swap partition. Things seemed fine, for a few days after which the system just locked up. After forcing a power cycle, grub complained saying "Error 17".
A quick google search will tell you that this has something to do with the hard-disk. Probably a failed disk or at the very least some errors.

Fortunately it was just the case of errors on the disk which I was able to fix by booting the live-cd and doing the following:

sudo -s
fdisk -l # to figure out the root partition.

ext3fsck -y /dev/sda2 # to find and fix disk errors

fsck found and fixed a few errors. The subsequent reboot was fine.

Searching for the error on google, showed a good discussion on the Ubuntu forums about another case when you might run into this error after a fresh install. Probably the case if you have multiple disks and/or more partitions. Check it out:

Monday, February 16, 2009

wubi and booting error

I have been running 8.04 at work using wubi and it has been working like a charm since the last 6 months.

However, I just ran into an issue where after a reboot, instead of booting, it dropped me into a busybox prompt. The problem was that grub could not find the initrd, probably due to a few _corrupted_ disk sectors where wubi had my Ubuntu image installed.

Simple fix, boot into Windows (hopefully that still works) and run 'chkdsk' on the drive.

Oh well, the price you pay for not giving yourself a dedicated partition.

Monday, February 9, 2009

formating a drive for fat32

To quickly format a drive to fat32 (for Windows) use mkfs.msdos:

Example: sudo mkfs.msdos -I -F 32 /dev/sdc

Other formatting options:


Monday, February 2, 2009

Ubuntu Pocket Guide

One of the strongest reasons for Ubuntu's rise in popularity as the Linux desktop distribution of choice is that you can pretty much search for answers to any of your questions. In case the entire Internet is not enough to give you the information you are looking for, feel free to download this Ubuntu Pocket Book and Reference Guide.

Free (as in open source) download!