top | item 46942924

(no title)

nly | 20 days ago

Sounds like you were just reviewing bad code.

The author should have provided context via comments and structured the code in a way that is easy to change and understand

discuss

order

crazygringo|20 days ago

Exactly. A long time ago, I learned to write comments explaining all necessary context for my future self and for others -- exactly for this reason.

Remember, you're not writing code just to execute. You're writing it to be read.

h4kunamata|19 days ago

I worked with people that defended the idea that code should not have comments, the code should self explain itself.

I am not a developer and I completely disagree with that, the python scripts I wrote, Ansible playbook, they all have comments because 1 month down the road I no longer remember why I did what I did, was that a system limitation or software limitation or the easiest solution at the time???

runeks|19 days ago

> Sounds like you were just reviewing bad code.

Software engineering in a nutshell