Live data from Hacker News

UCLA introductory programming classes should focus more on Python, not C++

dailybruin.com

51–60 of 92 posts

Re: UCLA introductory programming classes should focus more on Python, not C++

#51
post #31

Earlier quoted context omitted.

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 fir…

What's so bad about using C++ as a first language? My college uses C++, and I'm very happy that they did so. Transitioning into higher-level languages is very easy, and at no point while I was learning the language did I think "Damn, I wish we used Java/Python". I really have no complains.

C++ has all this "language-specific" overhead that you kind of have to wade through before you can get to doing anything really productive. Python is easy to use and be productive with out of the box, has a complete feature set, doesn't require manual memory management and has far more expressive errors.

It really depends on the emphasis of an intro programming course. If the goal is to cover the basic control structures of a higher level language (conditionals, loops, switch statements, functions) and the fundamentals of object oriented programming, and get into some basic algorithms and data structures, then Python probably has less baggage and is more terse and expressive than something like C++.

Re: UCLA introductory programming classes should focus more on Python, not C++

#52
post #17

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.

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?

Re: UCLA introductory programming classes should focus more on Python, not C++

#53
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.)

Re: UCLA introductory programming classes should focus more on Python, not C++

#54
post #35
post #31

Earlier quoted context omitted.

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 fir…

I think there is something to be said for Scheme as an intro language. Knowing the "full stack" of computation doesn't need to end at NAND gates, it could just as easily end at the lambda calculus. In fact, I personally would prefer it that way.

I'd be really curious to see a study of the performance of CS majors in later classes by paradigm of the language taught in CS1 (i.e. imperative/OOP vs functional). I've been trying to keep my eye out for a while, but haven't really found anything that answers this specifically.

Re: UCLA introductory programming classes should focus more on Python, not C++

#55
post #17

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.

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.

Re: UCLA introductory programming classes should focus more on Python, not C++

#56

Earlier quoted context omitted.

What's so bad about using C++ as a first language? My college uses C++, and I'm very happy that they did so. Transitioning into higher-level languages is very easy, and at no point while I was learning the language did I think "Damn, I wish we used Java/Python". I really have no complains.

C++ has all this "language-specific" overhead that you kind of have to wade through before you can get to doing anything really productive. Python is easy to use and be productive with out of the box, has a complete feature set, doesn't require manual memory management and has far more expressive errors. It really depends on the emphasis of an intro programming course. If the goal is to cover the basic control struct…

It almost feels as if more universities should have two different "introductory" CS courses: one for non-majors, and another for majors. I would however express that in my CS curriculum (only 6 years ago) we did not start using C++ until my junior/senior year, and instead stuck with Java.

Re: UCLA introductory programming classes should focus more on Python, not C++

#57
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".

Re: UCLA introductory programming classes should focus more on Python, not C++

#58
post #27

Earlier quoted context omitted.

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.

And how does a CS student vs an EE student know how computers "work". CS as I understand it is just the math not the underlying technology.

For some schools, including all schools in the UC system, CS majors have to take EE classes as part of their requirements. I remember having to setup and program gates and the sort on FPGA boards.

Re: UCLA introductory programming classes should focus more on Python, not C++

#60
post #49

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), fu…

>you both want to span as much of CS as possible in a single language Why? Teaching different languages for different kind of requirements make much more sense.

That would end up being too much to cover during the course.

Time spent getting a class to learn new syntax is unnecessary and takes a long time.

Post reply on HN