Joel Spolsky

From Wikipedia, the free encyclopedia
  (Redirected from Schlemiel the Painter's algorithm)
Jump to: navigation, search
Joel Spolsky
Joel Spolsky 2014-06-18.jpg
Joel Spolsky at the Stack Exchange London office, June 2014.
Born 1965 (age 52–53)
Albuquerque, New Mexico
Nationality American, New Zealand, Israeli, Dual citizenship[1]
Alma mater Yale University
Occupation Software developer
CEO, Stack Exchange Network
Co-founder, Fog Creek Software and Trello

Avram Joel Spolsky (born 1965) is a software engineer and writer. He is the author of Joel on Software, a blog on software development, and the creator of the project management software Trello.[2] He was a Program Manager on the Microsoft Excel team between 1991 and 1994. He later founded Fog Creek Software in 2000 and launched the Joel on Software blog. In 2008, he launched the Stack Overflow programmer Q&A site in collaboration with Jeff Atwood. Using the Stack Exchange software product which powers Stack Overflow, the Stack Exchange Network now hosts over 170 Q&A sites.


Spolsky grew up in Albuquerque, New Mexico, and lived there until he was 15.[3] He then moved with his family to Israel, where he attended high school and completed his military service in the Paratroopers Brigade.[3] He was one of the founders of the kibbutz Hanaton in Lower Galilee.[4] In 1987, he returned to the United States to attend college. He studied at the University of Pennsylvania for a year before transferring to Yale University, where he was a member of Pierson College and graduated in 1991 with a BS summa cum laude in Computer Science.[3]

Spolsky started working at Microsoft in 1991[5] as a Program Manager on the Microsoft Excel team, where he designed Excel Basic and drove Microsoft's Visual Basic for Applications strategy.[6] He moved to New York City in 1995 where he worked for Viacom and Juno Online Services.[3] In 2000, he founded Fog Creek Software and created the Joel on Software blog.[5] Joel on Software was "one of the first blogs set up by a business owner".[7]

In 2005, Spolsky co-produced and appeared in Aardvark'd: 12 Weeks with Geeks, a documentary documenting Fog Creek's development of Project Aardvark, a remote assistance tool.[8]

Spolsky also co-founded Stack Overflow,[9] a question and answer community website for software developers, with Jeff Atwood. He is now CEO of the resulting Stack Overflow and the Stack Exchange Network.[10]

In 2011, Spolsky launched Trello, an online project management tool inspired by Kanban methodology.[11]

In 2016, Spolsky announced the appointment of Anil Dash as Fog Creek Software's new CEO, with Spolsky continuing as Stack Overflow's CEO and as a Fog Creek Software board member.[12]

He is the author of five books, including User Interface Design for Programmers and Smart and Gets Things Done. He is also the creator of "The Joel Test".[13]

Spolsky coined the term fix it twice for a process improvement method. It implies a quick, immediate solution for fixing an incident and a second, slower fix for preventing the same problem from occurring again by targeting the root cause.[14] His use of the term Shlemiel the painter's algorithm, referring to an algorithm that is not scalable due to performing too many redundant actions, was described by's Scott Rosenberg as an example of good writing "about their insular world in a way that wins the respect of their colleagues and the attention of outsiders."[15]

Spolsky recently made an appearance at the WeAreDevelopers Conference 2017, stating how developers are writing the script for the future.[16] In his speech, Spolsky talks about how software is eating the world, how it is becoming more evident in everyday life as people interact with more software on a day-to-day basis, and how developers are helping to shape how the world will work as technology keeps evolving. He uses the metaphor "we are just little vegetables floating in software soup", referring to our constant use of software for the most mundane activities, including work, social networking, and even taking a cab.

Personal life[edit]

Spolsky announced his marriage to his husband, Jared, on social media and his blog.[17][18][19] He lives on the Upper West Side of Manhattan.[17]

Schlemiel the Painter's algorithm[edit]

In software development, a Shlemiel the painter's algorithm (sometimes, Shlemiel the painter algorithm) is a method that is inefficient because the programmer has overlooked some fundamental issues at the very lowest levels of software design. The term was coined in 2001 by Spolsky. The term is completely unrelated to the "Painter's algorithm", which is used in image compositing.


Spolsky used a Yiddish joke to illustrate a certain poor programming practice. In the joke, Schlemiel (also rendered Shlemiel) has a job painting the dotted lines down the middle of a road. Each day, Schlemiel paints less than he painted the day before. When he is asked why, Schlemiel complains that it is because each day he gets farther away from the paint can, and it takes him longer to go back and put paint on his brush each time.[20]

The inefficiency to which Spolsky was drawing an analogy was the poor programming practice of repeated concatenation of C-style null-terminated character arrays (that is, strings) in which the position of the destination string has to be recomputed from the beginning of the string each time because it is not carried over from a previous concatenation.

Spolsky condemned such inefficiencies as typical for programmers who had not been taught basic programming techniques before they began programming using higher level languages: "Generations of graduates are descending on us and creating Schlemiel The Painter algorithms right and left and they don't even realize it, since they fundamentally have no idea that strings are, at a very deep level, difficult."[20]


The programming practice that Spolsky used to make his point was repeated concatenation of null-terminated character arrays ("strings").[20]

The first step in every implementation of the standard C library function for concatenating strings is determining the length of the first string by checking each character in the array, starting from the beginning, to see if it is the terminating null character. Next, the second string is copied to the end of the first, effectively concatenating the two. At the end of the concatenation, the length of the combined string is discarded upon return to the calling code.

In Spolsky's example, the "Schlemiels" occur when multiple strings are concatenated together:

1     strcat( buffer, "John" );    // Here, the string "John" is appended to the buffer
2     strcat( buffer, "Paul" );    // Now the string "Paul" is appended to that
3     strcat( buffer, "George" );  // ... and "George" is appended to that
4     strcat( buffer, "Ringo" );   // ... and "Ringo" is appended to that

After "Paul" has been appended to "John", the length of "JohnPaul" (or, more precisely, the position of the terminating null character) is known within the scope of strcat() but is discarded upon its return to the point after Paul and before George. Afterwards, when strcat() is told to append "George" to "JohnPaul", strcat() starts at the very first character of the array ("J") all over again just to find the terminating null character. Each subsequent call to strcat() has to compute the length again before concatenating another name to the buffer.

Analogous to Schlemiel not carrying the paint-bucket (or the string's length) with him, all the subsequent strcat()s have to "walk" the length of the string again to determine where the second string should be copied. As more data is added to buffer with each call to strcat(), that terminating null character also gets farther away from the beginning, meaning subsequent calls are increasingly slow—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."[20]


  • Spolsky, Joel (2001). User Interface Design for Programmers. Apress. ISBN 1-893115-94-1. 
  • Spolsky, Joel (2004). Joel on Software: And on Diverse and Occasionally Related Matters That Will Prove of Interest to Software Developers, Designers, and Managers, and to Those Who, Whether by Good Fortune or Ill Luck, Work with Them in Some Capacity. Apress. ISBN 1-59059-389-8. 
  • Spolsky, Joel (2005). The Best Software Writing I: Selected and Introduced by Joel Spolsky. Apress. ISBN 1-59059-500-9. 
  • Spolsky, Joel (2007). Smart and Gets Things Done: Joel Spolsky's Concise Guide to Finding the Best Technical Talent. Apress. ISBN 1-59059-838-5. 
  • Spolsky, Joel (2008). More Joel on Software: Further Thoughts on Diverse and Occasionally Related Matters That Will Prove of Interest to Software Developers, Designers, and to Those Who, Whether by Good Fortune or Ill Luck, Work with Them in Some Capacity. Apress. ISBN 1-4302-0987-9. 

See also[edit]


  1. ^ Spolsky, Joel; Atwood, Jeff (July 8, 2008). "Stack Overflow podcast #13". Retrieved August 4, 2013. 
  2. ^ Joel Spolsky interviewed on the TV show Triangulation on the network
  3. ^ a b c d Spolsky, Joel (October 30, 2005). "About Joel Spolsky". Joel on Software. Retrieved August 4, 2013. 
  4. ^ Spolsky, Joel. "Joel Spolsky". Retrieved August 4, 2013. 
  5. ^ a b Livingston, Jessica (2007). "Interview: Joel Spolsky Co-Founder, Fog Creek Software". Founders at Work: Stories of Startups' Early Days. Apress. ISBN 9781590597149. Retrieved August 4, 2013. 
  6. ^ "An Interview with Joel Spolsky". Archived from the original on August 9, 2007. Retrieved August 4, 2013. 
  7. ^ Spolsky, Joel. "How Hard Could it Be". Inc. Retrieved August 4, 2013. 
  8. ^ "Joel Spolsky". Internet Movie Database. Retrieved August 4, 2013. 
  9. ^ Atwood, Jeff (April 16, 2008). "Introducing". Coding Horror. Retrieved August 4, 2013. 
  10. ^ "Management Team". Stack Exchange Network. Retrieved August 4, 2013. 
  11. ^ Spolsky, Joel (January 6, 2012). "How Trello is different". Retrieved August 4, 2013. 
  12. ^ Spolsky, Joel (December 6, 2016). "Anil Dash is the new CEO of Fog Creek Software". Retrieved December 11, 2016. 
  13. ^ The Joel Test
  14. ^ Spolsky, Joel (February 19, 2007). "Seven steps to remarkable customer service". Retrieved August 4, 2013. 
  15. ^ Rosenberg, Scott (December 9, 2004), The Shlemiel way of software, .
  16. ^
  17. ^ a b "About Joel Spolsky". Retrieved 27 June 2015. 
  18. ^ "stackoverflow". Retrieved 27 June 2015. 
  19. ^ "Untitled (Joel Spolsky on Twitter)". Retrieved 27 June 2015. 
  20. ^ a b c d Spolsky, Joel (December 11, 2001), Back to Basics, Joel on Software, .

External links[edit]