Per Lundholm

Per Lundholm

Everyday Software Development

Impact Mapping – the developer’s cut

Do you, a developer, have a feeling that the user stories your product owner is but a list of ideas prioritized on gut feeling only? That the relationship between them and their purpose are vague? Impact Mapping is an agile conversational tool by Gojko Adzic that may be primarily for product owners but hey, a developer needs a purpose too!

read more »

The Sword and the Shield

When refactoring legacy code, two problems seems to repeatedly occur. One is that the code is all tangled up with interdependencies and the other is that there is no specification of what the system is supposed to do.

Still we are asked to add features or fix problems without breaking anything. Everything in there should stay there.

read more »

Mocka med inhoppare – del 6 i TDD på svenska

TDD är en vana man behöver etablera. Första hindret är ofta när man återvänder efter kurs att omsätta teori i praktik. I detta avsnitt berätta jag om hur man isolerar en enhet så att man kan testa den.

Del 6 är i serien “TDD på svenska” handlar alltså om detta och har precis nu publicerats på vår YouTube-kanal “Crisp Agile Academy”.

Du hittar som vanligt de tidigare delarna i serien och mycket annat producerat av mina kollegor. Speciellt tack till Jimmy Janlén för foto, regi och klipp

Omöjligt att kombinera agilt arbetssätt med pm3

Låt oss säga det direkt: att kombinera pm³ och någon agil metod, som t ex Scrum, är en dålig idé. Varför?

Därför att du kommer inte kunna dra nytta av det agila arbetssättet. pm³ är baserat på en helt annan världsbild. pm³ bygger på årsplaner och att verksamheten beställer från en leverantör, typiskt den egna IT-avdelningen.  Agilt har som en grundläggande värdering att reagera på förändringar i stället för att följa en plan. Det agila arbetssättet drivs proaktivt genom utforskande i motsats till att vara en mottagare av beställningar.

Vi har sett flera försök att implementera pm³ och de har ofta misslyckats på grund av att pm³ bygger på tankar om att verkligheten kan förutsägas 18 månader i förväg, att användarna vet vad de vill ha och att det är viktigt att ha en skarp linje mellan verksamhet och IT. Vi hävdar (och flera med oss törs vi lova) att inget av detta är varken sant eller bra.

read more »

Too small for a user story – bugs, fixes and support

Some things are too small for the overhead of a user story, still they must be handled during the sprint effectively. I suggest a small taxonomy to classify them and also what to do with them.

read more »

7 Rules on Code Readability

What makes good code? Many things but whatever the qualities are, readability is a cornerstone.  If you can’t read the code, you can’t fix it. So how do you write readable code? I’ll give you my view but it’s like books, what I find enjoyable may be different from you.

read more »

Snabbare programmering – del 5 i TDD på svenska

Borde du inte programmera snabbare? Varför tar det så lång tid att mata in kraven i datan? Har du hört den frågan förut?

Del 5 är i serien “TDD på svenska” handlar alltså om detta och har precis nu publicerats på vår YouTube-kanal “Crisp Agile Academy”.

Du hittar som vanligt de tidigare delarna i serien och mycket annat producerat av mina kollegor. Speciellt tack till Jimmy Janlén för foto, regi och klipp.

Slides and code for one day Wicket introduction with Ajax

At my current assignment, I needed to get my fellow developers up to speed with Wicket. So I put together a one day course that taught them enough to join in on the work of a current application. Everything is publicly available on GitHub here:

You get a starting plate for a complete web application with database backend accessed through Spring Data JPA. Also, there is a Power Point presentation that guides you through the exercises. Very little is spent on Wicket philosophy and concepts to the benefit of hands on coding.

read more »

Time vs Story Points Estimation

One of the most common questions we get is whether to estimate in time or points. It seems like points are used only “to avoid thinking about time” and they are essentially the same. Wrong.

Let us give you the travel metaphor to give you an idea about how we are thinking.

read more »

“Lagom testtäckning” – Del 4 i TDD på svenska

Hur mycket testtäckning ska man ha? Vad är skillnaden på line coverage och branch coverage? Vad är komplex kod? Hur undviker man att få fejkade mätvärden (gaming)? Vad är “förtroende” i det här sammanhanget? Hur kan man kombinera flera mätvärden?

Det och lite till försöker jag svara på i den här videon.

read more »

Personlig träning i TDD – Del 3 i TDD på svenska

Testdriven utveckling, TDD, är en vana och för att skaffa sig en vana, behöver man träna. I den här videon gör jag en rolig övning i att bryta ner ett tal i primtal. Jag vill också trycka på att du ska träna dig att använda utvecklingsmiljön genom att skriva koden “baklänges”, använd en variabel och låt din IDE fråga efter typen. Lär dig kortkommandon och lär dig refaktoringfunktioner som “extract method” för ett lättare liv som programmerare.

Det går fort i videon men det är bara för att det inte ska bli så tråkigt att titta på. Jag skriver inte så där snabbt. :)

Red, Green, Refactor – Del 2 i TDD på svenska

Den andra delen handlar om TDD-processen. Se alla våra video på YouTube-kanalen Crisp Agile Academy.

Varför TDD? Del 1 i TDD på svenska

Den första delen om TDD på svenska på Crisp Agile Academy är en motivering om varför det lönar sig med TDD. Jag funderar över vad som händer om man inte skriver tester alls, skriver dem efteråt eller skriver dem innan.

Den här serien är tänkt att bestå av korta avsnitt där något inom TDD gås igenom på ett jordnära och personligt sätt.

Another builder pattern for Java

Whenever you have a domain object, data transfer object, parameter object or any other object that can’t be instantiated with constructor parameters only, you need to create a builder for its class.

The great thing about Java is that it is statically typed so a builder can give you compiler errors if you forget to set the compulsory parameters. If you use the builder in this pattern, you also get a very fluent interface that imposes order on the parameters. When using the builder, your IDE will suggest the next parameter to set.

read more »

Schema migration, an important part of continuous delivery

Most of you have a relational database involved in your persistence. As soon as your first version has been set in use, you can’t change the database schema as easy anymore or you might lose valuable production data.

At the same time, continuous delivery demands that there should be as few manual steps as possible. See here for motivation on continuous delivery.

You no longer have a few database instance, there are numerous for different levels of testing and every developer nowadays run a personal database. To keep track of all database instances and keep them updated becomes a steep task.

To tackle this, we started using Flyway as a tool to manage our database scripts. Our applications migrates the database automatically on startup so we get a hands-free solution that will guarantee that the code and database schema is in sync.

Here is a technical recipe for accomplishing this when using Flyway in combination with Spring.
read more »

Bragging: 100% coverage, specification by example and pair programming

Yesterday we ended our second two-week sprint and on the demo, besides showing the system, we could do some bragging about test coverage using our Sonar dashboard.  We also could show Fitnesse tests at system level that implements the specification by example technique, or like some say, executable requirements.

read more »

The proper use of @Ignore in unit testing

What is the purpose of the @Ignore annotation in unit testing?

Either a test will be green and everything is fine or it is red so you fix it before commit. So if there is an ignored test, it is the same thing as dead code and we know what to do with that: delete it! Keep the code clean! read more »

Retrospective using Jimmy Cards

I had taken on to facilitate a retrospective for my colleagues’ team. They wanted a different retrospective than the usual. So we borrowed Crisp’s office and used Jimmy Cards!

The group was around 15 persons from two teams. They all knew each other well which I believe is crucial as the questions on the cards can be challenging.

In this post I’ll give you the recipe which Jimmy and I came up with for this particular retrospective.

read more »

Why do we never get the time to work on system architecture?

Have not all of us been in a spot where we feel an urgent need to fix some quality such as performance or availability, which takes a change in the architecture for effect? And yet we are pushed to work on new features instead?

There is a chasm between the tech side and business side that has to be bridged before a sound dialogue about system architecture can take place.

read more »

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.

Using CloudBees for teaching XP practices

We are doing a course called “Certified Scrum Developer”.  We are of course proud of being one of the few eligible by the Scrum Alliance to hold such a course. But what matters most to us is teaching some modern development practices. The certificate bit is more of a bonus.

Crisp had recently its fifth installment of a code camp, the “Crisp Hack Summit”. It is an occasion for everyone at Crisp to go bananas on some project of their liking. We took the chance to work on the technical platform for the CSD course.  We know from experience that you can loose a lot of valuable lecture time if  the technical environment decides to hassle. Murphy, will you be there?

read more »

How to hire a real star developer

What makes the difference between a star developer and a day coder? First of all, with a star developer I don’t mean star as in ”famous”, rather as in ”elite”.  And, a day coder is OK to be, no disrespect here. We need you as much as we need the elite.

My point here is that if you wish to hire a real star, you need to know what to look for.

read more »

Window, Scene and Node coordinates in JavaFX

Here is an illustration on how the coordinate systems of the screen and JavaFX objects relate to each other. It is a great thing with JavaFX that you seldom bother about screen coordinates. Instead you rely on layout managers to position your nodes on screen. A node has its own coordinate system, should you like to do some positioning, e.g. in a game.
read more »

An Analog Clock in JavaFX

JavaFX is great fun but there are so many ways of doing things. You can use FXML, you can use images to build things piecewise or you can write code for a live, scalable design.  The latter is the case here where I show how I created an analog clock using Java code.

Analog Clock with desktop in background
The clock is designed with the clockwork in a separate class and the face in another.

This text shows some example JavaFX code in Java slightly above introductory level. You should have your development set up and done at least a first program.

read more »

Clamp The Code

This a picture of me used on our front web page. If you don’t see it there, try reloading.

What’s the matter with me on the picture?  What am I trying to say?

Per Code Clamping

Per Code Clamping

read more »

Lessons on the looks of UI

My mother’s sister is past 80 and still running her own company. Naturally, I do her IT-support since -95 when she realised that it was important to utilise a computer for her business.
The other day I was installing an invoice program for her. She has been using an Excel template, designed by my wife. But new regulations on VAT made her go for specialised software. She choose a well established product. It turned into a lesson for me.
read more »

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.

read more »

Product Owner’s Product and Project Board

The team has its Scrum board as an information radiator. It is an excellent way of getting an overview of the sprint. But what about us, the product owners, don’t we need that too? Of course we do, we too have a need for an overview of our work and to radiate information. The stakeholders pass by and ask “what’s in next sprint”, “when will we migrate”. We’d like to just answer with a light gesture towards the wall. It is all there for everyone to see.

Let me tell you how our project owner board works, as an example. read more »

Shared Values Build Teams

What makes a group of good people a great team? I believe that shared values and experiences are fundamental. While there are many team-building activities available, such as paint ball and boule, I’d like to think that software development teams need more than that.

read more »

The TDD Tetrahedron, version 2.0

The TDD Tetrahedron, or if you wish, pyramid, has reached 2.0. Like cars, the new model is bigger and comes with new technology.

By pure coincidence, I ran into somebody willing to print this. So here it is, the version 2.0 of the TDD Tetrahedron. The new version has sides of 100 mm and it is made of plastic.

What’s it for?

Well, if you didn’t use the older version, you may be wondering what’s so great about this. It is all about mental focus.

read more »