Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

COMMENT YOUR GOD DAMN CODE

Name: Anonymous 2010-06-15 11:46

Hi.

It has come to my attention that you faggots need to learn to comment your code. I'm looking at you, C fags, with your unreadable declarations.

char (*(*imafaggot)[])();

Tell me what this is and you win a prize.

Programs should be written for people to read, and only incidentally for machines to execute. - SICP 101

Name: Anonymous 2010-08-16 23:31

I make my code self-documenting, using good descriptive identifier names and well-factored methods/functions. I comment about non-obvious approaches or decisions I've made in writing the code to provide rational for why I did it that way. I also use doxygen to thoroughly document the public interfaces and APIs of my libraries.

But commenting every line or every few lines of code as the OP suggests is for the novice or amateur.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List