One Reason That MIT Should Reinstate Scheme and 6.001 (2009)
dekudekuplex.wordpress.com
dekudekuplex.wordpress.com
1. The classic Scheme based courses used to bootstrap an OO-DSL embedded in Scheme based on procedures and message-passing (you literally send a symbol by calling the object, which is a lambda, of course with an argument and get back a closure to run - a method). This is an invaluable experience to realize that there is absolutely nothing special about OOP and there is no magic.
2. There are still some gems (which leads to very real a-ha moments!) which cannot be taught in other languages. Here is one:
(define partially (lambda (f . as)
(lambda xs
(apply f (append as xs)))))
and then (define reverse (partially foldl (flip cons) '()))… but they don't. (There are also people—I'm among them—who found discussions of natural-language grammar dull, as belabouring too much a familiar point, until they saw the power that grammatical tools lent in the less familiar setting of formal specifications.)
1. They need students to justify their funding. If students stop taking their courses, they get funding decreases.
2. There are a lot of people that love SICP, and believe it should be the foundation for all computer science curriculum.
3. People pretty much agree it's important for computer science graduates, but the question is, should it be the first course? Are the concepts too hard, too soon? Does it weed too many students out too soon?
4. The industry at large is unconvinced about the benefits of Lisp dialects. They see high productivity gains with Java/C/C++/Python. And many students question why should they learn a language that doesn't advance their careers.
2. True
3. All data seems to suggest showing kids complex problems leads to more learning. "Too hard, too soon" isn't really a rational argument. At MIT it didn't really weed out students either; kids did okay.
4. Nope, nope, and nope. Of those languages, only Python has high productivity. C/C++ is obsolete for anything other than systems programming. The selling point of Java are cheap, interchangeable programmers with a standardized skill set. Small, elite shops do Lisp. But that's not the point. A freshman course isn't designed to be vocational career training, but to give fundamentals. MIT students learned other languages (including Java) in their degree paths as well. This was a freshman course.
Sure it is. When you teach swimming, you don't throw beginning swimmers in the deep end of the pool and tell them, "A challenge is good for you." And in the example I gave of quantum mechanics, even MIT requires previous physics prerequisites.
> 4. Nope, nope, and nope. Of those languages, only Python has high productivity. C/C++ is obsolete for anything other than systems programming. The selling point of Java are cheap, interchangeable programmers with a standardized skill set.
May I refer you to the TIOBE index of programming language usage? [1] The answer is Java, C, C++, and Python in that order, and by a large margin.
4. You may refer me, but popularity is quite different from productivity. Most C/C++ is maintaining legacy code. Most Java is either from legacy code, or from environments where productivity isn't a key metric.
I don't say that cynically; productivity is a key metric in startups trying to disrupt the world. In older, slower-moving organizations, a lot of metrics are more important than productivity. If I'm maintaining a system for a bank which handles employee payroll, productivity is likely not even in the top 10 things I'd look for. On the other hand, if an IT employee quits, being able to replace them easily (without assuming a Google-grade interview process or salary) and have someone else be able to take over (without extensive training+documentation processes in place) is really important.
Universities are for learning to learn.
In the same way, I think we need both "computer science" and "software engineering" - but they need to be different departments. They both belong at the university, though. (I'm not sure you go to a polytechnic school to learn chemical engineering.) The problem is, most universities try to teach a computer science degree to people who will work as software engineers (and therefore don't teach them as much software engineering as they should).
I used to think chemical engineering is about chemistry until I talked to some chemical engineers on the bus I used to commute on. Most of what they study is mechanical engineering, and so, it's better to think of CE as a branch of ME. These people worked in the R&D department of a materials company, so they definitely knew what they were talking about. Their chemistry chops were only marginally better than mine, and I'm an EE.
A solution to that is to have the Engineers college certify which university degrees are actually worthwhile to have engineering as part of their name, and crack down on misuses of the name by people that just had a bootcamp of some sort.
If the course is an elective it's probably better (more motivated students).
The hard parts are (1) understanding the scenarios the code covers, (2) interpreting error messages and edge cases coming from it.
Even better, in fact: one can misread a book with, usually, no reasonable way of determining the extent of one's misreading (see https://news.ycombinator.com/item?id=18380366 for a current front-page example); whereas, when one (mis)reads code, there is always at hand a way to test the accuracy of one's reading (and perhaps find out thereby, in the presence of a sufficiently detailed specification, that the programmer also 'misread' it!).
(defn index []
(html5
[:html
[:head]
[:body "the index-page"]]))
Or similarly create your route handler on the back end that will serve up your pages: (defroutes app-routes
(GET "/" [] (index))
(route/resources "/")
; if page is not found
(route/not-found "Page not found"))
Note how concise the language becomes, and this code will expand out to all of the necessary opening and closing tags or boiler plate code that makes your code safe and efficient. None of these syntax structures were previously in the language, they are instead created when needed for abstraction.Am I missing something? What's the special macro-ness here that is different from regular functions?
(defmacro or
"Evaluates exprs one at a time, from left to right. If a form
returns a logical true value, or returns that value and doesn't
evaluate any of the other expressions, otherwise it returns the
value of the last expression. (or) returns nil."
{:added "1.0"}
([] nil)
([x] x)
([x & next]
`(let [or# ~x]
(if or# or# (or ~@next)))))
Also check this http://lists.warhead.org.uk/pipermail/iwe/2005-July/000130.h...As an example, I have the beginnings of something like that in javascript at http://taeric.github.io/DancingLinks.html (in the appendix. Functions "div, table, etc.") I've done similar in java before to get the same basic structure that I could run in any c like language. I still miss the flexibility of lisp.
edit: to see another example of mine showing some of the advantage of the "macroness" see http://taeric.github.io/CodeAsData.html and see how little code it took to make a tree walker in lisp. (Not just the tree walker, but indeed, the tree.)
Well if your making a course for non-programmers maybe.. I should think they would want to do the opposite
I wonder if Richard Stallman would have invented recursive copyleft law if he had never programmed in a lisp/scheme.