El necesario mal del Legacy Code
Samuel Solís
For Drupal Iberia
The necessary evil of Legacy code
El necesario mal del Legacy code Samuel Solís
Samuel Solís
@estoyausente
El necesario mal del Legacy code Samuel Solís
● Where is the Legacy code from?
(or why it’s necessary)
● How to enjoy the mud
● Some specific Drupal problems
Index
El necesario mal del Legacy code Samuel Solís
How is a ten
years project
El necesario mal del Legacy code Samuel Solís
Long time ago…
El necesario mal del Legacy code Samuel Solís
One-man army
El necesario mal del Legacy code Samuel Solís
Junior team
El necesario mal del Legacy code Samuel Solís
Time & speed
El necesario mal del Legacy code Samuel Solís
Lot of changes and
project evolution
El necesario mal del Legacy code Samuel Solís
- Cheap materials and simple tools
- People not trained for this work
- Laborious construction
- Maintained by its own inhabitants
- The structure doesn't matter
Favelas
El necesario mal del Legacy code Samuel Solís
Technical debt concept
Technical debt is the additional cost due a conscious decision of a fast
execution versus an effective solution.
“ Samuel Solís - Philosopher (just in pubs)
(Aside)
El necesario mal del Legacy code Samuel Solís
Plan A
Plan B
Plan C
Money Time Changes
Summary
El necesario mal del Legacy code Samuel Solís
The Big ball of mud
El necesario mal del Legacy code Samuel Solís
El necesario mal del Legacy code Samuel Solís
Get out of the mud
or play with it
El necesario mal del Legacy code Samuel Solís
El necesario mal del Legacy code Samuel Solís
How to enjoy in the
mud
El necesario mal del Legacy code Samuel Solís
El necesario mal del Legacy code Samuel Solís
Identify the biggest
architecture/structure
problems
El necesario mal del Legacy code Samuel Solís
Standard is a must
El necesario mal del Legacy code Samuel Solís
Be a good Boy Scout
El necesario mal del Legacy code Samuel Solís
Get the quick wins
El necesario mal del Legacy code Samuel Solís
Isolate the issues
El necesario mal del Legacy code Samuel Solís
Avoid the shoddy work
(all of them are already
done)
Common
Ñapa?
El necesario mal del Legacy code Samuel Solís
MAS concept -
Maximum acceptable
shoddiness
--
MCA - Máxima chapuza asumible
El necesario mal del Legacy code Samuel Solís
Quality automation
El necesario mal del Legacy code Samuel Solís
Main Drupal legacy problems
- Too old version (D6, D7)
- Only “old” version (D8, D9)
- Lot of code in bad places (theme, .module, a
single module)
- Bad theming (or bad frontend in general)
Thank you!
Host Partner
Sponsors
@estoyausente
Samuel Solís
El necesario mal del Legacy code Samuel Solís
Learn more…
- A big mall of mud (2003) Brian Foote & Joseph W. Yoder
- Anti-Pattern Detection (2014) Fabio Palomba & Rocco Oliveto
- Working Effectively with Legacy Code (2004) Michael C. Feathers

El necesario mal del Legacy Code (Drupal Iberia 2024)

  • 2.
    El necesario maldel Legacy Code Samuel Solís For Drupal Iberia The necessary evil of Legacy code
  • 3.
    El necesario maldel Legacy code Samuel Solís Samuel Solís @estoyausente
  • 4.
    El necesario maldel Legacy code Samuel Solís ● Where is the Legacy code from? (or why it’s necessary) ● How to enjoy the mud ● Some specific Drupal problems Index
  • 5.
    El necesario maldel Legacy code Samuel Solís How is a ten years project
  • 6.
    El necesario maldel Legacy code Samuel Solís Long time ago…
  • 7.
    El necesario maldel Legacy code Samuel Solís One-man army
  • 8.
    El necesario maldel Legacy code Samuel Solís Junior team
  • 9.
    El necesario maldel Legacy code Samuel Solís Time & speed
  • 10.
    El necesario maldel Legacy code Samuel Solís Lot of changes and project evolution
  • 11.
    El necesario maldel Legacy code Samuel Solís - Cheap materials and simple tools - People not trained for this work - Laborious construction - Maintained by its own inhabitants - The structure doesn't matter Favelas
  • 12.
    El necesario maldel Legacy code Samuel Solís Technical debt concept Technical debt is the additional cost due a conscious decision of a fast execution versus an effective solution. “ Samuel Solís - Philosopher (just in pubs) (Aside)
  • 13.
    El necesario maldel Legacy code Samuel Solís Plan A Plan B Plan C Money Time Changes Summary
  • 14.
    El necesario maldel Legacy code Samuel Solís The Big ball of mud
  • 15.
    El necesario maldel Legacy code Samuel Solís
  • 16.
    El necesario maldel Legacy code Samuel Solís Get out of the mud or play with it
  • 17.
    El necesario maldel Legacy code Samuel Solís
  • 18.
    El necesario maldel Legacy code Samuel Solís How to enjoy in the mud
  • 19.
    El necesario maldel Legacy code Samuel Solís
  • 20.
    El necesario maldel Legacy code Samuel Solís Identify the biggest architecture/structure problems
  • 21.
    El necesario maldel Legacy code Samuel Solís Standard is a must
  • 22.
    El necesario maldel Legacy code Samuel Solís Be a good Boy Scout
  • 23.
    El necesario maldel Legacy code Samuel Solís Get the quick wins
  • 24.
    El necesario maldel Legacy code Samuel Solís Isolate the issues
  • 25.
    El necesario maldel Legacy code Samuel Solís Avoid the shoddy work (all of them are already done) Common Ñapa?
  • 26.
    El necesario maldel Legacy code Samuel Solís MAS concept - Maximum acceptable shoddiness -- MCA - Máxima chapuza asumible
  • 27.
    El necesario maldel Legacy code Samuel Solís Quality automation
  • 28.
    El necesario maldel Legacy code Samuel Solís Main Drupal legacy problems - Too old version (D6, D7) - Only “old” version (D8, D9) - Lot of code in bad places (theme, .module, a single module) - Bad theming (or bad frontend in general)
  • 29.
  • 30.
    El necesario maldel Legacy code Samuel Solís Learn more… - A big mall of mud (2003) Brian Foote & Joseph W. Yoder - Anti-Pattern Detection (2014) Fabio Palomba & Rocco Oliveto - Working Effectively with Legacy Code (2004) Michael C. Feathers