Tag Archives: Refactoring

Knolders review of #venkat_50_50_tour at #DelhiJUG17 meetup


Dr. Venkat Subramaniam celebrates his 50th anniversary with distributing his smiles throughout the world’s Java User Groups (JUG) meetups, conferences, and events. Recently, he was in India and Delhi-NCR Java User Group organized one stop meetup for him. Needless to say, core to our … Continue reading

Posted in event, Functional Programming, Java, Reactive | Tagged , , , , , , , , , , , | 3 Comments

Long Method? Move Accumulation to a Collecting Parameter


You would have definitely come across long bulky methods which accumulate information to a local variable and pass back that information. Here the local variable goes through a lot of changes throughout the logic of the method before it is … Continue reading

Posted in Agile, Java | Tagged , , , | Leave a comment

Long Methods? Try Compose Methods


We all have seen long winding code that goes on and on. By the time you have hit page down a couple of times, you forget what the method was doing. You forget because the method is doing a lot. … Continue reading

Posted in Agile, Java | Tagged , , , | 1 Comment

Duplicate Code? Chain Constructors


After the ‘Introduction of Null Object’ and the ‘Replace One/Many Distinctions with Composite’ let us do an easy one this time. It is easy but of course it is present in a lot of code samples else we would not … Continue reading

Posted in Agile, Java | Tagged , , , | Leave a comment

Duplicate Code? Replace One/Many Distinctions with Composite


After the first post on how to introduce Null Object, in this second post on how to write clean(er) code, let us look at one of the very frequent occurrence. At least something that I have seen quite often. You … Continue reading

Posted in Agile, Architecture, Java | Tagged , , , | 1 Comment

Duplicate Code? Introduce Null Object


One of the most significant code smells is having duplicate code. There are primarily 2 forms of code duplications Explicit – These are the ones where there is blatant copy paste of the code. Methods are repeated within classes and … Continue reading

Posted in Agile, Architecture, Java | Tagged , , , | 8 Comments