Software Woes

Rants, tips and tricks

Wednesday, February 21, 2007

UDEV woes - part 1

Today I decided to play with udev and make sure that my multi-card reader automatically detects the device and make it available under /dev/memory_stick. Knowing a little about it, I decided to RTFM. So, I typed "man udev" and it goes:

"udev expects its main configuration file at /etc/udev/udev.conf. The following variables can be overridden in this file:
The logging priority which can be set to err ,info or the corresponding numerical syslog(3) value. The default value is err."

Ok, cool, so I went to /etc/udev, opened the udev.conf file, and it says:

# udev_log - set to "yes" if you want logging, else "no"


...stay tuned... to be continued.

Monday, February 19, 2007

Benefit of distributed version control

Lately I seen reports about various distributed version control. Although it seemed useful (you can work on train argument), I didn't see any real benefit or reason to use it myself. Until today.

On my laptop I have multiple operating systems installed as virtual machines. I do the developement on main (host) system, and then try to deploy on various guest systems to see how stuff works. And sometimes something just doesn't work. So I have to change it in host system, copy to guest, recompile and try it. When you have to develop large piece of software for multiple platoform this becomes tiresome.

And then I figured it out. I setup the guest system to fetch code directly from main repository, did the changes on guest system, and when it worked fine I commited changes to main repository. There are two problems with this:

a) you must commit while working, i.e. you commit unstable code. This basically means you need to branch for each small feature you're working on - which sucks.

b) if the repository is unreachable (i.e. you DO work on train, or don't have Internet access for some other reason) you cannot basically do it, so you have dicrepancy between version in guest and host system.

So, I set up the local Subversion repository and worked there, which turn out to be great. However, the problem is migrating those changes to main repository when done. This is exactly the problem that distributed version control systems solve.

Now, I have to decide which one to use. If you can recommend some good, reliable, distributed version control system, please leave the comment and pros are cons of using it.

Wednesday, February 14, 2007

More Games

I dug out some old stuff I did while trying to learn Java. It's a bunch of simple games written as Java applets. As this code is laying dead since 2000, it decided to release it as open source project. I hacked up a website, so check it out:

There are four games: tic-tac-toe on 10x10 board, two puzzle games similar to Master Mind and Memory and good old Tetris. All those are playable online, so if you're looking for something fun to kill a few minutes, this might be for you.

Monday, February 12, 2007

Kompare your sources

Kompare is a very useful piece of software and I could hardly live without it. It really good when you need to visually compare two source trees or simply two files. You can also use it to apply differences to one of the files. There are three things that I don't like about it:

1. It only allows to apply changes in one direction. The excuse might be that it makes sure you don't change the file you don't want. Other tools I've seen (WinMerge) simply have a checkbox saying "read-only" on both sides, so you can easily decide which one of "source" and which is "destination"

2. The other thing is that many times I have changes in both files at same places. Kompare selects a large chunk of code as a single section. What I'd like is to be able to select some lines from that chunk and only add those to the destination.

3. As I wrote, I make changes to both files at same place. Sometimes I just need to add a line from "source" without overwriting the "destination" file. However, that doesn't seem to be possible with Kompare.

There are great development tools on Linux, but they really need some polish to be excellent tools.

Tuesday, February 06, 2007

Java coming back to Windows?

Sun open sourced Java recently. At first I didn't really care much about it, but now I started thinking. From what I know, few years ago, Microsoft lost a law suit regarding Java technology and they removed it from their operating system. This meant that you didn't get Java with Windows default installation. I also believe that it's one of the reasons Microsoft created .Net stuff.

It would be interesting to see Microsoft's reaction to this. Will new versions of Windows include Java by default. Too bad that Vista is already out and who knows when we'll have a new version of operating system from Microsoft. Maybe in another five years. It makes me wonder did Sun really have bad timing with this or they did it on purpose? Who knows, maybe Microsoft don't care much about Java anymore. I see them pushing .Net really strong.