Skip to main content

Posts

Showing posts from March, 2022

Breaking if/else with a Chain

Greetings! There are If/Else or switch statements in any Software. We need to use that logical branching for object oriented programming as well. The question is how do you use that? are they readable? maintainable? or looks beautiful? What I normally see in such codes is those are very fragile, hard to read, ugly. Needless to say about the vulnerability of the branching levels in this case. Most of the developers might add few private methods and call those to show that the code is clean. This can be solved in multiple ways depending on the situation. Simple Conditions When you see such a code, consider it as a candidate for polymorphism. In most of the cases, you can deal this with abstraction. A simple factory will do the rest. Multi level branches Complexity arrives with multi levels. It is quite difficult to identify common factors, abstraction. However, it does not mean you can't do it. It depends on the problem at hand. You might still fix this with a simple interface, using

What we learned (in each Sprint)

Greetings! Another job change, another team. That is how my career goes as I tend to change jobs (for obvious reasons). This time I'm working with a team where almost everyone is new to the business and product domain. Not only that, more than half of them are freshers. If I don't teach them who will? I have tried various ways to teach the team about the business and product domain (this is even new to me), internal frameworks (again new to me), and other technical aspects. Things we do/ did Clean Code chapter by chapter by each member Domain knowledge sessions with QA/ BA Internal framework sessions by each team member (learn and teach) Continues knowledge trainings (Java, Design Patterns, Angular, any useful technical thing) Gaining knowledge and insights from from other team. (lucky that we have friendly people here) Question of the Day - separate team chat group in which each teammate gets the opportunity to ask a question. (though people often forget this due to busy work)