Has Moore's Law made us lazy developers?

So, my shower thought this morning: Has Moore's Law made us lazy developers?

Jumping back a sec to explain a bit, I was reading Plip's blog about how your windows look and the side bar application caught my eye. Being one that's always interested in more eye candy and nifty toys, I ran out and installed it immediately. I've been playing with it, and tweaking it for the days when I realized that it's taking up around 50MBs of memory.

I was amazed. I tried removing a few panels and modules and tweaking it down a bit. But, to no real avail.

And, okay, 50MBs is nothing on my desktop that has 1GB of RAM. But, still, when did this become acceptable? I understand memory usage is relative. And, with our old TRS-80's from when I was a kid has little-to-no RAM, but I just found this interesting.

It makes me wonder if developers these days still worry about writing as efficient code as possible and conserving as much memory as they can, or do they chalk it up to Moore's Law and just say, “Add more memory!”

Of course, this isn't a new topic. I'm not being terribly insightful or thinking a new thought or raising a new question. I'm just curious and reiterating the same concerns, I suppose.

Anyways, I'm rambling now...

Filed under: ,

Comments

# Mike said:

Generally speaking, yes. One of the unofficial parts of my job description is 'clean up crappy algorithms'. It's not even a language dependant phenomena anymore.

The days of writing your own string handling code in your intro C or C++ class may be over. Theoretically this is great, but leads to no end of trouble when people become overly dependant on cookie cutter string classes and then cringe when the application doesn't scale as well as it should and, of course, they can't see anyway out of the predicament. That's just one issue I've come across numerous times.

Another contributor is the availability of a library for just about everything. Generally speaking, a solidly performing and well tested library is a great thing. But you have to pick the right one for the right job. One of my projects was moving some XML parsing to use SAX and native arrays instead of DOM to speed up the performance of one of our applications. Everybody thought I was nuts until things that used to take well over 5 minutes to load got done in about 40 seconds.

Is the code harder to maintain? Probably. It certainly isn't as clear as the DOM implementation. But the customers sure are a lot happier and at the end of the day, they are the guys paying the bills.

Avoiding premature optimization is fine, as long as it isn't used as a crutch to write crappy algorithms and use poorly performing methods when you know of a better way and it is pretty obvious that there will be a problem.

Anyway, I'm starting to ramble now...

Friday, July 09, 2004 5:12 PM
# Guido said:

Ahh, the good old days. UNIX Version 7 ran comfortably in 64k. Bill Gates would state that 640k was enough for anyone. A DEC salesman would tell me that a gentleman didn't need more than 64k.

I've been teaching computer science for about 20 years, and a little over 10 years ago I saw a shift. Students used to care about writing efficient code, and suddenly (perhaps like the Great Vowel Shift, but faster) they didn't care. Memories were getting larger, CPUs faster, and libraries like STL (Thanks a hell of a lot Alex Stepanov).

Some of the students still care, but most don't. I've learned that I am training two classes of people: computer scientists, and web monkeys. The former understand algorithms and the later just slap code together from parts. They're glue programmers.

Let's hope the Indians in Bangalore have a better programming ethic. I dispair at what I am seeing in the current generation of American programmers.

Sunday, July 11, 2004 3:10 PM

Leave a Comment

(required) 
(required) 
(optional)
(required)