<p>Matthias</p>
<p>I did basic BASIC on Tandy Color Computer 2 many years ago. Never had the right opportunity to learn programming since.</p>
<p>Steve</p>
<div class="gmail_quote">On Jul 10, 2013 11:31 PM, <<a href="mailto:users-request@racket-lang.org">users-request@racket-lang.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Send users mailing list submissions to<br>
<a href="mailto:users@racket-lang.org">users@racket-lang.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.racket-lang.org/users/listinfo" target="_blank">http://lists.racket-lang.org/users/listinfo</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:users-request@racket-lang.org">users-request@racket-lang.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:users-owner@racket-lang.org">users-owner@racket-lang.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of users digest..."<br>
<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>
<br>
Today's Topics:<br>
<br>
1. Re: Why experienced programmers don?t use comments?<br>
(Neil Van Dyke)<br>
2. Re: Why experienced programmers don?t use comments?<br>
(Richard Cleis)<br>
3. Re: Why experienced programmers don?t use comments? (Ben Duan)<br>
4. define-generics #:defaults (Bert De Ketelaere)<br>
5. Newbie's Dilemma (Steve Lett)<br>
6. Re: Newbie's Dilemma (Matthias Felleisen)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 09 Jul 2013 12:34:45 -0400<br>
From: Neil Van Dyke <<a href="mailto:neil@neilvandyke.org">neil@neilvandyke.org</a>><br>
To: users <<a href="mailto:users@racket-lang.org">users@racket-lang.org</a>><br>
Subject: Re: [racket] Why experienced programmers don?t use comments?<br>
Message-ID: <<a href="mailto:51DC3BA5.3040308@neilvandyke.org">51DC3BA5.3040308@neilvandyke.org</a>><br>
Content-Type: text/plain; charset=UTF-8; format=flowed<br>
<br>
Five categories of comments I currently use in Racket (refined over the<br>
years, and still sometimes refined further):<br>
<br>
1. Comments prefixed with "TODO:", for things that either I know have to<br>
be done, or that I might want to consider later. I often prefix the<br>
former as "TODO: !!!", for historical reasons. I think that TODO<br>
comments are more important than it seems most people think they are.<br>
The funny thing with "TODO" comments is that they often persist in the<br>
code much longer than you'd think they would.<br>
<br>
2. Comments worded imperatively to give a higher-level description of<br>
what is being done in the following lines of imperative code. In an a<br>
bit of code with complicated branching, I'll sometimes start each block<br>
with an imperative comment with a summary of conditions that got us<br>
there, including contrastive emphasis, such as "Foo is *not* a bar, but<br>
baz *is* null, so frob with the X factor."<br>
<br>
3. Comments prefixed with "Note:" to give an aside that explains why we<br>
are doing something the way we are doing it. Use this means of<br>
conveying the info when it feels better than conveying the same info as<br>
rationale in an imperative comment.<br>
<br>
4. Disable code. Usually these should be removed eventually, although<br>
occasionally I keep them in because certain code needs its unit tests<br>
commented-out because the code normally can't depend on the unit test<br>
framework.<br>
<br>
5. Markers, such as simply ";;" for separating parts of a big list of<br>
"require" forms (e.g., "for-syntax" vs. standard libraries vs.<br>
non-standard libraries vs. modules that are part of the same library),<br>
and sometimes ";;EOF". These aren't all that useful, and they're often<br>
kinda ugly, but I still sometimes find reason to do them.<br>
<br>
The other day, I also used "TODO: !!!" all-caps comments as placeholders<br>
for someone else, in some code for a client, who wanted me to make an<br>
app, and then they would add in a few bits of code very specific to<br>
something in which they were expert. Normally, I would put a<br>
library/framework border there, but in this case, working on the same<br>
code file and using placeholder comments made more sense. I don't<br>
expect to do this very often, so I'm not giving this category a number.<br>
<br>
Note that descriptive identifiers and keywords can go a long way towards<br>
readable code that does not need hardly any comments. I have written<br>
some code (for which audit-ability was especially important) that reads<br>
as close to English pseudocode, and most comments would be superfluous.<br>
<br>
Neil V.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 09 Jul 2013 06:55:18 -1000<br>
From: Richard Cleis <<a href="mailto:rcleis@me.com">rcleis@me.com</a>><br>
To: Ben Duan <<a href="mailto:yfefyf@gmail.com">yfefyf@gmail.com</a>><br>
Cc: <a href="mailto:users@racket-lang.org">users@racket-lang.org</a><br>
Subject: Re: [racket] Why experienced programmers don?t use comments?<br>
Message-ID: <<a href="mailto:F8220FC8-03B0-4685-B992-BD2F89A3EEF7@me.com">F8220FC8-03B0-4685-B992-BD2F89A3EEF7@me.com</a>><br>
Content-Type: text/plain; charset=windows-1252<br>
<br>
We continue to edit, comment, and document code as if it will be printed on paper and read from top to bottom. Instead, editors should manage templates for comments and documentation that can instantly be controlled (clutter switches, arguably). The software leads need a way of affecting the requirements that these aids impose.<br>
<br>
I am an experienced programmer and believer in the teachings of HtDP, but it is impractical to convince others of the benefits of taking the time to (for example) describe inputs and outputs... as schedules are gradually morphing into nonsense. Furthermore, changing arguments as code evolves screws up whatever comments and documentation have already been made. Development environments that aid programmers in maintaining such non-compiled portions of programs have been attempted, but they are hardly good enough or universally accepted.<br>
<br>
I suppose that was a long way of saying that it is too difficult maintain thorough comments, so experienced programmers instead use their heads to minimize them.<br>
<br>
rac<br>
<br>
<br>
<br>
On Jul 8, 2013, at 3:41 PM, Ben Duan wrote:<br>
<br>
> Dear All,<br>
><br>
> I have a question here. There?s an extensive use of comments in HtDP. But there are few comments in experienced programmers? code, for example in racket?s source code. Why is that?<br>
><br>
> Thanks,<br>
> Ben<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>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Wed, 10 Jul 2013 14:34:16 +0800<br>
From: Ben Duan <<a href="mailto:yfefyf@gmail.com">yfefyf@gmail.com</a>><br>
To: <a href="mailto:users@racket-lang.org">users@racket-lang.org</a><br>
Subject: Re: [racket] Why experienced programmers don?t use comments?<br>
Message-ID:<br>
<<a href="mailto:CANWW-jKH61E-fjPmCWvq-QhPajcGBDTXirbqFnpVm6jhKPQEVQ@mail.gmail.com">CANWW-jKH61E-fjPmCWvq-QhPajcGBDTXirbqFnpVm6jhKPQEVQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="windows-1252"<br>
<br>
Thank you all for your great insights. I've learned a lot through your<br>
books, your documents and your discussions here. You have saved me a large<br>
amount of time figuring out the better way for programming.<br>
<br>
Thanks again,<br>
Ben<br>
<br>
<br>
On Tue, Jul 9, 2013 at 9:41 AM, Ben Duan <<a href="mailto:yfefyf@gmail.com">yfefyf@gmail.com</a>> wrote:<br>
<br>
> Dear All,<br>
><br>
> I have a question here. There?s an extensive use of comments in HtDP. But<br>
> there are few comments in experienced programmers? code, for example in<br>
> racket?s source code. Why is that?<br>
><br>
> Thanks,<br>
> Ben<br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.racket-lang.org/users/archive/attachments/20130710/7e5764a0/attachment-0001.html" target="_blank">http://lists.racket-lang.org/users/archive/attachments/20130710/7e5764a0/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Wed, 10 Jul 2013 11:03:35 +0200<br>
From: Bert De Ketelaere <<a href="mailto:bedeke@hotmail.com">bedeke@hotmail.com</a>><br>
To: "<a href="mailto:users@racket-lang.org">users@racket-lang.org</a>" <<a href="mailto:users@racket-lang.org">users@racket-lang.org</a>><br>
Subject: [racket] define-generics #:defaults<br>
Message-ID: <DUB116-W943D5D0E25C5473FD168CCC77A0@phx.gbl><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Helo,<br>
<br>
in the documentation it is mentioned that the syntax for define-generics #:defaults is the same as for struct #:methods:<br>
<a href="http://docs.racket-lang.org/reference/struct-generics.html#%28form._%28%28lib._racket%2Fgeneric..rkt%29._define-generics%29%29" target="_blank">http://docs.racket-lang.org/reference/struct-generics.html#%28form._%28%28lib._racket%2Fgeneric..rkt%29._define-generics%29%29</a><br>
and #:methods specifies that define/generic can be used to bind the generic method:<br>
<a href="http://docs.racket-lang.org/reference/define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" target="_blank">http://docs.racket-lang.org/reference/define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29</a><br>
<br>
but unfortunately using define/generic in #:defaults is a syntax error.<br>
Is it possible to access the generic method from inside #:defaults definitions?<br>
<br>
Groeten,<br>
Bert<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.racket-lang.org/users/archive/attachments/20130710/5d13deae/attachment-0001.html" target="_blank">http://lists.racket-lang.org/users/archive/attachments/20130710/5d13deae/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Wed, 10 Jul 2013 22:42:42 +1000<br>
From: Steve Lett <<a href="mailto:steve.lett777@gmail.com">steve.lett777@gmail.com</a>><br>
To: <a href="mailto:users@racket-lang.org">users@racket-lang.org</a><br>
Subject: [racket] Newbie's Dilemma<br>
Message-ID:<br>
<CABg+j4tzyKOfwMH3rM39erdCgLu=<a href="mailto:Nwn_OZ9f_uKFahH4AhtaLw@mail.gmail.com">Nwn_OZ9f_uKFahH4AhtaLw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
I recently downloaded four things. Picturing Programs, How to Design<br>
Programs, Realm of Racket, and Intro to Systematic Program Design, from<br>
Coursera.<br>
<br>
My question is, in which order should I complete these? And why?<br>
<br>
Thanks, Steve<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.racket-lang.org/users/archive/attachments/20130710/65d6b53f/attachment-0001.html" target="_blank">http://lists.racket-lang.org/users/archive/attachments/20130710/65d6b53f/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Wed, 10 Jul 2013 09:29:47 -0400<br>
From: Matthias Felleisen <<a href="mailto:matthias@ccs.neu.edu">matthias@ccs.neu.edu</a>><br>
To: Steve Lett <<a href="mailto:steve.lett777@gmail.com">steve.lett777@gmail.com</a>><br>
Cc: <a href="mailto:users@racket-lang.org">users@racket-lang.org</a><br>
Subject: Re: [racket] Newbie's Dilemma<br>
Message-ID: <<a href="mailto:CB50532F-A03B-4057-A9E9-81C55B7509C5@ccs.neu.edu">CB50532F-A03B-4057-A9E9-81C55B7509C5@ccs.neu.edu</a>><br>
Content-Type: text/plain; charset=iso-8859-1<br>
<br>
<br>
What is your (level of) programming experience?<br>
<br>
<br>
On Jul 10, 2013, at 8:42 AM, Steve Lett <<a href="mailto:steve.lett777@gmail.com">steve.lett777@gmail.com</a>> wrote:<br>
<br>
> I recently downloaded four things. Picturing Programs, How to Design Programs, Realm of Racket, and Intro to Systematic Program Design, from Coursera.<br>
><br>
> My question is, in which order should I complete these? And why?<br>
><br>
> Thanks, Steve<br>
><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>
<br>
<br>
<br>
End of users Digest, Vol 95, Issue 22<br>
*************************************<br>
</blockquote></div>