Will code (insert language here) for food.

Yes, I have to face the truth. In April I will become 26 years old and that was reason enough to get some mail from the family benefits office (Familienkasse). Unfortunately they told me that I will no longer receive child allowance after March. Fortunately I served my time (9 month) at the German Bundeswehr directly after finishing school. This means that I will get money until 2009.

Nevertheless I wasted nearly one year, doing absolutely nothing for completing my degree in computer sciences. Instead I was wasting time getting drunk, trying to play guitar or doing other senseless stuff. But as you have probably reasoned after reading my last posting (Rambo), I belong to the working part of society by now. Yes, I sold my soul to ATB Bremen, an «Institute for Applied Systems Technology». Like the other students there I was mainly engaged to code for food money.

Reviewing the last 4 weeks at ATB I have to say, that I am still satisfied with what I am doing yet. We will see what happens in the near future, as I only have a contract for 3 months (my probation period). Recently I had to convert an old database (containing millions of rows in about 40 tables). Therefore I designed a new database schema which finally uses neat things like foreign keys. How can you even build a database without foreign keys. Even if it not really supports it, like when using MyISAM (the default MySQL) tables, which are not capable of using foreign keys. If you don’t have the possibility to activate InnoDB tables, you should at least use numeric Ids and JOINS to combine referencing tables to avoid redundancy. What so ever.

Documenting Java code

Eclipse with JavaDoc ViewSurprisingly I enjoyed coding this stuff and more important: even after work I wasn’t that annoyed of programming all day. That is why I suddenly restarted working at my diploma thesis. Unfortunately I did not made enormous progress within the last few days. Instead I had to read through my (three month) old source code, trying to understand what I did some time ago. Therefore I decided to clean up the code and refactor inappropriate names, packages and so forth. Moreover I started to document all my existing source code, using JavaDoc.

At first I did not really remember how to write doc comments, but fortunately most of the Java classes and interfaces are well documented. While editing my own JavaDoc comments, I found a nice view provided by Eclipse. It is called «Javadoc» (what a surprise) and shows a preview of the documentation for the currently selected element.

SuppressWarnings

If you are a Java developer like me you probably find some warnings that eclipse points out annoying. Fortunately you can suppress this warnings for methods, classes or simple lines of code by using the @SupressWarnings annotation. Maybe you have wondered like I did, what values for this annotation can be specified. The answer is: it is compiler dependent. But if you are using Eclipse, you can use one of the following values, documented in the Eclipse SDK help (at the bottom):

all
to suppress all warnings
boxing
to suppress warnings relative to boxing/unboxing operations
cast
to suppress warnings relative to cast operations
dep-ann
to suppress warnings relative to deprecated annotation
deprecation
to suppress warnings relative to deprecation
fallthrough
to suppress warnings relative to missing breaks in switch statements
finally
to suppress warnings relative to finally block that don’t return
hiding
to suppress warnings relative to locals that hide variable
incomplete-switch
to suppress warnings relative to missing entries in a switch statement (enum case)
nls
to suppress warnings relative to non-nls string literals
null
to suppress warnings relative to null analysis
restriction
to suppress warnings relative to usage of discouraged or forbidden references
serial
to suppress warnings relative to missing serialVersionUID field for a serializable class
static-access
to suppress warnings relative to incorrect static access
synthetic-access
to suppress warnings relative to unoptimized access from inner classes
unchecked
to suppress warnings relative to unchecked operations
unqualified-field-access
to suppress warnings relative to field access unqualified
unused
to suppress warnings relative to unused code

2 Kommentare zu „Will code (insert language here) for food.

Kommentar verfassen

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.