Click here to Skip to main content
15,910,118 members

Survey Results

What most improves the readability of source code?   [Edit]

Survey period: 24 Mar 2008 to 31 Mar 2008

Reviewing or even learning someone else's code can be hard work. What's the best way to make code easily approachable for someone else?

OptionVotes% 
Obvious and intuitive names for variables, classes and methods64238.31
Clear and useful comments29417.54
Wise use of Whitespace945.61
Correct Spelling and grammar60.36
Limits on file, class and method sizes281.67
Clear and concise code logic and structure39323.45
The use of common coding patterns and practices1649.79

View optional text answers (58 answers)


 
GeneralRe: Narrative Pin
Shog924-Mar-08 13:57
sitebuilderShog924-Mar-08 13:57 
GeneralRe: Narrative Pin
Chris Maunder24-Mar-08 19:44
cofounderChris Maunder24-Mar-08 19:44 
GeneralRe: Narrative Pin
Shog925-Mar-08 7:36
sitebuilderShog925-Mar-08 7:36 
GeneralRe: Narrative Pin
firegryphon25-Mar-08 7:48
firegryphon25-Mar-08 7:48 
GeneralRe: Narrative Pin
Tim Yen25-Mar-08 13:12
Tim Yen25-Mar-08 13:12 
GeneralA lost art: Clear and concise code logic and structure Pin
Nemanja Trifunovic24-Mar-08 3:57
Nemanja Trifunovic24-Mar-08 3:57 
GeneralRe: A lost art: Clear and concise code logic and structure Pin
Shog924-Mar-08 6:47
sitebuilderShog924-Mar-08 6:47 
GeneralRe: A lost art: Clear and concise code logic and structure Pin
Alan Balkany25-Mar-08 3:21
Alan Balkany25-Mar-08 3:21 
I think part of the problem is that with the emphasis on object-oriented design in recent years, people have forgotten the lessons that have been learned about function-oriented design.

I see "object-oriented" code that has 500-line methods. As a method's length increases, its complexity increases faster than linear, as the number of possible interactions between the method's statements increasing quadratically. Ideally a method should fit on half a screen. If it’s too long, break it up into cohesive subroutines. A method’s structure should be so simple it’s self-documenting.
GeneralRe: A lost art: Clear and concise code logic and structure Pin
Shog925-Mar-08 7:37
sitebuilderShog925-Mar-08 7:37 
GeneralRe: A lost art: Clear and concise code logic and structure Pin
Tim Yen25-Mar-08 13:15
Tim Yen25-Mar-08 13:15 
GeneralBesides CListCtrl.NET ? Pin
W Balboos, GHB24-Mar-08 1:21
W Balboos, GHB24-Mar-08 1:21 
GeneralRe: Besides CListCtrl.NET ? Pin
Gary Wheeler25-Mar-08 7:18
Gary Wheeler25-Mar-08 7:18 
GeneralRe: Besides CListCtrl.NET ? Pin
W Balboos, GHB25-Mar-08 7:19
W Balboos, GHB25-Mar-08 7:19 
GeneralAll Of Above PinPopular
Gautam Jain23-Mar-08 20:25
Gautam Jain23-Mar-08 20:25 
GeneralRe: All Of Above Pin
Vasudevan Deepak Kumar24-Mar-08 0:20
Vasudevan Deepak Kumar24-Mar-08 0:20 
GeneralRe: All Of Above Pin
Ernest Laurentin24-Mar-08 4:34
Ernest Laurentin24-Mar-08 4:34 
GeneralSorry - that's too easy! Pin
Chris Maunder24-Mar-08 19:38
cofounderChris Maunder24-Mar-08 19:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.