Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Larry Ullman... on Programming Efficiency  (Read 7046 times)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Larry Ullman... on Programming Efficiency
« on: May 07, 2008, 03:11:42 pm »

Question: Is it still that important for programs to be efficient?

Larry Ullman is the author PHP and MySQL for Dynamic Websites (Peachpit Press) and several other credible publications.
The following is Larry's answer...

This is a very interesting and timely question. The writer's original question was longer: "With the advances in processing power and memory is it really important to make programs that utilize them efficiently? Will we really notice the performance difference?"

This is a topic that everyone should consider. The immediate answer most people would come up with is "Of course programs should still be efficient" and naturally that's true, but the real question is a matter of how much emphasis should be put on efficiency, and my answer is "Probably not as much as you think."

For example, in PHP, there are certain easy steps you can take to make a program more efficient (such as only connecting to a database when necessary, caching pages, etc.), but I almost always caution people against taking efficiency much past the larger picture. In all likelihood, all of the extra effort would only improve the performance by a minuscule amount. The same is true for most technologies. One of the things that makes Ruby's approach stand out is that the creator started with the understanding that the programmer's time is more valuable than the computer's, so he focused on creating a language that one could program in efficiently, even if that meant that it executed somewhat less so. And this leads me to another point: the technologies selected for a project will probably have a greater impact on the performance than any tweaking you do (although, to be fair, sloppy programming in any language will always be worse than good programming).

Secondarily, outside considerations will likely have a greater impact. I just bought a new computer and rather than spend any time trying to get it to run as efficiently as possible (e.g., by enabling or disabling features), I dropped another $70 (US) to double the amount of RAM from 2GB to 4GB (and getting 4GB of laptop RAM for only $70 is gluttonous).

So, in short, my advice would be to pay attention to a program's (or site's) overall efficiency without spending too much effort on the little details. An exception would be made for very, very, very popular sites, where a small tweak in performance makes a huge difference to the server. For example, Yahoo! gets 3.5 billion hits a day. Any slight improvement to their site really does matter. For most people, projects, and sites, though, that is not the case.

« Last Edit: May 07, 2008, 03:15:45 pm by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: Larry Ullman... on Programming Efficiency
« Reply #1 on: May 07, 2008, 05:59:38 pm »

Thank you Sir, a very (advised) good point of view.

Quote
Question: Is it still that important for programs to be efficient?

Of course not much, just enough :P.

Is like tunning your car. Even if is only for show or weekend. I think that my site have a better importance than yahoo.com. In fact, no other sites count that much. And my site must have the best chrome and tires... and a very powerful custom engine (sNews one, if is affordable). That is the reason I am almost every day at snewscms.com shop and showroom. Looking for parts... learning tricks, sharing experience with this great community. Ah, I saw you today at showroom...  giving autographs ... presenting two great custom cars,
sNews 1.6 MESU | sNews 1.6 MEMU

 ;D
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: Larry Ullman... on Programming Efficiency
« Reply #2 on: May 07, 2008, 07:45:52 pm »

Ah, I saw you today at showroom...  giving autographs ... presenting two great custom cars,
sNews 1.6 MESU | sNews 1.6 MEMU

 ;D

Yeah... those two... are major byte guzzlers compared to 1.7RC  ;D
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

jared351

  • Sr. Member
  • ****
  • Karma: 4
  • Posts: 276
Re: Larry Ullman... on Programming Efficiency
« Reply #3 on: May 08, 2008, 01:16:30 am »

Yeah... those two... are major byte guzzlers compared to 1.7RC  ;D
;D ;D

Thanks for the great read Keyrocks.
Logged

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: Larry Ullman... on Programming Efficiency
« Reply #4 on: May 08, 2008, 02:52:58 am »

Efficiency...

had a thought the other day about efficiency and coding... and systems improvements... since my first humble computer experiences.

The entire Windows Operating System fit on a single floppy disk. Cassette recorders for "mass storage". Remember Punch Cards???

I really don't concern myself with writing the most efficient code since the systems they run on are so bloody 'oversized' and quick compared to the scarce resources once available. When you had a limit to the RAM and core, it mattered. Now it matters very little.

Of course, that doesn't mean that I write bad code on purpose... :)
Logged
Yes! I have no siggy.