Finishing the Project

It's not just stopping

Readings

Deployment

Your Number One Goal

Completely detach yourselves from the project.

Clean The Code

  • upgrade components and libraries
    • npm outdated
  • fix or document all remaining bugs
  • clean up the UI
  • delete unused and commented out code and libraries
  • re-test everything
  • write install scripts, if appropriate

Don't Forget the Cloud

  • Replace all developer-owned cloud service accounts with
    • client accounts, or
    • clearly marked dummy account info and instructions for getting valid accounts
  • Secret keys in files on github? Yikes!! Immediately:
    • Remove files.
    • Update .gitignore on all dev machines to not track these files
    • Update all dev repos and branches
    • Generate new keys

Document

Code Cleanup

The Agile Samurai, Chapter 13

Technical Debt

Technical debt is the continuous accumulation of shortcuts, hacks, duplication, and other sins we regularly commit against our code base in the name of speed and schedule.
The Agile Samurai, Chapter 13

Technical Debt: Not Just Code

While most of our technical debt is code centric, you can also have it in data and build and configuration files.
I was once part of a large-scale rewrite for a back-end system where a city name was spelled two different ways. The cost of this seemingly small difference was huge. Instead of not caring how the city was spelled, they had to write and carry this extra code and complexity for as long as that system remained in production, which for mainframe systems can be a very long time.
The Agile Samurai, Chapter 13

Refactoring

  • Small incremental code improvements with no change in external behavior
  • Many possible operations: Rename method, Extract method, Inline temp, ...
  • Martin Fowler's catalog
  • Only do with a robust regression test suite
  • Don't stop and do a mass refactoring of all code!

Refactoring: DRY

  • DRY: don't repeat yourself
  • Replace local repeated calculation with variable
  • Replace global repeated calculation with method
  • Move repeated operations on method result inside method

Refactoring: SWYM

  • SWYM: say what you mean
  • Meaningful names, e.g., var average;
  • Standardized names, e.g., for (var i = 0; ...
  • Named constants, e.g., numItems / CARTON_COUNT
  • Well-named methods, e.g.,
    function roundToCents(n) { return round(100 * n) / 100; }

Refactoring

The Agile Samurai, Chapter 13