A Django site.
June 12, 2007
» Linux / OSX Dependency Checking Script

Hello all. Today, I spent the better part of 10 hours writing a BASH script that aims to identify dependency issues for OpenMRS. The script seems to work on most any Linux distro as well as OSX. But please, test it out, and let me know what you find. If something doesn't work, chances are parts of your system are out of date. Before running the script, please ensure that you have an updated version of BASH. I'm running version 3.2.17(1)-release.

$ bash --version
GNU bash, version 3.2.17(1)-release

The script depends on AWK as well, but the version shouldn't matter and most systems have this by default anyways. The script will notify you if you are missing needed dependencies, or if the versions you have are out of date. If you receive syntax errors, that's what I need to know about. Also, if you are absolutely positive that the script is providing wrong information (i.e you have the latest version of XXX app, and it says you either don't have it, or it's too old) tell me that as well.

You can download the script here: http://discosoup.net:8080/~agent/depend-check.sh
(Make sure you open that in a new tab)

Just do a chmod +x depend-check.sh and then:

bash ./depend-check.sh


and you should be set.

Thanks goes out to Matthew Harrison "[omegentoox]" for helping me test the code out on a few different platforms, as well as for the hosting of the script.

June 4, 2007
» Development Environment

Well, the weekend didn't go entirely as hoped in terms of getting a stable development environment setup in Windows. The reason for this is the current state of the installer that I'll soon be taking over. The issue is with how it handles systems that already have some of the dependencies installed. However, I can outline some basic things that I require to develop software on a Windows platform (aside from patience, alcohol, and a very, very, very good reason...)

1. Netbeans / Eclipse

Some people don't like Netbeans; I do. I use it exclusively on Linux for all of my development. We could get into the IDE war, but I see no reason. People should use the tool that works best for them, and for me, Netbeans hits the mark. It is a bit slow on start up, depending on your system specs, but my machine is a beast, so no issues there. I prefer to use Netbeans for all of my file needs under Windows. (Wordpad / Notepad leave miles to be desired...) Netbeans has also recently released a C/C++ addon pack that offers all of the goodies for those languages - code completion, standard library reference, syntax highlighting, header files, makefiles, etc. My original draw to any sort of IDE was simply syntax highlighting and automatic indention; I never used it to complete code for me or anything like that. In fact, I always felt hindered by code completion because I felt I had to actually do MORE thinking to get something done rather than just knocking it out by hand. As time has progressed, I have found it useful having a reference to my own classes that I've created so I don't have to switch back and forth to see the variable names I used and whatnot.

2. Mingw32

I was recently turned on to this UNIX emulation environment because I wanted to have access to gcc/g++ under Windows. There is a one-click binary installer floating around on the net somewhere that gets you up and compiling with gcc/g++ in a matter of minutes. You also get some other basic UNIX tools and utilities, like vi, make, etc...

3. Command aliases

Good habits are pointless to break, so I make sure to alias all common file system navigation commands in Windows to those in UNIX. For example, ls, rm, cp, mv, etc... This just involves making various .bat files with the UNIX command as their name, and having them execute the Windows version of that command using the "%" to signify the command arguments. Really basic and simple. Of course, with Mingw32, you don't have to do this.

4. Path Variables

I always fight with path variables in Windows, so I have to go in and make sure all of my java commands are in my path, as well as the above-mentioned alias commands. It may be a good idea to make your own folder for the aliased commands and add that to your path, as opposed to dumping all of those .bat files into system32.

That's about it, really. As long as I can type commands I'm familiar with, edit files easily, and have them compile easily, I'm happy. Essentially, it can be summed up into about 2 downloads depending on how you do it. Via the Java website, you can get Netbeans bundled with the Java SDK, and then you're set with Java. Then, Mingw32 is one download and you're set with all of the UNIX tools, including gcc/g++. The other things are just basic configurations.

I hope this has been helpful for those of you that develop primarily on a UNIX based system, as I do. I honestly feel I get stupider when sitting in front of a Windows computer. I've got 2 Windows certifications and I've been involved in administration and tech support (hardware and software) for about 7 years now, but I'm always more productive and comfortable (and happy) sitting in front of anything with a BASH prompt.


May 30, 2007
» So It Begins...

Well, the SoC program has finally begun, although myself and many others have been active for almost 2 months now :) Next week is when I'll begin my official SoC schedule, that is to say, next week my current job bumps down to 3 days a week, and I'll have entire days devoted to OpenMRS, as well as evenings/weekends once I'm home from my other job. In the next 2 or 3 days, I'll be finishing up a small contract programming job that I took to earn some quick cash, and I think I may need to write an entry solely on that experience, I think it offers a great insight into how a lot of contract programming jobs unfold. Currently, I'm trying to resolve an issue with Tomcat on my distribution of Linux (ArchLinux, http://www.archlinux.org). There is a kernel module that Tomcat needs loaded in order to function, for some reason. It is a known issue, and I hope to have it resolved soon. How ironic is it that my project is to develop a simple "click and forget" installer for OpenMRS and I'm having trouble installing it? :) All is well though, the OpenMRS part is a breeze, it's all the dependencies that seem to hold everyone up. This project will surely be a challenge, but it's a welcomed challenge. I'm all for making the process of using a computer/software easier for everyone else, and I can personally attest to being turned away from numerous applications simply due to their complex installation requirements. Luckily though, my project doesn't depend directly on having OpenMRS installed and running on my system, so there are a lot of other productive things I can work on in parallel to getting the system installed, and I intend to do just that. That's all I've got for now, take care.