Monday, May 03, 2010

Slides fra Scala-præsentation på 7N's IT-konference 2010

Slides fra min Scala-præsentation på 7N's IT-konference 2010 d. 5. maj kan ses/downloades på slideshare.net.

7N vil inden længe også lægge denne og de øvrige præsentationer fra konferencen op på deres hjemmeside. Jeg vil opdatere dette indlæg med en URL, når det er sket.

Du er velkommen til at kontakte mig, hvis du har spørgsmål.

Wednesday, April 28, 2010

Scala-præsentation på Community Day 2010

Jeg skal holde en præsentation af Scala på Community Day 2010 d. 27. maj. Det er en heldags, gratis konference med et interessant blandet indhold (.NET, PHP, web mv.). Mit indlæg har titlen “Scala – en bedre Java?”.

Læs mere om konferencen her.

Monday, March 15, 2010

Scala-præsentation

Jeg skal holde en præsentation af Scala på 7N's IT-konference 2010 d. 5. maj. Konferencens overordnede tema er effektivitet. Mit indlæg har titlen "Scala - en bedre og mere effektiv Java?".

Læs mere om konferencen her.

Thursday, March 04, 2010

PyCharm - a Python IDE by JetBrains

JetBrains has done it again!

This time they have made a Python IDE, PyCharm, (currently in public preview) which looks as cool as the existing RubyMine product.

The tool allows for navigating your Python project, doing refactoring, debugging support. It supports Google App Engine and the Django web framework.

I like it!

Update: I completely forgot to include a URL to the product: http://www.jetbrains.com/pycharm/index.html

Tuesday, March 02, 2010

Introduktion til F# (på dansk)

Jeg lavede i går en "Introduktion til F#"-præsentation. Hvis du er interesseret, kan du se mine (få) slides og kodeeksempler (med kommentarer).

Jeg er spændt på at se, hvordan F# bliver modtaget, når VS2010 kommer ud. Jeg synes personligt vældig godt om den funktionsorienterede tankegang og mener, at man kan udtrykke logik væsentlig mere kompakt (og stadig læsbart), når først man har luret tankegangen. Men hvor meget det giver mening f.eks. at sprede logik mellem C# og F# er et godt spørgsmål - specielt med de funktionsorienterede, der blev introduceret i C# 3.

Sunday, November 01, 2009

Using 32-bit SWT with Mac OS X Snow Leopard

I just ran into a problem with Eclipse 3.4.2 on Mac OS X Snow Leopard. Attempting to run or debug an Eclipse application, I got the error message "Cannot load 32-bit SWT libraries on 64-bit JVM".

Turns out that the old Eclipse versions (pre-3.5) are 32-bit, and Java 6 in Snow Leopard runs 64-bit by default. There seems to be multiple solutions to the problem, but the easiest in my case was to add "-d32" on the "Program arguments" list on the run configuration (the solution described here).

Run configuration

Thursday, August 13, 2009

Using Google Reader's "Send To" feature with Diigo

I use Google Reader for keeping track of blogs and news. For bookmarks, I use Diigo.

Google Reader just added a "Send To" feature that allows you to send the link of a news item to Twitter, Facebook, Delicious, etc. Diigo is not on the list. However, it is possible to add your own "Send To" targets.

For Diigo, this is the recipe:

  • Go to "Settings" in Google Reader

  • Go to the "Send To" tab

  • Click the "Create a custom link" button

  • Specify the following details

    • Name: Diigo

    • URL: http://www.diigo.com/post?url=${url}

    • Icon URL: http://www.diigo.com/favicon.ico



  • Click "Save"


Now, you can post an entry in Google Reader to Diigo using the "Send to" link in the bottom of each item.

Update: You might also want to take a look at this Lifehacker article.

Tuesday, June 09, 2009

Security messages when they're best

I know that it's not a good idea to have a password identical to your username but even so, this may not be the best way to announce it to the world. This dialog is presented from Quality Center every time you attempt to log in:

[caption id="attachment_48" align="alignnone" width="383" caption="Message from Quality Center"]Message from Quality Center[/caption]

Monday, February 16, 2009

Great series of blog entries on DDD

Casey Charlton has a great series of blog entries on DDD (Domain Driven Design). The articles just keep on coming, and now he has made an ebook with all the articles. Great work, highly recommended.

Tuesday, February 03, 2009

Quality and the speed of development

Uncle Bob has written a post on the subject of quality versus speed.

I really like his point that speed in and of itself is not a success criteria. If the software you develop isn't quality software, it may (or may not) be faster to get the first release of the product shipped.

However, the speed of development for the remainder of the product's life may be heavily reduced due to the lack of quality in the design.

A good example of the opinion that speed matters more is when someone states that "we don't have time to write unit tests." Writing tests may take longer in the short run, but if done right, the quality of the software increases, which may even help get the release of out the door faster. At least, the quality of the code will improve.

In the upcoming book by Roy Osherove, The Art of Unit Testing, he deals with an example, where two teams in the same organisation implemented two similar features. One team wrote unit tests for their code, the other didn't. In summary, the unit testing team spent twice as long implementing the code. However, they were significantly faster integrating the code, and spent less time in manual test and bug fixing cycles. Actually, the team that wrote unit tests completed the feature in less time than the team that didn't. In addition, the number of bugs found in production was much lower.

The example in the book may not have been a very scientific study, but it shows that actions to increase the quality of the software may actually have the positive side effect of increasing the speed of development. Just remember that speed of development is not a quality in itself.

Sunday, January 25, 2009

Fantastic quote on Java in the "good old days"

Java before the Convention over Configuration movement: "Java is a DSL to transform big Xml documents into long exception stack traces" (Scott Bellware, according to Jeremy D. Miller).

Sunday, January 04, 2009

ReSharper 4.5 Nightly Builds are coming...

I just noticed that the nightly builds for ReSharper 4.5 have appeared. They are available here.

The changes in R# 4.5 are highlighted here. I am particularly looking forward to the enhanced performance and reduced memory footprint - these are practically the only issues that I find a tiny bit annoying (but nothing that cannot be cured with an extra helping of RAM).

Wednesday, December 10, 2008

Balsamiq Mockups - excellent UI mockup design tool

I was recently presented with a mockup UI design at my current project. The design was clearly a sketch, but there was no doubt at all what the purpose of the mockup was.

UI mockups are an excellent tool for communication between the users and developers of a system. If the drawing of the mockup is to take place during discussions, the process needs to be very swift. Enter Balsamiq Mockups.

Balsamiq is an Adobe AIR application allowing very quick UI design. Being an AIR application, it runs on Windows, Mac OS X and Linux.

[caption id="attachment_25" align="alignnone" width="292" caption="Simple Balsamiq mockup"]Simple Balsamiq mockup[/caption]

The tool uses a notebook metaphor, and all UI components look "sketchy" (which just underlines the fact that it is a mockup). The tool has a whole palette of the typical UI components for thin (browser based) and rich applications you might need for a UI design.

One of my favourite details about Balsamiq is that is very keyboard centric, which greatly supports a discussion based process, provided, of course, that you are a keyboard shortcut enthusiast. It is very easy to add components, move them around, edit the contents etc. If you prefer using a mouse, that is of course also very easy.

Mockups can be exported as PNG or as XML. Balsamiq claims that the XML format is human readable. I wouldn't exactly say that (unless you really like XML), but there is no question that the format is open and could possibly be manipulated by other tools (such as an XSLT) - it might even be possible to generate code directly from the mockup...

Balsamiq is the best tool for UI mockup creation I have seen so far. With a price tag at §79, even the price is right. Take a look at http://balsamiq.com and try their demo.

Wednesday, April 04, 2007

Implementors plugin v0.0.16 released

I have just released v0.0.16 of the Implementors Eclipse plugin. It is a minor bug fix release mostly catering for problems with class names in EJB descriptor files.

This is the first release in a very long time. I hope to find more time to look into my plugins in the not-so-distant future.

UPDATE: A link to the download page might be in order: Download link

Thursday, December 21, 2006

JavaPolis: Great conference!

I am back again from JavaPolis 2006. It has been a great conference. Belgium is always worth a visit if you like good food, chocolate and beer but JavaPolis is definitely also worth a visit.

The contents of this year's conference was really good (although I have already complained about the lack of Eclipse content :-) ).

The JavaPolis team had improved a lot on the practical matters:

  • Short breaks had been scheduled between the conference sessions so that it was actually possible to get from one room to the other in time

  • The speakers were kept on a tight schedule - they weren't allowed to exceed their time slot

  • The food was a lot better and in adequate supply

  • There was wireless internet (although the quality was questionable - they already know this...)

  • There were tables with power outlets where you could use your laptop in the breaks



I have a few suggestions for next year's conference:

  • Set up LAN cables at the tables. This might lower the load on the wireless network

  • Clearly state in the conference program whether a speaker represents a product. I attended (at least in part) several sessions which were in fact product presentations in disguise (the talks were not on the Partner track where this is to be expected). This is quite annoying! It is OK when you know in advance what you are in for (I saw an excellent presentation on Adobe Flex).



Thanks a lot to the JavaPolis team for a great job!

Wednesday, December 13, 2006

JavaPolis: Where is Eclipse?

I'm a bit amazed to see the number of sessions on Eclipse on this year's JavaPolis.

A search through the conference guide shows three sessions which include the word Eclipse in the description. Of these, two are product presentations on JBuilder 2007 and the Adobe Flex 2.0 development tool (which are both built on Eclipse). The third is on a framework based on Eclipse RCP. Erich Gamma might be expected to mention Eclipse in his keynote on Thursday.

Apart from these sessions there is nothing on Eclipse. I know that there are conferences specifically on Eclipse (EclipseCon, EclipseWorld, both in the U.S., and Eclipse Forum Europe), but still I would have expected to see more Eclipse related content on a general Java conference.

Considering the amount of work taking place in the Eclipse community and the number of projects (a quick count shows ten top-level projects), I wouldn't say that everything has been said on the subject. OK, maybe I'm just a bit disappointed...

Tuesday, December 12, 2006

JavaPolis: Dynamic Languages Are A Hot Topic

Apparently, dynamic languages in Java are a hot topic. At least if you judge by the size of the audience in the JSR223 - Dynamic Languages on the Java Platform University talk at JavaPolis today. The room was quite packed with people.

The talk was quite interesting. Geert Bevin did the first part on scripting features in Java (he claimed that he was just a stand in for someone else who had made the slides - he did a good job anyway.) Charles Nutter and Thomas Enebo presented their work with JRuby and presented a short demo with JRuby on Rails which is pretty much up and running. Finally, Dierk König presented some of the features in Groovy which is finally approaching its 1.0 release in the end of December - this year :-).

It is interesting to see the movements in dynamic languages on the Java platform. With JDK 6 just released, scripting (in the shape of Javascript) has been integrated into and comes bundled with the JDK itself. More scripting support is coming in future versions of the JDK. It is clear that Sun is putting some focus on the matter by hiring the JRuby guys. As they mentioned, currently they're working on JRuby but in the future they might on scripting support in general.

The ability to actually run Rails in a JVM is also quite interesting. This might make Rails more acceptable for some organizations which would never allow something like Rails on its production environments. When deployed on a Java application server it is basically just Java. Furthermore, JRuby comes with a database adapter for JDBC which adds database support for even more databases than Rails itself. As Thomas and Charles mentioned, you can now run Rails on a mainframe - quite an interesting thought :-)

Groovy is also an interesting language. I have used Groovy in small scale for some time now and have been quite happy with it (apart from the many changes since its inception). Groovy has the advantage over JRuby (and most other scripting for Java) that it is much more Java-like. Also, the Groovy scripts can be compiled into Java classes which allow them to be used from Java code without you noticing it. JRuby doesn't have this ability yet (although the feature is planned.)

There is a talk on Grails on Thursday that I consider seeing. I could hope that Groovy will get the same momentum with its companion web framework, Grails, as Ruby has had with Rails (although I doubt it.)

Tuesday, August 08, 2006

Quickmarks v3.0.2 released

I have just released a new version of the Quickmarks plugin for Eclipse 3.x. This release is purely a bug fix release, correcting two bugs (#1033426 and #1413468) that have been there for almost two years. Finally, they're out of the way... :-)

The new version has been tested on Windows XP with Eclipse 3.0.2 and Eclipse 3.2.

The new version of the plugin can be downloaded here: Quickmarks plugin

Wednesday, February 22, 2006

Stripes - a lightweight web framework

During my continuing search for alternative web frameworks, I came across Stripes some time ago. It looked quite nice and has even gotten nicer with the recent release of version 1.2.

What I like about Stripes is that it is simple. It may not be the perfect web MVC framework capable of anything, but for most simple (and I don't mean simple as in trivial) web applications, it looks good.

Stripes has practically no external configuration. Most of the configuration (and not much is needed) is written as annotations in the ActionBeans (which, by the way, do not have to extend a specific base class). For instance, the @UrlBinding annotation on the class states the URL, the action is bound to. The @DefaultHandler annotation on a method specifies that this method should be invoked if a specific event has not been specified. The @HandlesEvent("eventName") registers a method that should be used to handle the eventName event. Of course, it does add a number of @annotation elements to your code, but due to the simplicity of the framework, it won't be so much, that it renders the code unreadable.

Stripes has the basic features you would expect from a modern web MVC framework (the items below are just a subset of the functionality. For the full list see the Stripes documentation):

  • Validation. There are a number of standard validators (annotation driven) and you may write your own validate method (which will be called if you implement the Validatable interface

  • Type conversion from HTML input elements to Java objects

  • AJAX support. There is built-in support for calling methods on ActionBeans from AJAX functions

  • Localization

  • Reuse of layouts. A templating mechanism allowing you to get a uniform layout without duplicating a lot of code

  • Integration with Spring. Adds the possibility to get dependencies injected into ActionBeans from the Spring context.



Version 1.2 has added a number of nice new features (among other things):

  • Wizard forms. Handling of the very typical usecase of wizard style dialogs.

  • Flash scope. The ability to support the redirect-after-post pattern while retaining the parameters from the post.

  • Smart defaults. A new feature in version 1.2 enables Stripes to automatically determine the URL bindings based on the class name and some default naming conventions





Stripes does not attempt to deliver lot of functionality outside of the core framework. There is no CRUD functionality, no support for sending mails etc. However, I don't see this as a negative thing - you might not need it.

One minor drawback is that Stripes requires Java 5, which may not be an option for you (if you use Websphere, for example). But then again, why not try to go with a simpler set-up in that respect too :-).

In conclusion, Stripes does seem to deliver on the functionality that is actually included. I'm really looking forward to see, how Stripes will progress in the future.

Wednesday, January 25, 2006

The Problems Of Reuse

Danny Lagrouw has commented on a blog entry called Reuse is vastly overrated by David Heinemeier Hansson. Basically, the conclusion is that often reuse is simply not worth the struggle.

I couldn't agree more. I have seen so many examples of efforts of trying (too hard) to "design something for reuse since reuse will save us so much time and money". Designing something to accommodate for future business requirements is extremely difficult since these requirements tend to be changing rapidly. You almost never know in advance the exact requirements of future uses of your code.

There are several problems with designing for reuse:

  • Trying to design for generality in advance typically leads to overdesigning in a very non-XP way. This in itself might increase the costs of developing the general solution which can then be reused.


  • There are always little twists which make two seemingly similar usecases different. These little differences tend to make the general design jump through loops in order to cater for the differences. It typically makes the general code less easy to read and maintain due to the handling of the differences and it definitely adds to the costs.

  • Even when to usecases are similar when developed, I have seen many examples of business requirements "drifting apart", requiring the general code to adapt to the new gap between the usecases. Adapting to changes in one usecase may prove to be difficult as the changes apply to the general code. You need to be really careful with changes to the general code as it affects all the implemented usecases. And we're not even talking by the extra efforts in testing, since all the implemented usecases must be re-tested.



This is not an excuse for not creating quality design. I'm not saying that you should just copy-and-paste your way through the application - the DRY principle (Don't Repeat Yourself) still holds. However, I think it is important to really think carefully of whether reuse is feasible and find the right spots to reuse.