T Ashok (ash_thiru on Twitter)
Corona virus aka COVID19 is a global talking point now. What is being done to contain the COVID19? Well, there are THREE actions in terms of Prevention, Detection, Containment being aggressively pursued. Three targets of young children, old people and sick persons are the most vulnerable as of now. In this article we take a look at the actions being taken to contain the pandemic and relate to what to do deliver clean code.
Corona virus aka COVID19 is a global talking point now. A pandemic now, it has shaken the entire population of the world, busted the business and the world economy. The major stock markets are taking a massive beating driven by the sentiment that there is no medicine for this as of now.
Interestingly the suggestions posed by experts are pretty basic stuff related to good hygiene and this seems to be the only way to go given that there is no medicine as of now. What can we learn from COVID19 to deliver clean code?
So what is being done to contain the COVID19? Well, there are THREE actions in terms of Prevention, Detection, Containment being aggressively pursued. Three targets of young children, old people and sick persons are the most vulnerable as of now.
What is being done in terms of PREVENTION that we can relate to code?
- Cover when you sneeze/cough => USE ASSERTS, HANDLE EXCEPTIONS
- Wash hands frequently => SIMPLIFY, REFACTOR
- Don’t touch surfaces => STRIVE FOR LOW COUPLING
What is being done in terms of DETECTION that we can relate to code?
- Check for fever => DO BASIC TESTS
- Check for other symptoms => USE SMART CHECKLISTS, DO DETAILED TESTS
- Check if contact with affected => DO STATIC CODE ANALYSIS
- Check origin on arrival (for travellers) => WRITE DEFENSIVE CODE
- Check travel history => ANALYSE CODE COVERAGE
What is being done in terms of CONTAINMENT that we can relate to code?
- Quarantine affected/suspected persons => REWRITE POOR CODE, DON’T FIX
- Use masks use asserts/ EMBED TESTABILITY
- Publish routes travelled by affected people => PUBLISH CHANGE LOGS SO THAT OTHERS MAY ASCERTAIN IMPACT, CREATE INTERACTION MAPS, REGRESS CODE
Now who are the TARGETS that could be most impacted in COVID19 that we can relate to code?
- Young children => NEW CODE
- Old people => OLD CODE WITH MINIMAL DOCUMENTATION/CK COMMENTS
- Sick people => CODE FRAGMENTS THAT HAVE BEEN BUGGY
Here is the entire learnings summarised in the full mind-map.
Check out the current article COVID19 and Clean Code Part 2 : Process & Criteria,
that outlines techniques to deliver Process & Criteria, inspired by Covid19.
Excellent! Loved it.
Thank you Prasad
Thank you Prasad!