I was browsing some old code that I wrote (first year in the university) and noticed that I used to write comment titles preceeding various parts of the code. Stuff like (this is from a Monopoly game):
/*Board initialization*/
...code...
/*Player initialization*/
...code...
/*Game logic starts here*/
/*Displaying current situation*/
...code...
/*Executing move*/
...code...
/*Handle special event*/
...code...
/*Commit changes, switch to next player*/
...code...
This might be redundant, and arguably unnecessary if the code is really super clear, but as I scanned through the file it surprised me how strongly I felt like I know what's going on even though I hardly looked at the actual code. I can definitely see this as being fitting in certain circumstances, so I wonder- do you do this? Do you think it's a good idea? Or is it too much?
