What are some advanced concepts in programming that most average programmers have never...

Quora Feeds

Active Member
Rodrigo Irigoyen


Code optimization

I really think programmers should be taught to code on a pre-Pentium machine, or maybe PIC programming. I’m currently fixing a code because they decided to have all the string fields as Text(255). I constantly have to re-arrange “for” or “if”s, add returns, continue, and break to other people’s code.

People don’t realize that all those little “it is just a ms”, “it is just one bite” are multiplied by thousands or millions. And then they complain “the page takes 20 seconds to load, can you help me see where is the error?”, “my db space is running low can you help me identify the table with the issue”, “when we hit 200 users the app crashes, can you identify what is wrong with that user?”. They think it is only one in one single place, it is everywhere.

I remember a game programming book where they take about 5 pages explaining why use a nested “for(x=..) for(y=…)” instead of for(y=..) for(x=…)”
(it had to do with the time it takes to calculate a “sin(a)” vs a “a+b”)

You don’t see those kind of details on any book, and I see people laughing at questions that ask “what is faster a or b”.

Don’t believe me? When was the last time you used a byte instead of an int to store small numbers.. eg: int age. Do you think there is going to be a guy with more than 255 years?



See Questions On Quora

Continue reading...
 
Top