Category: Software Development
-
On Immutability
I quite like to use immutable value objects. They are really useful. However there are limits to this. Especially when it comes to objects with rich internal structures. Here you end up with a multi-line nested constructor call to create your object. I don’t think this is terribly readable. Also I see that people make…
-
Using the clipboard effectively – “Held der Kommandozeile”
Every now and then even the über-geek can’t avoid the use of non-command-line-tools. Currently I am doing a bit of production support work, so tail, grep, and awk are my friends. However people expect emails, excel spreadsheets, and similar stuff. So what to do? Well use the best of both worlds pipe your output into…
-
Seaside
Last Thursday I had the honour of giving a talk on the seaside web framework. It is implemented in smalltalk and it provides a lot of interesting ideas: Using builders rather than templates to spit out html. A component model for composing interfaces as well as for expressing page flow. Encaspulating Ajax goodness Excellent debugging…
-
JUnit-Shortcoming II: Fail on first failed Assertion
In an earlier post I did describe a possibly better way of handling fixture tear down in JUnit. In this post I look at the way assertions work. JUnit is actually widely used as a driver for all kinds of tests, not only unit tests. I think this is perfectly reasonable as it leverages all…
-
Dead Object Frameworks
I just came up with a new categorisation of application frameworks, which funnily enough places rails and most of the hibernate based java approaches in the same category: dead object framework. What do I mean with that? Well being all eagerly object orientated our domain is nicely modeled in classes, whatever language we choose. In…
-
Lessons learnt from using LaTeX
It has been a while since I last used LaTeX. And things have moved on. I wanted to write a paper as well as preparing some slides. I also had to include vector graphics and bitmaps as well as source code. So this is what I learnt: Use pdfLaTeX! It produces PDF straight away and…
-
Mockito to the Rescue
After all the abuse in my previous post, I feel a bit guilty. Luckily Mockito provides a way out of that problem by allowing hamcrest matchers being used to verify arguments. Here we go: verify(listener).propertyChange( (PropertyChangeEvent)argThat( new HasEqualState( new PropertyChangeEvent(holder, “value”, “Old”, “New”)))); It is not nice, but it works. Of course I also had…
-
Hallmark of the Stupid: PropertyChangeEvent
What troubles me with java is, that the implementors of its standard library utterly failed at setting an example. Java developers don’t know how to do proper christian oo, because every time they peek into the library sources they see C-ish hacks. Today I realised that PropertyChangeEvent is not implementing equals based on its value.…
-
Musings on Encapsulation vs. (De)composition
The standard dogma of OO-design is, that you should certainly not allow access to the internals of an object to the outside world. Instead you are to expose operations on that type. Generally there seems to be a consent in my current environment that getters and setters are evil, as they do indeed expose internal…
-
Embrace the Power of Unix
fortune | xargs cowsay