loading...
Cover image for 💻 Coding your way out of the Coronavirus 🚑

💻 Coding your way out of the Coronavirus 🚑

eyarz profile image Eyar Zilberman ・3 min read

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.

FYI, I followed all those practices and my code is Corona free since 93'.

Discussion

pic
Editor guide
Collapse
davej profile image
Dave Jeffery

Make sure your ingestion pipeline filters out .bat files.

Collapse
eyarz profile image
Collapse
schafeld profile image
Oliver Schafeld

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'... 😉

Collapse
ajaymagan profile image
Ajay

🤣🤣🤣

Collapse
eyarz profile image
Collapse
geongeorge profile image
Geon George

I'd like to mask my IP, If only those masks were available :(

Collapse
eyarz profile image
Eyar Zilberman Author

I feel ya'.
The only thing that I can offer you is to try free VPN 😜

Collapse
frostyworks profile image
Révaz

Hilarious, you made my day.

Collapse
eyarz profile image
Eyar Zilberman Author

Glad to hear, this was my intention :)

Collapse
swair_aq profile image
SAQ

Working from 127.0.0.1

Collapse
eyarz profile image
Eyar Zilberman Author

127.0.0.1 is where the ❤️ is