-
Continue reading →: Replace magic number with named constants
120308 What do you understand after reading the above number? It is just raw data. The interpretation is left to the reader of the data. However, the reader may not get the intent behind it. It could be a zip code of a city. It could be a birthday in…
-
Continue reading →: Encapsulate conditionals
Conditionals play a vital role in code for performing business decisions. These conditionals should be easy to read. If conditionals are complex then it might hamper readability. You would end up introducing more bugs if failed to understand its intent. Every time you visit this code, you will need to debug…
-
Continue reading →: Don’t be anti-negative
The negative conditionals in code blocks are most of the time difficult to read and understand. It becomes worse when you make the conditionals anti-negative. Before Try to read above code snippets and try to understand it. Please note the highlighted parts. Does that code reads like When inverse of a package is…
-
Continue reading →: Extract Method
Extract method is the most frequently used refactoring technique. It reorganizes the code for better reuse and readability. Ah! alright. Let’s proceed. Use the extract method in following cases — When your class contains a long method. A long method does more than one thing and it is not considered…
-
Continue reading →: Authentication and authorization
Authentication: I don’t know who you are, so, you are not allowed to enter the premises. Authorization: I know who you are, you are allowed to enter the premises. However, you do not belong to the accounting department hence you are not allowed to perform any action like accessing resources…
-
Continue reading →: Developer Professionalism : Take a stand
Few weeks ago, I was travelling to my hometown by a bus. I reached the pick-up point at scheduled time, but when I arrived, I found that the bus was late. Finally after a wait of 2 hours, the bus arrived and the driver found himself in the middle of…
-
Continue reading →: Don’t be too clever
A few days ago, I along with my friend went to the restaurant. When I went to use a washroom, I found these symbols on the doors. I realized the humor of the designer and then I went to the Male washroom. However, I observed that other people who don’t…
-
Continue reading →: Start slowly to finish fast
“In programming, the hard part isn’t solving problems, but deciding what problems to solve.” – Paul Graham I am fortunate enough to work with new, genius, competitive developers who have fresh perspectives. They often talk about faster algorithms, data structures, new-generation technologies, and buzzwords in the software industries. They are…
-
Continue reading →: Start practicing Shoshin
When you were a child and wanted to learn something for the first time. You chose to learn it from others with an open mind. Take an example of painting the picture. You could experience this when your kids try to mimic you while learning something the first time. (My…
-
Continue reading →: Agile Economics : How decisions impact cost?
Cost is one of the important corners of the Project-management triangle. This factor is especially important for decision-making from business perspective. Let’s look at one of the techniques that will help us take more informed decisions about various operations we as developers do. Consider a scenario when we have to…
