Who is participating (at least initially)?

Originally posted here:

Initially, the folks participating are primarily either co-workers or non-co-worker friends who have wide range of experience and interests.
From my perspective, everyone is welcome.
The more interested, motivated participants the better!

I’ve been delighted by the number of folks that have showed up on the Internet either to participate or help. There are a lot of great people out there!

What I post about Study-HTDP

About three weeks ago I “made it official” and announced the Study-HTDP for any folks who may be interested. I figured that I would post both to the group itself, and mirror the interesting things here. It didn’t really work out that way.
Focusing on the work and not much else, I’ve posted exclusively to the group. Since we’re only two weeks into it, though, I’m going to make a change and post the most interesting content here. The reason is that I want to be sure to have a place to keep my notes and thoughts on things so that they don’t get totally lost in the overall group.

A Prodigious Error Message

For my BarCampMadison2 presentation this year, I prepared a DVD “gift bag” with a lot of material on Functional Programming (FP) and specific FP languages like Scheme and Haskell, and also included DrScheme binaries for Mac and Windows and source for UNIX.
Yesterday I received an email from one of the attendees. He was copying the contents of the DVD to a directory on his UNIX system. In the course of doing so, he got an error message. If you are even superficially familiar with Monads and Haskell (as I am), you will surely find this error message prodigious!

/mnt/cdrom$ cp -R library ~/lisp-library
cp: cannot access `library/Haskell/Monads': Input/output error

Thoughts on HTDP

Originally I figured that a lot of my thoughts would show up here, but they haven’t. Instead they get posted directly to the group. That said, here are some thoughts from the week:

  • The beginning student language is interesting: no variable binding and function definitions are only one expression long
  • It is great to be able to talk to other folks about it; interested folks especially
  • A disciplined approach to function definitions is fine with me!

What is Study-HTDP?

Study-HTDP is a study group for folks who want to read through HTDP. My rationale is explained here. I suspect that many blog posts in the following months will be tagged with ‘Study-HTDP’.
I’m pretty excited to see how this turns out. I hope not only to learn a lot about programming, but also about learning with other folks, especially with this distributed/online model.

Why post to Study-HTDP rather than PLT?

Originally published here:

You may or may not know that the authors of HTDP are all directly available on the PLT Discussion list located here:
http://list.cs.brown.edu/mailman/listinfo/plt-scheme/
You might rightly be wondering why you would post messages here rather than directly to the PLT list? Well, there are two good reasons:
1. This group has a very focused goal. We can leverage our similar interests, and answer a lot of questions that anyone on our track would need answered once, and build a focused knowledge base. The PLT list discussed a much broader range of topics, mostly focusing on Scheme.
2. All of those guys on the PLT list are super nice folks, and world-class programmers, who are *happy* to answer our questions (even stupid ones, seriously). Buy why bother them with questions that we can answer ourselves? We can make life easier for the PLT folks by answering said questions here, first, and leaving tough questions for them.

One thing to note here is that there is a read-only mirror of this group located here:
http://groups.google.com/group/plt-scheme
This provides a nicer interface and more importantly the ability to search messages which is particularly helpful if you know for what you are looking.
It might be a good resource if you are looking for HTDP focused content.

My invitation to the world

Originally published here:

Do you love programming?
Does the famous Alan Perlis quip that “[Any programming language] that doesn’t affect the way you think about programming, is not worth knowing.” give you a rush?
Are you obsessed with becoming a better programmer?
I am. That is why I started this Google group called ‘Study-HTDP’.
I want a place where I can study, collaborate, and learn while we I down this path; and I figured “Why go it alone?”
_How_to_Design_Programs_ (HTDP) is a book about learning how to think about programming. I’ve no doubt that most of us, my friends and peers, already know how to program, and in fact, are excellent at it. But how did we get here? More importantly, how would we teach others to get there? (Is the unexamined life worth living?)
That is the question with which I was obsessed for months and months. My answer to the question is to re-learn how to program. HTDP is how I’m going to do it. If you are interested too, please have a look at:
http://www.htdp.org/
Let us begin!

Managing tags in WordPress

WordPress lets you associate tags with your posts. Version 2.6 even provides a nice UI to manage them. If you are interested in working with them directly in the database, here is a query to help you along:

SELECT
	term.term_id,
	tax.count,
	term.name,
	term.slug
FROM
	wp_term_taxonomy tax,
	wp_terms term
WHERE
	tax.taxonomy = 'post_tag'
	AND
	tax.term_id = term.term_id
ORDER BY
	term.name ASC
LIMIT
	0, 200

Sequencing in Scheme

When I was first learning about Functional Programming and Scheme, the idea that order-of-execution didn’t matter in purely functional programs, was “strange to me”, to put it nicely. When I first read about Scheme’s begin form, for example, I remember feeling satisfied that Scheme wasn’t totally insane as it had at least some way to force imperative execution (the fact that, at the time, I never considered how such a feature may be implemented using Scheme’s core constructs, I now consider to be both a ‘missed opportunity’ and ‘study flaw’, then again you could also call it ‘learning’). Nonetheless, much, much later, while reading LAMBDA: The Ultimate Imperative, I came upon page 5 on which the question of how we may model imperative constructs in languages based on lambda calculus (like Scheme, for example) was raised.
Continue reading “Sequencing in Scheme”

LAMBDA: The Ultimate GOTO

‘LAMBDA: The Ultimate GOTO’ (found here) is a paper that was written in 1977 by Guy Steele. It is fun to read, informative, and accessible to a wide-variety of programmers and interest levels. Here are some interesting bits about the paper (I will leave the detail to the paper, no sense in trying to re-state what Steele has already done so well):
(All bits are either copy-and-paste, or summaries directly from the referenced text, along with my comments)

  • Must programming language designers admit that they can’t possibly get it right for every programmer? Yes. Failure to do so results in programmers using the wrong structures to solve their problems.
  • There is a marked difference between programming language concepts and language constructs.
  • Tail-calls (tail-transfers) are really GOTOs.
  • In FORTRAN and APL (at the time the paper was written at least), a distinction is made between built-in and user-defined functions. For example, you can’t pass in a user-defined function as an argument to some built-in functions, whereas you can pass in a built-in function to a built-in function. This may be an interesting historical note for anyone wondering why Scheme lauds that it doesn’t introduce an artificial separation between built-in and user-defined functions.
  • Any notation should accentuate the unusual and make the unobtrusive the usual. To argue that today’s fashionable languages state this is as “Convention over configuration” is a very big stretch.
  • Tail-recursion (trail-transfer) is useful in many more situations than just iterative recursion. Calling tail-transfer tail-recursion was such a mistake. It has got nothing to do with recursion.
  • The difficulties in dealing with programming and programming languages stem from the fact that no distinction is made between the abstraction of program organization and the concrete embodiment of those notations as programming language constructs.
  • For every programming concept found to be useful, there ought to be more than one programming language construct to embody that concept. Philosophically, a marked difference from Python’s “my way or the highway” approach today.
  • The features of tail-recursion allow for a new mental approach for programming.
  • In trying to understand a program, it is necessary to determine not only what construct is being used, but what concept it is intended to express.
  • A language should be so designed that one is encouraged to use a construct if, and only if, it is appropriate; it must also provide enough constructs to cover all reasonable programming constructs.
  • Regarding GOTO, they tried to eliminate unwanted concepts and programming styles by banning a construct.
  • This paper is full of gems.