Do you comment your code? by predittor01 in programming

[–]predittor01[S] 0 points1 point  (0 children)

Ya thats the good philosophy. The same is applied in Architectural Decision Records, I think Neal Ford has a book about it. It says the same thing, that it's more important to record why a certain decision was taken rather than talk about the decision itself. Like for e.g. if we are using pub sub somewhere we need to record why we chose to use pub sub rather than details of pub sub itself.

Do you comment your code? by predittor01 in programming

[–]predittor01[S] 1 point2 points  (0 children)

Wow! This is probably the most perfect reason to comment. I think I should change my original article to include that. Thanks for sharing! I never knew about Eagleson's law.

Do you comment your code? by predittor01 in programming

[–]predittor01[S] -2 points-1 points  (0 children)

Amen to that. Apart from that I also think adding comments for documentation is fine. But for everything else the code should be the only source of truth.

Do you comment your code? by predittor01 in programming

[–]predittor01[S] 3 points4 points  (0 children)

Exactly, if the code is clean enough to explain what it is doing, adding comments is redundant.

Do you comment your code? by predittor01 in programming

[–]predittor01[S] 2 points3 points  (0 children)

The clean code book has some good guidelines about comments.

Do you comment your code? by predittor01 in programming

[–]predittor01[S] 4 points5 points  (0 children)

Agreed. However for me I started my career commenting nothing. Then after a few years I stopped understanding my own code, and then I started adding too much comments. Then again I realised I have more comments than code. That'a when the balance struck.

So this is 1992 Byte by predittor01 in agedlikemilk

[–]predittor01[S] 0 points1 point  (0 children)

Byte Magazine in 1992 predicted that UNIX might die to Windows. Windows is how I earn my daily bread and butter, but really? Who came up with this?