! 
The 5 people in your 
Organization that grow 
Legacy Code 
Roberto Cortez 
JavaOne 2014 
#CON4255
Roberto Cortez 
Freelancer, Speaker, RebelLabs Author, Blogger, Passionate Developer 
twitter: 
@radcortez 
! 
mail: 
radcortez@yahoo.com 
! 
blog: 
http://www.radcortez.com
This presentation is NOT about 
•Testing 
•Tools 
• Refactoring 
• Or any other thing that you heard before (hopefully)!
It’s about 
• Knowing yourself 
• Knowing others 
• Dealing with each other differences
“In historical terms, a legacy is something 
that is handed down from one period of 
time to another period of time.” 
(from Wikipedia) 
What is Legacy?
Movie Time! 
https://www.youtube.com/watch?v=PF7EpEnglgk
What is Legacy Code? 
• Is it old code? 
• Is it code no one wants to use? 
• Or is just badly written code?
public static String getDayOfWeek(String data) { 
switch (getDOWNum(data)) { 
case 1: return "Monday"; 
case 2: return "Tuesday"; 
case 3: return "Wednesday"; 
case 4: return "Thursday"; 
case 5: return "Friday"; 
case 6: return "Saturday"; 
case 7: return "Sunday"; 
} 
return ("???"); 
}
public static int getTokenCounter(String[] tokens) { 
int j = 0; 
if (tokens.length >= 5) { 
j = 5; 
} 
else if (tokens.length == 4) { 
j = 4; 
} 
else if (tokens.length == 3) { 
j = 3; 
} 
else if (tokens.length == 2) { 
j = 2; 
} 
else if (tokens.length == 1) { 
j = 1; 
} 
return j; 
}
Legacy Code is 
•Unknown 
•Scary 
•Ignored
Legacy Code is everywhere 
• Huge investments in software are to solve 
business problems, not code problems 
•Technology evolves way faster than software 
•New frameworks are released every year
How many frameworks?
Identify the Source! 
• Code is written by developers 
•Tools can help, but they are not enough 
• Developers are the main contributors!
The Overly Energetic Engineer 
! 
The Technology Enthusiast 
! 
The Firefighter 
! 
The Smartass 
! 
The Intern
The Overly 
Energetic 
Engineer
The Overly Energetic Engineer 
•Perfectionist 
• High standard for Quality 
• Ask a lot of questions 
•Focus on key details 
•Very critical 
• Study a lot
The 
Technology 
Enthusiast
The Technology Enthusiast 
•Very enthusiast about their work 
• Friendly and open 
• Speak a lot 
• Optimist 
•Wish to be recognised by their skills
The 
Firefighter
The Firefighter 
• Enjoy helping others 
• Like to work in teams 
•Patient 
• Calm people in stressful situations 
• Investigate facts
The 
Smartass
The Smartass 
•Focus on instant results 
• Demands from others 
•Impatient 
• Like to accept challenges 
•Impose their rules 
• Lead other people
The Intern
The Intern 
• Developers starting their own career 
• It’s a temporary stage 
• They need to learn
Golden Rule? 
“Treat others the way 
you want to be treated!” 
WRONG!
Golden Rule! 
•Everyone is different! 
•Everyone have different needs! 
• Psychology is tied with everything we do 
•Learn how to handle each profile
Everyone is 
Different!
The Overly Energetic Engineer 
• Delegate them important tasks 
• Give them opportunities to show their skills 
• Provide freedom to explore 
• Assign investigation work
The Technology Enthusiast 
• Don’t let them rearchitect 
• Clarify how things should be done 
• Research facts for the problems 
•Need to be included in decision making
The Firefighter 
•You shouldn’t pressure them 
• They need to feel confidence 
• Provide them with accurate information 
• They may need a step-by-step plan to proceed
The Smartass 
•Have all relevant information with you 
• Provide them with end solutions 
• Present alternatives 
• Give them facts and direct answers
You have 
the tools!
Remarks 
•People are not exclusive to one profile 
• They can adopt any behaviour or even a 
combination 
•Usually, one profile more predominant
Proof? 
! 
Empirical 
Data!
Inspiration 
•Heavily inspired in DISC 
•Behaviour assessment tool 
• Dominance, Influence, Steadiness, 
Conscientiousness
Wait! The Intern? 
• Invest 
• Promote peer code reviews 
• Quick presentations about technology 
•Teach them!
Last Words!
Golden Rule? 
You can drive people’s behaviour by 
learning how to accommodate each 
person unique characteristics!
Questions?
Thank you for Attending! 
twitter: 
@radcortez 
! 
mail: 
radcortez@yahoo.com 
! 
blog: 
http://www.radcortez.com

The 5 People in your Organization that grow Legacy Code

  • 1.
    ! The 5people in your Organization that grow Legacy Code Roberto Cortez JavaOne 2014 #CON4255
  • 2.
    Roberto Cortez Freelancer,Speaker, RebelLabs Author, Blogger, Passionate Developer twitter: @radcortez ! mail: radcortez@yahoo.com ! blog: http://www.radcortez.com
  • 3.
    This presentation isNOT about •Testing •Tools • Refactoring • Or any other thing that you heard before (hopefully)!
  • 4.
    It’s about •Knowing yourself • Knowing others • Dealing with each other differences
  • 5.
    “In historical terms,a legacy is something that is handed down from one period of time to another period of time.” (from Wikipedia) What is Legacy?
  • 6.
  • 7.
    What is LegacyCode? • Is it old code? • Is it code no one wants to use? • Or is just badly written code?
  • 8.
    public static StringgetDayOfWeek(String data) { switch (getDOWNum(data)) { case 1: return "Monday"; case 2: return "Tuesday"; case 3: return "Wednesday"; case 4: return "Thursday"; case 5: return "Friday"; case 6: return "Saturday"; case 7: return "Sunday"; } return ("???"); }
  • 9.
    public static intgetTokenCounter(String[] tokens) { int j = 0; if (tokens.length >= 5) { j = 5; } else if (tokens.length == 4) { j = 4; } else if (tokens.length == 3) { j = 3; } else if (tokens.length == 2) { j = 2; } else if (tokens.length == 1) { j = 1; } return j; }
  • 11.
    Legacy Code is •Unknown •Scary •Ignored
  • 12.
    Legacy Code iseverywhere • Huge investments in software are to solve business problems, not code problems •Technology evolves way faster than software •New frameworks are released every year
  • 13.
  • 14.
    Identify the Source! • Code is written by developers •Tools can help, but they are not enough • Developers are the main contributors!
  • 15.
    The Overly EnergeticEngineer ! The Technology Enthusiast ! The Firefighter ! The Smartass ! The Intern
  • 16.
  • 17.
    The Overly EnergeticEngineer •Perfectionist • High standard for Quality • Ask a lot of questions •Focus on key details •Very critical • Study a lot
  • 18.
  • 19.
    The Technology Enthusiast •Very enthusiast about their work • Friendly and open • Speak a lot • Optimist •Wish to be recognised by their skills
  • 20.
  • 21.
    The Firefighter •Enjoy helping others • Like to work in teams •Patient • Calm people in stressful situations • Investigate facts
  • 22.
  • 23.
    The Smartass •Focuson instant results • Demands from others •Impatient • Like to accept challenges •Impose their rules • Lead other people
  • 24.
  • 25.
    The Intern •Developers starting their own career • It’s a temporary stage • They need to learn
  • 27.
    Golden Rule? “Treatothers the way you want to be treated!” WRONG!
  • 28.
    Golden Rule! •Everyoneis different! •Everyone have different needs! • Psychology is tied with everything we do •Learn how to handle each profile
  • 29.
  • 30.
    The Overly EnergeticEngineer • Delegate them important tasks • Give them opportunities to show their skills • Provide freedom to explore • Assign investigation work
  • 31.
    The Technology Enthusiast • Don’t let them rearchitect • Clarify how things should be done • Research facts for the problems •Need to be included in decision making
  • 32.
    The Firefighter •Youshouldn’t pressure them • They need to feel confidence • Provide them with accurate information • They may need a step-by-step plan to proceed
  • 33.
    The Smartass •Haveall relevant information with you • Provide them with end solutions • Present alternatives • Give them facts and direct answers
  • 34.
  • 35.
    Remarks •People arenot exclusive to one profile • They can adopt any behaviour or even a combination •Usually, one profile more predominant
  • 36.
  • 37.
    Inspiration •Heavily inspiredin DISC •Behaviour assessment tool • Dominance, Influence, Steadiness, Conscientiousness
  • 38.
    Wait! The Intern? • Invest • Promote peer code reviews • Quick presentations about technology •Teach them!
  • 39.
  • 40.
    Golden Rule? Youcan drive people’s behaviour by learning how to accommodate each person unique characteristics!
  • 41.
  • 42.
    Thank you forAttending! twitter: @radcortez ! mail: radcortez@yahoo.com ! blog: http://www.radcortez.com