5 year retrospective – Project document management in Alfresco

pályazatThis post is the last in my current retrospective series, that sampled the projects I was working on years ago. You can see the previous posts here and here.

While the previous posts were about projects that span through years, this will be about a project that took no longer than a couple of months.

I was desperately looking for a screeenshot in my archives, to add as an illustration. I finally gave up, and tried to go with the University logo from the Internet. Imagine my surprise, to find the application is still up and running! It wasn’t used since 2013, but considering it was not maintained since the end of 2010, it was quite well done. You can see the version number on the bottom of the screen.pályázat-version

Disclaimer: The project is described best from my memories. I tried to keep the story professional, still there were emotional aspects that I tried to present in the back story. 
Continue reading “5 year retrospective – Project document management in Alfresco”

Why are there so few female software developers in Hungary?

Recently I was musing about this topic and was trying to find reasons for this phenomenon.

When I was running my company I interviewed several developers for open positions, and interestingly there was an unspeakable imbalance in the gender ratio. Namely I can only recall two ladies I interviewed, out of about a hundred subjects.

I’m trying to look into the root cause for this matter.

Continue reading “Why are there so few female software developers in Hungary?”

Regexp fun

Reading the post about useful regular expressions,  remembered what my favourite solution is to one of  the questions of the test we give to junior Java developers.

The task is to write a method that takes a string as a parameter and returns the acronym of the string in uppercase made up of the first letters of the words in the string. The acronym must ignore the words “the”, “of” and “and”.

The usual solutions are either to sequentially step through the string (Yuck!) or split it up or use a StringTokenizer class. The people usually overlook the fact, that the input strings can be padded with whitespace, or contain multiple spaces, and they usually ignore, that the keywords that are to be omitted might be found on the begining of a valid word. Thus my test ” United   States of Andorra” string breaks most of the methods.  The ones who have time to write the answer down, usually forget to return the value from the method, or to change it to uppercase and sometimes even ignore that it should be a method to start with! This is my favourite question, as it can really show how the applicant can handle stressful situations.

I was tired after several interviews one day and tried to come up with the  shortest possible solution. Naturally it contains regular expressions.

My solution looked something like this (OK I just reproduced it for the sake of the article, using nano and javac, so it might have overlooked flaws in it):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
public class Acronym { 
 
private static String toAcronym(String str) {
        return str.toUpperCase().
                        replaceAll("(THE|OF|AND)(\W+|$)","").
                        replaceAll("(\w)\w*\W*","$1");
}
 
public static void main (String args[]) {
                if(args.length>0) {
                        System.out.println(toAcronym(args[0]));
        }
}
 
}

Using JAX-WS without code generation

Something gave me the weird idea to try the new features of JAX-WS on a current project. The main idea was, to get rid of the code generators that must be ran whenever some minor change is done in the web service.

So instead of designing the WSDL along with the matching schema definition for the connector classes, I decided to start of by designing the interfaces and the connector classes, then just create the implementation with the corresponding annotations on the server side, that will be deployed automatically. The WSDL is generated from the annotations and the connector classes, there is no need to write them manually.

Continue reading “Using JAX-WS without code generation”

The Parable of the Object Oriented Programmer and Breakfast

This is the English version of a tale I’ve recently found in my archive mailbox from 2001. Looking at ongoing projects, I think it still has a point.

Once upon a time, in a kingdom not far from here, a king summoned two of his advisors for a test. He showed them both a shiny metal box with two slots in the top, a control knob, and a lever. “What do you think this is?
Continue reading “The Parable of the Object Oriented Programmer and Breakfast”

Quick and dirty way to create DB2 update scripts

In on of our major projects we store some of our business logic data as database metadata, but provide GUI interface for updates. Since clicking through the project’s GUI is much easier, than creating and verifying scripts for each tiny modification, our developers got lazy and we had to find a way to create SQL scripts to bring releases up to date. This basically means, we had to create a script generator that compares the data in source and destination databases and creates SQL INSERT, UPDATE and DELETE statements that can be used to modify the destination to source.
Continue reading “Quick and dirty way to create DB2 update scripts”

How not to use Java key stores

I spent half a day today trying to see why a the web start application created and deployed using a simple build script didn’t work after I’ve created a new certificate as our previous was about to expire.

First I suspected it was because I signed the application using SUN JDK 1.6, and it might have some compatibility issues (as if) then I suspected it was the IBM JDK 1.5’s ikeytool I used to create the key (NB. I’m lazy to learn the keytool paramers, so I prefer to use a GUI for creating keys)

It turned out I was presuming the keys use UTF internally, like most Java applications should, so when entering the locality I used “Vác” with accented characters. Neither ikeytool, neither keytool warned me about this. Once creating a new key without the accent the application started working straight away.

Since “Budapest” doesn’t have any special characters, I never noticed this, but I think it deserves to be mentioned, so others won’t run into this problem.

Off-line SWT application

One of our current Customers have a very interesting requirement for an upcoming project. The nature of the project requires mobile clients and frequent (or even instant) database updates, but there is no guarantee to have constant connectivity. We more or less have full control on the choice of tools to use for this application, but since our developer resources are limited, it would be great if we could use the architecture from a previous project. We’ve been working with András on this for quite a while and it seems we found a pretty interesting way to do this.
Continue reading “Off-line SWT application”