Hacker News new | ask | show | jobs
by freemium413 1874 days ago
When I come across a situation like that, i consider the chunk of code reusable and split it into a separate function. It may not be perfect and you might need to make that function more generic than it was but I think it makes sense.