News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Shlemiel the painter’s algorithm

Started by jj2007, April 27, 2018, 05:29:24 PM

Previous topic - Next topic

jj2007

QuoteShlemiel gets a job as a street painter, painting the dotted lines down the middle of the road. On the first day he takes a can of paint out to the road and finishes 300 yards of the road. "That's pretty good!" says his boss, "you're a fast worker!" and pays him a kopeck.

The next day Shlemiel only gets 150 yards done. "Well, that's not nearly as good as yesterday, but you're still a fast worker. 150 yards is respectable," and pays him a kopeck.

The next day Shlemiel paints 30 yards of the road. "Only 30!" shouts his boss. "That's unacceptable! On the first day you did ten times that much work! What's going on?"

"I can't help it," says Shlemiel. "Every day I get farther and farther away from the paint can!"

Credits to Joel CEO of SOF. Also a nice read: a cardinal, fundamental law of programming: It's harder to read code than to write it

I've searched the old and new forums, but it seems we never had a thread on optimising string concatenation... strange ::)

K_F

Shlemiel has never heard of Binary Trees,  or Sorting and Searching algorithms  ;)
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

hutch--

> we never had a thread on optimising string concatenation

Hmmmm, I may be able to help you here as I have just finished a technique in 32 bit code.