Finishing the Project

It's not just stopping



Your Number One Goal

Completely detach yourselves from the project.

Clean The Code

  • upgrade components and libraries
    • npm audit
    • 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 / build 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


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


  • 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!


The Agile Samurai, Chapter 13

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; }