Berkeley CSUA MOTD:Entry 54156
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2011/8/3-27 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Python] UID:54156 Activity:nil
8/3     http://vedantk.tumblr.com/post/8424437797/sicp-is-under-attack
        \_ http://www.cs.berkeley.edu/~bh/61a.html
           \_ this is sad
        \_ "An Update
            SICP will not be abandoned at Berkeley."
2025/05/24 [General] UID:1000 Activity:popular
5/24    

You may also be interested in these entries...
2014/1/14-2/5 [Computer/SW/Languages/C_Cplusplus] UID:54763 Activity:nil
1/14    Why is NULL defined to be "0" in C++ instead of "((void *) 0)" like in
        C?  I have some overloaded functtions where one takes an integer
        parameter and the other a pointer parameter.  When I call it with
        "NULL", the compiler matches it with the integer version instead of
        the pointer version which is a problem.  Other funny effect is that
        sizeof(NULL) is different from sizeof(myPtr).  Thanks.
	...
2013/4/9-5/18 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Apps, Computer/SW/Languages/Perl] UID:54650 Activity:nil
4/04    Is there a good way to diff 2 files that consist of columns of
        floating point numbers, such that it only tells me if there's a
        difference if the numbers on a given line differ by at least a given
        ratio?  Say, 1%?
        \_ Use Excel.
           1. Open foo.txt in Excel.  It should convert all numbers to cells in
	...
2013/4/29-5/18 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Compilers] UID:54665 Activity:nil
4/29    Why were C and Java designed to require "break;" statements for a
        "case" section to terminate rather than falling-through to the next
        section?  99% of the time poeple want a "case" section to terminate.
        In fact some compilers issue warning if there is no "break;" statement
        in a "case" section.  Why not just design the languages to have
        termination as the default behavior, and provide a "fallthru;"
	...
2012/7/19-11/7 [Computer/SW/Languages/C_Cplusplus] UID:54439 Activity:nil
7/19    In C or C++, how do I write the code of a function with variable
        number of parameters in order to pass the variable parameters to
        another function that also has variable number of parameters?  Thanks.
        \_ The usual way (works on gcc 3.0+, Visual Studio 2005+):
               #define foo(fmt, ...) printf(fmt, ##__VA_ARGS__)
           The cool new way (works on gcc 4.3+):
	...
2011/3/7-4/20 [Computer/SW/Languages/C_Cplusplus] UID:54056 Activity:nil
3/7     I have a C question.  I have the following source code in two identical
        files t.c and t.cpp:
                #include <stdlib.h>
                int main(int argc, char *argv[]) {
                  const char * const * p1;
                  const char * * p2;
	...
2011/2/5-19 [Computer/SW/Languages/C_Cplusplus] UID:54027 Activity:nil
2/4     random C programming/linker fu question.  If I have
        int main() { printf("%s is at this adddr %p\n", "strlen", strlen); }
        and soda's /proc/sys/kernel/randomize_va_space is 2 (eg; on)
        why is strlen (or any other libc fn) at the same address every time?
        \_ I don't pretend to actually know the right answer to this, but
           could it have something to do with shared libraries?
	...
2010/2/12-3/9 [Computer/SW/Languages/C_Cplusplus] UID:53708 Activity:nil
2/12    I need a way to make a really big C++ executable (~200MBs) that does
        nothing.  No static initialization either.  Any ideas?
        \_ static link in lots of libraries?
        \_ #define a   i=0; i=0; i=0; i=0; i=0; i=0; i=0; i=0; i=0; i=0;
           #define b   a a a a a a a a a a
           #define c   b b b b b b b b b b
	...
2009/9/28-10/8 [Computer/SW/Languages/C_Cplusplus] UID:53409 Activity:nil
9/28    http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
        Java is #1!!! Followed by C, PHP, C++, Visual Basic, Perl,
        C#, Python, Javascript, then finally Ruby. The good news is
        Pascal is going waaaay back up!
        \_ C is still more popular than C++?  I feel much better about myself
           now.
	...
2009/8/7-14 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java] UID:53252 Activity:high
8/6     In C one can do "typedef int my_index_t;".  What's the equivalent in
        C#?  Thanks.
        \_ C#? Are you serious? Is this what the class of 2009 learn?
           \_ No.  I have to learn .NET code at work.  I am Class of '93.
           \_ python is what 2009 learns, see the motd thread about recent
              cal courses and languages
	...
2009/7/21-24 [Computer/SW/Languages/Java] UID:53168 Activity:moderate
7/20    For those who care btw, it looks like eclipse is now A Standard Tool
        at UCB ugrad cs, probably replaced emacs.  Furthermore, people get
        angry at seeing Makefiles, (since eclispe takes care of that).  I
        guess it's just a sign of the times.
        \_ The more people at my work use eclipse the less the code is
           managable in emacs.  I'm not sure which application's fault
	...
2012/12/18-2013/1/24 [Computer/SW/Languages/Perl] UID:54561 Activity:nil
12/18   Happy 25th birthday Perl, and FUCK YOU Larry Wall for fucking up
        the computer science formalism that sets back compilers development
        back for at least a decade:
        http://techcrunch.com/2012/12/18/print-happy-25th-birthday-perl
        \_ I tried to learn Perl but was scared away by it.  Maybe scripting
           lanauages have to be like that in order to work well?
	...
2011/12/23-2012/2/6 [Computer/SW/Languages/Python] UID:54272 Activity:nil
12/23   In Python, why is it that '好'=='\xe5\xa5\xbd' but
        u'好'!='\xe5\xa5\xbd' ? I'm really baffled. What
        is the encoding of '\xe5\xa5\xbd'?
        \_ '好' means '\xe5\xa5\xbd', which is just a string of bytes; it has
           length 3.  Python doesn't know what encoding it's in.  u'好' means
           u'\u597d', which is a string of Unicode characters; it has length 1,
	...
2011/4/16-7/13 [Computer/SW/Languages/Python] UID:54086 Activity:nil
4/16    Whoa, I just heard that MIT discontinued 6.001 (classic scheme)
        to 6.01. In fact, 6.00, 6.01 and 6.02 all use Python. What the
        hell? What has the world become? It's a sad sad day. SICP forever!
        \_ old story, they've ditched that shitty book and lang for a while.
        \_ I used to think scheme was cool, then I saw Ka Ping Yee's
           "Beautiful Code" class aka 61a in python, and converted.
	...
2011/2/24-4/20 [Computer/SW/Languages/Java] UID:54048 Activity:nil
2/24    Go Programming Language.  Anyone here use it?  It kind of
        reminds me of java-meets python, and well, that is fitting given it's
        a GOOG product.  What is so special about it?
        \_ as I understand it, it's a suitable OOP-y systems language with more
           structure than C, less complexity than C++, and less overhead than
           Java/Python.
	...
2011/3/31-4/20 [Computer/SW/Languages/Python] UID:54070 Activity:nil
3/20    Has anyone here had success in using python 3.0?  Any gotchas
        to worry about? I've got an entire set of apps in python 2.x
        and am wondering if it's worth it to upgrade?
	...
2010/8/8-9/7 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Web] UID:53914 Activity:nil
8/8     Trying to make a list of interesting features languages have
        touted as this whole PL field comes around, trying to see if they
        have basis in the culture of the time: feel free to add some/dispute
        1970 C, "portability"
        1980 C++, classes, oop, iterators, streams, functors, templates
             expert systems
	...
2010/8/12-9/7 [Computer/SW/Languages/Perl] UID:53922 Activity:nil
8/12    Ruby coders, do you mostly DIY your stuff or use the ruby libs out
        there?   How is their quality compared to other libs you have used
        for other langs?  Thx.
        \_ I use Ruby for hobby stuff, etc.  I use libraries for system stuff
           (web access, process, etc.) but that's about it.  Perl libraries are
           much better/more complete.  I assume because of the maturity and
	...
Cache (5623 bytes)
vedantk.tumblr.com/post/8424437797/sicp-is-under-attack
regarded as one of the best textbooks in computer science, in favor of alternative material covering Python. There have even been reports of it inducing paroxysms of joy. The best thing that can be said about SICP is that it will make you a better programmer. It discusses crucially important topics like problem decomposition and the performance implications of various types of procedures. It initiates profound changes in the way you plan and think about code. Although the text is based on Scheme, its teachings are timeless and essentially language agnostic. Thinking In C++, will no doubt make you a better C++ programmer. From an educational standpoint however, none of these alternatives are satisfactory. The sad truth is that SICP's gradual removal from computer science curricula has left behind a gaping hole that few other texts can hope to fill. To understand what makes SICP so special, you have to immerse yourself in it. One of the earliest topics covered in SICP is linear recursion and iteration. At one point, you are asked to implement the function: f = n, n < 3 f = f(n-1) + 2f(n-2) + 3f(n-3), n >= 3 It's straightforward to translate this definition into Scheme: But SICP challenges us to do better. If you look carefully, you'll find three recursive function calls in f that deal with what happens when n >= 3 The top-level call to f(n-1) spawns three calls, each of which spawn three more, and so on, until the recursion terminates with the case n < 3 in each chain of calls. This process is repeated for the calls to f(n-2) and f(n-3). The challenge, then, is to convert this resource-hungry recursive process into an efficient iterative one. When I first encountered this problem, I thought it seemed trivial. After a few messy attempts at a solution, I decided that the challenge was outright impossible. I had attacked the dragon with a dull butter knife and all the raging ferocity of a domesticated panda. The issue I was having was that each term in f has an enormous amount of dependencies. I couldn't figure out how to represent these dependencies in a reasonable amount of state, or how to update that state without making the same class of huge, branching function calls that I needed to avoid. It's tedious, and the cool kids don't bother with it anyway. A Revelation I pondered iterative processes for a solid hour before having a sudden rush of understanding. What would happen if I isolated what I already knew into some basic state and then devised some logical mechanism to update it? Wouldn't I eliminate the need to keep track of all of those dependencies? You would probably be safe in comparing that moment to a religious experience. Not having ever seriously tried religion, I can't say for sure. The epiphany involved the realization that f can be decomposed into three distinct bits of state, or variables. Specifically: a = f(n-1) b = 2f(n-2) c = 3f(n-3) f = a + b + c The values of f(n < 3) are obvious. The first n that we have to make a real attempt to calculate is n = 3 That leads us to: f = a + b + c f = f + 2f + 3f a, b, c = {2, 2, 0} Before updating our state from f to f(n+1), consider how things would change algebraically: a' = f(n+1-1) = f b' = 2f(n+1-2) = 2f(n-1) c' = 3f(n+1-3) = 3f(n-2) f(n+1) = f + 2f(n-1) + 3f(n-2) = a' + b' + c' Then update the state using the first set of definitions: a' = f = a + b + c b' = 2f(n-1) = 2a c' = 3f(n-2) = 3b/2 The value of f, of course, can be discerned at any time: f = a' Beautiful. Think about all that you have just discovered (or if you have already discovered it all, reflect on how awesome it is). I realize that you are far more likely to use Python than Scheme when working. None of this means that you have nothing to gain from SICP. I previously claimed that SICP is fairly language agnostic, and I stand by that. It instills something deeper and more important than knowledge about how to glue APIs together, or how to deal with the vagaries of string encoding, or how to abuse the syntax of a language. "Why shouldn't students start with Python if it is the more practical language?" 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. 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. What if there were plenty of lucrative opportunities in this hypothetical mainstream BrainF--- programming scene? Would you switch introductory computer science courses over to BrainF--- because industry leaders complained about the low quality of your school's BrainF--- programmers? student, but I do care about the state of computer science education. Given how much I'm paying for it, I feel like I've earned the right to criticize it. A Plea I respect the Berkeley CS department's decision to try Python for its introductory course. I'm sure that the decision was well-meaning, and who knows, things may even turn out for the best this way. That said, I really hate to see SICP on its deathbed at Berkeley. Dive Into Python, whatever its merits, is certainly not an adequate replacement. I was looking forward to CS61A, and received an unpleasant surprise over the summer when I heard rumors of change... A lot of students will be missing out on a great program this fall. I don't know if the department can be convinced to reverse their decision, but I hope that's the case. I'll take the musings of Ben Bitdiddle over XML parsing 101 any day.
Cache (8192 bytes)
www.cs.berkeley.edu/~bh/61a.html
During that time, 61B (our data structures course) has gone through three programming languages and even more textbook changes; That's no surprise in a fast-moving field like computer science. So how come 61A is still using, with fairly minor changes, a 27-year-old curriculum? Well, there are two possible answers to that: Certain old fogies on the faculty just aren't keeping up with the times. Even though the details have changed, in very dramatic ways, the central ideas of computer science, as highlighted in SICP, remain unchanged. To be honest, there's definitely some truth to the first one. I could never in a million years program the slick web apps that our undergraduates put together overnight at the CSUA Hackathons. Before SICP, introductory CS courses were an unending sequence of programming language details. Instructors tried to invent entertaining program examples to illustrate these fundamentally boring details. SICP highlights the idea of abstraction as the fundamental principle of computer science, and brilliantly illustrates this principle with a series of mind-blowing examples from the functional, object-oriented, and declarative programming paradigms. Each abstraction is presented both from the user's point of view and from the implementor's, so that nothing feels like magic beyond the student's abilities. Every six or seven years, this question comes up at a faculty meeting. The young turks propose to replace 61A with something more modern. Until now, after each discussion, the faculty has voted to keep SICP. I'm retiring, and there has to be a plan for how 61A will continue after that. In fact there are two such plans, mine and the other one. 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. 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. CS 10, leading to a de facto four-course lower division CS sequence. This has been especially problematic for EECS students more interested in EE than in CS. John and Paul assure me that they value SICP and that changes will be slow, incremental, and small enough so that the spirit of SICP will remain. Earlier in the planning process, there was a proposal to dump the 61A curriculum altogether and start from scratch, but that was rejected by the lower division task force organized by the CS Chair. And the reason the Python version of the course is being introduced at scale in fall 2011, rather than as a small pilot section as in past reforms, is my own decision not to teach in 2011-12. Nevertheless, I prefer my own proposal for how to preserve 61A after my retirement: a self-paced version, CS 61AS. For one thing, I'm skeptical about the "more modern ideas" claim. The various faculty members who take that view don't agree about what the new ideas should be; among the more popular ones are web programming and querying large online databases. Those are important applications, but central ideas in computer science? Also, among trendy languages, Python isn't the best choice, I think, because its version of lambda is deficient in various ways. But, as I keep saying, the choice of programming language isn't the main point. I get upset when students, even the students who like 61A, refer to it as "the Scheme course." MIT, where SICP was written, no longer includes that course in its lower division core sequence, not because they wanted to change programming languages, but because they changed the entire sequence from courses organized around big groups of ideas to courses organized around application areas: first "let's build and program a robot" and then "let's build and program a cell phone." That's a brave and thoroughgoing attempt to, among other things, attract non-nerds to computer science. To say, as some people do here, "MIT switched from Scheme to Python" completely misses the point of what MIT did; nobody is proposing any change half as profound at Berkeley. So, the rest of this page is the proposal I wrote for 61AS. I'm offering a pilot section in fall 2011 (not really an exception to my no-teaching-in-2011-12 rule because a self-paced course doesn't require actual faculty teaching) under the course number CS 194-18 and if all goes well I'll propose to offer it at scale in 2012-13. Proposal for self-paced/lab-based 61A The proposed course, CS 61AS, would be run in a way combining elements of our current lab-based and our current self-paced courses: Like a lab-based course, it will schedule students into six hours/week of scheduled lab time with a TA present, and will present assignments via Moodle. Like a self-paced course, it will offer variable credit, frequent small quizzes with mastery learning (repeating the course assignments until the quiz is passed, with a different version of the quiz each time), and several paths through the material. Rationale for new course: 1 Many faculty are concerned about a perceived de facto prerequisite of CS 3 (or now CS 10), even though most of our students do arrive having met the programming prerequisite in high school or community college. instead, it offers different starting points for students based on an initial online placement quiz. The variable credit means that a student with absolutely no programming background will spend the first month of the course doing CS 3-level assignments and then has the choice of catching up (because of the self-paced structure) or finishing the last unit the following semester in parallel with 61B. Also, we will require only three units, not four, both as a graduation requirement and as a prerequisite to any courses now requiring 61A. Those students will complete the early units very quickly and will be offered optional material along the way (the "example" sections of SICP that we now mainly skip) and at the end (Chapter 5, compilers and garbage collection). Students who choose enough of this extra material will be given five units of credit in CS H61A, Honors Structure and Interpretation of Computer Programs. The online course materials available through Moodle will include edited (average 15 minutes) excerpts from my recorded lectures, appropriate to each lab assignment, as an optional component of the course. The job of the faculty member assigned to the course will be like that of the present SP faculty: supervision rather than direct instruction. With a standard course, we are constantly having to choose what to leave out, eg, because of the recent shift from 15 to 14 weeks in the semester. A self-paced format with variable credit allows us to have our cake and eat it too. Course Format: Six hours of scheduled lab time per week. Students are expected to complete about three additional hours of online assignments per week on their own. Prerequisites: Mathematics 1A (may be taken concurrently). Programming experience equivalent to that gained in CS 10 or the Advanced Placement Computer Science A course is recommended, but is not essential; students without this experience will begin at an earlier point in the online course. Credit option: Students will receive no credit for 61A after taking 47A. Students completing unit 5 and with excellent performance in units 1-4 will receive 5 units of credit in CS H61A, Honors Structure and Interpretation of Computer Programs. Later courses that list CS 61AS as a prerequisite require only 3 units. Description: Introduction to programming and computer science. Th...