Monthly Archives: March 2011

Note: This post offers a Windows JAR/DLL package. I have delivered a newer version, also for Linux/Mac OS X. Get them from here A long while ago I played around with Slick. A game library for Java. It offers easy 2d graphics drawing with the speed of OpenGL (by using LJWGL). It has much more features than that as well.  When I tried it I was running Win XP 32 bit. However, recently I was trying my code again, this time on Windows 7 64 bit, and I encountered the following error: lwjgl.dll: Can’t load… Read Article →

Recently I had the oppertunity to explain some students about what unit testing was. I started off with the question of “What does unit testing mean?”. They gave different types of answers. One of them talked about the smallest piece of code. And even though he is ‘right’. I asked him to apply this knowledge to his current code where he said “But I don’t want to test my get/set methods, that is useless!”. And so, our definition of ‘unit testing’ became unclear again. So what is a unit test? According to this article on… Read Article →

Not too long ago, Martin Fowler pointed out a nice blog post by Jay Fields. Jay Fields refers to a nice talk he had about accidental complexity and essential complexity and how this has impact on your estimates. He found that not all developers consider the accidental complexity and therefor have lower estimates. I found this a very interesting thought. It got me thinking how I estimate and how far I’m off. I found that, especially with larger solutions, I’m most of the time under estimating. Even with more complex things, and adding some ‘unforseen… Read Article →

Someone mentioned a mocking framework called Mockito some time ago to me. I am familiar with mocking frameworks, as I work with EasyMock quite a lot. I really like EasyMock, but I am curious about Mockito. I thought of trying it out a bit and write down my experiences along with a comparison with EasyMock. This is by all means not a very in-depth comparison, but I did find out some interesting things. In order to test out the mocking frameworks I have set up some code in place to test. The code to be… Read Article →

Here is a little example of code I’ve been faced with (not written by me), that struck me. Although the syntax is correct (it is javascript), it took me a little while to actually understand what is going on. Here is the code: [sourcecode language=”javascript”] someObject: function(data) { return data.json ? data.json.stateObject ? data.json.stateObject : {} : {}; }, [/sourcecode] And here is how I refactored it. [sourcecode language=”javascript”] someObject: function(data) { if (data.json) { if (data.json.stateObject) { return data.json.stateObject; } } return {}; } [/sourcecode] So I mentioned brianpower in a while ago. Michael… Read Article →

Scroll To Top