Explain SMBC — the wiki for Saturday Morning Breakfast Cereal

2012-12-21

2012-12-21 View on smbc-comics.com → 1 revision
2012-12-21
Votey panel for 2012-12-21
This explanation is incomplete or may contain errors. It was generated by AI and has not yet been reviewed by a human editor.

Explanation

This comic imagines a caveman-era computer science class where a teacher asks students to explain the "frogSort" algorithm. A student describes a sorting algorithm that uses frogs: you place a number of dead flies in each box corresponding to each integer, then put a frog in each box. Since more flies take longer to eat, the frogs leave the boxes in order from fewest to most flies, producing a sorted list. When asked the maximum number of steps, another student answers "log_frog(boxes)." The teacher assigns homework to "program frogSort on home frogputer," and later a frustrated student complains about getting an "off-by-frog error."

The comic is a wonderful computer science parody that translates real concepts into a caveman/frog idiom. "FrogSort" is an analog of real sorting algorithms (it resembles a biological version of sleep sort, where items are sorted by assigning delays proportional to their values). The "log_frog(boxes)" complexity answer parodies algorithmic complexity notation like O(n log n). The "off-by-frog error" is a play on the "off-by-one error," one of the most common and frustrating bugs in programming. The humor works on multiple levels: the absurdity of cavemen doing computer science, the surprisingly coherent algorithm design using frogs, and the fact that programming frustrations are apparently universal across all of human history.

View History (1) Original Comic
← Previous Comic Next Comic →