[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] HOWTO redirect a i/o-port in Unix??




  Whenever I have time I am going through MzScheme source code (both C and Scheme)
  and I beleive it is a piece of quality software. But it does not follow your
  recommendations. There are almost no comments, not to mention purpose statement,
  data analysis ... (notable exception being "inflater.ss"). Yet the code is quite
  understandable, though.

      MF> You may know all of this, in which case, just take it as my urge to
      MF> teach. If not I am hoping it helps. 

  Your recommendations are certainly useful and reasonable and I beleive should be
  the oath of any computer programmer.  But as you could see it is damn hard to
  apply the quidelines to 100% of the code one writes even within a PLT group:-)

Yeap. I had a sentence in my original message on this issue, but I cut it
out. There isn't much of an excuse.

;; --- 

For history: I used to oppose all comments in code and suggest that if a
program is worth writing, you write a "paper" on it -- i.e. internal docs
are models plus papers. Code should be so easy to read that you don't need
this "here I increase x by 1" stuff you get in many other things. (Been in 
industry and seen this.)

I changed my mind when I started teaching lower level courses and when I
started conducting code walks. Why? While many of us are really really good
at keeping code properties in our heads and/or deriving them from code,
most people are not. And the idea of them maintaining my code or me taking
over their code was a horror. So HtDP developed as a reaction. 

Did I insist with the people who write code here? Keep poking around and
you will see that some of the code is written that way. 

M own experience: I used to use the Chez Scheme debugger. Once I started
following my own guidelines, I have hardly ever needed to think about
debugging. Seriously. So I have become a beliefer in my own guidelines :-)

'nuff said -- Matthias