Linked by Thom Holwerda on Fri 28th Sep 2012 21:51 UTC, submitted by MOS6510
General Development "When I started writing programs in the late 80s it was pretty primitive and required a lot of study and skill. I was a young kid doing this stuff, the adults at that time had it even worse and some of them did start in the punch card era. This was back when programmers really had to earn their keep, and us newer generations are losing appreciation for that. A generation or two ago they may have been been better coders than us. More importantly they were better craftsmen, and we need to think about that." I'm no programmer, but I do understand that the current crop of programmers could learn a whole lot from older generations. I'm not going to burn my fingers on if they were better programmers or not, but I do believe they have a far greater understanding of the actual workings of a computer. Does the average 'app developer' have any clue whatsoever about low-level code, let alone something like assembly?
Permalink for comment 537033
To read all comments associated with this story, please click here.
RE: Get off my lawn!
by Alfman on Sun 30th Sep 2012 04:41 UTC in reply to "Get off my lawn!"
Alfman
Member since:
2011-01-28

ingraham,

I upvoted your post because I thought it was insightful. However...

"For example, after learning that add instructions are faster than multiply, a developer starts writing 'x+x+x' instead of '3*x' in their code. But adding is not TWICE as fast as multiplying, so he just slowed down his code."

It is silly to manipulate source code to optimise cases that can just as easily be handled by any respectable compiler, but I found your example ironically humorous because I performed this micro benchmark just now, and x+x+x was indeed faster than 3*x on my x86 processor. Only once I reached 4 did it become slower. The fastest solution by far was (x<<1)+x (this can be done in a single opcode on x86 btw).

Edit: Programers should be aware that the compiler already does these optimisations under the hood.

Edited 2012-09-30 04:47 UTC

Reply Parent Score: 4