DEV Community

Discussion on: Avoid code oversimplification with RoR

Collapse
 
scarsrcool10 profile image
Jonathan Cleghorn

This is a great article. The larger the RoR app gets you're working on, the more pronounced this issue becomes. Oncall shifts / 3:00am debugging over the years has completely colored my underling coding philosophy. When I'm doing PRs, one of the questions I always ask myself is, "Can I debug this at 3:00am on a weekend while partially drunk?" lol! If the answer is no, then maybe a more KISS approach is needed.

Collapse
 
gerardosandoval profile image
Gerardo Sandoval

Hahaha, I like that approach! Definitely while debugging you can identify big chunks of code that can use a refactor and follow the KISS approach.

I personally check the complexity of the bug first, and reverse engineer the process to identify the source... If by the time I found the source of the bug I already forgot how and where in the code I started, then I propose a refactor or at least add some comments to guide the process.