A good test suite is essential for safe refactoring. It is the only way to ensure that your modifications don’t break your code. Therefore, I start my refactoring by writing a test suite for Martin Fowler’s example program. I use EclEmma to check the coverage of the tests and to […]
Monthly Archives: September 2014
Refactoring is nothing to be afraid of. Know your tools and be rigorous about it and you will succeed. I chose the first example of Martin Fowler’s book “Refactoring” to demonstrate refactoring techniques in general and the respective tools available in Eclipse. In this episode, I discuss the target program […]
[LR] Refactoring MovieRental #1 – Problem Statement | Let’s Develop

How to check deep equality of arrays in Java? Got me confused, this one. But it helps to focus on the most simple tools we have available: Checking array length and concrete indexes. Finally got me through this one *sight*. ► All CodeHunt Episodes: http://goo.gl/WtTJ3L ► Let’s Develop! http://letsdeveloper.com ► […]
[LD] Code Hunt #31 – Arrays 2 – 11.03 [blind] ...

Section final! Understanding the problem is not equivalent to being able to code it… took me some time to figure out how to do it right. But I got it and on goes the CodeHunt! ► All CodeHunt Episodes: http://goo.gl/WtTJ3L ► Let’s Develop! http://letsdeveloper.com ► Don’t Miss an Episode: http://goo.gl/whzDi1 […]
[LD] Code Hunt #33 – Arrays 2 – 11.07 [blind] ...

It is amazing how helpful some meaningful parameter names can be. Solving these tasks is so much easier, because the names convey a scenario and the scenario implies a computation. ► All CodeHunt Episodes: http://goo.gl/WtTJ3L ► Let’s Develop! http://letsdeveloper.com ► Don’t Miss an Episode: http://goo.gl/whzDi1 «CodeHunt» An educational coding game […]
[LD] Code Hunt #32 – Arrays 2 – 11.04 to ...

When you replace variables by constants, generality breaks. When you switch from Java to C# to Java, your solution is gone with the wind. How CodeHunt bugs make me find the mistake in my solution. Don’t miss it! ► All CodeHunt Episodes: http://goo.gl/WtTJ3L ► Let’s Develop! http://letsdeveloper.com ► Don’t Miss […]
[LD] Code Hunt #30 – Arrays 2 – 11.02 [blind] ...

More challenging array tasks coming up! Apparently, the expectations for full skill rating drop down. Or is it me starting to program in the “right’ style? ► All CodeHunt Episodes: http://goo.gl/WtTJ3L ► Let’s Develop! http://letsdeveloper.com ► Don’t Miss an Episode: http://goo.gl/whzDi1 «CodeHunt» An educational coding game from Microsoft Research. https://codehunt.com […]