The Book Disease: On Bibliomania - <AUTHOR> https://www.laphamsquarterly.org/roundtable/book-disease <comment><USER2> This really struck a nerve with me as a board gamer. There's a renaissance in board gaming at the moment, where new publications have tripled from about 1,000 a year to 3,000. Old, collectible games are increasing in value, and there are now speculators who invest in kickstarters to get possession of soon-to-be rare expansions that will shoot up in value once the game comes to market.

There's a growing buzz in the gaming community about all of this. People, myself included, are worried about the fact that we own dozens of games that we may likely never play, but we had to buy them because of fear of missing out (FOMO). Many people are refusing to buy some games altogether because they recognize that they are completionists who will have to obsessively- compulsively track down every hard-to-find discontinued expansion.

There are forums now discussion coping mechanisms for managing the compulsion to buy new games (no one feels like they are playing too many board games, just buying too many). Some people keep a ratio of games owned to games played and won't allow themselves to buy new games unless they've played at least 80% of the games in their collection. Others give themselves board game allowances, where they are allowed to purchase one or two games a month. It's really fascinating to watch, and I keep wondering how far this can go before the bubble bursts.

<comment><USER3> I have a friend whose catchphrase is "I've stopped backing games on Kickstarter, but ...", delivered as he backs another game on Kickstarter.

</comment></comment><comment><USER4> I would say that contemporary equivalent is data hoarding. There are people who have archives of various media, whether (audio)books, films, music, video games or programs in sizes of tens of TB or more. Of course they will never be able to consume the content, but what if they ever wanted/needed some small part of it? And it's not like it would be useful backup in case of SHTF/TEOTWAWKI scenario either, because the popular storage methods aren't very durable.

</comment><comment><USER5> For those who wish to read about contemporary patients/vectors/what have you, _The Phantoms on the Bookshelves_ by Jacques Bonnet and _Books: A Memoir_ by Larry McMurtry are quickly read and worth it.

</comment><comment><USER6> Help, I think reading this piece gave me bibliomania.

<comment><USER7> Why dont you open a libraray to the public?

</comment></comment><comment><USER8> Is it still bibliomania if your criterium isn't bindings or editions but scientific, historic and mathematical subject matter?

<comment><USER9> As an exhibit, I have collected a large-ish library of the exact topics you mention, and I'd say it is becoming hard to manage. Nothing beats books for long term storage of information though, so I still indulge couple of titles per year, but hold the books I buy to increasingly higher standards.</comment></comment>


SSH Config Trick - <AUTHOR> http://dhruvasagar.com/2017/10/07/ssh-config-trick <comment><USER2> The shown shell script targets /bin/sh but uses several bashisms.

Also, the whole concept is largely irrelevant now as ssh_config _has_ an Include directive: [https://manpages.debian.org/stretch/openssh- client/ssh_confi...](https://manpages.debian.org/stretch/openssh- client/ssh_config.5.en.html)

<comment><USER3> You are right! I've updated my article since then. At the time I was solving this problem however this wasn't supported, I just happened to blog about it now. Good to know though!

<comment><USER2> Sure, I understand this was definitely a problem for a long time, it just seemed odd to post it now (I initially thought maybe it was a new submission of an old blog post).

FYI Your shell script is still not really valid. You should either fix the bash-isms (best option) or target bash specifically in the shebang line.

ShellCheck ([http://www.shellcheck.net](http://www.shellcheck.net)) should help with making it sh (posix shell) compatible.

Edit: probably more friendly.

<comment><USER3> alright will have a closer look, I use zsh so it can be harder to spot such problems.

<comment><USER2> So, this isn't really related to which interactive shell you use. The script is executed in the shell named by the shebang (#!/bin/sh) line.

/bin/sh though, is a bit of a "special" case - back in the day, it would have been the Bourne Shell (as distinct from Bash, which is the Bourne Again Shell).

These days, it depends on your platform - macOS uses Bash to provide /bin/sh, Debian/etc use Dash, and I believe the BSD's use Almquist (ash).

Dash and Ash (which Dash is a 'descendant' of) are pretty close to POSIX compliant, but 'Bash as /bin/sh', while being 'more strict', doesn't drop support for all Bash-isms, so your script probably works fine on macOS but will fail miserably on a recent Linux or BSD.

Edit: FYI, if anyone wants to properly test portable (i.e. POSIX /bin/sh compatible) shell scripts on macOS, Dash is pretty simple to install from source. I'd still suggest using VM's to test in a variety of shells (Ash, Dash, Posh would give pretty decent coverage) but for quick tests, native Dash will be more representative than Bash.</comment></comment></comment></comment></comment>


SICP is Under Attack - <AUTHOR> http://vedantk.tumblr.com/post/8424437797/sicp-is-under-attack <comment><USER2> This is one of a very very small number of programming-related articles I've ever been glad to read. Programming _should_ be taught as an approach to problem-solving and structured logical thinking, not as an approach to a particular language.

If you can understand the core concepts of programming, the individual languages begin to matter a lot less. Python is great. Java is great. C++ is great. But they are just tools for solving classes of problems; if you don't understand how to, as the author says by way of example, deconstruct problems and understand the advantages and disadvantages of various solutions, then the software you write will never be as efficient or as elegant as it could be.

There is a compelling argument that, in the age of nearly limitless computing resources, it doesn't matter anyway. You will in all likelihood be a glue programmer: you'll rely on APIs and libraries, most of which have been written by someone else, and you will simply string them together by applying the functions that most obviously address whatever problem you're trying to solve. Who cares, really, if you're using Quicksort or heap sort, you're just going to call sort() on your array (or map, or key-value store, or whatever), and define a callback function that will evaluate any two given values in the array to be sorted, and that's it. Who cares if one requires a little more memory than the other, or a little more time to execute?

Just knock it out, and then get back to arguing online about the One True Language, or the One True Framework.

But, I've been programming for about 25 years now, in dozens of languages, and I can't help but feel that this language-specific approach to programming is producing anemic programmers.

Programming _can be_ a craft; in can be done well, and elegantly. I can hack together a decent, reasonably strong wooden workbench for my shop, but it doesn't possess the same craftsmanship as a dedicated wood worker. It does the job, but it is ugly and uninspiring, and nobody admires it.

So, I guess I think that programming is similar, and moving from SICP to teaching Python or Java is just another representative sample of a disappointing sea change away from what I've come to know and love about programming.

<comment><USER3> It's not "what the school wants to teach" but more "what the student needs to know at the end of the semester". I love SICP -- for me it was a revelation which opened a new world, and is still my favorite book -- but not everyone is like that. 90% of my colleague in my university would hate that book.. (As they hated the dragon book and anything less practical). So, as they say, "Hate the game, not the gamers". What a school teaches is a reflexion of what is needed in the society and sadly what the students want.

I do hope however that great professors will still strongly suggest the book to students who want to go one step deeper.

p.s. A new version of SICP could include a couple of pages on python; i.e. make a list comprehension, yielding, etc. :)

<comment><USER4> So basically you and 90% of your colleagues hate computer science. You want a vocational education in software development, which is something different.

<comment><USER5> Who offers a vocational education at an university level? Not everybody who is smart wants to be an academic.

<comment><USER4> What does your comment have to do with what I wrote? No one is denying that many people really want a vocational education. No one is claiming that smart people should want to be academics. The point is that what people want is not computer science. Civil engineers do not enroll in physics programs and then complain that their physics professors are not teaching them anything about practical bridge construction.

<comment><USER6> Then the problem is with college departments and administration who fail to create separate programs distinguishing between CS and SE.

<comment><USER7> I'd argue that that would be a really bad idea. You can't be a good software engineer without having a good grasp of Computer Science.

<comment><USER6> There's nothing to stop them from having a lot of overlap. Much like how Computer Engineering overlaps quite a bit with EE.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> This is kind of sad, like an english department no longer teaching Shakespeare because it is written in archaic language and can't hold the student's interest. But computer science isn't like english, so I guess it is a bit of false analogy.

Fortunately the text and lectures are available for free online, so there is nothing to prevent the curious student from digging in.

edit: now that I've more time to reflect, I want to revise my thoughts...

I would be pretty pissed I was handed dive into python or something similar as my freshman programming text at a college like MIT or Berkley. I would hope that most CS majors wouldn't be going to into one of the top CS programs in the country cold, having never written a line of code. This is in no way meant to disparage Dive into Python or similar books, but it is something you can read on your own over the course of a week or two. If you aren't going into CS at a top uni to study the hard shit like SCIP, I don't really see the point.

<comment><USER9> The first sentence on diveintopython.org is:

 _Dive Into Python is a Python book for experienced programmers._

Deciding it's an appropriate choice for an entry-level _Computer Science_ course is baffling to me.

</comment></comment><comment><USER10> This isn't a question of whether we should teach SICP, it's a question of whether it's an appropriate _introduction_.

I love SICP, I think it's one of the most brilliant didactic texts ever written, but I think it's a terrible starting point for most students.

To me it appears that SICP is used as a trial by ordeal, intended in large part to scare off 'unsuitable' candidates. SICP is all about the beauty and interest of computation for it's own sake, but it doesn't really engage with solving the kinds of problems most software is written for. I think we're inadvertently dissuading people who would make great programmers, but who see computer science as a means rather than an end and need to relate algorithms and data structures to practical problems.

There is clearly value in CS for its own sake and academics are obviously inclined towards this, but I think dismissing the practical application of CS is unhelpful. If we segregate programmers into 'Computer Scientists' and 'Software Engineers', we lose the most precious part - the bit in between, where radical ideas meet great engineering.

I want to see more diversity in computing and I think SICP as an introductory course is a serious hindrance to that aim. We don't teach children to read and write by starting with linguistic theory. I think we should teach software the same way - start with Dick and Jane and work our way up to lambda calculus.

</comment><comment><USER11> > _Beautiful._

I guess beauty is in the eye of the beholder. A simpler way to analyze this problem is noticing the f(n-3) term implies your function has to memorize up to 3 previous results. Then just use the coefficients from the formula to cycle the next result into memory. Using algebra and generating new coefficients as per the OP's solution is unnecessary.

        function f(n)
          if n<3 then return n end
          local a, b, c = 0, 1, 2
          for i=3,n do
            a, b, c = b, c, c+2*b+3*a
          end
          return c
        end

<comment><USER12> Nice! Also your solution makes it easy to move on to a logarithmic time solution: going from (a,b,c) to (b,c,3a+2b+c) is a linear transformation which can be expressed as a 3x3 matrix, therefore iterating it n times is equivalent to raising that matrix to the nth power, which can be done in log(n) time using square and multiply [1]. Disregard programming, study math!

In fact the exact same reasoning can be used to derive the closed form expression for the Fibonacci numbers [2], which are defined by a recurrence relation similar to the one in the OP. You raise the corresponding 2x2 matrix to the nth power by going to the eigenbasis where the matrix becomes diagonal, raising the values on the diagonal (which turn out to be the golden ratio (phi) and -1/phi) to the nth power, then changing the basis back.

[1] <http://en.wikipedia.org/wiki/Exponentiation_by_squaring>

[2] [http://en.wikipedia.org/wiki/Fibonacci_number#Closed- form_ex...](http://en.wikipedia.org/wiki/Fibonacci_number#Closed- form_expression)

<comment><USER13> And conveniently enough for this discussion, this happens to be exercise 1.19 of SICP ([http://mitpress.mit.edu/sicp/full-text/book/book- Z-H-11.html...](http://mitpress.mit.edu/sicp/full-text/book/book- Z-H-11.html#%_thm_1.19)).

<comment><USER12> Awesome! But actually I think my comment was inadvertently a bit more illuminating than the SICP exercise :-) Despite being on the web, SICP is a "traditional" textbook and doesn't bother to link to Wikipedia. Instead they use some sort of stone-age technology called "footnotes", stuffing all supplementary material right into the book as a couple lines of tiny text. So the student gets the feeling of following a twisty cluttered rabbit hole instead of exploring a new land.

<comment><USER13> Well, SICP was a printed book before being put on the web (as it is quite a few years older than it), and the version you see on the webpage is just a rendition of it in HTML. Still, I didn't know until today that you could link to individual figures and exercises, it will be even more fun to cite it in a quasi-religious, trollish way.

Also, you generalized the principle (and fused two exercises of the book in one :), or at least I'll have to believe you ;) I didn't form really much of an intuition on eigenvectors during the completely proper Linear Algebra course that I took, which is only my fault.

But I think that the exercise serves to reinforce the underlying theme that with enough attention, one can either supply or draw the insight to chip away yet one more part of the problem, to attack it from another angle, to pull it from just another direction that one had not seen before. It celebrates cleverness and knowledge, used to make complex things simple, to find the easy way out the hard way and end up better in the end, and that's partly why it's so cherished, but we all know that.

</comment></comment></comment></comment></comment><comment><USER14> I think that starting with Python is a fine choice. Please keep in mind that it's just the introductory course-- these students are going to be battered with CS theory later on.

We are graduating around 20% fewer students in CS than we were in 2004. We need to find a way to make CS more accessible. I'm not saying that we should make the whole degree easier, but I think that having an easier & more practical first course would be good. The students might not learn as much theory, but they'll get the adrenaline rush of being able to code quickly and do some real damage with their code.

## EDIT: It was a 36% drop from 2004 to 2008. Here is my source: <http://marketing.dice.com/pdf/Dice_TechTalentCrunch.pdf>

<comment><USER15> Those percentages don't mean much out of context. Was the curriculum less stringent back then (I.e. graduating people that shouldn't have been able to)?

<comment><USER14> Unfortunately, that context (a survey of the difficulty of curriculums for CS programs across the country, per graduation class) would be very hard to collect.

However, we could try to look at CS school drop-out rates, and how many students picked-up or dropped the CS major. Nevertheless, it would be hard to separate "difficult courses" from "students who don't really love CS" as boit and pnathan suggested.

</comment></comment></comment><comment><USER16> There is a rather breathless presumption that underlies many of the comments to this article, and it is this: that the only way to learn anything thoroughly is to learn it from the inside out: to start from first principles and gradually pile up complexity and abstraction. There is something very compelling about this approach, probably because it purports to model the mind after nature. Just like complex phenomena in nature is built up of smaller, fundamental particles, so too understanding will be built up from atomic units. But stop and think for a moment: how many things in life are really learned that way? Isn't it more often the case that you hack around and only later come to understand what it was that you were doing? I think the fact that it is so intuitively compelling disguises the fact that this conception of learning is really quite bizarre and implausible.

<comment><USER17> We learn mathematics from the most basic principles and upwards. I don't think there is a way that you could start with higher level concepts and figure out the theory later. It would be incredibly confusing.

Programming is quite different of course. It's not terribly difficult to write a simple program to keep a database of your puzzle collection or build a website to share your puppy photos. One could start from such humble beginnings and build ever-more clever programs and have a steady career doing so. Computers are just machines after all.

But I don't think that's what computer science is really about. IMO it's the study of the nature of computation. Given it's theoretical nature it only makes sense to me that one would start with small foundational concepts and work their way up the ladder as one does in mathematics.

<comment><USER18> "We learn mathematics from the most basic principles and upwards."

Interesting point, although I'm not sure it's 100% true.

For instance, we learn mathematical skills that are readily applicable to life at an early age. Solving a word problem might be the mathematical equivalent of writing a working program that actually does something. And we memorize "formulas", like the simple one to multiply large numbers, at an early age, but don't learn why it works for quite a while.

Induction and abstract algebras might be considered more fundamental, but are introduced much later.

</comment></comment></comment><comment><USER19> I love SICP as much as the next person. I've spent vacations devouring it while despairing girlfriends try to get my attention. Seriously, it is _awesome_.

But, being realistic, an incredible amount of value is currently being created by software _engineering_. Value to society, and (hence) value to those who can practice the craft. I'm not surprised that so many schools are teaching software engineering, instead of computer science.

<comment><USER20> But engineers of the physical world variety learn the fundamentals of physics _while_ learning the pragmatics of building codes, loads, and laws. Shouldn't software engineering aspire to the same level of preparedness?

<comment><USER21> Nuclear Engineer here. I think you're looking at Physics I with rose-colored glasses.

</comment></comment></comment><comment><USER22> So did anyone else look at the challenge problem, see f(n-3), f(n-2), and f(n-1), then immediately think "oh. A three element array would solve that"? Took me less than 60 seconds...

I'm a little worried that I'm so good at imperative programming, though, since it might indicate that I'm "crippled" when it comes to functional programming. I bet one of you could code circles around me when it comes to e.g. implementing a DSL.

Anyone have advice about how I'd go about "diving into functional programming"? What's a fun project to do in Haskell, for example?

I rarely approach a programming problem by trying to define functional routines. Instead, I almost always use state. Seems like a bad habit that I need to focus on breaking.

<comment><USER23> I looked at it and thought, "easy, I'll just rewrite the Scheme function in Mercury and tell the compiler to memoize the function."

Of course, obviously the point of the exercise is to encourage thinking about how a computer _actually_ performs computations, which is in a linear, imperative fashion. In that case, why use Scheme in the first place? Its syntax and semantics encourage exactly the _opposite_ style of programming, and in my opinion, obstruct the learning process in this kind of problem.

To make an analogy, teaching this problem using Scheme is like teaching someone how to bake a cake using an unplugged Kitchenaid. The Kitchenaid _would_ work great if it was plugged in, but it's not, so you have to push the beater around by hand. _Why not just use a hand beater in the first place?_ [Scheme _would_ work great for this problem if it had memoization, but it doesn't, so you have to solve the problem as if you were using Python. _Why not just use Python in the first place?_ ]

<comment><USER24> The point of Scheme isn't to provide you with a given feature like memoization, its to provide you with the tools so you can do it yourself. SICP covers memoization at the end chapter 3.3.3 ([http://mitpress.mit.edu/sicp/full-text/book/book- Z-H-22.html...](http://mitpress.mit.edu/sicp/full-text/book/book- Z-H-22.html#%_sec_3.3.3)):

      (define (memoize f)
        (let ((table (make-table)))
          (lambda (x)
            (let ((previously-computed-result (lookup x table)))
              (or previously-computed-result
                  (let ((result (f x)))
                    (insert! x result table)
                    result))))))

<comment><USER25> And SICP quits at this point? What if "previously-computed-result" is false, because f computes boolean values? This is just an 80% solution, which works for "fib".

<comment><USER24> The implementation of tables that he uses isn't actually reasonable for most use. If actually implementing memoization, one would probably use SFRI-44 style maps, which come with a 'contains-key' function that solves this problem.

</comment></comment></comment></comment></comment><comment><USER26> It looks like the rationale for Berkeley's change is different than MIT. At MIT the change was made because "being a better programmer" in the classical sense was deemed to be less important than other aspects of engineering. If you look at the new MIT course, you'll see that it starts with an intense overview of python and programming techniques and then moves on to apply those techniques in a variety of relevant engineering-related areas. This makes sense in the context of the MIT major given that the choice to focus on software development doesn't have to be made until later on.

(edit: also there's an interview floating around somewhere that talks about the rationale being that modern programming is different in the sense that it more often requires ability to figure out existing libraries as much as an ability to compose well-structured programs.)

</comment><comment><USER27> I basically agree with the OP that Dive into python is a pale replacement, but at the same time there is something to SICP's critics. Peter Norvig seemed to think most people would get the most out of it after getting some experience, and the HtDP authors definitely have a point about how much heavy math is involved. It's still a wonderful book, and won't be lost, I'm sure.

<http://www.amazon.com/review/R403HR4VL71K8>

<http://www.ccs.neu.edu/racket/pubs/jfp2004-fffk.pdf>

<comment><USER2> > _...and the HtDP authors definitely have a point about how much heavy math > is involved._

I get why people object to heavy math in programming -- it makes the entire field less accessible -- but programming is _heavily_ based on mathematics, if not entirely a subset of mathematics. Saying, "it requires too much math to learn this" strikes me as a lot like saying "there's too much biology in learning to be a doctor".

<comment><USER27> I completely agree, but at the same time, it's a barrier to entry that I think might be unnecessary. Some college freshman haven't taken calculus, and SICP would seem a bit daunting at times to those students, I imagine. Unfortunately, I think HtDP goes too far; it's too dumbed down.

<comment><USER2> > _Some college freshman haven't taken calculus..._

Yeah, and that's a serious problem, too -- and one that I'm guilty of! ...that is, if I'd ever gone to college. :-(

I am very much not encouraged by a "race to the bottom" when it comes to education. If calculus is too difficult for the student, then perhaps the student should not consider a career in programming. I say that without any malice whatsoever; I'm not sympathetic enough to be a counselor, and I wouldn't expect counseling courses to simply disregard the importance of counseling so that I could have a job in the field.

To bring all this back to a more practical argument: I am annoyed daily by the great and heaping piles of inefficiencies and bloats and bugs and weaknesses of software. I have to, on a regular basis, explain to clients that they should throw out their old computer and get a new one, so that they can continue to do what is, to them, exactly the same thing they were doing with their old one. That can be a rather challenging thing to explain to some people.

I find it difficult to believe that this ongoing pattern of abuse of resources is not at least partly related to a greater and greater ignorance of the fundamentals of programming.

<comment><USER28> I really don't see what connection calculus has with the vast majority of programming. Calculus, and algebraic manipulation in general, has next to no relationship with programming. I really don't see any reason why someone who has difficulty with calculus would have similar difficulties with programming; for all I know, they missed out on some fundamentals because they were sick in school, or they fell out with their maths teacher, or god knows what.

The only time I've ever used calculus in a program in 20+ years of programming is in physics simulation in some toy game apps; and that was just to derive some formulas that plugged in. They could have easily been solved today with some googling (other people probably solved the same problems) or questions on forums.

(FWIW, mathematics has always been my best and favourite subject in school, aptitude tests put me in 99th percentile, etc. IOW, I have no personal grudge against maths. I just see very little connection to programming outside niche areas, and even then they usually barely scrape the surface of the related mathematical area.)

PS: I think your specific bugbears are not related to mathematics either. Bugs: best approached with proper programming style like invariants and defensive programming, along with testing. The quality of software that people actually use can be measured from feedback, bug fix rates, etc. A bigger issue with bugs is usually economics; it's frequently more important to get things into people's hands quickly and cheaply than it is to have higher quality and compromise the other two. Bloat and sluggishness have two cures: measurement and big-O. I'd put both in engineering rather than maths. Understanding big-O, either explicitly or intuitively, is absolutely essential, though it's all blatantly obvious when you spend some time thinking about it.

<comment><USER29> The only thing special about calculus is that it is where practically all universities have decided to start teaching students to create real proofs with the level of formalism expected in other courses. This is likely due to the fact the world needed more engineers than programmers or mathematicians when this stuff got hashed out.

</comment></comment></comment></comment></comment></comment><comment><USER30> SICP is going nowhere at Berkeley. Take a gander at <http://www.cs.berkeley.edu/~bh/61a.html> (Brian Harvey at Cal is synonymous with 61A) and note:

"Starting with the latter, in 2011-12, 61A will be taught by John DeNero (fall) and Paul Hilfinger (spring) using lecture notes based on SICP (since its text is now available on the web with a Creative Commons license that permits such use) but with the program examples recoded in Python. This is, on its face, a strange idea; Scheme and SICP build on each other's strengths and programming in Python as if it were Scheme will surely result in some of the examples looking unlike the way a native Python speaker would code them. But the long-term plan is that over time, the 61A curriculum will gradually change to include "more modern" ideas, leaving out some of the SICP ones to make room; because of its huge collection of application libraries, the new ideas will be more easily expressed in Python than in Scheme. Also, there is currently a vibrant open-source project community using Python, and 61A students can be introduced into that community."

</comment><comment><USER31> At my school our intro class was in Python, but an SICP class was required for majors. I think this was a pretty decent compromise, especially since many prospective majors placed out of the intro class anyway. I agree that SICP (really FP in general, though the consensus seems to be that SICP is the best way to teach it) is a necessary part of any serious CS curriculum, but I don't think it's necessarily a good place to start--especially if non-CS people are taking the intro class.

</comment><comment><USER32> Whoa, stop. There's a lot of issues in this article. First of all, Berkeley is NOT getting rid of SICP and SICP ideas. This is flat out untrue.

I'm a recent instructor for the course, and I've spoken to several TA's about this course. Below is a rough summary of what we've discussed. This should not be construed as the "official line", but take from it what you will.

First, Berkeley are not getting rid of SICP. For those who aren't aware, they (the future TA's/instructors) are making lecture notes based on SICP but using Python 3).

From a TA: At the end of the day most of the reason for moving to Python (beyond the weak argument that it's a bigger community), is that there was a meeting where they realized that nobody wanted to teach the course in Scheme after Brian retires. I'm not burning him at the stake, I read his argument and I've considered it. All I'm saying is that he has bad information. Also, lambda is cool but the only difference between that and defining a function inside the body of another function is the requirement of a name. I know lambda's amazing and it's not nearly as magical when you do it in Python, but Python supports proper closures which is the real reason lambda in Scheme is so powerful.

A different TA: But the real reason it's not being taught in Scheme? My understanding is that it's not being taught is because no professor wants to teach it in Scheme.

Secondly, we talked about some concerns about whether SICP is actually a good INTRODUCTION. I don't think we dispute that there's a huge value in the course, but whether it's good for an introduction is I think, debatable

I do know that when I was a student, I raised many of these same concerns and frankly, I dont think those concerns are invalid. I think that until you have an appreciation for mathematical elegance and REALLY REALLY understand SICP, which appears to only be true for less than half of the students, much of it is lost. I know that was the case when I took the class, at least.

Should clarify. I'm not saying that 50% of the class "doesn't get it", but there's a deeper level that I think is hard to grasp for people who either don't spend 40 hours a week on this, or don't have a mathematical background.

Good example: Data directed programming. Me as a student was: WTF is this? So I always just call this 'get-data' function? What's the point? Where's the application?

The examples in Scheme are often /SO SIMPLE/ that exercises seem like they are dumb. They often look like a point docking trap in exams to students.

In my mind, SICP is better as a capstone, senior course. Think about all of us who defend it. Do we think that we could reach a better audience with that message if the audience were seniors looking for a summary/enlightenment, rather than freshmen exploring CS and engineering applications?

Here's an interesting direction to take SICP: [http://ocw.mit.edu/courses/electrical-engineering- and-comp...](http://ocw.mit.edu/courses/electrical-engineering- and-computer-science/6-945-adventures-in-advanced-symbolic-programming- spring-2009/)

Correct me if I'm mistaken, but my understanding is that this is essentially SICP if they were to teach a graduate-version of the course. This looked /insanely/ cool.

In any case, for future TAs and Instructors of this course: It is now up to you to make sure the spirit of SICP and CS education lives on! Not that it's been any different since the beginning of time.

<comment><USER33> _In my mind, SICP is better as a capstone, senior course. Think about all of us who defend it. Do we think that we could reach a better audience with that message if the audience were seniors looking for a summary/enlightenment, rather than freshmen exploring CS and engineering applications?_

Indeed. I read SICP while in grad school w/ the online lectures. Frankly, I'm not sure I would have appreciated SICP nearly as much in my freshman year. With that said UCB and MIT are probably the two places you'd expect to find freshman that would appreciate it. But given the fact that the text is freely available online, and there are great lectures available for free online, it might be reasonable to say that for the inquiring student, they can use MIT's Open Courseware.

 _Here's an interesting direction to take SICP: http_

The link you posted is dead. I'm interested in what it is. Could you post a new link?

<comment><USER32> The link was the 6.945 course at MIT. As I understand it, it's SICP used in a graduate course. It still shows up on google if you search 6.945.

For the truly inquiring student, there's also a planned self-paced version of the course that may also include an honors option to dive deeper than what we can do in 61A (aka, SICP/6.001).

</comment></comment></comment><comment><USER34> Even MIT abandoned SICP for its introductory course in favor of Python. But I believe it's featured in its second course, no? I don't consider that a mistake. If you're getting rid of it from the curriculum altogether, though, that's a mistake. This article didn't say if that was the case or not. (Also the point of SICP being language agnostic is fairly false. I mean sure you can implement iteration as recursion in other languages, but without tail call optimization it's going to be ugly. Then there's the whole "code as data" problem that's not easily extendable outside the s-exp world. I guess one might say the important, deeper parts of SICP work across languages, but is there an equivalent somewhere to SICP that's not in Lisp?)

<comment><USER35> > _Also the point of SICP being language agnostic is fairly false._

I remember reading a bit of Eli Bendersky's SICP blog posts[1], where he started with the premise that he was going to work through SICP using Common Lisp rather than Scheme. I think that lasted through about half of the first chapter before he moved back to Scheme because he found it too hard to handle the differences between the two - I don't remember what specifically Common Lisp was lacking, but I remember he made it seem like a huge stumbling block.

[Disclaimer: This comment is based on a half-remembered perusal of only a couple of blog posts well over a year ago. Contents may not adequately reflect reality.]

Edit: I may have been badly misremembering. From Eli's "Conclusion" post[2]:

> _Also, I originally planned to reimplement all the code do all the exercises > in Common Lisp. Later I changed my mind and decided to use PLT Scheme for > some of them. Eventually, I've been using both languages interchangeably, > which is a good thing, as I got some practice with both._

[1] - <http://eli.thegreenplace.net/category/programming/lisp/sicp/>

[2] - <http://eli.thegreenplace.net/2008/04/18/sicp-conclusion/>

<comment><USER36> When I started the project, I preferred CL over Scheme. Later, however, I had some experience with PLT Scheme and really liked the programming environment, so I decided to give it a try. I figured that using both languages will help me understand the differences between them better. It was not some serious limitation of CL, in any case.

<comment><USER35> Thanks for clarifying, Eli.

As I said in my update, I was apparently badly misremembering a comment on your blog regarding the use of CL.

You've actually inspired me to take up a similar SICP reading/blogging project, though I'm hesitant for two reasons. First is the concern over the depth of the material. I don't have a CS degree and I'm mathematically out of shape (and I never even did a calculus class), so I'm concerned about making it to a certain point and then completely failing to be able to continue on. Second is a concern about copyright and plagiarism. I've never been clear where the line is with regards to the sort of summarizing knowledge of a whole book, since paraphrasing is still plagiarism AFAIK. Less of an issue with SICP, I'm sure, since you ended up with a signed copy, but I'm a very risk- averse individual and like to know exactly where I stand before attempting such a thing.

I'm sure that your blog will be a great resource for me when I do my version of your project, so I'd like to thank you in advance for having blazed the trail for me.

<comment><USER34> IANAL. Plagiarism is only relevant in a classroom environment where you aren't doing work in the expected way. Copyright infringement is different. In the case of SICP, the entire book is available online for free, as far as I know the book doesn't contain answers to all of the exercises (so most work you do there is your own), and many of the code snippets are small enough that I don't think they would withstand a copyright claim in court. (It'd be like trying to copyright "for (int i = 0; i < MAX; ++i)".) Even if you blatantly copy out large sections from the ebook for a blog entry, I'm still pretty sure there's a strong fair use claim to be had. (I guess it would be weakened if your blog serves ads.) Cite your source and you'll be alright.

Of course, looking at the actual page is better for solid legal ground <http://mitpress.mit.edu/sicp/> . It's licensed under <http://creativecommons.org/licenses/by-nc/3.0/> so again you're fine to redistribute and modify if it's non-commercial.

re: Calculus, you could always watch a few videos at Khan Academy. ;) I don't remember needing all that much calculus, but if you don't have a concept of derivatives or integrals then some of the earlier examples of higher order functions will go over your head. You could watch some online lectures here: [http://academicearth.org/courses/the-structure-and- interpret...](http://academicearth.org/courses/the-structure-and- interpretation-of-computer-programs) which don't ramp up the difficulty as steeply.

<comment><USER35> Right, sorry. `s/plagiarism/copyright infringement/g`. I've been reading a bit too much about education lately, and I guess it snuck in.

I knew SICP was CC-licensed, so I guess it was relatively clear that I'd be in the clear here. I have a sort of end game in mind where I build myself up enough to work through TAOCP as well (ha!), and it's certainly not CC- licensed. I rather enjoy the idea of doing something like this in public, for moral support and random acts of guidance, so it'll become important for me to know where the line is.

And yes, I'm quite familiar with Khan. I had a couple complaints about the site early on and ended up falling out of the work because of it (the main issue specifically was that I was working through the exercise section, and I had to do a geometry section for which there seemed not to be a relevant video, so I got stuck on a given node in the progress graph). The end game for that plan was to get at least through introductory calculus, since it almost feels like my geek card is illegitimate without it. I definitely need to take another run at it.

</comment></comment></comment></comment></comment></comment><comment><USER37> Publishing a Python version of SICP would solve the problem. Sure, you can't always translate Scheme to Python with ease, but even a smaller, modern edition of SICP written in a Pythonic way would be extremely beneficial.

<comment><USER38> Exactly my thought.

My introduction to Scheme, incidentally, came while I was learning JavaScript, and it was through a book that hadn't originally been written in Scheme, either: <http://javascript.crockford.com/little.html>

</comment></comment><comment><USER39> How introductory programming is taught should really be approached from two directions these days. (1) How to teach a firm foundation for those likely to pursue computer science, and (2) how to motivate and teach a breadth of material to those students who likely will not take more computer science courses.

At a place like Stanford, a majority of undergraduates will have taken an introductory computer science course by the time they graduate, but it's obviously not true that a majority will be computer science majors. And while I appreciate SICP and Scheme and functional programming, and completely understand why that kind of thinking should be valued, it may not be the best way to present a breadth of introductory programming knowledge that will motivate, interest, and offer practical examples. Sure, lambdas are awesome, but when you are just starting out in your first programming course, the deep theory behind why lambdas are so interesting will almost certainly be lost on the students. It's like building up a field of math from, say axiomatic set theory or algebra. By the time you get to multiplication and fields (perhaps akin to variables or for loops in programming), you gain a very deep understanding and appreciation for the topic that can only be gained by this bottom-up problem based approach, but then again, a non-mathematician (or non- computer scientist) could have probably just assume the existence of multiplication or loops for the sake of solving higher-level problems.

</comment><comment><USER40> So SICP is awesome. The article makes that assertion in the third paragraph, and then continues making that point for most of the rest of the article. It does not, however, make a good, convincing argument for why "Dive Into Python" is significantly worse, especially as an introductory text.

> It's just.. it's just not the same.

 _Never say this_. Horrible people (like me?) will point to it as you admitting that your argument is founded on nostalgia for the way things were, regardless of how strong the rest of your argument is.

<comment><USER41> "Stop. Take a deep breath. Think about all that you have just discovered (or if you have already discovered it all, reflect on how awesome it is). By page 45 of SICP, you will have;

        Translated recursive definitions into iterative processes
        Examined the differences in the space requirements of various processes
        Used tail-recursion to implement efficient iterative procedures
        Seen that iteration can be thought of as a special case of recursion
        Realized that iterative processes can be restarted easily by capturing and restoring their state variables
        Given thought to complexity, optimization, and state transition theory
        Been encouraged to explore creative solutions to challenging problems
        Learned the basic syntax and semantics of Scheme
        Observed a quasi-religious experience

What will you have accomplished by page 45 of Dive Into Python? Don't hold your breath. I've looked into it. You'll be learning how to use the and-or "trick" to make simple programs difficult to read. Soon afterwards you'll be exposed to Python's intentionally crippled lambda statement."

"Scheme is considerably less complicated and idiosyncratic than Python. It's simplicity and consistency have immense pedagogical value. It might take you anywhere from a day to a month to pick up the basics of Python. Scheme, on the other hand, has virtually no syntax. It's definitely possible to get a solid grasp of its fundamentals in less than an hour.

Python can be used to accomplish many of the same things as Scheme. Practically anything you can do in Scheme you can do in Python, and formally speaking, the two languages are equivalent.

However, until a Python textbook emerges that surpasses SICP in teaching the core elements of programming, we should stick with Scheme."

<comment><USER40> A single paragraph insulting a work does not a convincing argument make (perhaps the fact that it starts off very slow is good in introductory textbooks?). Nor does an assertion of how Scheme is "considerably less complicated and idiosyncratic than Python" convince me that all Python textbooks must, by necessity, be worse than Scheme textbooks.

I'm entirely willing to admit that SICP is better than Dive Into Python (well, I would be if I had a copy of it around so that I could verify this). I'm just saying that the article does little to convince me of that (and quoting parts of it at me does even less to convince me - if you think that I didn't read it thoroughly enough, just come out and say so).

<comment><USER2> > _...if you think that I didn't read it thoroughly enough, just come out and > say so..._

OK. I don't think you read it thoroughly enough. I wouldn't usually just come out and tell someone that, because it's likely to start a fight, and that won't help anybody. But, since you asked...

The post repeatedly makes the point that SICP primarily presents a language- agnostic approach to understanding how to solve problems in programming. The author even explains that they aren't objecting so much to Python _specifically_ as they are to the fact that there isn't an SICP-type book which happens to include Python for its code examples. The author does make the claim that Python requires more focus on syntax than Scheme does, and exemplifies this with the "and-or trick", but that's not really central to their argument.

Their main argument is that programming should be taught as an approach to problem-solving, not as an introduction to a language, and that by removing SICP from the curricula, future programmers will lose some valuable skills.

And I happen to agree with that.

</comment></comment></comment></comment><comment><USER42> SICP is a great book. Its abandonment is a sad reflexion of the gradual descent of programming teaching from principled discipline into an introduction to the process of trial and error. While most developers probably spend the majority of their time experimentally cobbling together applications from blackbox components, this they can and probably must learn on the job. What SICP tries to teach they cannot -- the most fundamental idea in programming: The evaluator, which determines the meaning of expressions in a programming language, is just another program.

We are starting to embrace again more featureful languages and regrettably accepting that the majority of programmers will use multiple languages regularly. Therefore SICP seems more appropriate than ever!

</comment><comment><USER43> It makes me so happy to see such an interesting and passionate article on hn, and at the top no less. So much more valuable than all the "what kind of socks to wear when launching a starup" type posts.

</comment><comment><USER44> I'm not worried. Good programmers read SICP on their spare time if they don't have to do it in school. If they haven't heard of SICP, they will once they'll join the company of other good programmers and probably find it interesting. On the other hand you can't force material on people who reject it because they don't understand it.

It's just the question of where do we need universities at all when everything valuable is replaced with ever-easier material? Of course, the marginal number of people who actually want to become academics in CS will be needing universities, but that would amount to 1/10th or likely less of current CS student population.

</comment><comment><USER45> I've always found SICP quite overrated (I'm saying this after reading it).

Given Python's learning curve, a much better curriculum would involve going through the codebase of a few well-chosen projects, sending in a few patches and perhaps writing a report on the high-level design of the piece of software or on how the project solves a particular problem (how does XYZ handle i18n? how does ABC stay stable even on a failing network?)

<comment><USER45> I can't say much about "Dive into Python", since I've not read it.

</comment></comment><comment><USER46> I can think of at least three conflicting approaches to teach programming:

\- Start with a low-level language like C (or MMIX...), possibly on embedded devices, so that students know what is going on at the hardware level and don't think that primitives in high-level languages are free.

\- Start with a functional language like Lisp, so that students know the theory and the elegance of functional programming.

\- Start with an easy and practical language like Python, so that students get to write (crappy) code as soon as possible, tweak it until it works, and finally see their program work and do something impressive (to them).

SICP is an excellent book, and a very good choice for the second approach, but it is not the only sensible way to discover programming.

</comment><comment><USER47> I did have SICP when I started undergrad, and I wish, and asked my professor why can't we use "something modern like python". He gave me some reasoning, and I wish I remember what it was. I think part of the problem is that there isn't enough of a "fun" or "excitement" component in SICP for a very many n00bs, which I was then. Python was cool. Perl was cool too. They're not terrible languages, but admittedly boggled down by syntax. Scheme had a "for education purposes rep" (many times propagated by professors themselves). And there was no "easy_install mechanize" or "easy_install pyqt" to start doing cool shit in Scheme (which I don't believe is true, but for whatever reason at that point it wasn't apparent this was even an option to me).

Overall, I had a lot more fun starting off with Python on my own time. I may have taken longer than most to come around and appreciate Scheme, and certainly find myself wishing JavaScript had less syntax. SICP is awesome though. In fact, I sold most of my books after I was done with university including that one. But maybe 3 or 4 years later, I ended up purchasing it again as I wanted to find classic Lisp literature. Only after it got delivered did I realize this was the same book. And this time around I did truly enjoy it. But I wish I remember what reasoning my professor gave for preferring Scheme over Python.

</comment><comment><USER48> I don't know if someone has already cited this lengthy interview to Hal Abelson (co-author of SICP) about this change, but I think it is worthy to point it out:

<http://www.codequarterly.com/2011/hal-abelson/>

</comment><comment><USER49> The books that are beloved by practitioners in a field are not always the best choice in terms of pedagogy. Clearly, these professors think that another book choice will help their students really grok the material. If they're successful, great. If they're not, they'll probably recognize it and supplement with other material or switch to another text. It's certainly possible to be a competent programmer without ever having read SICP in the same way that it's possible to learn linear algebra and calculus without ever having read Strang. My CS program didn't use SICP and I don't feel like I really missed anything of critical importance. There are other very competent authors writing other very good textbooks, after all. I was still exposed to Assembly, Fortran, Pascal, C, C++, Java, Scheme, Lisp, and Prolog in my program and learned core concepts of computer science such as asymptotic complexity, recurrence relations, Boolean logic, countability, Turing machines, finite automata, parsers, interpreters, threads, data structures, grammars, Backus-Naur form, etc.

</comment><comment><USER50> What I do not understand is that Python is seen as a good language to teach Computer Science. I would have thought that a requirement for such a language is that it is theoretically sound. Python has a broken scope concept. Also, I think that a "there is only one way to do it" philosophy, coupled with the crippling of several constructs, is not a good basis for forming an open mind.

</comment><comment><USER51> The new 61a will still try to (roughly) follow the old 61a/SICP curriculum. Dive into Python will (I think) probably just be used in the beginning to introduce the language.

<http://www.eecs.berkeley.edu/~bh/61a.html> Specifically where it says "in 2011-12, 61A will be taught ... using lecture notes based on SICP".

</comment><comment><USER52> I absolutely agree with the gist of this article.

The assumption that college should prepare you for a career is a fallacy. You should be able to teach yourself programming well enough to program, and take a few classes on the side for kicks+extra progress. But going to a 4-year institution and expecting that to be your golden ticket to a career? Ludicrous.

I go to school to be exposed to things I wouldn't otherwise. I go there to meet people I wouldn't otherwise. I go there to figure out myself, and challenge myself. If I wanted to go into a career working with Spring MVC, I'd have been ready for that out of high school (less the degree many places require–the requirements are a separate issue).

</comment><comment><USER53> The obvious solution: rewrite SICP to use Python rather than Scheme. It is CC attribution and non-commercial, so I don't see any legal barrier to outsider revision.

<comment><USER54> The beauty of Scheme is that it makes the underlying language mechanics transparent. The mental models I acquired from SICP for the process of computation have served me well across a dozen languages since.

<comment><USER53> No, I definitely agree with this. Scheme is a valuable pedagogical tool.

But that probably doesn't matter. So it's better, on the whole, to preserve what you can out of the current book by adapting it to Python than losing it completely.

Things will get lost in translation and substantive changes will have to be made. That's why writing textbooks is a creative endeavor rather than just updating the English used in older texts.

</comment></comment></comment><comment><USER55> Good god. I took Sussman's course when SICP was still in the notes phase. I never would have predicted that it would have such a following almost 30 years later.

<comment><USER56> Agreed.

I took Sussman's course in '87 with a $30 used copy of SICP which still sits on my shelf, surviving many other books that have long since faded into obsolescence.

From the preface: "Our design of this introductory computer-science subject reflects two major concerns. First, we want to establish the idea that a computer language is not just a way of getting a computer to perform operations but rather that it is a novel formal medium for expressing ideas about methodology. Second, we believe that the essential material to be addressed by a subject at this level is not the syntax of particular programming-language constructs, nor clever algorithms for computing particular functions efficiently, not even the mathematical analysis of algorithms and the foundations of computing, but rather the techniques used to control the intellectual complexity of large software systems."

Classic.

</comment></comment><comment><USER57> The merits of SICP have been debated many times. More interesting is the choice of "Dive Into Python." Is that really the best Python book for Berkeley CS?

<comment><USER58> That was my thought -- it was certainly one of the earliest books, which may explain why it was chosen, but I'm not sure if it's currently the best.

</comment></comment><comment><USER59> Practical programming should not be the point of early computer science curricula.

<comment><USER60> It should be if you want more people than CS majors to take it.

<comment><USER61> That's why there should be a separate line of courses for people who are interested in practical programming rather than computer science, similar to the way many schools have separate "calculus for business" or "calculus for engineers" classes for those who aren't math majors.

</comment></comment></comment><comment><USER62> Actually, i agree with him than SICP goes through a lot more important concepts than Dive Into Python, or any other book like this can do.

I also don't find it good that berkeley is abandonning it. But, i _really_ think that it's not necessarily a good choice for an _introductory_ course.

To sum up my position fast, i would say : "First teach how to program some silly things, by teaching the basis of a language (and python seems a very good choice for this). Then when students are addicted, show them some SICP"

This resonates with a lots of comments about SICP, where people who liked it are often quite experienced programmers, and not beginners (Not to say that SICP can't be appreciated by novices, but that it's probably a bit hard for an introductory course)

EDIT : Sorry, jdietrich did say something very similar to me in an earlier comment that i didn't see : <http://news.ycombinator.com/item?id=2846189>

</comment><comment><AUTHOR> ### An Update

SICP will not be abandoned at Berkeley.

Although Python will be used to convey the material, I have been assured that much of the content from SICP will be preserved.

I recognize now that CS61A is a fusion of sorts: an exciting modern treatment of traditionally intellectual material. This change reflects concerns about the difficulty of SICP, the popularity of Python, and a general lack of interest on the part of students and teachers in Scheme. Fair enough. I think this is the best possible solution for an introductory course, but that's just my opinion.

I want to reiterate that I mean Berkeley or its professors no disrespect, and that I only raised this issue because I was concerned about a potentially drastic shift in the curriculum.

I can't begin to thank you all for your comments, criticism, emails, and interest. It's made a world of difference.

</comment><comment><USER63> Damn, I feel like I'm really missing out having only been through a community college for CS. This is exactly what I need.

I don't know if anyone else posted this already...

SICP full-text online: <http://mitpress.mit.edu/sicp/>

</comment><comment><USER64> Why to make so much noise? Universities, even good ones, are about making money _at first_. So, if mediocre masses thinks that python is 'more practical' or that 'with Java they can always get a job' they have no choice, but to follow these stupid stereotypes.

Trying to convince mediocre masses that Scheme is really beautiful or SCIP is the greatest programming book ever (OK, together with the Man-month =) is not their job, their job is to get money from student's parents, good PR and grants from government or IBM.

Those who are smart enough and have a bit of taste will find out SCIP or discover beauty of Scheme (Python3/Ruby) and abandon Java or PHP themselves. ^_^

</comment><comment><USER65> I don't know what, if anything, is going on at Berkeley, but Hal Abelson talked quite a bit about the switch from SICP to a different intro course at MIT when I interviewed him for Code Quarterly <http://www.codequarterly.com/2011/hal-abelson/> and it wasn't about abandoning Scheme or "not teaching core computer science". (Well, maybe a bit less core computer science in the intro course but that was basically so that CS people could have more time later for CS without all that annoying EE stuff. And vice versa.)

<comment><USER66> Yeah, well, Hal has be diplomatic, he can't authoritatively state that the order came down from on high (perhaps above the department) that Scheme was to be totally purged from the base undergraduate curriculum, which to my knowledge was finished not long ago. That's what's behind his statement " _And for random reasons we didn't [do the course in Scheme]_."

That said, Hal himself does fully support the change from SICP/6.001 to 6.01 according to my sources.

And you're right that much less EE is required of of pure CS majors (6-3s), but I'm told that very few current students do that major, most do the combined EECS one....

To finish, while I don't have time right now to finish reading/skimming your very interesting interview (you do realize you are by far the best interviewer in our field?) as far as I can tell a lot of the deep stuff taught in SICP/6.001 has also been purged from the base undergraduate curriculum. Kinda reminds me of when the Boy Scouts of the USA changed their system in the '70s so that you could become an Eagle Scout without ever having camped outdoors, started a fire, etc.

(My response to that was to drop out of Boy Scouts; here, as a scientist by inclination who just happens to narrow interests in CS which are fairly EQ with SICP I don't exactly have a dog in this hunt (amusingly, my other big interest in this general field is pure software engineering, the fruits of starting out on an IBM 1130 and realizing there HAD to be a better way to do things :-). Although I do seriously wonder about the de-emphasis of functional programming at some of the top 4 in the multi-core future which is today).

</comment></comment><comment><USER67> Muy importante. :-)

Late to the party here, but over at the other SICP-related thread that's on the frontpage right now I've linked to an updated version of SICP where an enthusiast has created a pdf with greatly improved legibility, formulas set with tex and figures drawn with vector graphics.

<http://news.ycombinator.com/item?id=2848154>

</comment><comment><USER68> For those who haven't read SICP: don't get the impression that it only deals with very easy stuff like the example in the post about turning a recursive definition into an iterative one. It actually touches on many of the bet ideas in CS. This post could have easily chosen a more interesting example.

</comment><comment><USER69> The author makes the assumption that the only books people will ever read are those books that were assigned as part of a formal course. That may be true of some people, but it's certainly not true of the average programmer!

<comment><USER70> You have a very high opinion of the average programmer. I'd say unrealistically high.

<comment><USER69> Even the average programmer must keep up with the changes in whatever systems and languages they use, long after completing formal education. Therefore they must read beyond what their formal education prescribed.

</comment></comment></comment><comment><USER71> You might find this recent interview with Abelson to be interesting, esp with respect to the history of SICP at MIT:

<http://www.codequarterly.com/2011/hal-abelson/>

</comment><comment><USER72> I am just curious on this as I don't know Scheme at all. Could a new SICP book be authored that used Python instead of Scheme? Thereby, teaching what SICP was meant to teach yet using Python a well used "field" language?

</comment><comment><USER17> I felt the same way wrt The Little/Seasoned/Reasoned Schemer and religious experiences.

It's a shame that they're removing SICP in favour of a technical introductory text.

Python is great and all, but SICP isn't about teaching Scheme.

</comment><comment> ryan-allen SICP will always exist though, people don't have to go to MIT or whatnot to read it and receive it's wisdom! I have my copy, it's not going anywhere!

</comment><comment><USER73> programmers who have a good understanding of scheme and SICP are likely to pick up programming in python (or equivalent such as C#, Java, etc.) anyway - either on their own, or through industry experience.

it is a shame that csci is shifting away from teaching fundamentals to teaching syntax. it would be like teaching art with color-by-numbers.

</comment><comment><USER74> To the ramparts!!

</comment><comment><USER75> I'd been programming over 20 years when I read SICP. The book was interesting. It was interesting as an introduction to functional programming. But, in my opinion, a lot of the stuff in it that is held up to be clever or informative is just difficult because the reader is expected to figure out how to to imperative programming in a functional language.

A computer is an imperative device. It is a deterministic state machine. Teaching introductory programming with a functional language is teaching students _wrong_ , i.e. it does them a disservice. This being ycombinator, and given pg's thoughts on the merits of FP, I may not have a popular view. We will just have to agree to disagree.

Once you figure out (i.e. immediately if you have done it before) that computers are imperative, not functional, many of the "truths" or "revelations" in SICP are like "well, duh" or worse, "why the fuck did you make me go to all that effort?"

<comment><USER76> _A computer is an imperative device. It is a deterministic state machine. Teaching introductory programming with a functional language is teaching students wrong, i.e. it does them a disservice._

One could as easily argue that a computer is a tool, and if it helps us making _better_ (according to some criteria) programs, why not abstract away the underlying architecture?

<comment><USER75> _why not abstract away the underlying architecture_

Because it would not be an abstraction of what is there. It would be the creation of an abstraction of something that isnt there: i.e. a simulation. And indeed, this is exactly the cause of my complaint.

Its like you have a machine that deals with squares. You're suggestion is to "abstract" the system into shapes, but then build a system using circles. A shape is an abstraction of both squares and circles. But a circle is not a square, and squares are what you have. FP languages and Imperative Languages are both specializations of the "programming language". But FP is _not_ a generalization of IP. The computer is an IP machine.

When reading SICP there were several places where I had an uneasy feeling. Something was wrong and I didn't immediately know why. Then it clicked: I'm being asked to make rectilinear geometry out of circles. First time students aren't going to make it past the confusion.

And finally, if we're abstracting away the underlying architecture, why the focus on tail-recursion (an optimization), iteration vs recursion (an optimization), memoization (an optimization)... The complaint of the original article is that the alternative books are "How To Program In Language X", instead of "How to Program". However, SICP is most definitely "How to Program in Scheme".

<comment><USER77> In my country, we have Computer Science and Computer Engineering. CompSci is done in Science or Math faculties, while CompEng is done in engineering faculties.

CompSci is about abstract theory. It's more related to math then to engineering. To CompSci, computer languages are the building blocks. The fact that those language happen to run on computers is implementation detail. The fact that those computers are imperative is also implementation detail.

I'd say most CompSci students here don't care much about the inner workings of computers.

CompEng students are different. They couldn't care less about functional programming and care a lot about the underlying implementation.

Different people, different interests. I'd keep SICP for CompSci but not for CompEng.

I'll end with a quote: _Computer science is no more about computers than astronomy is about telescopes_ _~Edsger Dijkstra_

</comment></comment></comment></comment><comment><USER78> Wonderful article..

\- Lambda - The Ultimate Ponzi Scheme ;)

\- SICP is a bit old book :(

\- Things must EVOLVE, Mutation is bad ;)

\- The best way to make both ends meet is to tie a knot ;)

\- SICP 2.0 - Why don't the nirvana hackers hack the SICP book and lay down stuff they have learnt since their enlightment, as a legacy for all the future CS students? :)

\- It will be a OPEN book, highly reviewed and revered ;)

</comment><comment><USER79> So the school for auto mechanics is no longer using the Ford Mustang II from 1974 for teaching purposes? How sad...</comment>


Norway Idea to Exit Oil Stocks Is 'Shot Heard Around the World' - <AUTHOR> https://www.bloomberg.com/news/articles/2017-11-17/norway-idea-to-exit-oil-stocks-is-shot-heard-around-the-world <comment><USER2> > The Nordic nation's $1 trillion sovereign wealth fund said Thursday that > it's considering unloading its shares of Exxon Mobil Corp., Royal Dutch > Shell Plc and other oil giants to diversify its holdings and guard against > drops in crude prices.

That doesn't sound like activist divestment. And in fact, environmental activism isn't why Norway is considering this action:

> Norwegian officials say the plan isn't based on any particular view about > future oil prices

> ...

> the move has more to do with hedging risk than saving the planet. Norway > derives about 20 percent of its economic output from oil and gas. Finance > officials have long debated whether reinvesting those profits back into > petroleum producers leaves Norwegians overly exposed to the volatility of > oil prices.

So the headline and intro are fairly misleading, IMO.

<comment><USER3> Although driven by their own policy, the fact that _almost half_ of the new cars in Norway are electric/hybrid vehicles is incredible. I think they know EVs are on a growing trend, and they just get to see it at an accelerated rate than everyone else - but they probably believe the same will happen elsewhere, just 5-10 years later. I think it's unlikely that this wasn't at least a small factor in their decision.

I also believe that as EVs grow to 5%, 10%, 20% of the global sales for cars, Norway will increase its "hedging" over the next few years, which will show some direct correlation between EVs and Norway's decision to hedge its oil stock risk.

<comment> semi-extrinsic One should factor in that Norway's petroleum exports are ~50% natural gas (of which <1% goes to fuels for cars) and ~50% oil (of which ~60% becomes fuel for cars, trucks, tractors, excavators, airplanes, etc.).

So the total "negative exposure" towards EVs if all cars everywhere become electric is <30%.

Furthermore, the retail sales of gasoline and diesel fuel has not yet shown any decline in Norway [1], despite EV-subsidising policies being in effect for a decade. So decreased fuel sales volume has a many-year (perhaps even decade) long lag behind increased EV sales. (The average Norwegian car is 17 years when it is scrapped.)

[1] [https://www.ssb.no/en/energi-og- industri/statistikker/petrol...](https://www.ssb.no/en/energi-og- industri/statistikker/petroleumsalg/aar) \- petroleum product sales statistics, English description, you can export to csv file.

<comment><USER4> > the retail sales of gasoline and diesel fuel has not yet shown any decline > in Norway [1]

Odd. The stats you point to say otherwise. Says motor gasoline is down (1.9%) and diesel is up (4.7%) – so it's kind of a wash.

More interestingly (in the context of this news of divestment) the total figures are down year on year on year

(in 1000 litres units)

        2012    9 635 521
        2013    9 279 405
        2014    8 995 567
        2015    8 827 093
        2016    8 790 684

In light of those figures divestment looks sensible.

<comment> semi-extrinsic No, you have to look at just the sum of dutiable diesel and gasoline, which shows no decrease (even an increase). Most of the change you're summarizing above is reduced usage of light fuel oil (for heating), marine fuel and heavy distillate, particularly the latter two. Those changes are not caused by EVs.

</comment></comment></comment></comment></comment><comment><USER5> "Sharp retreat: European oil stocks react"

I wish financial reporters would stop using blatant hyperbole. The graph shows a -0.21% drop. That's nothing. The intraday noise is half that amount. 5% might be a "sharp drop," 10% definitely would be, but 0.2%, is not even a blip. A more realistic report would be "European stocks practically ignore Norwegian fund's announcement to leave oil" but that would not support their message that Norway is doing this as a statement about climate change. (In fact, as reported, their statement said nothing about the reasons for diversification, so the report's twisting that into a polemic about how everyone is abandoning oil is unjustified.)

<comment><USER6> "Minuscule blip: European oil stocks not really affected" doesn't grab those clicks, though. They won't stop using hyperbole for headlines unless the evolutionary pressure (i.e. revenue model) significantly changes for news media.

<comment><USER7> "Sharp drop or miniscule blip? Environmental activism or cold economic calculation? Find out which Nordic country made this sudden bold move to their portfolio!"

</comment></comment></comment><comment><USER8> So while this doesn't appear to be an 'ethical divestment' but more of a 'spread the risk'sort of move, I'd still like to say: I've never heard a convincing argument for ethical divestment (and this is coming from someone who's a bit of a SJW). My main point is that unless you buy stock in an IPO, then buying shares does not increase the funds the company has available to perform its operations (some or all of which you may disagree with ethically), so you're not changing anything. Unless you think that you can shame the whole world into not buying the stock even if it's a good investment (yeah, right), then all you're doing is making sure the company is owned by people more scrupulous than yourself. If you really want to influence a company to change its ways, you should become a major shareholder and actually change it. And if a given company is the best investment you could make (to the best of your knowledge), wouldn't you be able to accomplish more good with the money you could make from that investment? (e.g. using the money to lobby lawmakers to make a carbon tax does way more than divesting from fossil fuel companies does). So it seems to me that ethical divestment has this in common with terrorism, that the action itself doesn't actually achieve anything, and the whole point of it is really just to cause a fuss and get in the news.

<comment><USER9> I think the reasoning is that divesting can reduce demand for a stock. Thus reducing the stock price, and reducing the future financing capacity of the company.

<comment><USER10> The only financing that happens with a stock is at the point of IPO, which is obviously not applicable for these ancient oil companies. I'm not sure an oil company has issued more outstanding shares for financing in a very long time. They get the vast majority of their financing through low-interest debt.

<comment><USER11> > The only financing that happens with a stock is at the point of IPO

False. Companies make secondary offerings for acquisitions or other purposes as well as issuing shares as part of employee/executive compensation.

</comment></comment></comment></comment><comment><USER12> This seems like a particularly bad article, especially considering that it's published in a business publication. While the article does say:

 _Norway derives about 20 percent of its economic output from oil and gas. Finance officials have long debated whether reinvesting those profits back into petroleum producers leaves Norwegians overly exposed to the volatility of oil prices._

It fails to state clearly that the only reason that Norway has a $1 trillion dollar surplus of funds is because of their oil wealth. They are divesting from oil stocks due to simple goal of diversification, to prevent the Norwegian economy and the fund from being too closely coupled. While it's gauche to quote Wikipedia as the arbiter of truth:

 _The Government Pension Fund Global, also known as the Oil Fund, was established in 1990 to invest the surplus revenues of the Norwegian petroleum sector._

 _The Government Pension Fund Global (Norwegian: Statens pensjonsfond Utland, SPU) is a fund into which the surplus wealth produced by Norwegian petroleum income is deposited. Its name changed in January 2006 from the Petroleum Fund of Norway. The fund is commonly referred to as the Oil Fund (Norwegian: Oljefondet)._

 _The purpose of the fund is to invest parts of the large surplus generated by the Norwegian petroleum sector, mainly from taxes of companies but also payment for licenses to explore for oil as well as the State 's Direct Financial Interest and dividends from the partly state-owned Statoil. Current revenue from the petroleum sector is estimated to be at its peak period and to decline in the future decades. The Petroleum Fund was established in 1990 after a decision by the country's legislature to counter the effects of the forthcoming decline in income and to smooth out the disruptive effects of highly fluctuating oil prices._

[https://en.wikipedia.org/wiki/Government_Pension_Fund_of_Nor...](https://en.wikipedia.org/wiki/Government_Pension_Fund_of_Norway)

The most charitable interpretation I can come up with is that BloombergMarkets assumes that everyone bothering to read the article already knows this. But somehow I doubt this is true, and that the authors were actually making this assumption. So why is it written this way? Spin, ignorance, or just bad editing?

<comment><USER13> Excellent observation, this just irked me as well.

> So why is it written this way? Spin, ignorance, or just bad editing?

I don't know. Good question, though. A symptom of the journalism crisis in general? I can't remember where, but I think I read something about it a couple of days ago, something along the lines of a bubble of digital journalism, about to burst pretty soon, etc.

<comment><USER14> I read it too. Though Pocket, without ever seeing ads.

[http://talkingpointsmemo.com/edblog/theres-a-digital- media-c...](http://talkingpointsmemo.com/edblog/theres-a-digital-media-crash- but-no-one-will-say-it)

<comment><USER13> Yes, that's what I meant. Thank you.

</comment></comment></comment></comment><comment><USER15> Anyone know of index funds closest to vanguard low cost options that exclude oil and other stocks not friendly to the environment? I wish there was a fund where I can handpick my investments through exclusion of various categories against my core values but without having to pick individual stocks. Perhaps this exists and I'm just unaware?

<comment><USER16> There are a number of "socially responsible" ETFs with quite low fees - not as low, but not bad. Most focus on environmental goals, though some have worker rights, "biblical values" or equality goals too, some also seek to derive most of their revenue from the renewable industry. That's definitely riskier, but may appeal to some.

[http://www.etf.com/sections/features-and- news/top-10-sociall...](http://www.etf.com/sections/features-and- news/top-10-socially-responsible-etfs?nopaging=1) has some basic details about some popular ones.

<comment><USER17> If your interested in the opposite there is always the VICEX EFT.

"VICEX, as the ticker implies, holds a basket of stocks specializing in alcoholic beverages, tobacco, gaming and defense/aerospace industries"

Just missing CXW and its 6% dividend to round out the fund.

<comment><USER18> In this context the "opposite" would be something like an energy or utility ETF (like Vanguard's VDE or VPU), funds that are 100% invested in fossil fuel infrastructure.

</comment></comment></comment></comment><comment><USER19> It's impressive the way Norway has manage to avoid the Resource Curse ([https://en.wikipedia.org/wiki/Resource_curse](https://en.wikipedia.org/wiki/Resource_curse) ) unlike Saudi Arabia, Venezuela, etc.

Great article on slate about it: [http://www.slate.com/articles/business/moneybox/2004/10/avoi...](http://www.slate.com/articles/business/moneybox/2004/10/avoiding_the_oil_curse.html)

While the economics of it are sound, i.e. diversification, etc. it still is a major asset movement by an investor who would otherwise be strongly bullish on the commodity. Any way you slice it, this is a big deal.

<comment><USER20> Some think the curent corruption crackdown in Saudi Arabia is merely an excuse to seize the assets of eveyrone opposed to the official diversification plan. [https://www.theguardian.com/world/2017/nov/10/how-the- saudi-...](https://www.theguardian.com/world/2017/nov/10/how-the-saudi-arabia- anti-corruption-crackdown-will-play-out)

</comment></comment><comment><USER21> Norwegian Business School and the government have looked and promoted for years solutions for the local economy after oil party will end-up. It's a way to speed-up this transition to a cleaner economy with the risk of loosing some.. focus on the climate and lead that direction. Building a new church, paying for past sins, nothing wrong with that.

<comment><USER22> While this helps diversify, it doesn't really affect the transition of the Norwegian economy, though - the oil fund only invests outside of Norway. There is a much smaller fund that does invest in Norway, and the Norwegian government does own a substantial proportion (about 1/3 last time I checked) of the total value of the Oslo Stock Exchange, but that's a separate issue from the oil fund.

</comment></comment><comment><USER23> It's not like the idea should surprise anyone. It has always been a discussion whether or not to invest in oil.

A big part of the idea behind the oil fund is to make sure the county has resources if the income from oil where to decline. Investing in oil when such a high percentage of Norway's income is from oil might be a bad idea.

This is nothing more than "it might be a bad idea to put all the eggs in the same basket".

</comment><comment><USER24> This is just prudent diversification. If you work at Google and your personal capital is tied to Tech, go easy on Tech stocks in the retirement account. Bankers who held too many financial services stocks in 2008 saw their 401Ks crater at the same time they lost their jobs.

If the fund is to diversify away from oil, silly to buy oil stocks. If oil does well, they have more in the ground.

<comment><USER25> Interestingly, I believe this is a part of Eugene Fama's original argument for the value premium (workers buying stocks in industries outside their own).

</comment></comment><comment><USER26> Saudi Arabia has been diversifying out of oil for at least a few years. Everyone sees the same thing. We are one battery technology breakthrough away from gasoline being unnecessary.

</comment><comment><USER27> A related news item these days rolling in Norway is how a big investment (Goliat platform) is posed to make a net loss, costing the goverment a lot of money due to the tax regime. (Jury will be out for many years, investments in arctic oil happen 10-15 years before thw income).

Because of the high extraction costs for Norwegian oil, it is possible for Norwegian oil to crash, while other oil producers are still massively profitable.

So it is not about "oil or not oil" as such but the oil price.

</comment><comment><USER28> Isn't that a rather odd announcement?

If I was thinking of selling a huge amount of shares, I'm not sure I would announce I was considering selling and drive the price down.

What was their thinking here?

<comment><USER29> It's such a big decision that it has to be debated and decided upon by Parliament, so it can't stay secret.

<comment><USER30> Yes, as I understand it the petroleum found does very little active management, but instead have a mandate to hold stock based on the FTSE Global All Cap Index.

Changing the mandate require approval by the parliament.

<comment><USER22> It does do active management in some asset classes. E.g. real estate purchases and the like. It also does buy or divest shares based on various other consideration, such as ethical rules. But you're right that they're investing according to a mandate set by government so they're limited in what they can do.

</comment></comment></comment></comment><comment><USER31> An interesting piece of news. While this does not mean that the oil industry is going to die tomorrow, it sends the clear message that Norway starts to think that their money earned from oil production might be better invested long-term into something else. This is probably not surprising, but definitely another indicator that oil isn't "the future" any more.

</comment><comment><USER32> Why they keep pumping out their oil and buying financial junk for this, I really don't understand. Just keep the oil in the ground if you want safety fund, stop financing all kinds of modern tech bullshit around the world. This is my advice to Norwegians, your fund is going to turn into pile of junk when you most need it. Conserve your resources instead.

</comment><comment><USER33> Seems to be a media attempt at drumming up panic. The post outlines that the Norwegian fund won't be the first institutional investor divest itself of fossil fuels and is doing so for simple diversification purposes. The decision's also not set in stone and will take at least a year to be finalized.

</comment><comment><USER34> When the Rockefellers divested of oil and gas a year or two ago that was a heads up to everyone that they should reconsider this asset class.

</comment><comment><USER35> Norway is typically not behind the trends. I hope O&G's contingencies are ready for execution. That's 1 trillion.

</comment><comment><USER36> It's quite obvious they're doing this to diversify. It's not exactly a shock.

</comment><comment><USER37> Smart forward looking decision.

</comment><comment><USER35> :Norway is typically not behind the trends. They set them.

</comment><comment><USER38> I worry about Canada's significant dependence on oil as well.

<comment><USER39> If the world ever diversifies away from oil then Canada will take a major downturn. Canada is the 3rd or 4th largest oil exporting country.</comment></comment>


Is it possible/practical to program android in a language other than Java? - <AUTHOR>

So the quick and dirty back story of this question is that when I originally read Google's response to the Java lawsuit by Oracle, Google made reference to the fact that android doesn't use the Java virtual machine (it uses some other VM, but the name escapes me at the moment) and went on to say essentially that Java isn't the only language that can be used with the OS.
So when I read that it really got me thinking about how great it would be if I could program android apps without using Java.  This is relevant to me because I know plenty of programming languages but I really haven't picked up Java or its predecessor C++ (technically I did make a basic android app essentially using what little I have learned of C).
Anyway its been a few months since I read that story and I have been digging around here and there (not too seriously) and have come across a few posts/blogs/ect affirming that it is possible and there is a tiny bit of documentation out there (for instance I found some python users out there using "Jythonroid")
Anyway the question is, is it really practical to program android in another language (yes I realize android utilizes XML in addition to Java) and if so which is the language(s) of choice?
Additionally, any bread crumbs that can be left leading to documentation would be very much appreciated.
Thank you.
Student
Daytona Beach, FL <comment><USER2> Depending on what you want to do there are some options.

The one that's been around longest but the most limited is the ASE (Android Scripting Environment) [http://google- opensource.blogspot.com/2009/06/introducing-an...](http://google- opensource.blogspot.com/2009/06/introducing-android-scripting.html)

Using the ASE you can create some simple programs to do small tasks.

If you're looking to build a full app you're probably going to be looking at either working through Java, or if you're on Gingerbread you can use C++. Previous versions of Android allowed for C++ libraries being linked to your apps but had no way to access the APIs for creating graphical interfaces. That's now changed so I recommend you look into the SDK and NDK if you're really serious about building on Android. <http://developer.android.com/sdk/> <http://developer.android.com/sdk/ndk/>

The only other option that I know about is that the Mono framework is being ported to android (.NET framework port). So if you know C# or any other .NET language you may be able to start there, although I think it's currently in closed beta. <http://monodroid.net/>

</comment><comment><USER3> Android uses the Dalvik virtual machine, which is a clean-room implementation and different to JVM. Basically the .dex files are about 45% in size of compressed JAR files. Dalvik has been optimised for small RAM & slow CPU (compared to recent notebooks and desktops).

If you Google "Dalvik VM" you'll find lots of interesting information, too many to list here. There's a Google presentation which is very good.

So the answer to your question, is that so far, AFAIK, there is no compiler that directly generates Dalvik executables into .dex files. Currently, you need a Java .class file or a .java file and get it translated into a .dex file. But a retargetable compiler, like llc, could be customised to generate .dex files directly. An interesting project.

</comment><comment><USER4> Yes, possible:

[http://android- developers.blogspot.com/2011/01/gingerbread-n...](http://android- developers.blogspot.com/2011/01/gingerbread-ndk-awesomeness.html)

</comment><comment><USER5> I hate Java, but am using it for Android to take full advantage of the platform.

However, as an Actionscript guy I am curious about using AIR to write Android apps. Specifically, if I did this, would I be able to offer upgrades to native apps writen in Java down the road? Or would the Java versions have to be installed as separate apps rather than upgrades?

</comment><comment><USER6> I wrote a couple of test android apps in scala and was very pleased with the results. Scala is a huge improvement on java but gives you nearly the same execution speed which is particularly important on devices with limited CPU and RAM. There's a plugin for sbt (a scala build tool) that will assemble your .apk and upload it to the emulator or a device.

<comment> T-R I remember reading somewhere on Stack Overflow that Scala development on Android was less than optimal. Do you know if the situation has changed at all?

Edit: Here's where it was -

[http://stackoverflow.com/questions/476111/scala- programming-...](http://stackoverflow.com/questions/476111/scala-programming- for-android)

And some more information:

<http://riddell.us/ClojureAndAndroidWithEmacsOnUbuntu.html>

[http://stackoverflow.com/questions/3242034/android- without-j...](http://stackoverflow.com/questions/3242034/android-without-java)

[http://stackoverflow.com/questions/2832773/alternatives- to-j...](http://stackoverflow.com/questions/2832773/alternatives-to-java-on- android)

[http://stackoverflow.com/questions/3002566/can-i-program- for...](http://stackoverflow.com/questions/3002566/can-i-program-for-android- using-any-jvm-language)

[http://stackoverflow.com/questions/1994380/substantial- andro...](http://stackoverflow.com/questions/1994380/substantial-android- development-in-scala)

<comment><AUTHOR> Thanks for the links. It looks like scala is the most viable option currently, but a few others exist as well. I will probably doodle in scala later this week and see what I can make of it.</comment></comment></comment>