Techday Play framework

We’re holding another one of our monthly “Techday” events this week. We organize techdays because we like to stay sharp and have some fun in the process (Check out our previous blog post about why we do techdays).

This month’s techday is on thursday april 26th in our Avisi offices in Arnhem. This time about the Play framework. Want to join the fun?

Continue reading

Exploring Kotlin, writing a simple spell checker

In my last blog I talked about exploring Kotlin, a JVM language in development by JetBrains. In this blog I’ll walk through a larger piece of Kotlin code.

Spell checker
The program we’re talking about is a simple spell checker. It reads a dictionary of words from a file (/usr/share/dict/words) into a set. Then it reads a sentence from stdin and checks if every word is in the dictionary. Finally it informs the user whether or not the sentence is spelled correctly, i.e. every word is known in the dictionary.

The spell checker is available on my GitHub. Take a moment to study the Java version, we’ll discuss the Kotlin version next. Continue reading

EJB 3.1: Concurrency Management and (Avoiding) Synchronization

At Avisi we use a custom built EJB 3 based application for scheduling and running (automated) regression tests. This involves a queue from which objects are taken. These objects contain metadata describing the tests to execute. I won’t go into detail as to why we aren’t using Apache ActiveMQ (or a similar library) for this purpose, but I can say that we didn’t need distributed test-executing minions at that time.

Continue reading

File upload and character sets / encoding

When working with file uploads from a browser it is good to realize that you don’t know what is coming. Character set wise that is. You simply do not get a hint from your browser that says: here is a UTF-8 encoded Unicode text file. Or, beware, this document I am sending you now is created on a Windows machine, using the windows-1252 character set.

Why don’t browsers do this? The answer is rather simple: they don’t have a clue either. The file is read from disk and most file systems don’t store meta information on character set or encoding.

How do we correctly deal with that? There is only 1 valid option. The person uploading the file must tell us what it is. If you have a form with a file upload, put a drop down next to it with a list of character sets and let the user indicate what he is sending. If it’s a system sending in files via REST make sure you know what it sending, or give it a parameter to indicate the character set used.

That is the only solution that is 100% guaranteed. If you want to try something more advanced, look at IBM’s icu project (Java / C/ C++). It has functionality that detects the charset or encoding of character data in an unknown format, but the results can not be guaranteed to always be correct.

 

Day 3 at Devoxx 2011

This is a “live” blog from day 1 at Devoxx 2011, we will be updating this blog post during the day. You can read all three blogs by following the links below

Day one
Day two
Day three

Day three

We made it for the last day of Devoxx! A bit tired after the Devoxx party at the NOXX, but luckily there were only two sessions and a keynote today. Like previous years the keynote on friday was a “technical” discussion panel with people from/representing Oracle, Google, Microsoft, JUG’s, open source. Everybody could ask questions which unfortunately meant that the talk was less technical and more politics. With a lot of political questions which of course the panelists couldn’t answer.

Continue reading

Day 2 at Devoxx 2011

This is a “live” blog from day 1 at Devoxx 2011, we will be updating this blog post during the day. You can read all three blogs by following the links below

Day one
Day two
Day three

Day two

The day started with an android focused keynote by Google. It was definitely a better presentation than the keynote of day one. Despite that it was about android, Tim Bray showed us where the mobile market is going. Touching topics such as monetizing your app, new android features, comparison with the competition (Apple and Microsoft).

Continue reading