- 25 Jul 2008 -

I was recently tasked with finding out the number of methods in each class in each package inside of OpenMRS. My first thought was to write a java class to do some reflection. My second thought was to find a java class that someone else had written and use that. My third thought was to find a way for Eclipse to do it.

I really should have jumped to that last one first.  Googling for my second thought gave me nothing useful.  However, simply adding “eclipse” to my search term brought up the Metrics plugin as the first result!  The Metrics plugin counts all different types of things.  Lucky for me, “number of methods” just happens to be one of them.

To get the counts working for you, follow these easy steps:

  1. Add http://metrics.sourceforge.net/update to eclipse as a plugin update site
  2. Turn metrics on for your project:
    1. Right click on the root of your project in Package Explorer view
    2. Choose Properties–>Metrics–>Enable Metrics
  3. Do an Eclipse clean rebuild
  4. Click on the root of your project in the Package Explorer
  5. Open the “Metrics” view

These are the relevant statistics from the OpenMRS project:

The second api/web are from the test package.  We have a lot of work to do to catch our total number of unit test methods up with our number of api methods.

I’ve also uploaded the entire OpenMRS metrics output.

This is in the openmrs category tagged as , ,

Add a comment »

- 20 Jun 2008 -

This week most of the OpenMRS developers converged on Durban, South Africa for our third annual conference. We combined with a few other informatics groups from South Africa that are part of HISA. There were almost 400 attendees and OpenMRS made up the majority of them, so I’m estimating we could have had somewhere close to 250 people at this conference. This is continuing our Moore’s Law -esque style of doubling every year. (Cape Town 2006 had around 75 implementers and Cape Town 2007 had 150.) I’m not sure how we’ll increase by as much for next year, but I’m pretty sure that’s what CPU designers have been saying every year for decades!

I managed to steal some bandwidth at the hotel at 2AM a few nights ago and posted my pictures from the safari to Hluhluwe that James Egg, Jacob Brauer, and I went on.

We’re sitting in the lounge in Johannesburg now (thanks Paul!), I promise to post a few more thoughts from the conference over the next few days.

(As a side note while I’m thinking about it: The new logo is really growing on me. Chris Seebregts made heavy use of it at the conference. He even made up some pretty slick black t-shirts using it that he gave away to all the attendees.)

This is in the babble, openmrs category tagged as , , ,

1 comment »

I’m in the middle of moving OpenMRS’s web presence from a shared virtual machine to a new dedicated box.  The only trouble I ran into was with the mysql python module (again).

For posterity’s sake, I’m going to write my solution here.

easy_install mysql-python

I received this error when trying to install the MySQLdb-python module into python on centOS:

_mysql.c:2808: error: expected declaration specifiers before ‘init_mysql’
_mysql.c:2886: error: expected ‘{’ at end of input
error: Setup script exited with error: command ‘gcc’ failed with exit status 1

The fix I remembered.  I just had to install the python development packages:

yum install python-devel

I then had another very odd and strangely familiar error:

In file included from _mysql.c:35:
/usr/include/mysql/my_config.h:15:28: error: my_config_i386.h: No such file or directory
error: command ‘gcc’ failed with exit status 1

Googling around gave me nothing helpful…in fact the results looked strangely familiar as well.  I couldn’t remember the solution to this one though.

Eventually, I actually read the error message and realized that our new vm isn’t an x64 box.  For some reason there was a my_config_x64.h file in /usr/include/mysql but there wasn’t a my_config_i386.h.  Luckily, that file was present on the old server. Copying that file from /usr/include/mysql on the old box to the new was the cure.

This is in the babble category tagged as , , ,

Add a comment »

…are the shortcuts.

I’ve been using control-shift-t extensively since Darius first showed it to me a few months ago.  It will let you quickly find and jump to a java class across your current workspace.  (There is also an Open Type button by default in eclipse that you can use.)

I’ve always wanted a way to do the same except with our jsp, xml, and properties files.  I know most of the names of files and know where they are, I’m just lazy.  I want to be able to jump to them without having to expand the whole tree.

Well, Open Resource to the rescue!  Control-shift-r works just like the Open Type except with nonjava files.  Woot!

This is in the babble category tagged as

1 comment »

Leslie’s recent Google Open Source post highlighted a few students from some other GSoC 2008 projects.  One of whom was Filippo Bollini. She hightlighted one of his typical weekly updates for his MySQL mentor: http://www.filippobollini.it/soc/?p=4. The details he put into the post included his thought patterns for the week, what was accomplished, and what is planned for the coming week.  Filippo sets the bar pretty high, but I think my student, Upul, is up to the challenge.  I would hope all of the other OpenMRS GSoC 2008 students also strive for this kind of detail! :-)

This is in the openmrs category tagged as ,

1 comment »

« Previous Entries Next Entries »