Menu

GUI Testing, Without The Gooey Parts

November 16, 2010

Alright, so I know that Java on the desktop has never reached the level of popularity that it enjoys on the server side, but regardless of popularity, there are cases where the requirements favor or maybe even necessitate a desktop solution. Testing a user interface can get kinda sticky, but with the right abstractions, you’ll… Read more

Monitoring Long Running MySQL Queries with Nagios

November 15, 2010

We’ve been using Nagios as part of our monitoring infrastructure from some time now and it has been very useful to monitor our databases. To look at long running queries (those whose running time is measured in seconds) we use the show processlist command. Here is what the output looks like on an empty machine…. Read more

Less IO for your Unit Tests with a Java SecurityManager

November 11, 2010

Our quest for a truly test-driven engineering team has enabled us to confidently ship our software every few minutes. Automated testing is the keystone of continuous deployment, and as a result our unit tests and smoke tests are thorough. Perhaps, a bit too thorough. (Our last unit testing extravaganza in the form of a cyclomatic-complexity-driven… Read more

Computation: “There is no try”

November 09, 2010

Often a complex, multi-step calculation requires your code to react to many circumstances. Typically you use exception handling to separate the normal control flow from error handling: Option<BigDecimal> result = Option.none(); try { result = compute(); } catch (WhateverException e) { // Perhaps rethrow. } if (result.isEmpty()) { // Perhaps retry, or set a dummy… Read more

If you ever write a varags method…

November 08, 2010

In some specific cases, methods with a variable argument list might greatly improve the usability of an API. However, it is very easy to overuse or misuse this language feature, leading to cumbersome APIs. Varags methods shine when the programmer knows how many arguments must be passed to a specific invocation of the method when… Read more

Evolve or die: Start-ups and “Dealing with Darwin”

November 04, 2010

It’s that time of the month again. Endless conversations about the product roadmap, planning, priorities and resources. “We’re accumulating too much technical debt,” says the CTO, “we badly need some time to work on magic-refactoring-XYZ.” The product guy nervously answers a bit too quickly: “Are you forgetting about those killer-features-of-the-year we’ve been putting off?” “What… Read more