JBeamer – Freemind and Latex Beamer … continued

Januar 4th, 2009

In my day to day job I have to prepare now and then some presentations and thus I hacked a simple converter from freemind to latex(beamer) using XSLT, as I’ve demonstrated in previous posts.

The XSLT approach had some drawbacks, however – some of them were a nuisance for me, therefore I’ve rewrote the functionality in Java.

This led to a little parser for freemind files, which could serve also for other use cases. My first thought was to reuse the java implementation, but I gave up after skimmig through the code – as much as i like the end functionality of freemind, I couldn’t really embrace the internals of the freemind implementation – well maybe in the meantime it got better.

Anyway, latexbeamer is a powerful tool to create nice presentations, and the source language is quite simple and easy to understand. Moreover, presentations and Mindmaps match nicely together since presentations should be very easy – less is more in this case.

In contrast to the XSLT approach here and here the Java solution supports more features as listed below:

  • Support for highlighting of text (bold/italic/red)
  • Support for boxes
  • Pause support (elements are shown one after another on the same slide)
  • Different themes

In the source code you’ll find experimental support for tikz/pgf generation too. I’ve discovered this very nice technology only recently, it has a nice mindmap generation support and I think Freemind would benefit greatly by exporting also in this format. Have a look here what the mindmap module it is able to do.

Below is an example for the latex beamer and tikz output.

Here is the source. (LGPL)

At the moment, it is a command line application, which is fine with me. I plan to write a GUI using JavaFX, so stay tuned.

….

Ps: Just discovered the project JCommons which implements utility methods for mindmap manipulation. Looks interesting! Although I don’t know why it is called JCommons.

Btw: The original XSLT approach was pimped. Cool.

Freemind – a glimpse at the source code and current status of the project

Januar 3rd, 2009

Ok. I’ll check now the current statusin cvs – version freemind fm_0_9_0_beta20.

*rant start*

  • I see a .classpath, .project file, which tells me that eclipse should be used.
  • Well, they should use also subversion, not cvs ;)
  • an ant script is here however … on command line, use ‘ant -p’ to show the most important build options. An alternative is to use eclipse and its ant integration -  Robert J. Alexander has some tipps (remarkably old anyway)
  • the main directory is cluttered with various resource files – the packaging could use some brush – up.
  • A quick try yields a successful build, creating a dist dir with all compiled classes. So far so good. Anyway, I would use maven for the job, just because it is cooler.
  • In the ant project help the main goal for running is missing – use ant runWithoutPreferences . It working out of he box for me!  Thats great. Typically that is never the case ;)
  • a freemind.bat file is here, this should start freemind without 3rd party tools. Doesn’t work for me.
  • OUCH! just discovered that the beformentioned ant runWithoutPreferences creates a directory directly in my eclipse workspace. thats not so good. The paths should be corrected accordingly in build.xml. Those values should be put in a separate property file.
  • Consequently, the freemind.bat also fails.
  • For my taste, freemind.bat should be replaced by a maven exec command – this could reduce the need for a bat and a shellscript file.
  • wtf???

*rant end since …*

Well, I could complain about various things, but it would lead exactly to NOWHERE. Much more productive is to submit patches, as suggested on the project site. Again. Just do it.

Ok, so what is necessary to contribute to freemind? The well structured wiki is certainly a strength of the freemind development. It is very end user friendly and really motivates to contribute. This is one aspect which is often under estimated by open source projects in my view. Whoever is responsible for the nice freemind website, kudos for him.

ok … after some surfing, I discovered that one of the main developer did a fork on freemind, called freeplane. Obviously he got tired of the codebase and wants to make a complete refactoring, mentioned OSGi and stuff … will be interesting to see where this development is going to – end.

As a side effect, it also prooves my theory that the code is at is end of life cycle and it needs a major effort to get it maintainable again. Qed? I would very much regret if freemind development would stop or the core team breaks apart.

Remember: Technological problems can be always repaired, the important thing is that the involved team shares a common vision.

Didn’t try the mentioned  XMind yet. Dick Wall did, however ;) . As an end user, I’m very happy with freemind. Seen from a developer’s perspective, I’m not. But if I’m not contributing, I have to live with it. I have also to accept if freemind development won’t continue. I would very much regret that. But do i regret it so much as to invest time and energy?

This is the key question for open source projects – bottom line.

Freemind is an example for a product which gives a high value to end users, but looking at the code is a pain and relatively isolated. It is sexier to contribute to an apache project, use a cool new language or some kind of middleware; is it of more value to learn EJB 3.1 or struggle with ‘customers’ (end users) who are ignorant of  architectual problems in the code? Whoa. What a dejá vue. It reminds me of the problems I face on a daily basis, just like every sw engineer. I don’t want to cope with such problems also in my spare time.

Alas!

Open Source Projects are hard work, the people involved just do it for the respect of the users. For their own satisfaction. Much of the motivation is described by the thoughts of this man. Remember: everything is better than to watch tv and waste your time. Everybody can contribute, no matter which skills. Energy is a valuable thing. Think twice before you invest it.

Coming back to freemind vs. freeplane – I don’t know what I should think about it. The vision sounds very ambitious, if not too abstract? Dimitry selected his main points for refactoring freemind here. I miss very basic things like source code management, continuous build system, tests … to start with. It is essential to give new developers a jump start into the project, this means that checking out provides all things in order to get the tests (seems like coverage is way below it should be – the follow up question: are the classes testable at all?) running.

My 0.02 cents.

Netbeans vs Eclipse, some interesting links …

Dezember 30th, 2008

Netbeans has become a great IDE over the last years. I’m a eclipse user on a daily basis, but I’m rediscovering Netbeans again and I’m using it for my private projects.

I mention only the maven support which feels more mature than in Eclipse.  Source navigation and the refactoring support for Java lacks some features though. Well, I won’t bore you with details, there are plenty of blogs which do a brilliant job at commenting, comparing, explaining and ranting about almost all aspects of software engineering  – you aren’t interested in another one.

A killer feature for the productivity in Eclipse is the Mylyn approach. Netbeans pendant is Cube°n – but I didn’t look into that so far.

Some people have asked me to post more of stuff I’m currently interested in, since ” … it would be interesting …” (?).

Well here is a small list:

As for the usage of generics in java, I liked Joshua Blochs talk about Effective Java Reloaded on parleys.com. If you follow his recommendations you make your developer life much easier.

On the aforementioned website you’ll find also talks from other computer superstars like Mr. Odersky. Watch it!

Java FX

Dezember 30th, 2008

Java FX is out since 4th of december … read and heard about it, but started my experiments only today …  and I’m pleased of Netbeans’ support for developping  JavaFX applications.

I am, however, disappointed about the (still) missing feature (?) to deploy on ‘real’ mobile devices, not just the emulator. This will be fixed soon I’m sure. There are some blogs which complain about the missing authoring framework, but I’m sure the engineers at Sun do their job perfectly well. A major contribution to the success story of JavaFX will be the modularization of the Java runtime distribution, using profiles for target systems.

Anyway, all competing technologies (Flash, Silverlight … ) converge to a common denominator, from a developer’s perspective it won’t make much of a difference.

Anyway, this will improve Sun’s perspective on the RIA market and finally provide an enterprise tool chain with decent tool support.

Of course I created a nice looking JavaFX Hello World demo which demonstrates Timelines, some graphic primitives, fonts and a home made gradient effect ;)   using the Java Network Launch Protocol (JNLP) – here is the source.

Scala

September 2nd, 2008


("Nil"::"the"::"in"::"Swim"::Nil).reverse.foreach(print)