I would like to point out before this discussion moves too far along that UCLA does in fact have an introductory programming course which is taught using Python: http://web.cs.ucla.edu/classes/enroll/97/
Students that are unfamiliar with programming are encouraged to take this course before the C++ course.
I really like Lisp-based and multi-paradigm languages for teaching because you both want to span as much of CS as possible in a single language, and you eventually want to implement languages and compilers as part of the curriculum. The former requires multi-paradigm, the latter requires good metaprogramming and homoiconicity. You also want the ability to get low-level to talk about the assembly code (or LLVM IR), function pointers, and handling of memory allocations.
Python is good in the multi-paradigm sense but it abstracts too much away. C++ gets in the way of learning the higher level concepts. Scheme is great for teaching but not really used. I think Julia sits comfy in the middle and can be a great teaching language once its tooling evolves more. It's the only language I know of where some people are writing lazy functional code with metaprogramming, others are writing high-level scripting language vectorized code, while others are writing inline LLVM and controlling stack vs heap allocations, and it all makes sense. I wouldn't use it in a first programmer's course quite yet because the books and tooling need a little bit more, but in a few years I see it as a great option for a university to choose than can span multiple courses, from beginning programming all the way to the algorithms courses and HPC.
It starts with Lua(Jit) -which is a very simple, powerful, Schemy language. Lua is used both as a runtime and as a metaprogramming layer for a Lua-ish interface to LLVM IR (including SIMD) that requires static typing and manual memory management. It is intended to be the implementation layer of compilers and JITs and it is created by and for the HPC community.
All it really needs is more attention, documentation and tutorials.
UCLA is one of the biggest users of CoCalc.com. They use CoCalc extensively to teach a course called "LS30: Mathematics for Life Sciences". Well over 1000 students a year in this course program in Python for hours every week (via SageMath Worksheets) in a lab and at home. The content is really beautiful, and teaches ideas from Calculus in a much more hands on and motivated way. Expanding Python education at UCLA would definitely help support the LS30 sequence.
It makes a lot of sense for non-CS students to be able to learn CS using Python.
For CS students, there's a good argument for starting with the fundamentals and adding abstractions later. It's not the only way to learn it, but if the CS department wants to start there for CS students, that's reasonable.
+1, back when I was considering attending the UC system the fact that Java was taught almost exclusively pretty much removed them from my list. We had UCSD students coming to my local community college to take the C course I was in since it wasn't being taught at UDSD. It always shocked me considering they had a pretty awesome super-computer lab.
Ironically I spend about 90% of my time in Java code. That said understanding the fundamentals is super-valuable when root-causing JNI issues or trying to speed up the VM in cases where normal Java approaches don't cut it.
Who is the author that makes them an authority on this? I couldn't find much, but it looks like they are just a student or journalist that writes opinion pieces. Shouldn't the professors designing the courses have much more say than someone that does not appear to be an expert?
In my opinion C++ and C are rather good choices for a first language.
There is significantly less 'magic' going on behind the scenes and the language design choices generally have sane explanations.
For example, the standard library does not have access to language features hidden from users.
A CS education, for better or worse (in my opinion - for the better), is grounded in theory and foundational knowledge. Introductory CS classes are designed to ease people into programming, yes, but also to give a taste for concepts that they'll eventually have to become very comfortable with later on.
I don't think Python is a bad first language to learn, but I think that it's important to consider the audience of these introductory CS classes. These classes aren't really designed JUST to teach you programming (I say this as a person who never coded before CS31). This is why the UCLA Computer Science faculty recently introduced CS97, which is actually an introductory programming course taught in Python for absolute beginners. That way those who are already comfortable with coding can ease themselves into learning about lower-level implementation they may not have been exposed to before, and absolute beginners can supplement their introductory _Computer Science_ class with an introductory programing class as well.
What UCLA is doing, as well as most universities is the difference between a university and a trade school. these courses do, and should focus on the fundamentals. University is teaching the theory, and having a fundamental understanding. Otherwise there are ample trade schools and code camps, that will skip the fundamentals, and teach you the basics of programming tailored to the current job markets needs.
As for the argument that C++ isn't good learning language, I beg to differ, it gets you very close to the meat of how programming works, without the layers of abstraction that higher languages offer. C++ requires that you understand memory, its allocation, and allows you easily to see how it interacts.
CS50, the intro CS course at Harvard, which is notably a large and successful MOOC in addition, is taught in C. It's a really bizarre choice, and only serves to add complexity to a topic that already has a fairly high cognitive barrier to entry.
This is all that CS has ever been, and is the reason they're teaching in C++ in the first place (it's a low-level language good for learning fundamentals), which is fine. But a huge part of CS students graduate without knowing how to code in languages that are reflected in the jobs they are trying to get, which are mostly python, javascript, and java. If you think the industry is fine, great, but if you agree with those that think CS degrees should emphasize job skills a little bit, then teaching courses in Python is a good move.
I hate python. It's an awful language and should be burned with fire. And yet its my go-to language when I just need to handle some small problem. It's so bad, and I use it anyway because it gets the job done. I never use C++ any more. (well, I used C once last year to create a brute force DNA search algorithm that was 30x faster than our previous implementation, but that kinda proves my point). fuck, i learned to program in BASIC.
I was gonna say "maybe Node", but there are a lot of python libraries that benefit academics.
But it sounds like the course we're talking about here is for actual CS majors, in which case, UCLA, are you fucking mental? Python?
I think the issue here, though, is that C++ is fucking garbage now. It's utterly horrible to use, bloated in all the wrong places while utterly non-existent in places that would make day-to-day use of the language viable. Last year I used C (not C++) to get the job done. You'd have to be insane to build a large scale product in C++, and in the places you really need performance, C or assembly is better.
I think UCLA is correct to drop C++. But teach C instead, not python.
What does it even mean for a school to 'switch' languages? When I did my bachelors it was straight up a new language in each class, at the discretion of the prof in charge. Intro class homework was in Java, data structures was in C++, operating systems was in C, digital logic design was in Verilog, bioinformatics was in Python, ...
When I was in high school C++ was taught as an intermediate language to sophomores. Most everyone in the class had no issues learning the language. We were all making our own versions of frogger in the terminal.
There was plenty of focus on problem solving and developing interesting programs. The language didn't get in the way at all.
One thing we had that seems lost today is the nice, simple programming environment with Borland Turbo C++. These days I suppose people use Visual Studio but can kids really go home and get up and running quickly? Embarcadero exists but the license is prohibitive. Perhaps if there was some way to get them working in a unix environment--which is what they'll end up in anyway--but teachers would be right to balk at the idea of teaching a new OS...
C++ was a much simpler language back in the Turbo C++ days (early 1990s). If I recall, there were no namespaces, exceptions, or templates (and no STL). It was much easier to get started with back then.
I don't know if I should feel good about this. I graduated from UMich back in 2015, and we tend to do a lot of the core CS courses in C++. After working full time for ~2 years, learning to code on a lower level helped me understand computers better and write better code.
There are kids around my age group who don't do as much C/C++ and dislike it because of the "pointer" concepts. They find them hard, but these guys also don't know other CS concepts like how a GC works or pass by value vs. pass by reference.
Our professors have good reasoning for why the school does this: "By teaching you everything in C++ first, you'll find it much easier to pick up any other programming language".
on lower-level implementation details related to how machines interpret code – knowledge that non-computer science students are unlikely to use after they graduate.
Yeah, the world really needs a load more developers with no idea how computers work. We don't see any of those in interviews already.
No one is suggesting that CS students shouldn't learn about low-level machine architecture - what would they do for the last 3 years? C++ is just not made to be a first programming language.
Aside: I'm not convinced that Python is a perfect first language either - its error messages are very unhelpful when you're learning. Also I think a "NAND to Tetris"-style curriculum could work, but C++ would still not be the first step for this.
Also, look at the second half of that sentence. This is not about "developers". If you're a business or physics student who's taking one elective programming course over a bachelor's degree would you be better served if that one course was in Python? Yes, absolutely.
Did you read your own quote? These aren't developers, they're "non-computer science students" who don't need to know underlying memory details, but they're being required to because this class is a prerequisite for a bunch of computing-related classes in other majors.
We definitely need more developers who can't leverage more than 10% of the CPU's actual power.</sarcasm>
Its literally impossible to have any clue about performance without understanding the hardware. Sure you can profile and gain 5-10% after micro-optimizing what the profiler tells you.
But you will never, ever get the 200-1000% performance gains you can only get by accounting for the hardware at the very architecture level, something you can't fix by just profiling later on.
What even is the point of having programming classes if alls they do is teach what you can learn yourself with an online tutorial?
You fail to justify why C++ conveys an idea of "how computers work" better than assembly, or machine code, or learning the basics of transistors, capacitors, signals etc. Why does C++ have the "right amount" of abstraction, when it sweeps under the rug a vast body of physics and EE?
It's an _introductory_ course for a reason. Not all of these students are going to be developers. Those that do, will take advanced classes, rather than trying to interview on the basis of an introductory course.
To be fair, there's always a dividing line. Usually, "knowing how a computer works" for a programmer is equivalent to knowing the programmer's model for a cpu. A programmer's model is most definitely not how a computer really works (cf. recent cpu security flaws with speculative execution), but it's usually good enough.
Knowing more and deeper information is usually a good thing, but students don't need to learn it all at an introductory level which I think this article is focusing on.
While the best programmers definitely have that knowledge, most programming jobs don't require that anymore. It's like saying that in order to be a secretary you need to know how to replace a typewriter ribbon.
Most applications aren't written on the machine level, nor do they have the complexity that requires machine level knowledge. Embedded systems programming is, at this point, a separate disciple than generic software engineering.
The only regular exception I see to this is the poor curriculum around most Java oriented BS programs. I've seen many candidates come from a Java focused school that couldn't even write their own code without a full hand-holding IDE.
What's with the false dichotomy? I personally agree with you that knowing lower level things is incredibly helpful to every single good developer, even those who don't touch anything lower than Javascript on daily basis. However, I totally disagree that those computing concepts should be taught in an intro class, when the student not only has to struggle with learning basic computing concepts, but also with memory management and low level quirks that even competent established developers struggle with sometimes.
Tl;dr: agreed that low level computing fundamentals are helpful to every developer, disagreed that intro classes are the right place for them.
Whoa... (UCLA c/o 2010, Bioengineering) UCLA used to use C# in the PIC10A series. I didn't take too many classes in these series, but did audit some while I was deciding as a non-CS major how technical to become. Personally, I think it's fine for the Math Department to use Python - there's plenty of opportunities to do the lower level stuff or unmanaged stuff in other classes at UCLA.
For CS/CSE and engineering majors we take the CS31 (intro to CS)/32 (data structures and algorithms)/33 (operating systems) series - these primarily use C++ (if not C, assembly, etc.)
I think I agree with this article (even if some of its argument is bogus). The other thing that all programming classes should teach, regardless of whether they're for CS majors or not is how to debug using a modern (i.e. not command-line-based) debugger. It's insane that programming is being taught anywhere without teaching debugging at all, or teaching only very hard-to-use debuggers.
I majored in EE at UT Austin around 2000, and our intro programming class was C++. I doubt there was a good rationale for it other than to cause rapid attrition of EE majors. I never again used C++ in my studies or professionally. Learning C would have been much more helpful for my later embedded systems classes.
UCLA is teaching computer science, not programming. To fully understand and appreciate the intricacies of modern computers you cant just ignore the fundamentals because they are too rudimentary. Just ask Tim Duncan about the importance of fundamentals.
[+] [-] piemonkey|8 years ago|reply
Students that are unfamiliar with programming are encouraged to take this course before the C++ course.
[+] [-] kccqzy|8 years ago|reply
[+] [-] ISL|8 years ago|reply
Unclear from afar...
[+] [-] pattycake|8 years ago|reply
[+] [-] ChrisRackauckas|8 years ago|reply
Python is good in the multi-paradigm sense but it abstracts too much away. C++ gets in the way of learning the higher level concepts. Scheme is great for teaching but not really used. I think Julia sits comfy in the middle and can be a great teaching language once its tooling evolves more. It's the only language I know of where some people are writing lazy functional code with metaprogramming, others are writing high-level scripting language vectorized code, while others are writing inline LLVM and controlling stack vs heap allocations, and it all makes sense. I wouldn't use it in a first programmer's course quite yet because the books and tooling need a little bit more, but in a few years I see it as a great option for a university to choose than can span multiple courses, from beginning programming all the way to the algorithms courses and HPC.
[+] [-] corysama|8 years ago|reply
It starts with Lua(Jit) -which is a very simple, powerful, Schemy language. Lua is used both as a runtime and as a metaprogramming layer for a Lua-ish interface to LLVM IR (including SIMD) that requires static typing and manual memory management. It is intended to be the implementation layer of compilers and JITs and it is created by and for the HPC community.
All it really needs is more attention, documentation and tutorials.
[+] [-] fooker|8 years ago|reply
Why? Teaching different languages for different kind of requirements make much more sense.
[+] [-] williamstein|8 years ago|reply
(Disclaimer: I started SageMath and CoCalc.)
[+] [-] andrewmutz|8 years ago|reply
For CS students, there's a good argument for starting with the fundamentals and adding abstractions later. It's not the only way to learn it, but if the CS department wants to start there for CS students, that's reasonable.
[+] [-] vvanders|8 years ago|reply
Ironically I spend about 90% of my time in Java code. That said understanding the fundamentals is super-valuable when root-causing JNI issues or trying to speed up the VM in cases where normal Java approaches don't cut it.
[+] [-] ecshafer|8 years ago|reply
[+] [-] jakear|8 years ago|reply
[+] [-] fooker|8 years ago|reply
For example, the standard library does not have access to language features hidden from users.
[+] [-] Zofren|8 years ago|reply
I don't think Python is a bad first language to learn, but I think that it's important to consider the audience of these introductory CS classes. These classes aren't really designed JUST to teach you programming (I say this as a person who never coded before CS31). This is why the UCLA Computer Science faculty recently introduced CS97, which is actually an introductory programming course taught in Python for absolute beginners. That way those who are already comfortable with coding can ease themselves into learning about lower-level implementation they may not have been exposed to before, and absolute beginners can supplement their introductory _Computer Science_ class with an introductory programing class as well.
[+] [-] Meph504|8 years ago|reply
As for the argument that C++ isn't good learning language, I beg to differ, it gets you very close to the meat of how programming works, without the layers of abstraction that higher languages offer. C++ requires that you understand memory, its allocation, and allows you easily to see how it interacts.
[+] [-] tomtheelder|8 years ago|reply
[+] [-] walshemj|8 years ago|reply
[+] [-] brian_herman|8 years ago|reply
[+] [-] jackconnor|8 years ago|reply
[+] [-] lowbloodsugar|8 years ago|reply
I was gonna say "maybe Node", but there are a lot of python libraries that benefit academics.
But it sounds like the course we're talking about here is for actual CS majors, in which case, UCLA, are you fucking mental? Python?
I think the issue here, though, is that C++ is fucking garbage now. It's utterly horrible to use, bloated in all the wrong places while utterly non-existent in places that would make day-to-day use of the language viable. Last year I used C (not C++) to get the job done. You'd have to be insane to build a large scale product in C++, and in the places you really need performance, C or assembly is better.
I think UCLA is correct to drop C++. But teach C instead, not python.
[+] [-] bradleyjg|8 years ago|reply
[+] [-] electricslpnsld|8 years ago|reply
[+] [-] kccqzy|8 years ago|reply
[+] [-] defgeneric|8 years ago|reply
There was plenty of focus on problem solving and developing interesting programs. The language didn't get in the way at all.
One thing we had that seems lost today is the nice, simple programming environment with Borland Turbo C++. These days I suppose people use Visual Studio but can kids really go home and get up and running quickly? Embarcadero exists but the license is prohibitive. Perhaps if there was some way to get them working in a unix environment--which is what they'll end up in anyway--but teachers would be right to balk at the idea of teaching a new OS...
[+] [-] bdowling|8 years ago|reply
[+] [-] tzhenghao|8 years ago|reply
There are kids around my age group who don't do as much C/C++ and dislike it because of the "pointer" concepts. They find them hard, but these guys also don't know other CS concepts like how a GC works or pass by value vs. pass by reference.
Our professors have good reasoning for why the school does this: "By teaching you everything in C++ first, you'll find it much easier to pick up any other programming language".
[+] [-] techman9|8 years ago|reply
[0] https://dl.acm.org/citation.cfm?id=1734437
[+] [-] thomastjeffery|8 years ago|reply
Syntax, templates, etc. are. C++ is a mess, and there are plenty of better alternatives.
[+] [-] zelos|8 years ago|reply
Yeah, the world really needs a load more developers with no idea how computers work. We don't see any of those in interviews already.
[+] [-] mastax|8 years ago|reply
Aside: I'm not convinced that Python is a perfect first language either - its error messages are very unhelpful when you're learning. Also I think a "NAND to Tetris"-style curriculum could work, but C++ would still not be the first step for this.
Also, look at the second half of that sentence. This is not about "developers". If you're a business or physics student who's taking one elective programming course over a bachelor's degree would you be better served if that one course was in Python? Yes, absolutely.
[+] [-] jakear|8 years ago|reply
[+] [-] jeremiep|8 years ago|reply
Its literally impossible to have any clue about performance without understanding the hardware. Sure you can profile and gain 5-10% after micro-optimizing what the profiler tells you.
But you will never, ever get the 200-1000% performance gains you can only get by accounting for the hardware at the very architecture level, something you can't fix by just profiling later on.
What even is the point of having programming classes if alls they do is teach what you can learn yourself with an online tutorial?
[+] [-] techman9|8 years ago|reply
[+] [-] starpilot|8 years ago|reply
[+] [-] cm2187|8 years ago|reply
[+] [-] czardoz|8 years ago|reply
[+] [-] rrmm|8 years ago|reply
Knowing more and deeper information is usually a good thing, but students don't need to learn it all at an introductory level which I think this article is focusing on.
[+] [-] fortythirteen|8 years ago|reply
Most applications aren't written on the machine level, nor do they have the complexity that requires machine level knowledge. Embedded systems programming is, at this point, a separate disciple than generic software engineering.
The only regular exception I see to this is the poor curriculum around most Java oriented BS programs. I've seen many candidates come from a Java focused school that couldn't even write their own code without a full hand-holding IDE.
[+] [-] filoleg|8 years ago|reply
Tl;dr: agreed that low level computing fundamentals are helpful to every developer, disagreed that intro classes are the right place for them.
[+] [-] quanpod|8 years ago|reply
For CS/CSE and engineering majors we take the CS31 (intro to CS)/32 (data structures and algorithms)/33 (operating systems) series - these primarily use C++ (if not C, assembly, etc.)
[+] [-] peterjlee|8 years ago|reply
https://cacm.acm.org/blogs/blog-cacm/176450-python-is-now-th...
[+] [-] taoethnoeua98|8 years ago|reply
[+] [-] coupdejarnac|8 years ago|reply
[+] [-] blackflame7000|8 years ago|reply