Disclaimer: The following post includes unfunny jokes about the Coronavirus (COVID-19) and the Corona crisis. Some people may find this content offensive, so continue reading at your own risk. This blog should not be taken seriously under any circumstances.
The Coronavirus is creating shock waves around the world, forcing more developers to work from home. While the practices to avoid the Coronavirus spread among humans is pretty clear for most of us, this blog will cover the best practices to avoid your code from being infected (prevention), checking to see if your code is infected (detection) and what to do in the case of contamination (post-infection). It is also important to remember that the statistics show us that new (freshly developed) code has a higher chance of recovery after infection. Legacy code (any code that was created before the year 2010) is at the high-risk group.
β Prevention
Due to the high infection rate and the fact that Alibaba AI didnβt create the anti-coronavirus, all experts agree that the best cure, for now, is prevention.
Avoid using protocols that require handshaking
Handshaking is the most common way to establish an exchange of information between two machines. Unfortunately, this is also the most common way to get infected and to spread the Coronavirus. Therefore, try to avoid using protocols that require handshaking to start communication (e.g. TCP, TLC, etc.)
Be careful when copying code from crowded places
Crowded places like stack overflow and open source projects, especially the ones with plenty of contributors, have more chances to contain code that is infected by the Coronavirus. Instead, try to copy code from your teammates, unpopular open-source projects, and bad stack overflow answers.
Achieve (and maintain) code hygiene
Now it is the best time to stop writing βquick-and-dirtyβ and to start refactoring, so you will have clean code because keeping high code hygiene standards will help to avoid infection. Also, be sure to verify youβre sanitizing (any) input data received, especially if it received from external services.
π Detection
If your code is acting funky, maybe it is not because youβre a sh*ty developer, but because you got infected. It is crucial to constantly debug, monitor and scan your code with different anti-viruses solutions (like VirusTotal) to check your code health.
π± Post-infection
If you find that your code got contaminated, you should follow the guides under this section ASAP!
Git blame to see how you got infected
Thanks to the ability to use git blame
it is possible to detect how your code got infected so the relevant safety measurements can be taken to prevent the spread of the Coronavirus.
Use only localhost to serve your app
Infected code should stay in quarantine until fully recovered. Therefore, if your app contains code with Coronavirus, for public safety, it should be accessible only on the localhost and not exposed to the world.
Mask your IP in public places
Contrary to the myth that masks should protect you from getting infected, they are actually supposed to help infected code not to infect other code snippets out there. So if you MUST deploy your code on the WWW, at least mask your server IP to minimize the exposure to others.
Top comments (11)
Make sure your ingestion pipeline filters out .bat files.
π€£
Taking Β«Coding your way out of the CoronavirusΒ» as cue: How about really doing that?
I've just come out of an 'Antivirus' Hackathon that happened over the weekend in Germany. Some people in Berlin picked up an initiative that started in Estonia and Poland. Within five days nearly 43,000 volunteers signed up.
Not all coders, mind you. People were also working on ways to help elderly and isolated folk, support small local businesses, to home-produce masks and medical equipment (as simple as sowing nurses clothing) etc.
Check it out: wirvsvirushackathon.org/?lang=en
Nothing is as contagious as a good idea!
WIRvsVirusHack π€π€π¦ π
P.S.: I worked on this team: devpost.com/software/covid-qa-1vyrkt
Feel free to click 'Like'... π
π€£π€£π€£
:)
I'd like to mask my IP, If only those masks were available :(
I feel ya'.
The only thing that I can offer you is to try free VPN π
Hilarious, you made my day.
Glad to hear, this was my intention :)
Working from 127.0.0.1
127.0.0.1 is where the β€οΈ is