Home » 2012 » November (page 4)

Monthly Archives: November 2012

Guava Preconditions Class

Anyone who’s written much Java has probably written methods that begin with conditionals that verify either the provided parameters or the state of the object being acted upon before proceeding with the remainder of the method’s implementation. These can add verbosity to the method and sometimes, especially if there are multiple checks, can almost drown out the interesting business logic ...

Read More »

Guava Stopwatch

Guava‘s Stopwatch is another Guava class new to Guava Release 10 (as is Optional, the subject of another recent post). As its name implies, this simple class provides a method to conveniently measure time elapsed between two code points. It has several advantages over use of System.currentTimeMillis() or System.nanoTime(). I don’t focus on these advantages here, but the Javadoc documentation ...

Read More »

Database and Webapp Security

Threat Model This is a discussions on database and webapp security loosely based on the quick reference page on my site. That page is becoming unwieldy and does not make it easy for readers to interact with me or others. Threat Model All security analysis must begin by examining the threat model. A threat model requires you to answer four ...

Read More »

Java SE 11: Moving Java Forward

Introduction This serie of article presents how, in my opinion, the java language should evolve to keep being a top choice language. It also presents some features, sometimes already existing in other language, that I love but that cannot (or should never) be part of Java, for some reasons that I will explain. I would really love to transform some ...

Read More »

Developer’s wife – Or how do they stand us?

First of all we would like to begin with 2 apologies. The first one is sent to all women developers out there. The points are valid to your husband as well. The second apology is to all women out there. We are really not sociological experts or pretend to be. This post is written from the experience and view point ...

Read More »

Introduction To Extreme Programming (XP)

This post is an introduction to Extreme Programming (XP), another of the Agile methods for software application implementation. Reading this post is a prerequisite to this post. The underlying philosophy of Extreme Programming is to take the best elements of software engineering and bring them to an ‘extreme’ level. If a little is good, more will necessarily be better. XP believes that ...

Read More »

Guava Functions & Java 8 Lambdas

I recently read Brian Goetz’s The State of the Lambda and after reading that article I wanted to try using Java 8 lambda expressions. In his article, Brian goes on to describe interfaces that have one method as “functional” interfaces. Functional interfaces are almost always used as anonymous classes, with the ActionListener being the canonical example. These “functional” interfaces are ...

Read More »

Facade Design Pattern – Design standpoint

In our previous article we have described about the Adapter Design Pattern. In today’s article we are going to show about another such Gang of Four Structural patterns. As the name suggests structural pattern is used to form a larger object structure from many different objects. Façade pattern is one such pattern which provides a simplified interface to a set ...

Read More »

Off-loading your test execution using Hudson

One of the annoyances if you have a load of tests for a particular project is that running them can tie up your machine for a while. There are also sometimes consistency issues when running on different machines with different window managers and operating system versions. One thing we do is for every main hudson job we create a copy ...

Read More »