鯨落筆記whale fall notes

內明學 adhyātmavidyā(意識學 Consciousness) |原始佛教 Pre-sectarian (Original) Buddhism|道教 Daoism (Taoism)|古瑜伽 Ancient Yoga|哲學 Philosophy|靈氣 Reiki|薩滿與民間信仰 Shaman & Folk Religions|太極 Tai Chi|氣功 Qi-Gong |軟件工程 Software Engineering

聯絡方式 contact: life.is.curiosity@pm.me


Bug Fixing and The Responsibilities of Coding

As I know many developers have been fixing the bugs which made by other guys. The bugs always come out with the tight deadline, bad time management, think before you code, bad coding style…etc. Anyway, we have been making bugs at any time for any reason. And a bug will potentially cost you more than a million dollar in the financial industry. Here is talking about Why have we always been making Bugs on the system?

I think we all agree the quality of code is linking with our dignity and personality. If someone doesn’t even want to see his code again and feel nasty that means he thinks that he wrote a bunch of garbage as well, Certified Dead!. After this guy is gone, you might have to pick up the dirty work with high pressure, and no one cares about the code but the result, it will be worse in a fast-piece environment. Actually, you didn’t do anything wrong but you need to fix someone’s bug as soon as possible. Generally you feel frustrated and confused about the code and career and finally, you may want to quit from your job one day as well. This is how the bug with bad coding to lose the most valuable programmer in the company.

In ninety-nine percent of the time, you need to fix someone’s bug without any documents and diagrams and even a single line of comment. Every programmer has their coding style and skills and the code is representing how do a programmer work for the business with his understanding. That means you have to understand the whole business logic and trace the root cause of the bug by the code with line by line. This is not about the ability, due to understanding the code which wrote by someone is not that easy as you thought. Especially many programmers don’t know what have they done after they worked for more than 12 hours non-stop.

Please be responsible for your code and don’t let other people fix your bugs anymore. I usually make a bunch of diagrams to show how my logic works with the code. UML is quite useful with Enterprise Architect / DrawIO. The comments among your code are very important for helping someone to know your story whatever you wrote many shit code. Separate the responsibilities of your code, don’t try to finish all the things within a function. From the management perspective, please be polite to explain the bugs is not anyone’s fault but there is no way out at this moment so that to reduce the bad emotion of the code in the future.