

Zed Shaw on Modern Literate Programming - mqt
http://www.zedshaw.com/blog/2008-04-26.html

======
bkbleikamp
He seems to have a habit of always telling us how long it took him to do
something, as though the amount of time it took makes it more or less
impressive...

I remember people doing this when I was 13 and hung out in graphic design
forums - "This took me about 35 minutes...what do you think?" - it wasn't cool
then, either.

------
benreesman
the only thing "fucking awesome" about zed is that he reminds me of maddox.
what a poseur.

------
vasudeva
1) Read intro about how fucking awesome some document is.

2) Find link to the document; click link.

3) Error detected -- surely this loathesome-looking PDF isn't the fucking
awesome document in question!

4) Hit back, re-parse intro looking for link to _real_ document.

------
jrockway
I'm not sure why he thinks literate programming source code is hard to parse.
I would just implement it like this; normal text is normal text, program text
is indented two spaces. Example:

This is a super-fun algorithm. It is a function of super-fun-arguments, a
list.

    
    
      (defun super-fun-algorithm (&rest super-fun-arguments)
    

We start by parsing the super-fun-arguments into lists of foobars. See page
1234 for the parse-into-foobars utility function.

    
    
        (let ((foobars (parse-into-foobars super-fun-arguments)))
    

OK, I'm bored now. But this is only tedious because I'm writing about
irrelevant details (we all know what _defun_ does, after all).

------
fa
Does anyone know how hard it is to write a code highlighting mode for vim
where it uses normally uses latex highlighting, and then switches to C or
Python or whatever programming highlighting inside special delimiters, like
"\code{}"? Then I can just write a perl script to mimic tangle and weave,
creating code-only and latex-only text files.

------
petercooper
If more than a few people with print design experience would say that the
leading in his PDF is good, I'll eat my hat. Admittedly, the document is good;
the leading is poor.

------
gus_massa
Don't get suckered in by the comments - they can be terribly misleading. Debug
only the code.

Dave Storer

Cedar Rapids, Iowa

~~~
Jesin
Ahh, but if the code doesn't work, you can read the comments to figure out
what it was _supposed_ to do, and then fix it.

~~~
baha_man
'If the comments and code disagree, then they are both probably wrong!' - I
think that's from Code Complete by Steve McConnell, I'll check tomorrow. BTW,
does anyone here rate Code Complete? I heard great things about it, but by the
time I got round to reading it I found most of it was either out-of-date,
blindingly obvious, or stuff I'd already been taught or worked out for myself.

------
anupamkapoor
bottom line :

\- tex / latex rocks

\- lp not so much

~~~
SwellJoe
Frankly, I wouldn't want to argue with Knuth on very many things. While I
don't get literate programming, I suspect he understands something that the
rest of us don't (yet).

And, I share his suspicion of most XP techniques.

~~~
jrockway
> I share his suspicion of most XP techniques.

Well, he is suspicious because he assumes people using XP are programmers.
That's not correct.

The idea behind XP is to get somewhat usable code out of non-programmers. Why
companies don't just fire people that can't program, I'll never know... but XP
does seem to work. Instead of getting unmaintainable, untested, half-working
garbage, you get unmaintainable, tested, two-thirds working garbage.

Oh yeah, now I remember why these programmers exist. Companies seem to value
quantity over quality of programmers. That way people can be sick or go on
vacation and you'll still get your two-thirds-working code. BRILLANT!

~~~
SwellJoe
I'm not sure I buy this logic either. Programming is right in the name, and
some proponents of XP are good programmers. And, I really don't see how
horrible programmers would be made better by poor techniques (which I believe
some aspects of XP are).

~~~
jrockway
XP makes programming less like a creative art and more like checking off items
on a to do list. You can't teach art, but you can sort of get people to do
stuff on a list. Hence XP.

