Refactoring as one of the methods of agile development is part of our everyday practice. It consists in well-defined (often small) changes to the code without altering functionality. One goal is to make the code more clearly saying what it does. Refactoring in this sense is often done while exploring the code before its going to be changed. It shows once more the advantages of bottom up approaches, as small steps are less likely to break the code, while nevertheless in the long run not only leading to better local understandability but to better global structure.
Martin Fowlers “Refactoring: Improving the Design of Existing Code” from about 10 years ago is considered the canonical reference on the topic. And yet with this long history its fun to read, especially if one likes to know exactly whats going on inside those magic refactoring functions from our modern IDEs. All those refactoring methods are shown broken into small steps. By expressing them this way Fowler laid the groundwork for our today’s fancy refactoring tools. >> more…
Do you know those books that make you want to grab a computer and start coding – and you only hold off, because there are more interesting things to come?
Those books, that confirm your “I always thought it should be like this” feelings and add a lot of new thoughts and knowledge to that?
Those books you somehow need to tell others about?
This is one of them.
It starts with an overview what Clean Code is and how to achieve it, neglecting not even the simplest things like naming, formatting or comments. I liked the Boys scout rule best which says: “Always check-in the code a little cleaner than you checked it out” (of course, originally it’s about campgrounds). >> more…
Tobi gives us some hints how to improve our ant script (there’s better ant task which we can use). Let’s see.. surely it’s better, let’s introduce it…done! Looks much nicer indeed. Ok, seems like the work is done..but wait, something tells us that we can do even more in this task. There’s still a possibility to insert incorrect data via deprecate constructor. We quickly get rid from it. There’s also some legacy code which I want to delete as well. Like that? No way – says Tobi, this stuff is still used from hidden corners of NG, don’t delete it. Let’s have a look..o-la-la, indeed there is still a lot of strange functionality which I even didn’t know about. It seems to be too diffcult to refactor it this time. >> more…