DEV Community

Discussion on: When are you happiest as a coder?

Collapse
 
adrianmarkperea profile image
Adrian Perea

Refactoring!

Nothing beats the feeling of transmuting a garbled mess into well-written prose

Collapse
 
axelledrouge profile image
AxelleDRouge

But first you have to read and understand the garbled mess, even (especially) if it's yours, and I find that part excruciating.
But yes, after it is done, it is really a fantastic feeling of accomplishment. Maybe it is actually proportional ?

Collapse
 
adrianmarkperea profile image
Adrian Perea

You're absolutely right! It's painful to refactor large piles of stinky code. I find it less accomplishing to do manage that since I don't find any joy in doing it. Then again, continuously optimizing/refactoring after every small change in code slows your progress to a crawl.

I think laying down the logic, and THEN ironing out wrinkles afterwards is the sweet spot!

Thread Thread
 
axelledrouge profile image
AxelleDRouge

Laying down the logic is the part where you must rethink your logic (why sometimes asking yourself "what the h*** was I thinking ?"). I find its a stimulating time. Most of the time, I use my good old paper and pen to do that, and really like the process.

Thread Thread
 
adrianmarkperea profile image
Adrian Perea

I totally agree with using pen and paper to map logic! This is where I appreciated my UML diagram lessons back in university. They may seem esoteric, but knowledge of flow charts/activity/sequence diagrams really help clarify your own intentions. Plus, it's a good skill to have if you work with a team.

Thread Thread
 
axelledrouge profile image
AxelleDRouge • Edited

Indeed! I actually discovered the computer world with flow charts/sequence diagrams first, using them to work with a software that allowed to create new modules without code (a so-called "no-code" platform). You could say that I start with diagrams, before learning to translate it to code