<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16470"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=412064219-19032013><FONT color=#0000ff
size=2 face="Courier New">You're right of course. Clearly <FONT color=#000000
size=3 face="Times New Roman">Brian Kernigan</FONT></FONT><FONT
face="Courier New"><FONT size=2><FONT color=#0000ff> was referring to something
like you describe. Nevertheless I couldn't help arguing that that type of
cleverness is stupid. I started programming late 60ties begin 70ties and always
have had trouble convincing my colleages to think/design/document and talk with
future users before coding. If you wish you can interpret my comment as a
frustration that I felt like a profet in the
desert.</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=412064219-19032013></SPAN><SPAN
class=412064219-19032013><FONT face="Courier New"><FONT size=2><FONT
color=#0000ff>Jos</SPAN></DIV></FONT></FONT></FONT><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Laurent
[mailto:laurent.orseau@gmail.com] <BR><B>Sent:</B> martes, 19 de marzo de 2013
8:20<BR><B>To:</B> Jos Koot<BR><B>Cc:</B> Harry Spier;
users<BR><B>Subject:</B> Re: [racket] OFFTOPIC - Quote on
Programming<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>
<DIV>
<DIV>I think "clever" here is meant in the "smart-ass" sense.<BR></DIV>
<DIV><BR></DIV>
<DIV>Let me take this smart-ass definition to be measured by how much you
write "compressed" code (in the sense of Kolmogorov complexity, which
incomputability fits well with the cleverness).<BR></DIV>You have a
compression function C: Program -> Program which compresses a program to
the best /you/ can in reasonable time.<BR>So we have, for any program p you
write, the length l(p) is greater or equal to the length l(C(p)).<BR>Now say
you are able to debug a program p only if l(p) > C(p) + N bits (we are in
log scale, so addition instead of twice).<BR>Then if you compress a program to
the most /you/ can, i.e. you write a program p so that l(p) = C(p), then
you're screwed for debugging it.<BR><BR></DIV>
<DIV>I.e., between "Never write the same code twice" and "Compress your
programs as much as possible", there's a line one should not cross.<BR></DIV>
<DIV><BR></DIV>Laurent<BR></DIV>
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>On Tue, Mar 19, 2013 at 6:20 AM, Jos Koot <SPAN
dir=ltr><<A href="mailto:jos.koot@gmail.com"
target=_blank>jos.koot@gmail.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote><U></U>
<DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff face="Courier New">Well,
that may depend on how you define "clever code". Surely it is clever to
write well documented code that can easily be understood, debugged,
maintained and reused by yourself and by others. Understanding may require
knowledge of the discipline the code is written for, of course. In
my opinion it helps a lot first finishing the documentation and the
design (both user and 'inside' docs) before starting coding. With good
and well described design it is even possible to leave the coding to another
person, just like an architect designs a building and constructors build
it.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff face="Courier New">My 2c,
Jos</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us align=left>
<HR>
<FONT face=Tahoma><B>From:</B> <A
href="mailto:users-bounces@racket-lang.org"
target=_blank>users-bounces@racket-lang.org</A> [mailto:<A
href="mailto:users-bounces@racket-lang.org"
target=_blank>users-bounces@racket-lang.org</A>] <B>On Behalf Of </B>Harry
Spier<BR><B>Sent:</B> martes, 19 de marzo de 2013 2:56<BR><B>To:</B>
users<BR><B>Subject:</B> [racket] OFFTOPIC - Quote on
Programming<BR></FONT><BR></DIV>
<DIV class=im>
<DIV></DIV>
<DIV>I found this quote on a blog and couldn't help sharing it
:-)<BR></DIV>
<DIV><BR></DIV>
<DIV>"Debugging is twice as hard as writing the code in the first place.
Therefore if you write the code as cleverly as possible, you are by
definition not smart enough to debug it." Brian
Kernigan</DIV></DIV></BLOCKQUOTE></DIV><BR>____________________<BR>
Racket Users list:<BR> <A href="http://lists.racket-lang.org/users"
target=_blank>http://lists.racket-lang.org/users</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></BODY></HTML>