Vert.x Boot first step

So, I happen to find myself with a lot of free time at my disposal. Having spent the last three years head-of-teching in a startup I also have finally the time to think about the technologies we used, the shortcomings, the pitfalls and what I would do different on the next project.

Turns out that I really fell in love with Vert.x as a technology, Java 10 and RxJava2. As you still can see on GitHub we build an awfull lot of components around that. Vert.x is just blazingly fast and easy to understand, RxJava makes for nice reactive streams and modern Java is just fun to work with.

We also had a couple of Spring Boot services, mostly for simplicity and the hype four years ago. In general Spring Boot brings a lot of features, most of them you don’t need or don’t know. It is also quite slow when it comes to startup, in a container, on a VM, in the Cloud.

Now, while I am wondering what to do next and what to do in general I started wondering what I would do knowing what I know now.

We mostly used a stack based on Vert.x, RxJava (sadly 1.x) and Vert.x Jersey. We glued it all together with a couple of abstractions over Verticle deployment and got our own nice stack this way.

Things I would (and have done with newer services) is using RxJava2 as well as replace HK2 with Guice. HK2 is nice but also slightly inferior to Guice in my opinion. For some reason HK2 is not that well maintained, as of last week there was still no support for Java 10 in a released version.

And now I am wondering if I should take this whole stack to a new level and build something like Vert.x Boot, a system that easily lets you bootstrap Vert.x microservices for a variaty of use-cases with the following features:

  • Easy to use bootstrapping process like Spring Boot has
  • Guice as CI and general application configuration approach (I strongly believe in using code for as many things as possible)
  • Vertx-Jersey as a general REST/JAX-RS abstraction
  • Metrics and Prometheus integration out of the box using Micrometer
  • Defined readiness and liveness probe patterns (health checks)
  • Very good RxJava2 integration
  • Minimal dependency footprint that is easy to upgrade in order to follow Java’s amazingly fast upgrade cycle
  • Some well defined testing and containerization patterns (we all build images now, no?) that make it easy to build “golden” images, maybe using Testcontainers

On top of that there should be some modules to integrate with commonly used data layer services and provide the infrastructure that you usally use around that, like connection pooling and schema migrations:

Bonus

  • I really like GraphQL, so something that would abstract around GraphQL Java to build easy to use GraphQL endpoints would also be nice
  • I’m not so sure about my feelings about Jigsaw and the way the Java eco-system is going, but having a good way to work with modules would also be a bonus.

I used to say that Java is not a great fit for Microservices because of memory usage and startup times, but with this stack it might actually make sense. I haven’t yet figured completely out how low you can go, but with a very low old-gen baseline and requests that always run only in your young-generation you can actually run those things with a very small memory footprint.

Maybe that is something to fill my time with once the summer ends.

Advertisement

ApacheCon EU 2012 Day 3

Mit dem dritten bzw. eigentich vierten Tag neigte sich dann auch die Konferenz dem Ende zu, was man unter anderem auch daran merkt das ich nicht mehr so viel mitgeschrieben habe. Reichte dann aber auch.

The CouchDB Implementation (Jan Lehnardt)
Wie der Name schon sagt ein wenig CouchDB internals. War sehr interessant, so richtig lässt sich das hier aber auch nicht wiedergeben.

Solr-based search & tagging services at ZEIT Online GmbH – where metadata come from (Christoph Goller)
Ein wenig über Analysers und was in der realen Welt wirklich funktioniert.

Apache Camel – Advanced Techniques (Hadrian Zbarcea)
Gut, man sollte eventuell nicht in den “Advanced Techniques” Vortrag gehen wenn man das Produkt nicht kennt, war aber auch ganz, äh, interessant.

Apollo and future of ActiveMQ (Dejan Bosanac)
Die JMS Implementierungen sind erwachsen geworden. Und sprechen jetzt bessere (plaintext) Protokolle: STOMP http://stomp.github.com/.
LevelDB ist ein Key Value Store von Google das ich noch nicht kannte.

World of Logging (Christian Grobmeier)
Logging ist ein gelöstes Problem, ne? Es gibt sehr viele Frameworks und Meta Frameworks, Commons Logging ist etwas tot, daher ist slf4j aktuell die beste Lösung. Aber log4j2 ist unterwegs und bringt viele schöne neue Features.

Danach gab es noch kurze Sessions zu allen möglichen Themen und noch den Shutdown, noch mehr Gespräche und dann war es auch schon Abend und Zeit für noch ein gemeinsames Bier und dann schlafen. Heute geht es dann auf den weiten Weg zurück nach HH mit kleinem Abstecher über Bonn.

Mein Fazit ist durchwegs positiv, die Themen waren alle sehr interessant, viel dabei was man sich mal anschauen muss bzw. sollte. Auch die Infos über die Apache Software Foundation selbst waren ganz interessant, mit war nicht bewusst wie professionell das da alles abläuft. Wenn es nicht eh schon tausend andere Konferenzen gäbe dich ich auch alle gerne mal besuchen würde dann würde ich auf jeden Fall jederzeit wieder auf eine ApacheCon fahren.

ApacheCon EU 2012 Day 2

Konferenzen sind ja auch etwas anstrengend. Man muss früh raus, obwohl man am Abend vorher lange unterwegs war, man hat die ganze Zeit stimulierendes Input um sich herum und man weiß das man Abends schon wieder lange unterwegs sein wird. Und vor allen Dingen lernt man ständig neue Menschen kennen. Ich bin also immer noch begeistert von der ApacheCon, hier die Notizen zu heute:

Real-time Big Data in Practice with Cassandra (Michaël Figuière)
Ja, Cassandra halt. Mir ist der Usecase auch immer noch nicht klar, es sei denn du bist Twitter, dann ists schön. Das wesentliche was sich in der letzten Zeit getan hat ist das man jetzt SQL, pardon, CQL mit dem Ding sprechen kann.

What are we working on? (Steve Rowe)
Ja, Lucene halt. :). Auch nichts was ich gestern nicht schon gehört habe, noch etwa sin depth. Ich glaube ich habe gerade einen Lucene Overkill.

Domain-driven apps with Apache Isis (Mohammad Nour)
“Apache Isis is for GUI as Hibernate is for persistence”. RAD Framework mit dem man Apps generieren kann. Sieht lustig aus, kann man bestimmt benutzen wenn man den passenden Use-Case hat.

The Apache Way (Ross Gardler)
Q: “If people off the sub projects dictate what the board is doing, what is the board doing”? A: “Usually we’re drinking whiskey”.
Ross Gardler ist ein großartiger Redner, der Talk hat sehr viel Spass gemacht. Wenn man sich noch nie damit auseinandergesetzt hat wie die ASF funktioniert dann ist er auch voller Infos, jetzt weiß ich wenigstens was ein PMC ist. Auch war mit nicht so bewusst das es Apache Labs gibt. Eine gute Quote zur Arbeitsweise der ASF ist auch: “We never pay for code”.

Ferner hat er folgendes Video empfohlen:
https://www.youtube.com/watch?v=Q52kFL8zVoM

OSGi for mere mortals (Bertrand Delacretaz)
OSGi kann man also auch für Webapps verwenden, das war schon sehr lustig. Wenn man den Case hat dann hat man auf diese Art und weise ein sehr entkoppeltes System von dem man Einzelteile austauschen kann. Apache Felix ist hier dann wohl der way to go.

Managing project risk when using open source (Ross Gardler)
Da ich jetzt Fan von Ross geworden bin habe ich mal CouchDB Features liegen gelassen und mir angehört was er sonst noch so zu erzählen hat. War aber auch eher ein politscher Talk über die möglichen Risiken wenn man FOSS einsetzt, die kennen wir ja nun alle.

Mongo, its all the Rave (Matt Franklin)
Web & Social Mashup Engine. Im großen und ganzen haben sie das auf Mongo umgestellt und danach war es viel schneller (vorher lief es gegen MySQL). Bis auf lustige Requests die plötzlich ewig dauern. Wo das herkommt hat er aber keine Ahnung gehabt. Zumindest weiß ich jetzt was Rave ist.

HBase Status Quo (Lars George)
Kleiner Blick in das Hadoop/HDFS und hauptächlich HBase Universum. Damit würde ich auch mal gerne spielen, ich habe nur die Daten nicht ;).

Danach gab es dann noch Commiter treffen (warum die Apachen immer so mit Commitern beschäftigt sind versteht man wenn man die Struktur der ASF kennt). Da hab ich mich dann mal angeschlossen, die Struts Leute kennengelernt, die Log4j2 Leute kennengelernt und gutes Essen gehabt, das ich tatsächlich diesmal selber bezahlt habe.

Nebenher habe ich heute ein wenig mit ZooKeeper gespielt, das ist wirklich auf einem sehr tiefen Level aber trotzdem sehr schön. So Sachen wie verteilte Locks und Queues kann man zwar damit bauen, sie gehören aber nicht in den API und werden als “Recipes” mitgeliefert. Aber man kann damit bestimmt ein schönes verteiltes System bauen mit dem man Keys in Values transformieren kann und diese dann noch synchronisiert verteilen kann. Mir fällt da ein usecase mit ungefähr 10 Nodes ein. Mal sehen ob ich meine Demo dafür noch an den Start bringe.

ApacheCon EU 2012 Day 1

image

Mein Tag bestand hauptsächlich aus zwei Tracks, dem Java EE/Webapps Track und dem Lucene/Solr Track, die Gott sei Dank auch am weitesten räumlich auseinanderlagen, so dass ich immer hin und herlaufen musste. Dabei ist mir aufgefallen das die ApacheCon gegenüber den meisten Konferenzen die ich so kenne doch ein sehr diverses Publikum hat, man hat den Eindruck die Leute kommen aus aller Herren Länder, nicht nur aus Europa. Das Vortragsprogramm war vollgepackt und es gab in jedem Slot einen Vortrag den ich sehen wollte. So viele Konflikte hatte ich heute nicht, beim letzten Slot hat es mir etwas leid getan das ich Lucene 4 dem Tomcat 8 vorziehen musste.
Auf jeden Fall war der Tag sehr sehr lehrreich, die Talks waren meistens sehr gut und auch voller Wissen das ich noch nicht hatte.
Hier also meine Notizen zu den Vorträgen:

CDI at Apache – Open WebBeans and DeltaSpike Deep Dive (Mark Struberg)

OpenWebBeans
CDI ist anscheinend ein Buzword das ich noch nicht kannte (DI = Dependency Injection,
C = Context, wobei das sowas wie ein Scope ist im DI Sinne, also so etwas wie ein RequestScope, SessionScope, ApplicationScope etc.). Dafür gibt es einen JSR mit der Nummer 299, der quas das was was Spring macht als Standard beschreibt. Der Vorteil ist dabei sit wohl das CDI bzw. JSR 299 in der Form von OpenWB 3x schneller ist als Spring da es viel zur Boottime macht.

DeltaSpike
All in all Framework für alle Layer (Application Stack) in Form von JSR 299 Plugins.
Im Großen und Ganzen schmeißt man Applikationsweite Events durch die Gegend (Benutzer hat sich angemeldet) die man mit Annotationen binden kann. Dazu kommen noch alle möglichen Custom Annotationes die man bauen kann, klingt so als wenn man am Ende direkte Method Calls einfach durch eine Menge an Annotationen ersetzt und dann funktioniert das alles schon. Macht irgendwie Code Browsen anders. Würde ich trotzdem mal gerne in einem kleinen Projekt testen.

Query Parsing – Tips and Tricks (Erik Hatcher)
Hauptsächlich Überblick über die unterschiedlichen Query Parser, da hat sich schon einiges getan seitdem ich den Hund gebaut habe, aber das war ja auch 1.0.
GeoFeatures sind jetzt Build-In und eigentlich ist das was ich aus dem Talk mitgenommen habe das alles schon irgendwie geht. War auch von der Tiefe her sehr gut, wenn man Lucene nicht vom API her kennt war man schon etwas verloren.

Apache TomEE, Java EE 6 Web Profile on Tomcat (David Blevins)
TomEE ist der Java EE 6 Web Profile (ca. 12 anstelle von den vollen ca. 24 Specs für Full Profile, da sind noch so tolle Technologien wie CORBA enthalten) Stack aus dem Hause Apache. Im Großen und Ganzen wohl erstmal schneller und besser als die alten bloated Implementierungen (JBoss, Glassfish).
Konkret technologisch bedeutet TomEE: Tomcat + CDI – Apache OpenWebBeans, EJB – Apache OpenEJB, JPA – Apache OpenJPA, JSF – Apache MyFaces, JSP – Apache Tomcat, JSTL – Apache Tomcat, JTA – Apache Geronimo Transaction, Servlet – Apache Tomcat, Javamail – Apache Geronimo JavaMail, Bean Validation – Apache BVal
Wie gesagt, klingt ganz gut, sollte man mal als Stack ausprobieren. Natürlich mit einer sinnvollen Frontend Technologie wie Wicket. Wobei das taugt bestimmt auch sehr gut wenn man mal eben $Webservice oder $RestService an den Start bringen möchte ohne viele zusätzliche Libs zu suchen.

Und Arquillian habe ich heute mehrfach gehört, das ist ein Integration Test Framework für JavaEE, aber das kann man bestimmt auch für Custom Stacks benutzen. Wobei Integration hier heißt das es tatsächlich die App in einem TomEE deployt und man alle Konfiguration in dem Arquillian Code macht. Fancy, sieht in der der Demo sehr cool aus, müsste man mal mit Real World Apps ausprobieren.

Am Rande aufgeschnappt:
YourKit – Profiler

Solr 4, the NoSQL database (Yonik Seeley)
Guter Talk von dem Typ der Solr gebaut hat. Die grundsätzliche Idee ist das man alles was man über Solr weiß vergessen soll und ihn eher als ein NoSQL-Store sehen soll mit dem man auch ganz gut suchen kann.
Allgemein viele neue Features in Solr 4 mit denen man bestimmt ganz tolle Suchen bauen kann. Z.B. Functions beim Suchen und beim ausliefern der Felder mit denen man die Werte in den Feldern noch modifizieren kann. Außerdem sieht die Admin Console nicht mehr so aus als wenn ich sie designt hätte und hat auch mehr Infos.
Stark empfohlen hat er auch folgenden Blog Artikel:
http://blog.cloudera.com/blog/2010/04/cap-confusion-problems-with-partition-tolerance/

Am Rande aufgeschnappt: ZooKeeper scheint auch mal eine gute Lösung zu sein wo jGroups nicht (mehr) ausreicht. Solr 4 benutzt das auch zum Clustering.

ElasticSearch in Production: lessons learned (Anne Veling)
ElasticSearch ist sowas wie Solr, also Lucene basierter Search Server mit REST API, JSON in, JSON out. Plus Distributed, sind wir das nicht alle.
Leute da draußen bauen krassen Kram: http://udini.proquest.com/ (Scala, Unfilitered, MongoDB, Solr und ElasticSearch auf Amazon EC2). Scheint aber gut zu laufen.

Als neues Buzzword fand ich auch “nodb” ganz schön, das ist dann quasi die Steigerung von NoSQL.

ElasticSearch ist also ein wenig der coole kleine Bruder von Solr.
http://de.slideshare.net/AnneVeling/elasticsearch-in-production-lessons-learned

Wicket – where do we go from here? (Sven Meier)
Nicht so viel neues wenn man Wicket schon mal benutzt hat, MetaDataKey kannte ich noch nicht, ist m. E. aber auch gefährlich, in die Session zu schreiben ist ja irgendwie heute nicht mehr so cool (https://github.com/svenmeier/apachecon-wicket/blob/master/src/main/java/eu/apachecon/customer/ui/model/CustomerSessionModel.java)
Ansonsten war das ein etwas komischer Titel für einen Talk der eigentlich eine Intro zu Wicket sein wollte.
Mitgenommen habe ich das ich mir mal Tepstry 5 ansehen möchte und
Vaadin auch (https://vaadin.com/home),

Content extraction with Apache Tika (Jukka Zitting)
Tika ist “erwachsen”, Version 1.2, kann man gut benutzen wenn man einen Use Case dafür hat. Kann eigentlich alle Dateiformate die es gibt ;).

Lucene 4 Performance Tuning (Simon Willnauer)
Hat schweren Herzens gegen das “Tomcat 8 preview” von Mark Thomas gewonnen, aber bevor ich einen Tomcat 8 überhaupt benutzen kann wird noch einiges Wasser die Elbe herunterfließen.
Blazingly Fast Indexing, tausend neue Features und vor allem haben sie ausnahmsweise mal den API geändert, komplett. Aber wie immer, alle neuen Features und perfomance Optimierungen klingen großartig will ich auch.

Am Abend gab es dann Bier und Brezen gesponsert von Adobe und noch viele gute Gespräche. Von den EE Leuten habe ich gelernt das wenn man die Spec doof findet muss man halt die Spec ändern. Nachdem wir dann die Arena dicht gemacht haben gabs noch ein Abendessen von CodeBusters(.es) gesponsert. War im großen und ganzen ein sehr lustiger Tag.

Programming Concurrency on the JVM

The fun thing about Venkat Subramaniam’s latest book is the way he jumps to and fro between a couple of JVM based languages: Java, Scala and Clojure. He shows interesting ways to do given tasks in different languages and introduces a couple of interesting frameworks I at least have not heard of before. The most interesting frameworks he shows are Akka, which is an Actor Based Concurrency Framework, written in Scala but which comes with an API that is just as well usabale from Java. Furthermore, I knew the concepts of Software Transactional Memory but did not know that there are working implementations for the JVM. One of them beeing Multiverse.

 

I really liked the book, because I really like the idea of using a framwork implemented in Scala through its Java API in Groovy. Sometimes it gets quite tiresome to have many of the same examples just shown in different languages, but it is always good to practice Scala or Clojure reading skills. If you feel safe in Java concurrency, i.e. you now Concurrency in Practice by heart, I warmly recommend this book.

Google Merchant Module for ROME

Google Merchant is the way a company can feed their products into Google Shopping and ROME is a Java Library to create and parse RSS and ATOM feeds. Google Merchant allows RSS as one of the feed formats you can use to feed them their data. In order to get additional information into ROME created feeds you have to implement 4 classes, so it is not really easy to get your data there.

I created a small Library to make RSS feeds that conform to Google Merchants requirements:

        final SyndFeed feed = new SyndFeedImpl();
        feed.getModules().add( new GoogleMerchantModuleImpl() );

        final SyndEntry entry = new SyndEntryImpl();

        entry.setTitle( "Title" );

        final GoogleMerchantModule merchantData = new GoogleMerchantModuleImpl();
        merchantData.setImageLink( "SOME IMAGE URL" );

        entry.getModules().add( merchantData );

It’s under MIT License up in Github, you can direct download the Version 0.1 here.

Code with style: Readability is everything

So, by now everybody got it: Code is there to be read by people, to be analyzed by people and to be understood by people. The fact that you can put it through a compiler and run it is a nice sideffect, but nothing to focus on. Besides writing readable tests of course.

But when software is growing and many different hands touch the same spots, it somehow gets dirty. So even when you have usually quite high coding standards, it still can happen that I stumble upon something like this:

User user = userService.createNewUser( email, password,
                                       false, true, null, 5 );

I like to be able to read a line of code like a line of text. Which means that I at least want to be able to get the “words” without the surrounding context.

So what would you be able to tell about the above snipplet? I would say: it apparently creates a new user, using some service and it requires an email and a password, which might be stored somewhere. And the point that makes me cry: apparently some magic flags, a nullable parameter and a magic number.

So lets see how we can clean this up with some new patterns. I usually make up my own names, if someone has a rather more common name for them feel free to comment, I will  be happy to replace them.

Enum as Flag Pattern (aka do not use boolean literals) 


enum FailIfExists { YES, NO };
enum NewPasswordChecks { YES, NO }

User user = userService.createNewUser( email, password,
                                       FailIfExists.NO,
                                       NewPasswordChecks.YES,
                                       null, 5 );

So, what can you tell about the method call now. The problem of methods that react to flags aside, the readability is better. You at least can deduct now that there might be no error if the user already exists and that it uses the “new” password checks. It is even easier to refactor to use the third password validation algorithm should it ever be changed again.

When setting up a new project you might try to disallow all boolean literals in certain high level classes, I don’t know if it works that well with third party libraries. This might be a cool Checkstyle rule to try.

No nullable Parameters Pattern (aka keep your implementation details internal)

So what is my next problem? Well, the given null parameter value. I believe that the ability to cope with null values is an implementation detail that belongs in the class that defines a method. So the UserService interface should provide us with an overridden version createNewUser that does not have the fifth parameter. Then the implementation could hide the fact that this parameter is really nullable. And it avoids the clutter of methods that have n optional object parameters.

If you use Findbugs in combination with the great JSR 305 annotations, which by the way can be enforced using a Checkstyle plugin, you might try to disallow using the Nullable Annotation in public methods. Maybe even for protected methods. In any case, you should never have to use a null parameter while calling a visible method of another class.

No literals outside constant definitions (aka give names to your magic numbers)

The last thing is a classic, but there are still a couple of people who do not use constants instead of literals. I think the general rule is that you should never use a numeric literal inside a method, but always a class declared constant. Furthermore this might even be extended to be valid for String literals and as told in the first point to boolean literals.

So let’s revisit my short (and bad) example taking the above mentioned points into consideration:


enum FailIfExists { YES, NO };
enum NewPasswordChecks { YES, NO }

private static final int INITIAL_NUMBER_OF_INVITES = 5;

User user = userService.createNewUser( email, password,
                                       FailIfExists.NO,
                                       NewPasswordChecks.YES,
                                       INITIAL_NUMBER_OF_INVITES );

Given that you might see this lines of code during a review, where you can’t browse the complete source of your project, one might now be able to better understand what this method does: it creates a new user with the given email and passwords, succeeds even when the user already exists, uses some mythical new password check and gives him an initial number invites of five. This can be guessed by just reading code, without a single line of JavaDoc and even without once visiting the declaring class or interface.

So in future, when writing code, try to consider if you would understand your method calls without ever having seen the implementation or even the declaration of the called method.

Code with style: Exception handling antipatterns

There a couple of exception handling patterns that I come across regularly that I believe to be plain wrong or harmful. In order to get rid of them I’d like to present them here and explain the reasons why they should be avoided:

Log-Log-Log and Rethrow

Imagine a typically layered application design where you have a DAO layer at the bottom, a service or business logic layer in between and a frontend layer on top. Now imagine that you decided to wrap most exceptions from the lower layer and rethrow them with an exception which is more apropriate to the level of abstraction that you are currently on:

DAO Layer:

public T getById( Id id ) {
try {
 ....
 } catch( Exception e ) {
 LOG.error( e.getMessage(), e );
 throw new WrapperException( e );
 }
}
 

Service Layer:

public T doSomething( Id id )
try {
 T foo = getById( id );
....
 } catch( Exception e ) {
 LOG.debug( e.getMessage(), e );
 throw new WrapperException( e );
 }
}

This happens again in the UI layer. You usually do not have per layer logfiles, as this would make it harder to see the flow of the application. But when you log the exception on every layer, it leads to a lot of log clutter. The best way is to define a layer that logs the exception, the business layer being the obvious candidate here. Thus you have a defined way to handle lower layer exceptions. This pattern does not appear that often anymore, as unchecked exceptions are generally considered the better solution today.

Fail Silently

There are two versions of the fail silently antipattern:

Version 1:

 try {
....
} catch (Exception e ) {
// empty block<
 }

Version 2:

 try {
....
 return true;
} catch (Exception e ) {
 return true;
 }

The two versions of the Fail Silently Pattern have the same problem: you will never know that an exception happened. Combined with the fact that Exception is caught all kinds of runtime problems can be hidden. Usually, you should always catch specialized exceptions that you expect and can handle. If you’re doing frameworks or using libraries that might throw all kinds of exceptions, or you write handling code that needs to handle all kinds of exceptions on some way you still must log what is happening there. Otherwise you will never be able to explain certain behavior in production. And an exception handling block should never return the same value as the usual code path. After all it is an exception handling block.

Fail with least possible information

 try {
....
} catch (Exception e ) {
LOG.error("Something went wrong");
 }

There are two simple rules when handling exceptions: always log the exception including the stacktrace and always include any data which might have lead to the stacktrace. I still see it today that people discard all information directly at their fingertips to log out what they think might have happened at that point. Or what they have expected to happen. Together with to wide catch clauses this leads to the problem that you do not really know what happened in production, you just believe you know. Even worse, you might stick to assumption someone else made about the error at the point. So when you write a try-catch-block, always see that the variables used in the try are also logged out in the catch.

Deduct from vagueness

 try {
....
} catch ( Exception e ) {
 throw new CustomerNameTakenException( "The user already exists" );
 }

This is somehow the worst case of the above mentioned pattern. Here not only the wrong information is logged but it is used to create error messages. This might lead to all kinds of wrong behavior. Just because you know that a certain layer or lower level function behaves in a certain way does not make it an interface. Maybe a different exception is thrown, maybe something else went wrong.

As usual, these points are open for discussion. But I believe that these are some general rules everyone needs to apply when writing exception handling code.

Was ich dieses Wochenende gelernt habe

So, jetzt wo ich wieder ein schönes Blog habe kann ich das ja auch benutzen. Nämlich um mal aufzuschreiben was ich dieses Wochenende alles gelernt habe, ich habe nämlich Aufgrund meiner Erkältung ein Nerd Wochenende eingelegt:

Scribe für OAuth mit Java

Wenn man mit Java OAuth machen will Benutzt man Scribe. Nicht nur weil ich da noch eine Pull-Request offen habe, sondern weil der API sehr schön ist und Spass macht und einfach zu benutzen ist.

Die Bahn will nicht mit mir spielen

Ich wollte eigentlich sowas wie einen Hafas Client schreiben, die Bahn sagt aber immer 500. Dabei habe ich gefunden das Andreas Schildbach, der Autor von Öffi, seine Client Lib auf Google Code hat. Kann man bestimmt auch mal benutzen.

Perstistent Collections für Java

Die PCollections die auch auf Google Code rumliegen sehen so aus als wenn ich sie mal gerne benutzen würde, auch wenn ich nicht verstehe warum man immer noch die 15 Jahre alten Collection Interfaces implementieren muss. Leider hatte ich nichts was ich auf Anhieb damit machen würde, habe aber mal eine Implementierung in meinen Collections ausprobiert.

Des weiteren habe ich noch gelernt das man auch von zwei Erkältungsbädern nicht wieder gesund wird. Und das WordPress viel leichter zu Updaten und zu Administrieren ist als vor 3 Jahren.