Skip to main content

“Best” practices – mindset matters



“Sir, can you please switch off your mobile phone or keep it in flight mode during the entire flight?”


The flight attendant approached a young guy and told. The guy did not like what she said, looks like he was busy in a very important call and not in a mood to discontinue the conversation. But she did not give-up and thanks to the federal law, the guy had to hang the call and switch off his mobile. I often encounter such situation during flight, most of these occur either because of electronic devices or fastening of seat belt. These are very trivial matters but can generate greater negative impact during the flight. Let’s take the case of mobile phone or any electronic devices, these devices are equipped with Wi-Fi and may interfere with the cockpit devices causing communication breakdown. The modern flight operating devices are designed to block such interference; however it is highly recommended that the devices are switched off or kept in flight mode. There can be exceptions like the blocking devices are not installed properly or the device produces very high frequency, so it is unpredictable and interestingly the flight attendant cannot call an air craft maintenance engineer 37000 feet above the ground to fix if any problem occurs. Hence it is their duty to make sure that all best practices (or flying protocols) are followed by the passengers to avoid any emergency situation. The guy looks like highly educated and cultured, however at that moment his selfishness or “I need to finish this call at any cost” behavior seems did not care to push 200 people into danger.
So, it is about awareness and attitude that we posses towards such practices. There are lot of such practices that we need to adhere to make things work better and also to help others. I saw people switching off their mobile phones before entering the flight and some shortening their conversations. Those persons know the value behind such practices and they tend to make it a part of their daily life, like we do not forget to brush our teeth in the morning. The concept of best practices in programming aligns with these facts, the fact of making it a daily practice, the fact of helping others by writing clean code and the fact that helps to create a healthy programming culture within a team. Programming is not an easy job; we may found tons of so called “geeks” but very few who falls into those who believe in switching off their mobile phone before entering the flight. The best practices make sure that you do not increase your code maintenance effort, help others to understand easily what you have written and set an ideology for the team by being accountable what you have written. It helps you to establish a long term sustainable programming model that not only educate new joiners but also boosts the programming morale. It helps to avoid any emergency situation caused due to technical debts by providing a well define process of developing software. 

Now the question is how big difference the best practices can make in engineering. We have several side of this problem, I think the most important one is how much are we aware of these practices and what our mindset towards learning and adopting them. We all fly first time, but do we consider fastening our seat belt next time we fly or do we need to be informed by an attendant every time. So there is a difference between awareness and adoption. Because knowledge can be spread across easily by several means such as training, discussions, coaching etc. but inheriting those into work life is the biggest challenge as it needs a professional mindset with adaptive nature. The mindset is an individual characteristic attribute which cannot be controlled by another individual. One’s mindset is controlled by his attitude. Attitude is developed over a period of time and so is mindset. We have to control both in order to incline towards adhering best practices into our working life. It will sound really hard for the first time if you have started fresh because there will be a cultural shift from your traditional programming model to another completely new model. But if we take this as an advantage or challenge we can make up to it very quickly and easily. There is always an opportunity to develop ourselves and we should consider this as one of them. 

These are implicit; the manager does not come and tell you how beneficial will be SRP or OCP, may be sometime but it is our responsibility to create that SOLID culture and get some benefit out of it. In principle it is easy to write a blog or to suggest these kind of cultural shifts, however end of the day it is up to the management and the product team to decide which way to go, but from my point of view we should keep the management team away from this and start programming today in a way that all best practices are examined and followed.  

Comments

Popular posts from this blog

Spring: Method Injection

This is useful when a Singleton bean need to use a non-singleton bean. Sometime your application may need to collaborate a prototype bean with a singleton bean to satisfy your business logic. That is your singleton bean is dependent on a prototype bean. Let’s consider three beans Customer Sales Person Product A customer may ask a sales Person to show different type of products from the repository. Let’s assume you have gone to a garment shop to buy a new shirt for the lucky date with your new girlfriend. So, it’s a tough choice and you may like to try different colors and styles and finally you will choose one. So, if we describe the above situation in the form of business logic inside one of your module, it will look like this, The sales Person should show a new product every time he requests. Let’s assume Customer and Sales Person to be singleton bean in your Spring container and Product as prototype. But based on bean life-cycle a prototype bean can not be injec...

Copying objects – Java Clonable interface

We can assign reference of an object to another, provided each of them satisfies an “ is-a” relationship or of same type. For example, a Dog object can hold the reference of another Dog object regardless both have different states. Similarly an Animal object can hold the reference of a Dog or Cat object, if they satisfies an “is-a” relationship. But hold on, these assignments do not help you to create a duplicate copy of the object. It’s nothing but different pointers pointing to the same memory location. Java provides API to clone an object. Using this API one can get a copy of an object to another. To achieve this, proposed class should implement Clonable interface (else JVM will throw CloneNotSupportedException during runtime). The rationale behind cloning is to get an independent copy of an object. The Object class has a clone() method which takes care of this operation. This method is protected by nature and returns an Object , when called.   You can call this ...

JUnit Rule : Creating Temporary Folder

I was surprised to see this beautiful feature in JUnit and it helped to ease to lots of constrains I face while writing JUnit tests. I basically follow TDD and as you guys know we focus more on writing tests, hence it is necessary to use some shortcuts availed by the tools like JUnit to make the process fast. Recently I had an issue where I had to create and delete a file before and after every test executes. I did that using @Before and @After annotation of Junit and it worked, however I was looking for more of a generic way to do this at one place. As I started googling I came across this post, which is amazing,  After reading the block I know how I can generalize my creating and deleting of a temporary file or folder (I decided to go with a temporary folder and a file inside it, which looks more readable and oganized). The JUnit class: public class TemporaryFolderTestCase { @Rule public TemporaryFolder temporaryFolder = new TemporaryF...