When I encounter overly long methods, I first identify chunks that are independent of one another and extract them into an own method. Eclipse offers automated support for that, but we still need to think about what we do in order for the result to be what we aspire. ► […]
Monthly Archives: October 2014

This is the most code I’ve written for a single CodeHunt task so far. Since there is no way to dynamically change the size of arrays and we cannot use the collections from the standard library, we’ve got to come up with our own version of arrayCopy. Still: full skill […]
[LD] Code Hunt #35 – Search Sort – 12.05 [blind] ...

Counting occurrences and computing the index of elements in arrays. Rather simple tasks to get started with the Search Sort sector. ► 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 «Other Series» ► Let’s Develop […]
[LD] Code Hunt #34 – Search Sort – 12.01 to ...
To refactor safely, we want to get test coverage up. Our ideal is always 100%, but remember that this doesn’t guarantee a good test suite. Use the coverage as a guide to missing test cases, but don’t forget to think about cases that might not be revealed by coverage! ► […]
[LR] Refactoring MovieRental #3 – A Covering Test Suite 2 ...

This is a tough one. Took me a while to wrap my head around the concept. Stumbled across the solution more by chance than by systematic search, but I got it right, in the end 😉 ► All CodeHunt Episodes: http://goo.gl/WtTJ3L ► Let’s Develop! http://letsdeveloper.com ► Don’t Miss an Episode: […]
[LD] Code Hunt #37 – Search Sort – 12.08 [blind] ...

Implementing value-replacement and some i’m-not-sure-what-purpose computation on arrays. The biggest challenge remains the allocation of arrays with previously unknown size, but we know the pattern from before. Again, the solution are quite long for CodeHunt. ► All CodeHunt Episodes: http://goo.gl/WtTJ3L ► Let’s Develop! http://letsdeveloper.com ► Don’t Miss an Episode: http://goo.gl/whzDi1 […]