Survivalist Pro
Photo by Charles Parker Pexels Logo Photo: Charles Parker

What is zombie Code?

“Zombie code is an expression used to describe software functionality that is more or less abandoned or unsupported but which still appears in the current source code,” explains Daniel Stubbs, scientific analyst at Calcul Quebec and part of the Compute Canada Federation.

What are the six basic needs?
What are the six basic needs?

The six human needs are Certainty, Variety, Significance, Connection, Growth and Contribution. We all have a need for certainty, safety, stability...

Read More »
Does a spoonful of olive oil help constipation?
Does a spoonful of olive oil help constipation?

The fats in olive oil can help smooth the insides of the bowel, making it easier for stools to pass. It can also help the stool hold in more water,...

Read More »

“Zombie code is an expression used to describe software functionality that is more or less abandoned or unsupported but which still appears in the current source code,” explains Daniel Stubbs, scientific analyst at Calcul Quebec and part of the Compute Canada Federation. These lines of code are no longer useful and they are not executed. They should no longer be there but for reasons that are often obscure, they are still clearly visible, rendering the program’s source code needlessly mysterious, sometimes to the point of being outright unreadable! Fortunately, zombie code is not as dangerous as the brain-eating zombies found in horror movies (and honestly, our analysis team much prefers to deal with the former). Zombie code is nevertheless a nuisance and when it becomes ubiquitous, it can give your code a post-apocalyptic look… “Zombie code is unfortunately fairly common,” says Daniel Stubbs. “For example, we help many researchers who are not experts in programming: they are first and foremost experts in their scientific domain. As a result, we meet a lot of zombies.” “Poorly written code is confusing, which makes it more difficult to update, extend or optimize. Overall, it’s harder for us to help the individual. Such code can also lead to very subtle bugs that require a lot of effort to eliminate,” he adds. Zombie code can also be brought back to life by mistake, potentially causing a multitude of problems! Zombie-infested code can also waste memory, CPU cycles and increase execution time.

How to eliminate them?

Since zombies are already dead, it’s not easy to kill them. And just like in the movies…not all zombies are the same. Some are easy to identify and kill, while others are a nightmare! There is no miracle solution, except perhaps, to avoid creating them in the first place. Many zombies are created at the very beginning of writing a program, as the author of the code, out of a fear of deleting code which may later prove useful or being forced to start over, prefers to retain multiple versions in a single file by using comments and changing the name of functions and variables. “If your code is chaotic and you have trouble understanding it yourself, imagine sharing it with someone who didn’t write it. Your goal should be to write code that you’ll be proud to share with others,” adds our analyst. It’s easy to write code, but it takes a little more time and energy to write good code – but in the long run, it is worth it!

– Use good software engineering practices.

– Remove old and deprecated code (“cruft”) from your source code files.

– Document your code.

– Use good version management software: this will allow you to keep your code readable while still having access to earlier versions. At Calcul Québec we offer a workshop with GIT

Zombie hunting !

Our analyste prepared an exemple of a (very bad) code in C, but that can still compile and execute. He also made a much nicer version.

About this article

This article was written in collaboration and revised by a high performance computing expert.

Can you hit someone if they spit on you?
Can you hit someone if they spit on you?

In addition to battery, the crime of “assault” under Penal Code § 240 is also available for spitting. This crime covers the attempt to use force or...

Read More »
How do Muslims purify?
How do Muslims purify?

Sunnah of Ghusl Washing both the hands up to the wrists. Wash the private parts and remove dirt or filth from the body (using your left hand)....

Read More »

What could I live without?

Organs you can live without Lung. For instance, you only need one lung. ... Stomach. Another organ you don't need is your stomach. ... Spleen. You can also live without your spleen, an organ that normally filters blood. ... Appendix. Many people know your appendix isn't necessary for survival. ... Kidney. ... Gallbladder. ... Liver, sort of.

Your body’s 79 organs produce all the necessary functions to keep you alive, but there are some organs that you just don’t need. ORLANDO, Fla. – Your body’s 79 organs produce all the necessary functions to keep you alive, but there are some organs that you just don’t need.

Here’s a look at some of the organs you can live without.

Lung

For instance, you only need one lung. If you have a lung removed, you’ll lose about 35% of the volume of air you exhale in a second, but breathing is still possible.

Stomach

Another organ you don’t need is your stomach. If it’s removed, surgeons can connect your esophagus with your small intestine, and you can still eat solid foods just less of them.

Spleen

You can also live without your spleen, an organ that normally filters blood. However, if you have it taken out, you’re more likely to get sick.

Appendix

Many people know your appendix isn’t necessary for survival. Doctors still aren’t sure exactly what the organ does.

Kidney

You’ve probably heard that you don’t need both of your kidneys. That’s why you can donate one while you’re alive.

Gallbladder

Your gallbladder is also not an essential organ. If it’s removed, your liver can perform the job without it.

Liver, sort of

While you can’t live without your liver, you can live with just part of it. Your liver is the only organ in your body that can regrow after parts of it have been removed or damaged. In fact, it can grow back to its full size in just months.

How to get free solar panels from the government?
How to get free solar panels from the government?

What's the Process for Applying for a Solar Panel Grant? To apply for a solar panel grant, you can contact any of the participating energy...

Read More »
What is a good name for a gamer?
What is a good name for a gamer?

Cool Gaming Names to Choose From Aspect. Kraken. Bender. Lynch. Big Papa. Mad Dog. Bowser. O'Doyle. More items... • Mar 25, 2021

Read More »
What is the best to live life?
What is the best to live life?

Living your best life means becoming the best version of yourself, mentally and physically. Your mental and physical health go hand in hand and...

Read More »
Does hair come from mom or dad?
Does hair come from mom or dad?

One popular myth is that hair loss in men is passed down from the mother's side of the family while hair loss in women is passed down from the...

Read More »