Saptarshi Purkayastha, an OpenMRS GSoC student this year, wrote mini java script and submitted a patch for adding the OpenMRS license to all of our java files. This was long overdue and was much appreciated, thanks Saptarshi!

Submitting this to trunk was no trouble at all, all things went as normal. However, when merging from trunk to other branches, I kept running into problems. All files that received the new license were showing as conflicts, even though there were no other changes. I had to manually copy the license from the old file to merged file. NOT fun. I did this manually when I was merging to the report-api-refactoring branch because it was late and I didn’t want to look up the “right” way to fix it.

Well, I think I found the reason.  Java file handlers don’t do prepending very well.  The script that Saptarshi wrote creates a new file with the license code, and then appends the old file contents.  The java newLine() method used in the java script to append that old file contents apparently uses a different newline character than the default for unix/windows.

This minor little difference caused two problems: 1) merging produced conflicts and 2) when comparing versions or showing annotations it showed that I had changed all lines when in fact I had just added the license header.

The fix for problem 1 above was to merge from trunk with the ignore-eol-style flag set:

svn merge -x––ignore-eol-style -r3684:3685 http://svn.openmrs.org/openmrs/trunk /home/ben/workspace/openmrs-api-refactoring

Note: I merged from trunk up to version 3684 first using the Subclipse svn gui (3685 was the revision with the license patch).  I ran the above at the command line to get a nice clean successful merge.  I was then able to merge from 3685 to HEAD using subclipse again.

I can’t really tell if this fixed problem 2 as well because I can’t remember which files this was happening to before.  The few files I queried were only showing me as having changed the first few license lines, so it appears to have solved it.

This is in the openmrs category tagged as , ,

5 comments »

I had been camping back on Wordpress 2.2 in fear of the upgrade process. I must have been worried that the downtime would scare off all three of my blog readers!

However, Burke’s successful upgrade to version 2.5 gave me hope.  I took the plunge this weekend.

Well, I was right.  The upgrade process was long.  Actually, the upgrade process only took about 20 seconds.  However, I then proceeded to start fixing all of the little things in my blog and blog theme that have been bothering since the beginning.  That entire process took the rest of the afternoon. :-)

Wordpress 2.5 is pretty sweet.  Most of the upgrades are on the management side of things, so it doesn’t look any different to the end reader.  One of the big changes (that actually occurred back in 2.3) is the addition of tags. See the discussion on tags vs. categories.

I’m writing this post because I couldn’t figure out how to display the tags for a post in my theme.  Google searches for wordpress theme show tags, wordpress template tags, wordpress list tags, etc didn’t give me any useful results.  I’m posting this hoping it will help others find the solution faster.

The function_exists check is optional, and only necessary if you want your theme to be backwards compatible to pre wordpress 2.3.

<?php if ( function_exists(’wp_tag_cloud’) ) : ?>
    <?php the_tags(’Tagged as: ‘, ‘ | ‘ , ”); ?>
<?php endif; ?>

This will output a line such as: Tagged as: joe | bob | fred

This is in the babble category tagged as , ,

Add a comment »

- 26 Apr 2008 -

I finally got around to uploading the photos I took at the MySQL Conference.  You can find them on my photos page.

I felt like a detailed explanation of the merchandise picture was in order, so I uploaded that one to flicker just for the annotations: see the annotated swag.

This is in the babble category tagged as , ,

2 comments »

My primary OS has been Ubuntu for the last 6 months or so.  Ubuntu Logo I have been quite happy with the switch away from XP.  (For those interested, I’m dual booting my ThinkPad laptop. ThinkWiki is a great resource for all Ubuntu tweaks specific to ThinkPads)

A Release Candidate was put out for Hardy Heron this last week.  I’ve been itching to upgrade and, unlike Brian, I wasn’t willing to (potentially) suffer through a beta release.  Upgrading from Ubuntu 7.08 was absolutely painless.  The only thing I had to do was run the standard Update Manager program with a flag to say I wanted to upgrade to a new release.  An unnecessary screenshot walkthrough can be found on the Ubuntu site: https://help.ubuntu.com/community/HardyUpgrades.

The download took 20-25 mins on my cable connection, and the installation took about three hours.  I’m sure the installation would have been 30-60 minutes, but I was in-and-out all afternoon.  Dialog boxes kept popping up asking if I wanted to overwrite some custom config file.  This caused the whole process to halt until I came and clicked “ok”.  Everything worked the first time, I’ve had exactly zero “gotchas” so far! :-)

I only had a few complaints with 7.04 Gutsy Gibbon.  The only one I can remember now is the silly Keyring Manager application that saved usernames and passwords.  A master password was all that you needed to be able to access all passwords for all applications that used it.  I was fine with this except that Network Manager used it for some reason to store my WEP key.  When initially logging on it would pop up and ask for my master password.  Meanwhile, all of my default apps were loading in the background and flailing about (Thunderbird, Firefox, and XChat).  I had switched to WICD as a very nice alternative, but it had a few other annoying habits of its own.

If I recall correctly, Hardy Heron doesn’t use the same Keyring Manager application anymore.  When I logged in the first time after reinstalling Network-Manager, I entered my master password and checked the little box labeled “Always log me in automatically”.  Voila!  Now I don’t have to enter my password at log-in.  Its a beatiful thing.  Combine that with the new Firefox 3 option of automatically loading my past tabs (instead of asking me if I wanted to everytime) and I can start up the laptop, walk away, and when I come back everything is loaded and waiting for me.

The one thing I miss is the ability to control-tab through my Firefox tabs.  I was using the LastTab plugin which allowed me to cycle through my tabs in the order I last accessed them.  The plugin hasn’t been updated for firefox 3 yet.  I tried cheating and unpacking the plugin and simply upping the maxVersion…but there were a few bugs that prevented it from working correctly unfortunately. Google gave me no alternatives.  I really don’t know why this isn’t an option baked into Firefox.

This is in the babble category tagged as ,

Add a comment »

A new company named Kickfire launched at the MySQL 2008 Conference. Kickfire LogoTheir product is a rackmounted server intended to be used as a high-end database (and server, if need be). Their innovation is a cpu specific to sql commands: the “SQL chip”. It works in similar fashion to a graphics specific cpu or router cpu. Instead of taking in the normal assembly commands, the sql chip understands 10 or so sql type of commands: insert, update, join, etc. This change drops the number of commands being run on the chip by leaps and bounds. There are a few other changes they make, but you can learn those in their video.  They claim there is a 10x decrease in query time.

Kickfire is currently in beta. If you would like to join the beta program, I can put you in touch with the right people. Unfortunately, all beta boxes will be returned to Kickfire. Fortunately, OpenMRS implementers may have an opportunity at that point for a discounted machine. If you’re looking into buying a high end server, you definitely want to add the Kickfire box to your list of options.

This is in the openmrs category tagged as , ,

Add a comment »

« Previous Entries