Crafting Code Podcast
$ cd episodes/006-deleting-code
~/podcast/episodes/006-deleting-code $ ls -1a ~/podcast/episodes $ cat episode-summary.txtA professional doesn't just write code, they also know when to delete it. In this episode, we discuss the problems that code can cause and share some ideas on how to go about making your codebase smaller.
Timestamps
[00:00:00] Host introductions. Why would a professional want to delete code? Batch size: rewrite vs. refactor. Sometimes it is faster to just rewrite it.
[00:03:49] Is code an asset or liability? Code becomes a constraint as soon as it is written. The world changes around the code, forcing you to keep it maintained.
[00:13:12] U-curve optimization function for how much code you should have. Code has inertia. Can you turn your ship?
[00:17:33] Delete dead code and remove debris. Don't be clever. Be intentional about whether you're crafting business value or making art.
[00:25:03] Liabilities are considered bad, but they enable something. Strategically remove duplication.
[00:30:05] Code doesn't have to feel so precious if you have confidence in manipulating it. Burning down the greenfield to make it more comfortable.
[00:32:44] Deleting or replacing things is made much easier by keeping the scope small. Micro-commits and the tiger team problem.
[00:38:13] Be careful about deleting code. Don't use technology to solve people problems. Encoding business processes can limit your ability to change.
[00:43:58] What types of code are most difficult to delete? Old/unfamiliar code. Big code. Coupling. Little-used code. Untested code.
[00:48:01] It is hard to delete code you shouldn't have written, such as your own ORM. Need to balance between fighting frameworks and the "not invented here" syndrome.
[00:51:30] You are not your code. Deleting code does not diminish who you are nor the value you provide.
[00:53:40] Outro
References: ~/podcast $ cat copyright.txtCopyright © 2024 - Crafting Code Podcast