Apoptosis Gem - Which lines in your project need to die?(github.com)
github.com
Apoptosis Gem - Which lines in your project need to die?
http://github.com/swerner/apoptosis
4 comments
This is a great idea! You may want to use `git ls-files` instead of `Dir['/.']` in order to consider only tracked files inside the directory.
Cool, thanks! I whipped this up the night after the talk so there are probably some kind of inefficient parts in the interest of getting it released quickly. I'll get right on that.
This is totally backwards: code you haven't touched in a while hasn't been touched /because it works/. It is the code you've recently edited where the larger number of buga are going to be found, and the more attention needs to be applied. When code is stable you don't delete it: you trust it.
Michael Feathers is the author of Working Effectively With Legacy Code. This is basically that software projects, as they age, have a tendency to become huge unwieldy monstrosities.
While this gem is kind of a joke, reminding you of older code that was written a long time ago when you knew less about the problem domain than you do now (since you've been working on it for the last year), checking older code for refactoring/rewriting opportunities can make life easier for you in the future or whoever maintains the code after you.
Speaking as someone who inherited a huge untested codebase - debugging those sections that were written early on and work most of the time, but have never been refactored to take advantage of things that were learned later on in the project, is pretty unpleasant.
While this gem is kind of a joke, reminding you of older code that was written a long time ago when you knew less about the problem domain than you do now (since you've been working on it for the last year), checking older code for refactoring/rewriting opportunities can make life easier for you in the future or whoever maintains the code after you.
Speaking as someone who inherited a huge untested codebase - debugging those sections that were written early on and work most of the time, but have never been refactored to take advantage of things that were learned later on in the project, is pretty unpleasant.
I'm gonna run Apoptosis over the Apoptosis code base in a year, and see what warnings it throws up ;)
> He made a point that software is alive and unlike biological systems, doesn’t have an automatic way to kill off old ‘cells’.
That's just crazy talk. Software doesn't grow old!
That's just crazy talk. Software doesn't grow old!