Choices and innovation

May 15, 2007

Yesterday, I discovered that there is a free Java hosting service: MyJavaServer. The service includes a Resin server with Java 6. It has a really cool way of registering by giving the registrant a (relatively simple) programming task, a smart way to ensure that people don’t just register for fun. The problem is: the service does not seem to work anymore. I was afraid so, Java hosting, in general is expensive and rightly so, because it also means more maintenance work. I remember having to rent a dedicated Linux server that I had to administrate myself just to install JBoss and Tomcat. I spent more time just making sure to keep up with the security of the system, and when I came back from a longer vacation, I found that my server had been hacked and messed up. That’s why you should be nice to your network administrator, they save you a lot of time and work to focus on the central task.

I definitely don’t insist on a service which is completely for free, but for development purposes, I’d prefer something that is cheap enough, like 5 bucks a month. That’s another reason why PHP, Python, Perl and Ruby are so popular: it is much cheaper for a private person to get an application online (besides the obvious difference in the learning curves of course). I use hosting services for demoing and testing, and I don’t make any money of it directly, so I really need a very affordable service. The only choice I have is Ruby on Rails which is not a bad alternative, but it would be great to have something in the price range of Rails or PHP based offers with a full Java EE stack.

I appreciate services like Sourceforge and RubyForge to give developers  free Subversion hosting and related service, which means I can use their network administration services for free, and their service is friendly and fast enough. I can’t emphasize it enough, so to these services and their sponsors: Thanks for doing this ! By doing this, you offer developers  the opportunity to experiment, learn and innovate (well, I am probably not that innovative, ha !).

Back to MyJavaServer.com: It seems this issue is already known since last year and they say it is due to Resin and Java 6 integration problems. I won’t complain, it was mainly run by one person. To offer something free, there must be some form of motivation, be it constructive feedback or funding (that’s a kind of feedback as well). Maybe (and hopefully) one day, it will be back, maybe one day, someone else will offer an affordable hosting service with a full JavaEE stack.  Until then – I’ll stick to Ruby on Rails.


Goodbye CVS

May 15, 2007

Today I finally migrated the ZMPP repository to Subversion. It was my only maintained project in a CVS repository. Subversion definitely is an improvement over CVS. I like the way how it handles directories much better, and the possibility to add embedded links is very useful. Another reason is TortoiseSVN, I simply love this frontend to Subversion, better than any other frontend I have used. The nearly seamless integration into Windows is great. The only thing I would love to see is availability of TortoiseSVN on a Linux desktop.

Subversion support in NetBeans is very good as well, but I keep doing things like tagging/branching and creating links in TortoiseSVN.

CVS has served me well, but if you have used Subversion, it’s hard to go back. I am still using it at work and it’s unlikely that the projects there will ever be migrated. That’s fine, because CVS works. For my private needs, I want to use one system only, so I go with the best available for my needs.


Eclipse RCP – like it or not

May 10, 2007

At work, I am enhancing an Eclipse RCP application now. I thought it is a good opportunity to see what I have been missing by mainly programming in Swing. About three weeks into the project, I can say that it was in fact pretty easy to understand at the beginning. The layout management cost me a little while to understand. I also had get to used to the fact that a lot of constants are defined in the SWT.* manner (SWT.LEFT, SWT.BORDER, SWT.V_SCROLL,…). I just don’t see any logical relationship between those constants other than that they belong to SWT. Well however, probably it is easier that way for most people (not having to remember the logical context), at least it is somehow C(++)-ish.

I consider myself a pragmatist, so if a tool does the job, I don’t think too much about it. I like Eclipse’s architecture, how Eclipse plugins are written and how this process is supported by pretty good tools. However, I still can’t see the advantage of RCP/SWT. I get OutOfMemoryErrors every day, which takes down not only my application, but the whole Eclipse IDE (kind of reminds me of the times when applications took down the whole operating system), I can hardly remember this kind of thing happening to me using Swing other than programming a non-terminating loop (this does not happen too often). Another annoying thing is that exceptions thrown in my plugins seem to be swallowed somewhere in the platform.

I found a comment on the Eclipse news board here:

I'm curious as to why the workbench is catching and (apparently) ignoring exceptions that are causing my plug-in to be unable to successfully create pages in a multi-page editor. Seeing the exception and stack trace would be extremely helpful in diagnosing the problem, but for some reason the exception is being silently ignored.

and the answer to this is:

As far as I know, exceptions are logged to your target runtime workspace's

.metadata/.log file. To see stuff in your console, you want to add

-consoleLog as a 'Program Argument' in the 'Arguments' tab of your PDE

launch configuration.

The biggest issue besides those OutOfMemoryErrors I have with RCP/Swing is flexibility. Example: at the moment (Eclipse 3.2), TableViewers allow cell editors to be defined by column and not by row, which is pretty limiting in our case, where the users are used to spreadsheet-like interfaces. I should point out that this issue seems to have been addressed in 3.3. Another question is: Why in the world do I have to create a specific version for Windows one for Linux, one for Solaris etc. I really feel like I am back to C/C++ here (especially with those OutOfMemoryErrors :-) – I know I am stressing it here).

Probably I am just expecting too much. Because everywhere I can read how much cooler/easier (have your favorite buzzword here) SWT/RCP is compared to Swing, I thought it must be somehow on the same level. As any developer, I’d be happy to use whatever does the job and gets it done quicker, since I don’t work for Sun or IBM, I have no cultural pressure here, either.

RCP/SWT works ok when I want to create an “Eclipse Workbench”-ish user interface (which I often don’t). At this point, I can’t really understand the hype surrounding it, especially those quotes made by people who claim to have been experienced Swing developers and converted. I don’t see how that is easier, or more powerful, but in my opinion, it contributed to creating a lot of FUD about Swing, client sofware development in Java and Java in general. Java is a fantastic platform to create client applications, just no one seems to see it and just talk about how complicated user interface programming is in Java. This is because user interface programming in general is a hard task. Just placing a few buttons here and some icons there doesn’t make a good interface.

I know that there will substantial improvements to the Eclipse RCP framework since there is a huge interest and investment in it (even though I could have lived without this reinvented wheel in this case) and if the project calls for it, I will use it. But for now I have to ask: Where’s the benefit ?


Release 0.13 and beyond

April 27, 2007

TinyUML as Applet

I have released Version 0.13 two weeks ago and now I plan to put about four weeks into the next release. The next version number is planned to be a 0.25, because there will be some major enhancements, namely multiple diagrams and a new diagram type: sequence diagrams. Sequence diagrams are what I consider the most difficult of the UML diagram types. The main reason for that is that the interaction seems to be completely different than for the other diagram types. The elements are moved like they are on rails (ha, why don’t I call it “TinyUML on Rails” ? Nah, just kidding)

The first step for me is now to make application configuration more flexible. At the moment, I am pretty involved in my “programming for a living” activities, so I need to do something which is less demanding to relax. So this week is just about offering different ways to deploy TinyUML. I have put it in an Applet first, I haven’t seen that anywhere else so far (even though for Java that is a pretty obvious thing to do), the other configuration I added is Webstart. Being able to run on a variety of platforms and configurations is generally considered as a sign of quality, for me that is a reason to implement desktop applications purely in an object-oriented cross-platform language (e.g. Java, Python, Ruby) and to abandon native code completely. So far, I haven’t missed it, especially with Java it is difficult to find a reason why one would have to use a native library.

I also decided to introduce maintenance branches in my process now that the software has become more complex. By this way, I can release fixes very quickly on the release version without affecting the development (or so I hope).

Another change is to abandon the idea of using Mantis as the tracker tool and to entirely use the sourceforge tracker. While Mantis is a great tool, I believe it is easier to have the tracker hosted within the sourceforge environment.


First experiences with Ohloh

April 21, 2007

Today, I discovered a website called Ohloh. This is a service that evaluates Open Source projects under certain criteria. I decided to try it out and registered both TinyUML and ZMPP there.

After some time, an information screen appears, listing the data it determined for the project. The summary for both looks like this:

  • mostly written in Java
  • well commented source code
  • short source code history
  • only a single active developer

Interestingly, the scoring whether code is well-documented is dependent on the average for a programming language. A value of 30 % would be extremely high for C, for example. The website determines the following values for average comment-to-code ratios:

  • Java: 35%
  • C#: 24%
  • PHP: 24%
  • C/C++: 20%
  • JavaScript: 18%
  • Ruby: 16%
  • Perl: 14% (!)
  • Python: 12%

Seemingly, for Java projects, this average is usually very high, much higher than for other languages. As I already expected, the value is much lower for Ruby and Python, probably because they are more easy to read (I could not get the values for Groovy, but I guess it would be in the same ballpark). Big surprises for me are Perl and C/C++. For any non-trivial software project, 14% or 20%, respectively look way too low.

The reason for the higher average on Java projects is probably the wide availability and acceptance of automatic code review tools (such as checkstyle and PMD) among Java developers, but it is only a guess.

My personal opinion is that larger C/C++ or Perl projects could in fact benefit from more code documentation, that’s what pod and doxygen are for.

Another interesting feature is the calculation of project costs, which is seemingly completely dependent on the Lines of Code metrics. For TinyUML it determines 14415 LOC and an effort of 3 (!!!) person years. While the 14415 Lines Of Code measured might be correct, I am really surprised about the estimated effort of 3 person years (another thing would be the average salary of 55000 USD/year – I think the salaries for software engineers here in Washington are way higher).

According to this, the average productivity of a programmer per year for 55000 USD is less than 5000 LOC. While the LOC does not say anything about the usefulness or quality of the software, this number seems terribly low for average productivity, assuming people working full-time on the project.

On the other hand, it does not account for different programming languages, it usually takes much more effort to write an equivalent program in C compared to Java and projects written in scripting languages tend to be even smaller.

In a comparison of KFrotz and ZMPP which are both implementations of the Z-machine with a similar feature set, KFrotz has 35204 LOC and ZMPP 18035. Still not the whole truth, Ohloh counts comment lines and test code, which account for two thirds of the overall ZMPP code, so it is actually only 8840 NCSS.

Test code is a factor that might make projects difficult to compare for Ohloh. Of course it contributes to the overall cost and effort for a project, but not directly to the functionality. That would be an interesting additional feature for the future, since more and more projects adopt automatic testing.

Still, I think, Ohloh is an interesting way to look at a software project and there sure will be some improvements in the future.


Cait Sith milestone release

April 9, 2007

Cait Sith screenshot

After two weeks I got the Cait Sith release ready. Looking back, I am surprised that it only were two weeks, there was so much stuff, that I put in and changed during that time and until now, this was definitely the most challenging release cycle. This is why I also decided to increment the version number to 0.12 instead of 0.11.

The editable connections were a pretty hard piece of work and there is still room for improvement. For now, they work good enough for me. I now added context menus, so there is quicker access to the functionality. There are a lot small things that were put in, things that are barely noticeable, but improve the overall usability.

This time, I also took the time to test the whole system a little more thoroughly. It took about two hours including fixing the bugs that I discovered. I noticed that I should do the feature freeze a little earlier, dependent on the amount of functionality that I put in. I just could not stop putting in new stuff.

I also noticed that the two weeks release period was appropriate, probably too short for the feature set. Next time, I will choose either less features or more time.

Looking at what I can do with the system now, I am pretty happy with the progress. TinyUML also passed the first usability test by my wife: She created a diagram without any knowledge of my software or UML diagrams. She either is incredibly smart or the software is simple enough to understand. While I hope that the latter is true to a certain degree, I have to admit that my wife is indeed pretty intelligent.


Cookies for Geeks

April 5, 2007

When looking for food at the cafeteria next to my office, I discovered a new cookie: Papa Giki, and since I am a “geeky Papa”, I had to try it out. According to the information on the cookis wrapping, it is a heart healthy cookie. Ya, whatever – it does taste great ! It is a rather soft and moist cookie, the raisins in it are also very soft. The fact that it contains german chocolate and is produced here in Washington State makes it even more attractive to me :-) Maybe they should think about wrapping more than one together, that would reduce packaging material. As a traditional german treehugger, I had to get used to the american way of using tons of wrapping and packaging material, wax-coated cups (I was never aware of that until I drank hot water out of one, blah !) and styrofoam dishes.

Yesterday’s efforts to improve on progress on rectilinear connection editing was very fruitful. I made one very useful experience: When simulating a user interaction with a JUnit test, I could not reproduce the errors I was getting when I did the same with the mouse, even when I set what I knew was the error-triggering conditions. The reason was that the bug did not show on the first even – it showed on the second one. I finally got the error when I simulated the user interaction more closely with a stream of events rather than just sending a single one. As Kent Beck says “a failed test means progress”. Absolutely true. It you can reproduce it, the work is half done.

Equipped with the new “drag simulating tool”, it was straightforward to add new tests. I haven’t yet got all the points that I consider to be included in that functionality, but it is quite stable, I know why it works (it’s in the tests)  and so far, it “feels” promising.


Follow

Get every new post delivered to your Inbox.