SlideShare a Scribd company logo
1 of 51
Karoline Klever
@karolikl
𝐿
𝐼𝑄 𝐷𝑒𝑣 − 𝐼𝑄 𝑃𝑀
% 𝐴𝑣𝑔 𝐶 +
𝑌𝐸
𝐿 𝐴
where
L = Number of lines of code
𝐴𝑣𝑔 𝐶 = Average number of coffee cups per day
𝑌𝐸 = Years of programming experience
𝐿 𝐴 = Number of layers of abstraction
Lines of code: 5,000,000
IQ of developer: 115
IQ of project manager: 110
Average number of coffee cups per day: 3
Years of programming experience: 16
Number of layers of abstraction: 3
Life expectancy: 6,33 years
(And it’s our fault)
 9 questions
 291 respondents
True
62.1 %
False
6.2 %
I don't know
11.4 %
I didn't write
code 10 years
ago
20.3 %
True
62.7 %
False
35.9 %
I'm not currently writing any code
1.4 %
68.90%
53.20%
28.9 %
46.8 %
2.2 % 0.0 %
0%
10%
20%
30%
40%
50%
60%
70%
80%
Devs with 10 years old code in production Devs without 10 year old code in production
True False I'm not currently writing any code
0
10
20
30
40
50
60
70
80
90
1751
1757
1763
1769
1775
1781
1787
1793
1799
1805
1811
1817
1823
1829
1835
1841
1847
1853
1859
1865
1871
1877
1883
1889
1895
1901
1907
1913
1919
1925
1931
1937
1943
1949
1955
1961
1967
1973
1979
1985
1991
1997
2003
2009
 Version Control
 Testing
 Build servers
 Refactoring
 Deployment
 Documentation generators
 Performance
 Monitoring
 And the list goes on and on...
True
85.5 %
False
14.5 %
We are...
True
69.7 %
False
30.3 %
True
64.5 %
False
35.5 %
True
60.7 %
False
39.3 %
...is what separates a great developer
from an average one
- @bergdaniel
True
35.5 %
False
64.5 %
Unreadable code
The code is not clear enough to be
read or interpreted
«Unreadable» code
The reader does not possess the
required knowlegde to read the
code.
Unreachable?
When code is...
Dead?
Deprecated? Legacy?
Unreachable?
Call it! When code is...
Dead?
Deprecated? Legacy?
Unreachable?
Call it! When code is...
Dead?
Call it!
Deprecated? Legacy?
Unreachable?
Call it! When code is...
Dead?
Call it!
Deprecated?
Call it when appropriate.
Legacy?
Unreachable?
Call it! When code is...
Dead?
Call it!
Deprecated?
Call it when appropriate.
Legacy?
Depends on your
definition.
- Michael C. Feathers
13
57
102
115
180
77
63
0
20
40
60
80
100
120
140
160
180
200
It's legacy if
someone other
than I wrote it
It's legacy as soon
as it's in
production
It's legacy if
everyone who
wrote it are no
longer on the
project
It's legacy if it
lacks unit tests
It's legacy if it's
written in an old
language, or uses
old libraries and
frameworks
All code is legacy
after X number of
years
Other
- Anonymous respondent
- Anonymous respondent
- Anonymous respondent
- Anonymous respondent
How I would define it
Unreachable?
Call it! When code is...
Dead?
Call it!
Deprecated?
Call it when appropriate.
Legacy?
Depends on your
definition.
It’s legacy if it
lacks unit tests
Advised that a piece of code should be rewritten simply
because rewriting it would be easier than having to figure
out how the original code worked.
62%
It’s legacy if it
lacks unit tests
It’s legacy as
soon as it's in
production
Advised that a piece of code should be rewritten simply
because rewriting it would be easier than having to figure
out how the original code worked.
62% 73%
It’s legacy if it
lacks unit tests
It’s legacy as
soon as it's in
production
It’s legacy if
someone other
than I wrote it
Advised that a piece of code should be rewritten simply
because rewriting it would be easier than having to figure
out how the original code worked.
62% 73% 92%
 Support systems and technology increase life
expectancy
 Most of us are quick to rewrite rather than fix
code, which decreases life expectancy
 We view code as our playground, introducing risk,
which decreases life expectancy
So how do we change this?
Clean
Modular
Maintainable
Karoline Klever
@karolikl
karolikl@gmail.com

More Related Content

Similar to What is the actual life expectancy of your code?

100% Code Coverage in Symfony applications
100% Code Coverage in Symfony applications100% Code Coverage in Symfony applications
100% Code Coverage in Symfony applicationsAndreas Czakaj
 
TDD for the Newb Who Wants to Become an Apprentice
TDD for the Newb Who Wants to Become an ApprenticeTDD for the Newb Who Wants to Become an Apprentice
TDD for the Newb Who Wants to Become an ApprenticeHoward Deiner
 
Managing JavaScript Complexity
Managing JavaScript ComplexityManaging JavaScript Complexity
Managing JavaScript ComplexityJarrod Overson
 
Automating good coding practices
Automating good coding practicesAutomating good coding practices
Automating good coding practicesKevin Peterson
 
Workshop fight legacy code write unit test
Workshop fight legacy code write unit testWorkshop fight legacy code write unit test
Workshop fight legacy code write unit testTung Nguyen Thanh
 
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015][XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]Agile đây Vietnam
 
Code Excellence for the Average Programmer
Code Excellence for the Average ProgrammerCode Excellence for the Average Programmer
Code Excellence for the Average ProgrammerLlewellyn Falco
 
Lessons from Testing
Lessons from TestingLessons from Testing
Lessons from TestingJon Jagger
 
How to write good quality code
How to write good quality codeHow to write good quality code
How to write good quality codeHayden Bleasel
 
Clearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsClearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsJonathan Hitchcock
 
W jax wenn-code altert
W jax  wenn-code altertW jax  wenn-code altert
W jax wenn-code altertSven Peters
 
Planning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teamsPlanning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teamsChristian Heilmann
 
A sweet taste of clean code and software design
A sweet taste of clean code and software designA sweet taste of clean code and software design
A sweet taste of clean code and software designKfir Bloch
 
Search for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code AnalysisSearch for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code AnalysisAndrey Karpov
 
From SLO to GOTY
From SLO to GOTYFrom SLO to GOTY
From SLO to GOTYScyllaDB
 
Agile latvia evening_unit_testing_in_practice
Agile latvia evening_unit_testing_in_practiceAgile latvia evening_unit_testing_in_practice
Agile latvia evening_unit_testing_in_practicedenis Udod
 
WordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressWordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressmtoppa
 
ITCamp 2013 - Florin Coros - Driving Your Team Towards Code Quality
ITCamp 2013 - Florin Coros - Driving Your Team Towards Code QualityITCamp 2013 - Florin Coros - Driving Your Team Towards Code Quality
ITCamp 2013 - Florin Coros - Driving Your Team Towards Code QualityITCamp
 

Similar to What is the actual life expectancy of your code? (20)

100% Code Coverage in Symfony applications
100% Code Coverage in Symfony applications100% Code Coverage in Symfony applications
100% Code Coverage in Symfony applications
 
TDD for the Newb Who Wants to Become an Apprentice
TDD for the Newb Who Wants to Become an ApprenticeTDD for the Newb Who Wants to Become an Apprentice
TDD for the Newb Who Wants to Become an Apprentice
 
Managing JavaScript Complexity
Managing JavaScript ComplexityManaging JavaScript Complexity
Managing JavaScript Complexity
 
Automating good coding practices
Automating good coding practicesAutomating good coding practices
Automating good coding practices
 
Can you trust your tests?
Can you trust your tests?Can you trust your tests?
Can you trust your tests?
 
Integreation
IntegreationIntegreation
Integreation
 
Workshop fight legacy code write unit test
Workshop fight legacy code write unit testWorkshop fight legacy code write unit test
Workshop fight legacy code write unit test
 
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015][XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
 
Code Excellence for the Average Programmer
Code Excellence for the Average ProgrammerCode Excellence for the Average Programmer
Code Excellence for the Average Programmer
 
Lessons from Testing
Lessons from TestingLessons from Testing
Lessons from Testing
 
How to write good quality code
How to write good quality codeHow to write good quality code
How to write good quality code
 
Clearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsClearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad Decisions
 
W jax wenn-code altert
W jax  wenn-code altertW jax  wenn-code altert
W jax wenn-code altert
 
Planning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teamsPlanning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teams
 
A sweet taste of clean code and software design
A sweet taste of clean code and software designA sweet taste of clean code and software design
A sweet taste of clean code and software design
 
Search for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code AnalysisSearch for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code Analysis
 
From SLO to GOTY
From SLO to GOTYFrom SLO to GOTY
From SLO to GOTY
 
Agile latvia evening_unit_testing_in_practice
Agile latvia evening_unit_testing_in_practiceAgile latvia evening_unit_testing_in_practice
Agile latvia evening_unit_testing_in_practice
 
WordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressWordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPress
 
ITCamp 2013 - Florin Coros - Driving Your Team Towards Code Quality
ITCamp 2013 - Florin Coros - Driving Your Team Towards Code QualityITCamp 2013 - Florin Coros - Driving Your Team Towards Code Quality
ITCamp 2013 - Florin Coros - Driving Your Team Towards Code Quality
 

Recently uploaded

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

What is the actual life expectancy of your code?

Editor's Notes

  1. That's what we'll do for the next hour, we'll investigate whether the life expectancy of our code is actually increasing or whether we just tell ourselves that to sleep at night.
  2. Change developer IQ to 140: Life expectancy increases to 7 years Change number of coffee cups per day to 6: LE increases to over 9 years
  3. For everyone else: I believe the overall life expectancy of code is decreasing and it's our fault This is something I’ve thought about for quite a while, after seeing how code is treated and how developers behave. Problem was, I had no statistics to back up this statement.
  4. Raise your hand Stats
  5. Raise your hand Stats Now, I want to break this down a bit further to see how these two questions relate to each other
  6. Stats
  7. Based on these answers... Now, I’d like to talk about something completely different for a couple of minutes: The life expectancy of human beings in Sweden
  8. 1773: Famine due to failed crops 1809: Dano-Swedish war 1857: Financial panic 1918: World War I Other than that, the life expectancy of humans has increased steadily for 200 years. Why?
  9. Housing Sanitation Access to clean water
  10. Medicine such as Antibiotics and Vaccination programs Nutrition Free health care
  11. Free for all
  12. So our bodies haven't changed much in these 200 years, we are stil the same. The support systems have simply improved. Can we see the same trend for our code?
  13. Those who believe developers just write code are wrong, our jobs also consist of being able to use our toolset correctly. This is only the beginning of a long list of tools we need to understand and be able to use. Imagine for your next project, not using any of these tools. What would that do to the life expectancy of the code you’d write?
  14. Stats But hold on, I'm standing here arguing that our support systems increase the life expectancy of code. Yet in my introduction, I said that the overall life expectancy of code is decreasing. Where's the catch?
  15. Who's the bad guy? We are the bad guys. Us, the developers. We have forgotten our responsibilities.
  16. We've forgotten the science involved in writing code and instead we view code as our playground. Instead of fine-tuning existing code, analyzing, understanding, we have developed a habit of throwing it away and redoing it. We create our own.
  17. Stats Remember all the devs who believe their code will be in production 10 years from now? Roughly the same stats apply to them. Isn't expecting your code to live long while being quick to rewrite legacy code somewhat contradictory? Doesn't it increase the chances of someone else rewriting your code before it reaches its 10 year anniversary? Most of us are quick to rewrite rather than fix code, is it always worth it?
  18. We have to realize that there is value in understanding what already exists before making calls about its limitations. One of the things that leads to potentially unnecessary rewriting of code is our fascination with new toys. We're easily mesmerized by new, shiny frameworks, languages and coding styles. This makes us want to rewrite our code, using these new tools.
  19. Developer ADHD Example: Friend (always a friend, huh?) worked with a customer. Frontend was all HTML/CSS and Jquery. Knockout came along, they rewrote their frontend code. AngularJS came along, another rewrite. Not a very efficient way of working
  20. New, shiny things involve risk: Bugs Lack of developer support Lack of knowledge within the project team Chance of it being discontinued or completely changed in the future? (Angular) The decision of accepting these risks has to be done on a strategic level.
  21. Again, we've forgotten the science involved in writing code, and instead we view code as our playground. We introduce new frameworks/libraries without considering all the risk, essentially calling time of death on our code.
  22. In the ER, calling time of death is only done after repeated attempts at resuscitation, when they're sure there is absolutely nothing else they can do for their patient. Developers call time of death (and consequently rewrite or remove) for various reasons: Not pretty enough I can write this better/more losely coupled It needs more abstractions... it needs less abstractions I don’ agree with the pattern used It's not readable
  23. It's quite easy for medics to know when they can call time of death, when the patient no longer has a pulse. Unreachable code: Code that exists, but is never executed. Completely useless, call it!
  24. Dead code: Code that is executed, but whose result is never used in any other computations. In other words, useless. Call it!
  25. Deprecated code: Code that is superseded or obsolete, and therefore should be avoided. The code exists only for backwards compatibility. Call it when appropriate.
  26. Legacy code: Difficult one, because no one agrees on what legacy code is.
  27. If you tell someone «this code is legacy», they will understand what you’re saying. Your message is received loud and clear. But if you ask the same person to define what legacy is, you might get anything in return. Those who have read ... By Michael Feathers are likely to argue that legacy code is code that lacks tests.
  28. Describes the feeling of working with legacy code, but doesn’t give a definition I want an absolute definition, that always gives you the same answer regardless of who you ask. If I were to show a piece of code to 100 people and ask them, they would always give the same answer.
  29. Stats What about the «other» option?
  30. Many mentioned being scared, nervous or frightened. I might be scared, while my colleague is not. Depends who you ask, therefore not absolute definition.
  31. What is the meaning of code? This also depends on the eye of the beholder.
  32. All code is legacy. If all code is legacy, there is no point in even using the word legacy, we can just say code.
  33. This definition requires all legacy code to be written in a non-modern system. But we’ve all seen legacy code in modern systems, haven’t we?
  34. "For me, code becomes legacy when continuing maintenance becomes more expensive than rebuilding/rewriting it. Whether this ‘tipping point’ is reached because of badly written code or outdated technology doesn't matter, these are all factors that contribute to code becoming legacy."
  35. Back to this, when is it appropriate to call time of death on legacy code? It depends on your definition. The really interesting question then: Does a developers definition of legacy impact if and when you decide to throw away and rewrite a piece of code instead of debugging and fixing it?
  36. 62% of those who agreed with the statement it’s legacy...
  37. 73% of those who agreed with the statement it’s legacy...
  38. 92% of those who agreed with the statement it’s legacy...
  39. Your definition of legacy impacts if and when you decide to throw away and rewrite a piece of code instead of debugging and fixing it.
  40. Support systems and technology increase life expectancy Having old code increases belief of code surviving. Most of us are quick to rewrite rather than fix code, which decreases life expectancy We view code as our playground, introducing risk, which decreases life expectancy Your definition of “legacy” impacts the life expectancy of code
  41. No point in building a house on weak foundation. Won’t last long. Same goes for code. We have to focus even more on writing clean, modular, maintainable code.
  42. Code is how we communicate Not just to computer, but to other developers Communication will fail, and therefore we also have to...
  43. Don’t rewrite simply because it’s easier than trying to understand. Assume that the developer who wrote it has a brain and was able to use it. View it as a learning experience: What is the previous developer trying to tell you?