Schlemiel the Painter's algorithm: Difference between revisions

Content deleted Content added
SmackBot (talk | contribs)
m Dated {{Notability}}. (Build p608)
Spolsky's example: Hyphenated "high level"
Line 30:
Analogous to Schlemiel's not carrying the paint-bucket (or the string's length) with him, all the subsequent <code>strcat()</code>s have to again "walk" the length of the string to determine where the second string should be copied. As more data is added to <code>buffer</code>, that terminating null character also gets farther away from the beginning with each call to <code>strcat()</code>, meaning more checks must be taken to find that character and subsequent calls are increasingly slower&mdash;just as "Schlemiel's" path to his bucket keeps getting longer.
 
The problems illustrated by Spolsky's example are not noticed by a programmer who is using a high -level language and has little or no knowledge of its underlying principles and functions. "Some of the biggest mistakes people make even at the highest architectural levels come from having a weak or broken understanding of a few simple things at the very lowest levels."<ref name="basics" />
 
== References ==