Skip to Content »

Tech Life of Recht » archive for 'groovy'

 Hacker Days with Trifork

  • October 31st, 2008
  • 12:06 pm

This week, we had the first Hacker Days with Trifork. It’s a pretty simple concept: Pack up your laptop and other necessities and head out to a more or less remote location and work on whatever little project you want. Basically, it’s a way to get some time to look at new and upcoming technologies and stuff that you can’t normally fit into your daily work.
I spent the two days with four others trying to implement a Scrum board in JavaFX. Of course, that’s not enough for two days, so we threw some Groovy into the mix too. Also, we used NetBeans for the IDE (because of the support for JavaFX), and finally we tried out Git for version control.
No complete product was created (but I don’t think anybody expected that to happen either), but here are some lessons learned:

  • The declarative style of JavaFX seems promising, and the bind mechanism makes a lot of things much easier. However, it can be a little hard to think the JavaFX way – I normally think in Swing terms, and that doesn’t always work out.
  • Effects in JavaFX are pretty nice. Implementing simple animations on widgets is also easy.
  • When you’ve finally worked out how JavaFX works, it’s pretty easy to add new functionality, as long as you stay within bounds. There is a lot of undocumented constructs, and guessing how they work is not easy. Also, googling for JavaFX will give you a lot of articles about earlier versions, which can’t be used for anything anymore.
  • For some reason, there are two worlds in JavaFX: The “native” components and the ones built on Swing. These have different properties, and are not really compatible. I’ve not figured out why yet, but it is a little irritating
  • NetBeans might be a good IDE, but the JavaFX support just plainly sucks. Auto completion only works half the time, it displays errors when the compiler runs with no errors, the component palette is a joke, formatting stinks, no automatic imports. It might be better just to use Emacs or something like that because then at least you know what you’ve got, and you don’t try the auto completer again and again, hoping that it will learn something.
  • Git looks promising, but for a project which needs to sync up all the time, it feels more complicated than Subversion. Especially the push and pull process is somewhat convoluted, and I’ve yet to figure out how to see what’s actually being pushed and pulled.
  • Rumor has it that Git is a pain on Windows. I run Linux, so I wouldn’t know – I used something like 10 minutes to set it up, including an account at repo.or.cz.
  • Finally, we had Groovy for the data layer. I didn’t work on that part, but I did hear some grumbling, primarily because of the loose typing.

We did get a semi-working application up and running, but not with real data, and only display of data, no input mechanism. However, the focus wasn’t so much on getting a complete system as it was on experimenting with new technology, and I’ve definitely learned a lot about JavaFX. The primary lesson is probably that it’s not production ready yet, and that good IDE support is vital (no surprise there).
Hopefully, the hacker days will become a semi-annual event, so maybe one day, we will have a more complete product.

 Keeping track of time

  • February 22nd, 2008
  • 2:01 am

For some reason, companies like to keep track of what their employees are doing, and where I work, it’s no different. Keeping track of which projects you work on and for how long gets tedious pretty quickly, and I wouldn’t be surprised if quite a number of people have the same experience as me: when you go to the time tracking system, you discover to some degree of horror that you’ve forgotten to update the system for the last 14 days. Now, what’s the chance of you remembering which tasks you worked on and for how long with any kind of precision? Probably none.

This is why I’ve been working on a small prototype for semi-automatic time tracking. It’s based on a simple concept: At regular intervals, a program pops up and asks what you’re doing right now. You click one button, and the program goes away. At some point, you can get a report of which tasks you’ve been working on.
Obviously, this is not completely accurate, but I hope it’s better than nothing. If you’re interested, you can try it out yourself. Remember, it’s a prototype, so there are probably plenty of bugs and missing features, but the basic functionality should be there.

The program is implemented in Java (actually mostly in Groovy), and can be launched via webstart. Java6 is required. Launch the Timesheet application here. If you do try it, please give your comments.
Should you want to reset everything, then delete the .timesheet_db file from user.home.