The comma, present in the article and missing in HN, completely changes the meaning of the title.
vs.
The next time you catch one, Lennie, avoid killing a mouse by strangling it.
...
Do you strangle it to avoid it, or do you avoid strangling it? The age-old question.
Thanks for pointing the titles actually differ.
Avoid rewriting a legacy system (by strangling it)