Click here to Skip to main content
15,896,606 members

Survey Results

Is the way source code looks as important as how it runs?   [Edit]

Survey period: 29 Jul 2002 to 4 Aug 2002

Some people are code formatting nuts while others feel that as long as it's tight it's good enough. What's your opinion?

OptionVotes% 
Formatting is most important because nothing's worth doing if you don't look good doing it.756.22
Formatting is important because it makes optimisation, bug fixing etc. easier.64453.44
They are both equally important.34328.46
Performance over good looks. The user doesn't see the code.1068.80
It was hard to write so it should be even harder to read.221.83
I really don't care.151.24



 
GeneralRe: VS 7 IDE speed Pin
Ellery Familia2-Aug-02 19:36
Ellery Familia2-Aug-02 19:36 
GeneralRe: VS 7 IDE speed Pin
Anders Molin3-Aug-02 0:38
professionalAnders Molin3-Aug-02 0:38 
GeneralRe: VS 7 IDE speed Pin
Paul A. Howes3-Aug-02 2:50
Paul A. Howes3-Aug-02 2:50 
GeneralRe: VS 7 IDE speed Pin
Daniel Turini3-Aug-02 3:21
Daniel Turini3-Aug-02 3:21 
GeneralRe: VS 7 IDE speed Pin
Anna-Jayne Metcalfe4-Aug-02 12:52
Anna-Jayne Metcalfe4-Aug-02 12:52 
GeneralRe: VS 7 IDE speed Pin
Marc Clifton31-Jul-02 11:42
mvaMarc Clifton31-Jul-02 11:42 
GeneralRe: VS 7 IDE speed Pin
Pavel Sokolov31-Jul-02 12:13
Pavel Sokolov31-Jul-02 12:13 
GeneralRe: VS 7 IDE speed Pin
Jim A. Johnson31-Jul-02 12:33
Jim A. Johnson31-Jul-02 12:33 
Marc Clifton wrote:
And if you change the DWORD to a WORD, do you diligently search and replace all references to the variable name with the corrected name? Maybe you do, but I bet a lot of other people don't.

Actually, I do that, and have no problem with it. If I'm changing the size of something, it's not a bad idea to go look at all usages of it as part of the change; it usually only takes a few minutes. Might as well change them whild looking.

Marc Clifton wrote:
Isn't this why we have getter/setter methods, so we don't need to concern ourselves with internal implementation, and therefore don't care about the storage mechanism?

As nice as that sounds, frequently we do care about the storage mechanism. For example, in communicating with external devices - whether they be musical instruments as in my work, or files, whatever - the size of storage is frequently hard-coded and must be respected. Sometimes data must be passed through a pipe of fixed size.. in which case data may be truncated and precision or sign lost.

Here's another example: I work in a typical mixed environment, with character strings represent in various APIs as either char*, CString, or STL string. Frequently I have to deal with two or even all three types in the same chunk of code, all referring to the same text. In this case specific prefixes are very helpful.
GeneralRe: VS 7 IDE speed Pin
paulccc2-Aug-02 7:05
paulccc2-Aug-02 7:05 
GeneralRe: VS 7 IDE speed Pin
Pavel Sokolov2-Aug-02 8:52
Pavel Sokolov2-Aug-02 8:52 
GeneralRe: VS 7 IDE speed Pin
Pavel Sokolov2-Aug-02 8:54
Pavel Sokolov2-Aug-02 8:54 
GeneralRe: VS 7 IDE speed Pin
Jason.King.Work@gmail.com2-Aug-02 9:21
Jason.King.Work@gmail.com2-Aug-02 9:21 
GeneralRe: VS 7 IDE speed Pin
Chris Maunder31-Jul-02 14:04
cofounderChris Maunder31-Jul-02 14:04 
GeneralRe: VS 7 IDE speed Pin
Ed Gadziemski3-Aug-02 4:05
professionalEd Gadziemski3-Aug-02 4:05 
GeneralEntropy Rules Pin
Stan Shannon29-Jul-02 9:22
Stan Shannon29-Jul-02 9:22 
GeneralRe: Entropy Rules Pin
Daniel Lohmann31-Jul-02 9:12
Daniel Lohmann31-Jul-02 9:12 
GeneralRe: Entropy Rules Pin
Chris Maunder31-Jul-02 14:08
cofounderChris Maunder31-Jul-02 14:08 
GeneralRe: Entropy Rules Pin
ColinDavies31-Jul-02 17:35
ColinDavies31-Jul-02 17:35 
GeneralRe: Entropy Rules Pin
Paul Watson4-Aug-02 1:41
sitebuilderPaul Watson4-Aug-02 1:41 
GeneralRe: Entropy Rules Pin
George4-Aug-02 3:02
George4-Aug-02 3:02 
GeneralFormatting is important because.... Pin
Roger Allen29-Jul-02 5:30
Roger Allen29-Jul-02 5:30 
GeneralRe: Formatting is important because.... Pin
James R. Twine29-Jul-02 7:42
James R. Twine29-Jul-02 7:42 
GeneralRe: Formatting is important because.... Pin
Armen Hakobyan29-Jul-02 11:31
professionalArmen Hakobyan29-Jul-02 11:31 
GeneralRe: Formatting is important because.... Pin
UltraJoe30-Jul-02 1:49
UltraJoe30-Jul-02 1:49 
GeneralRe: Formatting is important because.... Pin
Armen Hakobyan30-Jul-02 6:37
professionalArmen Hakobyan30-Jul-02 6:37 

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.