Continue reading: Size matters, why and how to measure your heap

Size matters, why and how to measure your heap

I have had to deal with memory problems in Java applications a few times. A lot has been written about this already, but this time I ran into a slightly different issue that surprised some of my colleagues so I decided to write about it here. Contrary to popular belief, a big JVM heap size is not always better when it comes to performance.

The problem

I came to the customer site to help them with their performance problems of a fairly large J2EE-system Web Service/Hibernate/MySQL system. They had several customers running the system, but only the largest was experiencing problems. The application suddenly froze and stopped processing transactions. All sorts of hypotheses were discussed, but no one could really for sure say what the problem was. And there was little data to work on.

Continue reading

Continue reading: The Future of Software Development

The Future of Software Development

Whar are YPU doning in the future?

What will software development be like in the future? “Agile” as we know it, will not be around, nor will test-driven development, continuous delivery, or BDD-like methodologies. I’ve been pondering this for a while, and based on some observations and a dose of wishful thinking, I’ve arrived at the conclusion above. Do you agree?

Continue reading

Continue reading: Code archeology 101: Custom Exception Hierarchies

Code archeology 101: Custom Exception Hierarchies

After having worked with various legacy codebases one discovers certain recurring traits and patterns. The topic of today is the Custom Exception Hierarchy encountered in Java legacy code. This phenomenon is rather Java-specific because of that language’s checked exceptions.

So what is a Custom Exception Hierarchy? It’s an exception hierarchy, with some strangely named exception at its root, present throughout the entire codebase and used everywhere. The author(s) of such hierarchy obviously felt that exceptions like IllegalStateException or IllegalArgumentException, or the like weren’t sufficient for the sophisticated needs of their application, so they came up with a better suited hierarchy of checked exceptions.

Continue reading

Continue reading: Is your software architecture explicit?

Is your software architecture explicit?

You know, every system has a software architecture and a software design. Whether you think about your system’s architecture or not, it will have one. Here is an example of two methods in a class I recently saw. It is not architecture, it is good old OOD, but it exemplifies what can happen if you

Continue reading
Continue reading: Learnings from a new technology stack

Learnings from a new technology stack

After years of programming in Java with frameworks like Spring, GWT, JBoss, Hibernate, Seam and other traditional stuff, I needed a new learning curve. My colleague Mats Strandberg invited me to create a new version of his code kata/hobby project SignUp.

SignUp has been built and rebuilt several times before, but for this incarnation (number 4 of the more prominent ones) we decided to use some stuff we haven’t used so much before: Scala, Play! Framework 2.0, Anorm, Twitter Bootstrap and Secure Social. We store the source code on GitHub and deploy on Heroku. In this article I’ll summarize some of the things I learned so far. Since I’m an IntelliJ IDEA user, there is some of that too…

Continue reading

Continue reading: Android SMS-PingPong

Android SMS-PingPong

För några veckor sedan var jag på Crisp Hack Summit (en och en halv dag valfritt hackande) och då jag jobbar med Android-utveckling kände jag för att testa skriva en liten app som man kan kommunicera med via SMS. Det är ju inga större problem att kommunicera med en telefon om man har en fungerande IP-förbindelse, men om man inbart har 2G så blir det lite värre. Dagens prepaid abonemang har oftast en obegränsad mängd med SMS (åtminstone om man inte är tonåring) som man kan skicka. Så varför inte göra en app som när man skickar strängen “ping” svarar med “pong” 🙂
Continue reading

Continue reading: Programmerarna visar vägen

Programmerarna visar vägen

Lite i skymundan pågår något av en revolution inifrån i IT-branschen, och då särskilt i företag med många programmerare. På gräsrotskonferenser, i nätfora och i management-litteratur äger vår tids kanske mest avancerade och levande diskussion om hur man bäst organiserar arbete rum. Om det skriver jag i en längre essä om hur programmerarna visar vägen

Continue reading
Continue reading: Canned Wicket Examples Updated to Wicket 6

Canned Wicket Examples Updated to Wicket 6

Today I decided to update my canned wicket test examples to the latest version of Wicket.

I still think Wicket is a really nice web framework for the following reasons, primarly.

  1. Hot deploy from the Maven archetype. The quick start setup offered from the Wicket site gives you “change-and-reload” out of the box.
  2. Unit testing framework built in. You test the logic of the web application without resorting to click simulation.
  3. HTML separation. Allows you to work in a tight loop with an interaction designer that can use any HTML editor.
  4. No need for JavaScript. Well, for the basic stuff at least. The examples here all use AJAX.
Continue reading: Analog Clock Revisited

Analog Clock Revisited

Screenshot of the analog clockI have been playing around with JavaFX on and off since it came out and I got really inspired by Per’s blog post about the analog clock. So I decided to spend my time at the Crisp Hack Summit trying to improve Per’s design both in code and visually.

Continue reading

Continue reading: Min första kurs

Min första kurs

Jag har precis lagt upp min första kurs här på Crisp – Testning av webbapplikationer med Selenium WebDriver. I detta blogginlägg tänkte jag förklara lite mer ingående vad kursen är tänkt att lära ut. Mina kolleger har också kommit med värdefull feedback och frågor som säkert kan dyka upp igen.
Continue reading

Continue reading: Crisp Hackday is under way!

Crisp Hackday is under way!

The safety belt is off.  Focus is intense.  Standup?  Tdd?   Rubbish!  Crisp hack day! 🙂

Continue reading
Continue reading: Slides from the Selenium Conference

Slides from the Selenium Conference

I gave a presentation called ”Being good at waiting – Using Selenium to test Ajax-intensive pages” in an unconf session at the Selenium Conference in London.

The audience was great! Thanks everybody! I certainly didn’t know everything there’s to know about the subject, and that resulted in an interactive session where people from the audience would share their experience and answer some questions. That was so cool 🙂
Continue reading

Continue reading: On Unit Testing and Mockito

On Unit Testing and Mockito

This is just a blog post to point to my presentation of the aforementioned subject. Or should I say, “prezi”, because there are no slides, just a big picture with a path through it. That’s is the way of Prezi presentations and as a first timer, I felt liberated. Slides are so dull!

The content of my presentation is aimed at those with some experience of unit testing that would like a dose of philosophy on testing styles. Classical or Mockist? State or Behavior? Also, if you are not that familiar with Mockito, take this prezi for a spin!

Here is the link to the prezi! That’s all for now.

Continue reading

Continue reading: Functional Java

Functional Java

I have just finished reading a neat little book about functional programming for Java developers by Dean Wampler. The book is only sixty pages long so it’s a really fast reading. This is a book for Java programmers and others working in the object oriented paradigm that haven’t read about or done any functional programming before. If that fits you then this book may be a good choice to read. Otherwise, I recommend that you seek more advanced and in-depth books in the subject instead. But this text will not be a review of the book. I will instead comment on the use of the functional structure and its paradigm in languages like Java that is not designed for it.

Continue reading

Continue reading: The link between testability and object-orientation

The link between testability and object-orientation

What’s testability? And why does object-oriented code feel more testable? In this post I argue, somewhat informally, that making code object-oriented, or just by introducing more accurate abstractions, we decrease the domain-to-range ratio, thus making our code more testable.

Continue reading
Continue reading: Äventyr i molnet – del 1

Äventyr i molnet – del 1

Det är mycket prat om Cloud Computing nuförtiden. Amazon EC2, Google App Engine, SpringSource CloudFoundry, och nu snart Windows Azure.

Detta är första delen i en serie som beskriver utvecklingen av Eats-o-matic, som kommer att köras på Google App Engine (GAE).

Häng med!

Continue reading
Continue reading: The Wicket framework is not TDD-friendly

The Wicket framework is not TDD-friendly

The Wicket framework is somewhat deceptive when it comes to testing, especially TDD.

Continue reading