Branching over data should be close to where the data. Because if I ever change the data’s semantics in the future, I see the branching that depends on it and can change it alongside. In this episode, I show you how to move computation without changing the API of the […]

[LR] Refactoring MovieRental #7 – Move Branching to Data | ...


“Temporal variables […] are useful only within their own routine, and thus they encourage long, complex routines” (Martin Fowler). Going down this path we decompose the statement-method further and then finally realize our HTML-statement without duplicating any computation! ► All Refactoring Episodes: http://goo.gl/f7Yf21 ► Let’s Develop! http://letsdeveloper.com ► Don’t Miss […]

[LR] Refactoring MovieRental #6 – Replace Temp with Query | ...


After breaking down the big statement method into smaller chunks it turns out that those chunks actually belong to the Rental class, so we move them over. Thanks to Eclipse’s intelligent move-refactoring assistant this is a pretty easy task! ► All Refactoring Episodes: http://goo.gl/f7Yf21 ► Let’s Develop! http://letsdeveloper.com ► Don’t […]

[LR] Refactoring MovieRental #5 – Move Methods | Let’s Refactor



Ok, while task 1 was a soft introduction, task 2 ended up quite hard. It was more luck than anything that I had the right idea (and wikipedia to look up the formula). ► All CodeHunt Episodes: http://goo.gl/WtTJ3L ► Let’s Develop! http://letsdeveloper.com ► Don’t Miss an Episode: http://goo.gl/whzDi1 «CodeHunt» An […]

[LD] Code Hunt #42 – Puzzles – 14.01 to 14.02 ...


More Caesar Code… I must confess I’m a little disappointed. My expectations for the “Cypher” sector were certainly higher. Now I’m through before it started! Tho good side: probably no more ASCII-table lookups 😉 ► All CodeHunt Episodes: http://goo.gl/WtTJ3L ► Let’s Develop! http://letsdeveloper.com ► Don’t Miss an Episode: http://goo.gl/whzDi1 «CodeHunt» […]

[LD] Code Hunt #41 – Cyphers – 13.03 to 13.04 ...


Caesar Code for the win! If only I could manage to keep that stupid ASCII table in mind… ► 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 Conway’s Game of […]

[LD] Code Hunt #40 – Cyphers – 13.01 to 13.02 ...



Sorting arrays is simple, but I find it a little disappointing how easy the actual solution is… Access to Arrays.sort() was prohibited in prior tasks. I think it should be here too. ► 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 […]

[LD] Code Hunt #39 – Search Sort – 12.11 to ...


Task 9 was easy enough, but task 10 freaked me out, until I found that the generated test cases are simply wrong. My final solution does not fulfill all of them! What is it MSResearch? Wrong test cases or acceptance of a wrong solution? ► All CodeHunt Episodes: http://goo.gl/WtTJ3L ► […]

[LD] Code Hunt #38 – Search Sort – 12.09 to ...