Subj : Re: Syntax, style, the infinite monkey theorum and coding To : comp.programming From : Rob Thorpe Date : Mon Aug 22 2005 03:49 am gswork@mailcity.com wrote: > Rob Thorpe wrote: > > gswork@mailcity.com wrote: > [] > > > Code snippets with that 'monkeys' feel are kind of like modern art - > > > you're aware that it's supposed to mean something and that it may well > > > be very clever, but you can't help feeling that a 3 year old, or indeed > > > a money, would happily and readily, but unintentially, hammer out the > > > exact same! > > > > The message cracker macros look a bit this way: > > http://www.csee.umbc.edu/~squire/download/WindowsX.h > > This one has a kind of rythm to it, something un-random. Lovely use > of CAPITALS though. The casts are really nice. For instance the three consecutive casts will do exactly the right thing on every Windows. E.g.:- #define FORWARD_WM_CTLCOLORSCROLLBAR(hwnd, hdc, hwndChild, fn) \ (HBRUSH)(UINT)(DWORD)(fn)((hwnd), WM_CTLCOLORSCROLLBAR, (WPARAM)(HDC)(hdc), (LPARAM)(HWND)(hwndChild)) The really interesting bit is why. > > So does anything written in TECO. > > http://en.wikipedia.org/wiki/Text_Editor_and_Corrector > > That's a wonder to behold > > qz"g 0uz @o/START/ ' > > Little code gets more 'thousand monkeys' than this! I believe it was a ritual amongst users of TECO to type in their name as a command to see what it does. Any string is a set of TECO commands that will do something, even if it's something strange. .