Click here to Skip to main content
16,016,024 members

Survey Results

Do you optimise your code?   [Edit]

Survey period: 29 Nov 2004 to 5 Dec 2004

Do you optimise your code for speed, size or resource use? Or do you just let it all hang out?

OptionVotes% 
Yes, all the time27219.22
Yes, whenever I have the time or resources42930.32
Only when it's critical I do so45131.87
Occasionally1319.26
Never: I have no time or resources332.33
Never. What's the point?211.48
Never. I've never learned how.785.51



 
GeneralRe: Maximum Efficiency and Minimum Resource Utilization Pin
sreejith ss nair1-Dec-04 16:16
sreejith ss nair1-Dec-04 16:16 
GeneralRe: Maximum Efficiency and Minimum Resource Utilization Pin
diilbert2-Dec-04 9:46
diilbert2-Dec-04 9:46 
GeneralRe: Maximum Efficiency and Minimum Resource Utilization Pin
Ravi Bhavnani2-Dec-04 17:21
professionalRavi Bhavnani2-Dec-04 17:21 
GeneralEmbedded scandal! Pin
Bamaco229-Nov-04 11:57
Bamaco229-Nov-04 11:57 
GeneralRe: Embedded scandal! Pin
dr.justice29-Nov-04 19:52
dr.justice29-Nov-04 19:52 
GeneralOptimize for readability! Pin
Bamaco229-Nov-04 11:27
Bamaco229-Nov-04 11:27 
GeneralRe: Optimize for readability! Pin
sreejith ss nair29-Nov-04 21:16
sreejith ss nair29-Nov-04 21:16 
GeneralRe: Optimize for readability! Pin
Daniel Petersen3-Dec-04 4:01
Daniel Petersen3-Dec-04 4:01 
True Story:

I work at one of the largest contract electronics manufacturing companies in the world, and one of my responsibilities is to develop bar code label programs for our customer's products. When I first arrived I was horrified to find out that all of their bar code programs are still done on old DOS 16-bit machines, which are not networked. They literally have 200+ DOS PC's all holding mission critical data, which is not backed up anywhere, on old machines that barely run. When I looked at the programs, I was skeptical that the person who actually wrote them had a recent Computer Science degree, since the code was written at a level I would expect of a high school student.
What added insult to injury was this person was going to be my supervisor and I was required to program in the exact same manner that she did, and in so doing it usually took on the order of 3 days to write any given program. Over time I worked on improving the readability of the code and changing it so that all the highly repetitive sections are put into standard function call (all pretty basic stuff from CS 101). These improvements led to a library that when used allowed the same programs to be written in 3 hours instead of 3 days, and could be readily understood by people with only a basic understanding of C++. When my supervisor found out, she went ballistic, even though there was only ever 1 bug in the entire system (which took only 5 minutes to find and fix) she went to her boss and tried to claim that I had destroyed their entire system and none of the programs worked. I got chewed out BIG TIME Unsure | :~ even though I could prove that the programs' functionality had not been changed, only its readability, size, and speed. All programs that use the new library work great, but now I am only allowed to use it for programs that I write, and cannot change existing programs. My supervisor still codes in her old fashion. Funny, in the same time period of 3 months I have finished 20 projects and she has only finished 1, and it has lots of bugs. Yet she still remains adamant that her way is superior and that my method is totally wrong, go figure.D'Oh! | :doh:


Daniel Petersen

GeneralRe: Optimize for readability! Pin
Bamaco23-Dec-04 12:19
Bamaco23-Dec-04 12:19 
GeneralWhen it's needed.... Pin
Shog929-Nov-04 10:40
sitebuilderShog929-Nov-04 10:40 
GeneralRe: Very often required for embedded code. Pin
Jeff J29-Nov-04 6:48
Jeff J29-Nov-04 6:48 
GeneralGggggggggggggg... Pin
Kochise30-Nov-04 4:25
Kochise30-Nov-04 4:25 
GeneralNever, because...... Pin
Thomas Latuske29-Nov-04 6:48
Thomas Latuske29-Nov-04 6:48 
GeneralRe: Never, because...... Pin
Jim A. Johnson29-Nov-04 7:08
Jim A. Johnson29-Nov-04 7:08 
GeneralRe: Never, because...... Pin
Thomas Latuske29-Nov-04 7:27
Thomas Latuske29-Nov-04 7:27 
GeneralAll the time, or on a second pass at a minimum... Pin
James R. Twine29-Nov-04 5:01
James R. Twine29-Nov-04 5:01 
GeneralRe: All the time, or on a second pass at a minimum... Pin
patnsnaudy29-Nov-04 8:49
patnsnaudy29-Nov-04 8:49 
GeneralNetwork code... Pin
Navin29-Nov-04 3:04
Navin29-Nov-04 3:04 
GeneralOnly when needed Pin
ed welch29-Nov-04 2:36
ed welch29-Nov-04 2:36 
GeneralRe: Only when needed Pin
Jörgen Sigvardsson30-Nov-04 11:02
Jörgen Sigvardsson30-Nov-04 11:02 
GeneralGood programming style Pin
Roger Allen29-Nov-04 2:26
Roger Allen29-Nov-04 2:26 
GeneralRe: Good programming style Pin
Jim A. Johnson29-Nov-04 7:04
Jim A. Johnson29-Nov-04 7:04 
GeneralRe: Good programming style Pin
Jeff J29-Nov-04 8:06
Jeff J29-Nov-04 8:06 
GeneralRe: Good programming style Pin
Jörgen Sigvardsson30-Nov-04 11:08
Jörgen Sigvardsson30-Nov-04 11:08 
GeneralRe: Good programming style Pin
Nemanja Trifunovic30-Nov-04 12:47
Nemanja Trifunovic30-Nov-04 12:47 

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.