Schlemiel the Painter's algorithm: Difference between revisions

Content deleted Content added
Wookie2u (talk | contribs)
No edit summary
Line 1:
{{Essay-like|date=May 2008}}{{unencyclopedic}}
 
In computer science '''Schlemiel The Painter's Algorithm''' denotes an [[algorithm]] which repeatedly reprocesses content. This '''re'''processing is inefficient, which becomes problematic with repetition. The problem most commonly appears in string and buffer processing. The concept was coined by software engineer and computer science writer [[Joel Spolsky]], who used a Yiddish joke to illustrate the problem by way of [[analogy]]. In the joke, Schlemiel (also rendered Shlemiel) is painting a fence; his boss notes that he is slowing down alarmingly. When challenged, Schlemiel complains that he can't help it - "every day I get farther and farther away from the paint can!"<ref>http://www.joelonsoftware.com/articles/fog0000000319.html</ref>
 
The concept of the "schlemiel" struck a chord with programmers, becoming part of their vernacular vernacular.<ref>http://discuss.techinterview.org/default.asp?interview.11.246942.7</ref><ref>http://www.codinghorror.com/blog/archives/000957.html</ref> It has been cited as a good example of the entertaining, crystal-clear style that makes Spolsky's work accessible and enjoyable to non-programmers, making him one of the few "programming pros" to become notable outside of their field.<ref>http://dir.salon.com/story/tech/feature/2004/12/09/spolsky/</ref>
The algorithm is named after an anecdote about a person who is painting a fence. His progress keeps diminishing because he keeps a bucket of paint at one end of the fence, instead of moving the bucket to the part of the fence he is painting.
 
== An example ==