Live data from Hacker News

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

dailybruin.com

41–50 of 92 posts

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

#41
post #31
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.

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.

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

#42
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.

We definitely need more developers who can't leverage more than 10% of the CPU's actual power. 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,…

I think the path python/javascript => java/c# => c/c++ makes more sense. But students should finish with c, not start with c. And the performance you get out of java or c# is not that far behind c/c++ performance.

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

#43
post #37
post #25

Earlier quoted context omitted.

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

The reason is that not teaching those lower-level concepts continues to allow them to be magical. No one expects to get into Reference Counting vs. Tracing Garbage Collectors, but understanding that lower-level construct exists partially removes the mystery of the underlying mechanics. An analogous example would be Cars: you press the accelerator and gas gets sucked in from the gas tank to the engine. Most people don…

My point was that even though those things are very useful to know, I don't think that an intro class is a good place for that. Your reply didn't address that at all, and instead brought an analogy that works within the frame of my argument as well.

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

#44
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.

We definitely need more developers who can't leverage more than 10% of the CPU's actual power. 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,…

But you aren't getting details of the hardware at the very architectural level as they exist today even with c. Even with asm. You are getting the details of an abstract model of a computer that is long, long since gone if it ever fully existed in the first place.

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

#45
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.

Yeah, the world really needs a load more gatekeeping jerks who don't consider Python a "real" programming language.

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

#46
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...

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

#47
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.

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

#48
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.

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

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

Post reply on HN