[racket] OFFTOPIC - Quote on Programming

From: Jos Koot (jos.koot at gmail.com)
Date: Tue Mar 19 16:11:10 EDT 2013

You're right of course. Clearly Brian Kernigan 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.
Jos


  _____  

From: Laurent [mailto:laurent.orseau at gmail.com] 
Sent: martes, 19 de marzo de 2013 8:20
To: Jos Koot
Cc: Harry Spier; users
Subject: Re: [racket] OFFTOPIC - Quote on Programming


I think "clever" here is meant in the "smart-ass" sense.


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).

You have a compression function C: Program -> Program which compresses a
program to the best /you/ can in reasonable time.
So we have, for any program p you write, the length l(p) is greater or equal
to the length l(C(p)).
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).
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.


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.


Laurent



On Tue, Mar 19, 2013 at 6:20 AM, Jos Koot <jos.koot at gmail.com> wrote:



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.
My 2c, Jos


  _____  

From: users-bounces at racket-lang.org [mailto:users-bounces at racket-lang.org]
On Behalf Of Harry Spier
Sent: martes, 19 de marzo de 2013 2:56
To: users
Subject: [racket] OFFTOPIC - Quote on Programming


I found this quote on a blog and couldn't help sharing it :-)


"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


____________________
  Racket Users list:
  http://lists.racket-lang.org/users




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130319/c01308ff/attachment.html>

Posted on the users mailing list.