Selasa, 24 November 2009

The non-linear relationship of coding effort and results

The non-linear relationship of coding effort and results

This is counter-intuitive, so I don't think most users of software understand it.

Picture a situation like this: an app crashes every time you click a certain button. What does that say?

Well, a crash is a very bad thing, so it probably means a great deal of effort to fix it. It seems like there should be a relationship between the badness of a result and the time it would take to fix it.

But there isn't. Not necessarily, at least.

A crash can be the simple result of a single missing or mis-placed character. (A very embarrassing crash in NetNewsWire 3.2 was the result of a missing :. I think 3.2.1 differed from 3.2 only in that it added that : at the right place.)

There's another level of non-linearity: just because a fix is really, really, easy to implement (such as just adding a : at the right place) doesn't mean the level of effort is small. It may take a week to find exactly what the problem is. Once figured out, it may take 3 seconds to fix it.

Or... not. It may take only seconds to figure out the problem, and just a few more to fix it. Sometimes a crash log and a peek at the code are all that's required. Sometimes the worst, most obviously bad results have the quickest find-and-fix time. Sometimes.

What had me thinking about this was some coding I did over the weekend.

In a new operation (not in the current shipping version), I noted the app was allocating about 100MB of RAM, for something that should never have gone above about 50K or so.

About 10 minutes later I had it down to 4MB.

But I still need to get it down to about 50K — I still need to shave off about 4MB.

If it took 10 minutes to reduce memory usage by 96MB, then — were there a linear relationship — it should take under half a minute, less than 30 seconds, to go the rest of the way.

That's the way things work in the real world, after all. If you have 100 bags of leaves to carry out to the curb, each bag will take about the same amount of time as the others.

Instead, it will probably take me about two hours, maybe more, to get rid of that last 4MB.

It's almost as if you carried out 96 bags of leaves easily and quickly, then realized you can't get those last four bags, even though they're exactly the same as all the others, without pouring a new driveway first.

Which is crazy, right? If the real world operated like that all the time, we'd go completely nuts.

Anyway. Enough rambling.

Now it's time to do a prime number of handstands, then touch all the walls of my office (twice) with the index finger of my left hand, then iron my tinfoil hat, then get back to programming.

Lots to do.

Mon, 23 Nov 2009 12:26:55 -0800

To read the full article click here.

To unsubscribe from this feed, click here

To manage your other subscriptions, click here

Powered by RSS:Forward

Jumat, 20 November 2009

Get Chrome OS Now (PC World)

Get Chrome OS Now (PC World)

PC World - The open source version of Google Chrome OS was released on Thursday, and tech wizards didn't waste any time turning the code into a workable test version of the new operating system. If you don't want to wait until next year to see what's going on with Chrome OS, then follow this handy guide to find all the information you need to get the new system up and running on almost any computer.

Fri, 20 Nov 2009 19:02:00 GMT

To read the full article click here.

To unsubscribe from this feed, click here

To manage your other subscriptions, click here

Powered by RSS:Forward

California's Plasma-TV Ban Could Be Costly, CEA Warns (NewsFactor)

California's Plasma-TV Ban Could Be Costly, CEA Warns (NewsFactor)

NewsFactor - California's ban on plasma-screen televisions to reduce energy consumption could cost as much as $50 million per year in sales taxes because consumers are free to buy the sets online or in other states. "At a time when the state of California is facing its worst money crisis in history, this is going to be disastrous," said Jennifer Bemisderfer, a spokesperson for the Consumer Electronics Association, which lobbied against the ban.

Fri, 20 Nov 2009 22:22:11 GMT

To read the full article click here.

To unsubscribe from this feed, click here

To manage your other subscriptions, click here

Powered by RSS:Forward

Mac OS X 10.6.2 Hack Gets Atom Support Back (PC World)

Mac OS X 10.6.2 Hack Gets Atom Support Back (PC World)

PC World - Early last week, Apple released the 10.6.2 update to Snow Leopard loaded mostly with welcome, but unsurprising bug fixes, including a patch for the uncommon but extremely harmful user account deletion bug.

Fri, 20 Nov 2009 20:49:00 GMT

To read the full article click here.

To unsubscribe from this feed, click here

To manage your other subscriptions, click here

Powered by RSS:Forward

Sony hopes online service will build brand loyalty (AP)

Sony hopes online service will build brand loyalty (AP)

Sony Corp. Chief Executive Howard Stringer, center, Executive Deputy President Hiroshi Yoshioka, left, and Executive Vice President Kazuo Hirai smile as they show the company's latest products, digital still camera DSC-TX1, e-book 'Reader,' and a new remote controller for PlayStation 3, respectively, during a press conference in Tokyo Thursday, Nov. 19, 2009. Sony's new online service connecting the whole range of its gadgets to downloadable content like movies and games should help build brand loyalty, Hirai said Friday. (AP Photo/Shizuo Kambayashi)AP - Sony's new online service connecting the whole range of its gadgets to downloadable content like movies and games should help build brand loyalty, a top executive said Friday.


Fri, 20 Nov 2009 10:43:41 GMT

To read the full article click here.

To unsubscribe from this feed, click here

To manage your other subscriptions, click here

Powered by RSS:Forward

Yahoo jumps on Twitter bandwagon to improve search (AP)

Yahoo jumps on Twitter bandwagon to improve search (AP)

AP - Yahoo Inc. is jumping on the Twitter bandwagon in its latest attempt to get people to use its Internet search engine more frequently.

Thu, 19 Nov 2009 19:38:55 GMT

To read the full article click here.

To unsubscribe from this feed, click here

To manage your other subscriptions, click here

Powered by RSS:Forward

Google Chrome OS: A Simple FAQ (PC World)

Google Chrome OS: A Simple FAQ (PC World)

PC World - Everyone's all a-twitter over Google's newly announced operating system, Google Chrome OS. Some swear it'll be a hit; others are convinced it's destined for failure. Love it or hate it, though, this puppy's one tough piece of software to ignore.

Fri, 20 Nov 2009 22:44:00 GMT

To read the full article click here.

To unsubscribe from this feed, click here

To manage your other subscriptions, click here

Powered by RSS:Forward