Domain: htdp.org
Stories and comments across the archive that link to htdp.org.
Comments · 88
-
Re:Checklist-based education
-
Re:"When everyone can code . . . "
I've posted this above, a text which I think makes some compelling arguments.
-
Re:AlsoNow contrast this view with the following...
Many professions require some form of computer programming. Accountants program spreadsheets and word processors; photographers program photo editors; musicians program synthesizers; and professional programmers instruct plain computers. Programming has become a required skill. Yet programming is more than just a vocational skill. Indeed, good programming is a fun activity, a creative outlet, and a way to express abstract ideas in a tangible form. And designing programs teaches a variety of skills that are important in all kinds of professions: critical reading, analytical thinking, creative synthesis, and attention to detail. We therefore believe that the study of program design deserves the same central role in general education as mathematics and English. Or, put more succinctly, everyone should learn how to design programs.
-
Lisp-likes and CS background
Start with How to Design Programs and work it through, from beginning to end, even if you are a good programmer.
Then go to Structure and Interpretation of Computer Programs. Work through the chapters that you find interesting.
Then start with learning Common Lisp. Even after 30 years existence, there is still no other programming language which implements everything that is possible with CL. There might be programming languages which are more specialised in certain language subsets that are also part of Common Lisp, but none includes everything that CL includes.
Then learn Common Lisp macros, and realise that to get at the same level of possibilities in other programming languages, you need to embed a Lisp system. But that will be a slow interpreter, and Common Lisp can compile.
-
Re:Difference between scripts and programs
Am I programming right this second, right now as I type this?
According to Matthias Felleisen, you are. Or, as the proverb says, "a data structure is just a stupid programming language". There's a smooth continuum here. Also, sufficiently complex library APIs form languages and languages become libraries of functionality. Another smooth continuum.
-
Re:mutable state
Problem is, for transparent parallelism, you need to go 100% functional / immutable
Which comes down to re-educating programmers to learn to think about their algorithms.
One book which does this nicely, without going to deep into theoretical computer science is How to Design Programs
-
A quote from How To Design Programs
http://htdp.org/2003-09-26/Book/curriculum-Z-H-2.html "Many professions require some form of computer programming. Accountants program spreadsheets and word processors; photographers program photo editors; musicians program synthesizers; and professional programmers instruct plain computers. Programming has become a required skill. The answer consists of two parts. First, it is indeed true that traditional forms of programming are useful for just a few people. But, programming as we the authors understand it is useful for everyone: the administrative secretary who uses spreadsheets as well as the high-tech programmer. In other words, we have a broader notion of programming in mind than the traditional one. " I agree with both of them. Although I think Javascript isn`t the best suited language for this.
-
Python or Scheme
A lot of people these days recommend Python as a first language. It is easy to learn and powerful. I don't know which of them is best, but here's a list of Python tutorials aimed at non-programmers.
Another interesting choice might be Scheme. There are two very good books that use Scheme to teach programming:
- How to Design Programs is aimed at roughly your son's age group.
- Structure and Interpretation of Computer Programs is aimed at university students and assumes some basic knowledge of calculus (which I'm guessing is over your son's head, but maybe not!)
DrRacket is a good programming environment to use with either of them.
-
How to Design Programs
It was written with zero prerequisites in mind. Works as a CS 101 course, but also works as a do-it-yourself course, and ought to be accessible to a bright young kid.
The language is Scheme, although that's sort of incidental—the point of the book is to teach programming, not to teach Scheme. The good thing is that DrScheme is an no-distractions IDE tailored specifically to teaching. The bad thing is you probably don't have access to the same kinds of bells and whistles (graphics, robots) you would in a more industrial language.
-
Re:Reinvention of LISP
I know you're just joking, but for anyone just following along, please don't be scared off by the parentheses.
A good editor will keep track of the parentheses, and indent for you.
Knowing LISP or Scheme is a huge brain training exercise. If you want to sing (as a programmer), you have to train your voice.
Great Scheme implementation
http://racket-lang.org/How to Design Programs
http://www.htdp.org/Free LISP book
http://www.gigamonkeys.com/book/ -
Re:Documentation good, comments bad
If what you need documenting is at the level of comments within a file your problem is not that your programmers aren't writing comments it's that they are not sriting good software. If meaningful class, method and variable names and sensible expression constructs are used there is no benefit to be had from comments.
They should be all forced to pass HtDP with all exercises done properly and I bet a lot of them would actually start writing quality code (both quality as in "less bugs" and quality as in "readable"). I love the Amazon comment where a CS PhD admits that reading the book actually taught him to write code properly.
(I have pretty much the same experience, having been subjected years ago to a typical "learn-the-syntax-of-Pascal-and-a-dozen-sorting-algorithms"-style first year of CS at my uni. But they never got around to teaching us how make your brain come up with code like the one in those nice textbook examples in the first place, what are the recurring code patterns (*not* design patterns, mind you). They have never ever once explained how to systematically go (for any problem in general) from a problem formulated in words to a working, readable code. Much like what Dijkstra about the contemporary math education - people memorizing proofs but having no idea how to "do math" in the first place, and teachers hand-waving every objection with saying that studens must "grow some intuition", but never explaining the processes involved explicitly. I believe I eventually got to the point where I started seeing the patterns, but explicitly formulated knowledge could have shortened the process by *years*. Go read the book, do the chores, see for yourself.)
-
Re:It shouldn't be mandatory
While I appreciate the need to expose students to computer classes in the same way they're exposed to other subjects, I don't think that something as specific as programming should be a *mandatory* requirement. Programming is a vocation, like many vocations, that some people are cut out for and other people are not.
Fortunately, there are people out there who beg to differ. They elaborate on their point of view in the preface to their learning materials, and it seems that they have succeeded in convincing quite a lot of people.
I have also been introduced into basics of biology and chemistry in high school, but despite becoming neither a professional biologist nor a chemist by vocation, I don't grumble about that. And more people come into direct contact with computer programs than with phyllogenetic trees and nitration processes, I would guess. They deserve to know what the stuff is all about, even if in superficial terms. A "how to misuse PowerPoint and Word" curriculum will only give them a fish, not a fishing rod.
-
Re:Geometric Proofs?
That is why this is an absolute must, it does not learn a language (even though it uses Scheme), it learns to think about algorithms and their design.
-
Re:Lessons from the Old and Wise
Perl is nice, I program whole days in Perl, but my real productivity boost (with Perl) came from this book.
If you have finished it, you will never look in the same way at programming.
After you have finished it, you should be able to start with this book, which will still give you a deeper insight. Make the exercises, try especially to grasp the parts about writing a Scheme interpreter and the register machines.
-
LISP.
When people talk about such features, I wonder:
The classic quote of course is that every languge environment expands to implement LISP badly, so why not just start with the real deal?
You can just implement any language features you desire by yourself.
And if you say that corporate programmers can't handle LISP, what makes you think that they can handle closures, lamda expressions, and the rest?
The fact is, I think the legions of corporate programmers cannot handle advanced language features. They're better off being verbose.
But the line of reasoning employed against Java and for advanced language features (make the language more powerful, and code more terse) can be used continually until you end up with Scheme.
By the way, How to Design Programs is a great programming book using Scheme.
-
Teach Scheme, Reach Java
You may be interested in the Teach Scheme! project. The idea is to teach the programming fundamentals with Scheme where the syntax is simple and use those experiences as a scaffold for more complex languages. The project offers both a LGPL Scheme interpreter, Racket, and an online textbook, How to Design Programs. Follow up with How to Design Worlds, and students could be making games in no time! An intro course to game design might give that touch of creativity you were looking for.
-
And how about the "next" and "up" button?
Has the "next" button already been defined? Or even patented?
I like to see a standard [back/up\next] interface that is easy to set from HTML, so you never have to look for it again when a set of pages is structured that way.
For example, I don't like interfaces like the one this has: http://www.htdp.org/2003-09-26/Book/
-
How To Design Programs with DrScheme
Really. If he is interested in programming and you can guide him to follow the book, then he will know what to expect from a programming language, get a a good background and will not need to unlearn bad habits.
-
Re:I can only go by my own experience --
Best book for doing what you did and 1) is really How To Design Programs
-
Re:Perl has died in industry (mod away, kids)
Sorry that you had problems with Perl, but I am now running Perl code since 9 years on an environment consisting of three different platforms, which are Solaris, Windows and cygwin (yes, also Windows, but there are differences between running Perl pure on Windows and in Cygwin). The libraries and programs I have written can be installed unmodified on any of these platforms and provide the same functionality. I never had any problems running Perl on Solaris, but the prerequisite is that a gcc is installed beforehand and that you have the possibility running it always when necessary, especially when installing C-based packages from CPAN.
I did not even have a choice in the matter, my boss decided 9 years ago that I should do everything with Perl, because we inherited some Perl code from another site that was to maintain.
The thing that helped me become a better (Perl) programmer was the discovery of How To Design Programs, and discovering that Perl has the same wonderful functional possibilities as Scheme and Lisp.
-
Scheme
I first learned BASIC on my own through reading "Programming for Kids" books. But those books really didn't teach me anything about programming, just how to copy code from the book to make computer games and other cool things. The first programming language I formally learned was Scheme in my college introduction to programming class. Our textbook was How to Design Programs and we ran our programs with DrScheme. As Scheme is an interpreted language, we didn't have to worry about compiling our code or creating classes. Since Scheme is a functional language, we had to think about how to define functions and how to call them. Essential programming concepts such as recursion and looping come to life in Scheme, and we had our first taste of various data structures (linked lists) and object-oriented programming. The next quarter, we moved onto Java. I think those of us who took Scheme first before moving to Java did much better than those who began with C++ or with Java.
-
Re:Solution For College's Bad Network Policy?Unfortunately, they do not.
The first quarter course is mostly avaialble online though (the scheme one). My teacher seems to have moved on to northwestern but here is a recent course website http://www.ece.northwestern.edu/~robby/uc-courses/15100-2008-fall/. and the textbook is available for free at http://www.htdp.org/. Somewhere out there should be a link to a current version of DrScheme...the homework assignments on that course website look like exactly what I used
-
Re:Teach concepts not implementations!
In fact, if you look at How to Design Program's introduction (the server seems to be down right now; here an archive page), you'll see that it was written with this sort of a class in mind. Even if you use a different language, and even if you disagree with its philosophy, you should at least be familiar with it as an important work in this area.
A relevant excerpt from the link:
Many professions require some form of computer programming. Accountants program spreadsheets and word processors; photographers program photo editors; musicians program synthesizers; and professional programmers instruct plain computers. Programming has become a required skill.
Yet programming is more than just a vocational skill. Indeed, good programming is a fun activity, a creative outlet, and a way to express abstract ideas in a tangible form. And designing programs teaches a variety of skills that are important in all kinds of professions: critical reading, analytical thinking, creative synthesis, and attention to detail.
We therefore believe that the study of program design deserves the same central role in general education as mathematics and English. Or, put more succinctly, everyone should learn how to design programs.
-
How to Design Programs
Have a look at the book How to Design Programs, which was written with a pedagogical focus and is a great way to teach the fundamentals of programming and problem solving. It uses an excellent free programming environment which should make it easy for students to get started.
-
Use the text "How to Design Programs"
Use the textbook "How to design programs" by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt and Shriram Krishnamurthi., It's available free on the web or hardcopy from MIT press. Unfortunately the HtDP web-site seems to be down today. Check out the wikipedia entry. It's been used in high schools. They have a summer seminar for teachers, too.
-
Concepts not Implementation
To begin with let's take the computer out of programming Computer Science UnPlugged
There are three environments I'd recommend for teaching programming.
SmallTalk/Squeak coupled with Squeak by Example
Scheme/PLT Scheme coupled with How To Design Programs
Logo/Berkeley Logo coupled with Computer Science Logo Style
The big idea is not to teach them how to do something in one language but to teach them the concepts that will allow them to learn how to do it in any language.
If the kids really are gifted then the class time is too valuable to have them sat there pounding keyboards, that's manual labor. Treat the class as lectures/discussions with experimenting on computers left up to them.
Try and get them to learn about the lectures subject matter before the class e.g. publish a schedule and make it clear they are expected to have read so and so pages before the class.
If they are gifted and motivated this will be as close to the Platonic style of teaching as you can get.
The side effect is that you have prepared them to succeed in college if they can get the idea of using lectures as a review of what they already know.
-
Process over paradigm
Functional, OO, or (structured) imperative methods are all valid; I think How to Design Programs is a good basis for a first course not because of paradigm, but because of its focus on problem analysis, design for reuse, and testing, which is largely paradigm independent.
-
Re:All of them.
Wow, that sounds pretty advanced. Functional programming, with loops, through people. I've never even heard of that new paradigm.
To be fair, the loops were really tail recursive calls.
Seriously, though, I do believe that SICP is a fantastic way to learn programming; it really is very thorough, and Scheme is a great language for learning - it is small and simple, yet supports every programming paradigm you could want to teach. While I am partial to SICP, another good one is How to Design Programs, which is designed to fit in more generally in a liberal arts curriculum, so its focus is more on problem solving.
I also believe that a, perhaps basic, introduction to logic and discreet math (how to do induction proofs, what graphs are, and things like that) are also important, and should be taught before or concurrently with an intro programming class.
-
Re:Teach them All
How to Design Programs is essentially a gentler SICP, and it accomplishes most of the same goals.
-
HtDP
You aren't a teacher, why come up with a curriculum from scratch? Better yet, use something that a lot of high schools and colleges use, HOW TO DESIGN PROGRAMS: http://www.htdp.org/ http://www.htdp.org/2003-09-26/Book/curriculum-Z-H-2.html
-
HtDP
You aren't a teacher, why come up with a curriculum from scratch? Better yet, use something that a lot of high schools and colleges use, HOW TO DESIGN PROGRAMS: http://www.htdp.org/ http://www.htdp.org/2003-09-26/Book/curriculum-Z-H-2.html
-
Teach Scheme using "How to Design Programs"
Teach them Scheme using the text "How to Design Programs" http://www.htdp.org/
-
Re:No one made it cause no one cares
I concur. And if you really want to program powerful in Perl, you should first learn how to design program.
Perl is Lisp, but without the macro facility.
-
Re:Scheme
also, don't forget the world's possibly best-written programming book: SICP [mit.edu].
I don't think SICP is a good reference, and for many people I suspect HtDP (also using Scheme, and also from MIT Press) is probably a better programming book.
-
HtDP
Hands down, the best introduction to programming I've encountered is How to Design Programs. The full text is available online, though you can buy a copy from MIT Press if you really want.
Nominally, HtDP uses Scheme, but it's such a tiny subset of the language that it barely needs the name. Instead, the book focuses on the fundamentals of programming. HtDP's philosophy is data-centric. Instead of directly presenting recursion, for example, it presents recursive data structures, from which recursive functions naturally follow.
Last year, I was a TA for a first-year CS course which used this book; the course was phenomenally successful (as always). On the other end of the spectrum, HtDP has been used successfully in high schools and middle schools as well.
-
Re:Ockham's Razor tells me....
Yes! Book recommendations for Perl programmers, outside of the standard ones you need :
- Perl Best Practices, by Damian Conway. This one is really mandatory.
- Higher-Order Perl, by Mark Jason Dominus, to understand why Perl is so powerful.
- How To Design Programs, which taught me better ways of using Perl, even though the book is based upon Scheme.
- Structure and Interpretation of Computer Programs, which is somewhat the bridge between HTDP and Higher-Order Perl.
All the rest I learned from the camel book. I use Perl on three platforms (Win32, Cygwin and Solaris), using the same libraries, and now also adding Perl/TK to the mix.
If you need to define several goals, I would recommend Perl Best Practices for writing maintainable and easy to read code and installing a peer review process.
HTDP is more for individual programmers, to become smarter and better programmers.
... add in "How To Win Friends and Influence People". -
Re:Ockham's Razor tells me....
Yes! Book recommendations for Perl programmers, outside of the standard ones you need :
- Perl Best Practices, by Damian Conway. This one is really mandatory.
- Higher-Order Perl, by Mark Jason Dominus, to understand why Perl is so powerful.
- How To Design Programs, which taught me better ways of using Perl, even though the book is based upon Scheme.
- Structure and Interpretation of Computer Programs, which is somewhat the bridge between HTDP and Higher-Order Perl.
All the rest I learned from the camel book. I use Perl on three platforms (Win32, Cygwin and Solaris), using the same libraries, and now also adding Perl/TK to the mix.
If you need to define several goals, I would recommend Perl Best Practices for writing maintainable and easy to read code and installing a peer review process.
HTDP is more for individual programmers, to become smarter and better programmers.
-
"How to Design Programs" book is free online
The book How to Design Programs specializes in this topic. It is available for free online, it was written by a programming languages specialist at Northeastern University (a 30 minute T ride from Tufts) and published at MIT (a 15 minute T ride from Tufts).
Yes, it's very academic in nature -- it uses Scheme as its base language (well, a very simplified/gimped Scheme) under the premise that it's not your standard procedural language (so you won't fall into old habits) yet it is easy to pick up and learn the fundamentals of programming rather than the specifics of a useless language (e.g. whatever language-of-the-day is liked by industry).
I'm sure there are several research papers tied to the book, and I'm also sure that Matthias Felleisen (its author, trustee professor at Northeastern University) would be happy to sit down and talk to you about it.
-
Re:This is a shame
I wish I could mod parent up.
Scheme is absolutely a better pedagogical choice.
Northeastern University also uses Scheme in their introductory course (see How To Design Programs).
By the end of my first semester, I was using functions as first class values. Throw in functions as member data of structs, and you have objects. The gradual transition to full-fledged Java was an absolute cinch the second semester, as has been the transition to learning any other language after being exposed to the functional concepts of Scheme.
I only wish more people could "see the light".
-
Re:Get the Little Schemer
Free resources for Scheme.
The classic, Structure and Interpretation of Computer Programs:
http://mitpress.mit.edu/sicp/full-text/book/book.html
SICP videos:
http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/
How To Design Programs (somewhat PLT Scheme specific):
http://www.htdp.org/2003-09-26/Book/
The Scheme Programming Language (somewhat Chez Scheme specific):
http://www.scheme.com/tspl3/
Teach Yourself Scheme in Fixnum Days (also PLT to an extent):
http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme.html
Of course there are others, and most of these can be bought in dead-tree form. -
Re:@_@
The point though is that programming as a concept is completely alien to somebody who hasn't done it before, so the fact that some bits about a very simple Java program can't be explained without knowledge that students don't yet have is not something peculiar to Java, but is inherent in the nature of programming itself.
I don't think it is. I think that the problems are that:
1) Programs that perform I/O are inherently not "simple" programs—now, I/O is a requirement for useful programs, and might be pedagogically useful at an early stage to give people a feeling of making the computer "do something" productive, but its not simple, and it isn't central to understanding computing or program design, and
2) The structure of Java (this is true of C and Pascal as well, though to a slightly lesser extent) programs inherently is not "simple", it involves lots of overhead.Then they should, because the first thing any student needs to learn is what a program is, i.e. something that processes input, and outputs the result.
I prefer HtDP's description: "[A program] is a rule that tells us and the computer how to produce data from some other data." (SICP has a similar perspective, though expressed less directly.)
Input and output (outside of the context in which inputs refer to function arguments and the like, and outputs refer to function return values) are—while important to practical programming, pretty much a distraction from the central focus of computer science. -
Re:@_@
As the author tried to explain, programmers need a solid foundation in data structures and algorithms before they should even begin looking at Java. The specific problem he calls out (which I actually feel only scratches the surface) is that Java offers such a featureful API that the programmer isn't forced to learn the basics.
This might be a problem if you don't learn anything but Java (but even then, probably not, see below)—though neither the first article, this article, or the comment threads attached to either pointed to any university that let you do that. Its not really a problem with learning Java first: a first course often touches on data structures and algorithms, but spends a substantial portion of its time teaching basic problem analysis and structured design of solutions, and even in the "golden age" when they were taught with Pascal or C (or now, when they are, at first rate institutions, apparently often taught with Scheme) these courses often made use of libraries, either industry standard, designed-for-general-pedagogy, or designed for the course specifically (often, a combination) to allow the students to focus on the parts of the problems they were intended to focus on an learn the process basics, that are more fundamental than data structures and algorithms.
But even for a curriculum that always used Java or other languages for which such libraries are not merely available but included in the standard distribution, this shouldn't be a problem even beyond the first course. Having libraries available, even standard, isn't a pedagogical problem: so long as the coursework involves and requires learning about and implementing data structures without relying on the implementations in the libraries. Heck, in first or second courses using Scheme or other Lisps, implementing more robust Lisp variants relying only on the handful of primitive operators at the core of Lisp from the host implementation is fairly common. Having more efficient implementations of the other features available in the host implementation doesn't hurt pedagogy because use of them is specifically forbidden in the assignment.
Now, certainly, having a limited teaching language may have utility, especially in first courses, for other reasons (How to Design Programs makes good use of successively-more-advanced pedagogical variants of Scheme, for instance), its not because having a robust library hurts, but because language features that are useful in other contexts (either because of support for legacy code, or notational adaptations to support certain flexibilities that aren't needed in early pedagogy, or otherwise) often make either notation or errors less clear than they could otherwise be for pedagogical purposes. But viewing the availability (or inclusion in standard distribution) of rich libraries as a bad thing seems unjustified in any case. -
Re:That's true
I personally would being with C and then jump to Java.
Personally, I think I'd start with Scheme, then C, then Smalltalk, then Java and then other things (I'd think it would be good to also include some languages that are more declarative or that bring concurrency to the fore, maybe something like Prolog for the former, Erlang for the latter, or Oz for either or both.) Scheme I think is a better vehicle for teaching design approach and programming process, and is rather amenable to a restricted-pedagogical-subset approach (as exemplified in How to Design Programs), then C gets you down to the nitty-gritty implementation details. It works as a kind of distint theses->synthesis approach (a generalization of thesis->antithesis->synthesis to more than two basic models.)
There are some good things to be said for C -> Scheme -> Smalltalk -> Java, too, but I haven't seen a first-course book or course outline that I think is as good as SICP or HtDP that is C-centered (which may well just be my limited exposure, its not like I've seen a really wide-selection of first-course books/outlines), so I lean toward doing Scheme first. It might work well to C third (Scheme -> Smalltalk -> C) and immediately before Java, as well. -
Re:Possibly the greatest programming book I've rea
How to Design Programs is available online.
-
Re:A free book to learn CS using Python
http://www.htdp.org/ is a much better book, and depending on the level maturity you can go with http://mitpress.mit.edu/sicp/.
-
Re:My suggestions
I will agree with parent. However, take a look at
http://www.htdp.org/2003-09-26/Book/
This is in the same spirit as Structure and Interpretation of Computer Programs but more appropriate for beginning computer programming. Scheme is a good choice so download DrScheme and have fun!
Do well in your math and science coursework now and get into a good CS program when you are out of high school.
If only I got this advice in high school. -
Re:Scheme? *ducks*
I strongly second that. It is one of the easiest possible languages to learn, and one of the most expressive. It is also a real programming language, not in any way dumbed-down for easier grasping.
I would especially suggest the DrScheme implementation. It has a nice, simple GUI with great features for teaching programming. One of the coolest things in that regard is the ability to use images as objects and actually visually see them represented in your code (a simple example) -- I think that this could be especially great for children who may find understanding the processes demonstrated easier when they see the outcome visually. Also, generating any kind graphics is really simple.
-
Re:Scheme? *ducks*
There is actually absolutely nothing wrong with your suggestion. In fact, it's being used already, although admittedly it's mostly at a slightly higher level (High School).
I strongly suggest checking out:
The Teach Scheme Project
How to Design Programs
The first is a project designed around teaching programming through scheme, and the second is the text book for the project (full text online, free). -
Re:PHP is broken...
I'm guessing you mean this?
http://www.htdp.org/ -
How To Design Programs