Life of the IT-Drummer

A web log from Tobias Rusås Olsen.

Lottery - Norwegian joker game in Groovy

By request, and for fun, I made the game “Joker” (I think that’s what it’s called?), best known for it’s parody “Ekstra Joker Nord” (Extra Joker North) from Team Antonsen:

It’s a simple game where you get five numbers from 1 to 9, and decide if you want to go up or down based on that [...]

Read the rest of Lottery - Norwegian joker game in Groovy

A SimplePriorityQueue in Java.

For some crazy reason, I today decided to implement the most simple form for priority queue possible. And since I just got Syntax highlighting on my site, I decided to put it out here.
PS: If you are looking for a PriorityQueue, please use this one, it’s a better solution, based on a heap implementation.
This SimplePriorityQueue [...]

Read the rest of A SimplePriorityQueue in Java.

JSF: Make your own error messages.

Today we had trouble with changing the default error messages in JSF, they were pretty confusing. After surfing the net, we found an easy solution:

Make a file called messages.properties and put it somewhere in your source folder (for example in a resource folder).
Go to the faces-context.xml, and add the following inside the faces-context tag:
<application>
<message-bundle>resource.messages</message-bundle>
</application>
Open the [...]

Read the rest of JSF: Make your own error messages.

Todays note:

Java EE:
If your application server crashes, and nothing works: Delete stupid .jar files from domain/lib/ext.

Read the rest of Todays note:

GWT, Java and Josh Bloch at Google.

I came over a great talk at youtube the other day, which I really enjoyed. It’s from Joshua Bloch, currently Chief Java Architect at Google, who has worked with Google Web Toolkit (which is like a ajax and javascript written with the Java-language), and also was part of the Java.util.Collection and java.math libraries among others. [...]

Read the rest of GWT, Java and Josh Bloch at Google.

Ruby on Rails - first impressions and a solution to a silly problem

Tonight I decided to give Ruby on Rails a try, as I tend to like playing with ruby, and I also like web applications. Therefore I search for “ruby on rails tutorial” on google, and found a wikipage which seemed like a nice tutorial. I already had ruby installed, and I followed the tutorial down [...]

Read the rest of Ruby on Rails - first impressions and a solution to a silly problem

I’m on Youtube (again)!

I recently installed this amazing program “CamStudio”, where you can record things happening at your screen, and record sound at the same time. Since it was functioning rather well, I decided to take it a step further, and record a video of me doing something useful (I guess). So I made a video about SQL-injection [...]

Read the rest of I’m on Youtube (again)!

Mitt første ruby-program!

Så, endelig har jeg tatt steget inn i rubyverdenen på ordentlig, og laget meg et lite script. Jeg fikk mye hjelp fra Bjørn, som også har bearbeidet koden min litt i etterkant (takk for det!).
Det scriptet gjør, er at det henter ut og lagrer alle tegneseriestripene fra den flotte siden Saturday Morning Breakfast Cereal på [...]

Read the rest of Mitt første ruby-program!

javax/servlet/jsp/tagext/TagLibraryValidator

If you ever encounter this silly exception, and can’t make any servlet/jsp-page to run, this might be because you have put some .jars (standard.jar og maybe some other jars) in a directory where it shouldn’t have been.
I found this bug really hard to debug, so the best way is to think about where you’ve could [...]

Read the rest of javax/servlet/jsp/tagext/TagLibraryValidator

Java puzzles

Her er en kjekk video der to karer viser en del små kodesnutter, og man skal tippe hva som skjer når de kjører. Det er lagt litt opp som et slags gameshow, så man får svaralternativer. De tar for seg en del javaspesifikke ting, som man kanskje ikke hadde tenkt over. Kjekk underholdning hvis man [...]

Read the rest of Java puzzles