News for hackers. Stuff that matters.
Re:UCLA introductory programming classes should focus more o... by zelos on Friday March 02, 2018 @12:14PM (#16503501)
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.

Re:UCLA introductory programming classes should focus more o... by mastax on Friday March 02, 2018 @12:30PM (#16503679)
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.

Re:UCLA introductory programming classes should focus more o... by jakear on Friday March 02, 2018 @12:35PM (#16503744)
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.
Re:UCLA introductory programming classes should focus more o... by techman9 on Friday March 02, 2018 @01:04PM (#16504070)
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 o... by NiceGuy_Ty on Friday March 02, 2018 @01:50PM (#16504520)
Maybe course withdrawal rates could be used, but getting access to the necessary statistics seems like it'd be a chore. I just checked with my university and the only statistics I can find are centered around graduation rates. One would likely have to contact all the registrars among a sample of universities individually, as I haven't found a university offering these statistics yet.
Re:UCLA introductory programming classes should focus more o... by techman9 on Friday March 02, 2018 @02:57PM (#16505108)
CS Educators do this research all the time, but it's pretty challenging to design a CS1 class that's effective but also so radically different from the typical paradigm.

There's also a risk you'll set students back if it's not effective so there are definitely ethical concerns and it requires interrupting a professor's load for the quarter. That said, CS educators conduct research like this all the time and there's probably a lot of value in studying this kind of change.

Re:UCLA introductory programming classes should focus more o... by farresito on Friday March 02, 2018 @12:52PM (#16503936)
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 o... by techman9 on Friday March 02, 2018 @01:01PM (#16504042)
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 o... by 52-6F-62 on Friday March 02, 2018 @01:30PM (#16504323)
>C++ has all this "language-specific" overhead that you kind of have to wade through before you can get to doing anything really productive.

For that reason I'm surprised by the lack of enthusiasm for just starting students in C.

By university, I imagine most students have already spent some time noodling around enough to understand some basic paradigms. C does not have the barrier that C++ has in that way. It's so much smaller, which is great, and no less useful. Soon after learning the basics a student may want to jump to something else, but then they'd be fully equipped.

Not that I'm against the Python approach— but for somebody looking for a deeper understanding C seems like a good choice since you can either drill down into memory management, or (as long as you don't do anything drastic) be somewhat lazy about it (with modern computers).

Python— I agree with many people in the thread—is very suitable for non-majors or a more applied approach. I am consistently trying to encourage non-programmer friends, family, others to take a stab at it because of the increase in productivity or ability it gives them with their machine they use on a daily basis.

... To the other questions— how much do you really need to know to be considered a CS? Surely you could pare it down to theoretical physics if you wanted to and eventually end at some unanswered questions somewhere between electron behaviour and quantum physics, no? Then you're a computer scientist.

Kidding aside and perhaps off topic—but much of the discussion in this thread causes me to wonder why so many interviews surround the ability to re-implement common (stdlib) algorithms, or on the web-side polyfills for existing language features, rather than understand some basics about how memory works from a programming perspective.

Re:UCLA introductory programming classes should focus more o... by farresito on Friday March 02, 2018 @01:40PM (#16504427)
You have a great standard library; you don't need manual memory management, because this is an introductory course; the error messages are admittedly bad, but not that terrible if you are not using templates. I'm not particularly fond of C++, but if you intend to teach the basics of programming and data structures, it's a decent language.
Re:UCLA introductory programming classes should focus more o... by epmaybe on Friday March 02, 2018 @01:07PM (#16504107)
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 o... by techman9 on Friday March 02, 2018 @01:14PM (#16504181)
I'm not sure about segmenting intro courses by majors, but there is good research that suggests that segmenting CS1 by level of background knowledge has a significant positive impact on future coursework [0]. I suspect that a larger proportion of students who eventually study CS have a higher degree of background knowledge as well, so this probably makes sense.

[0] https://dl.acm.org/citation.cfm?id=2445248, https://dl.acm.org/citation.cfm?id=2255982

Re:UCLA introductory programming classes should focus more o... by jakear on Friday March 02, 2018 @12:26PM (#16503630)
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.
Re:UCLA introductory programming classes should focus more o... by zelos on Friday March 02, 2018 @01:37PM (#16504389)
Yes, there was a healthy dose of facetiousness in my comment ;-)

That said, there is definitely something to be said for learning a lower-level language fairly early on I think. It's much easier to go from worrying about pointers vs values, manual memory management etc to not having to think about them than it is the other way round.

Re:UCLA introductory programming classes should focus more o... by walshemj on Friday March 02, 2018 @12:33PM (#16503719)
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.
Re:UCLA introductory programming classes should focus more o... by PirateDave on Friday March 02, 2018 @01:10PM (#16504148)
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 o... by jeremiep on Friday March 02, 2018 @12:34PM (#16503726)
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?

Re:UCLA introductory programming classes should focus more o... by nemothekid on Friday March 02, 2018 @12:48PM (#16503890)
I don't see what any of this has to do with C++, especially modern C++.

The only "low-level" detail from lower level systems course I find that is still relevant on a daily basis is cache-alignment - which I doubt they would cover in a 101 course anyways. Almost everything else either 1. the compiler does better or 2. you'd have to know how to fight the compiler to achieve.

Anything that would let you achieve 200-1000% performance gains in Python vs C++ (besides, again cache alignment) is likely not something you would cover in a intro level course. (I know C++ is faster Python, but that has nothing to do with "accounting for the hardware at the very architecture level")

Re:UCLA introductory programming classes should focus more o... by AnimalMuppet on Friday March 02, 2018 @01:20PM (#16504237)
SIMD. As you say, "you have to fight (or escape to assembly) the compiler to achieve" SIMD, even in C++. But in C++, you can correctly align the memory in preparation. In Python? Not so much.
Re:UCLA introductory programming classes should focus more o... by pennaMan on Friday March 02, 2018 @12:50PM (#16503910)
>What even is the point of having programming classes if alls they do is teach what you can learn yourself with an online tutorial?

Well, you can learn everything covered by even the most exhaustive CS degree by yourself using open resources. Low level knowledge is not locked away in some ivory tower. You certainly don't have to join a modern priesthood to gain access to high quality learning material, no matter how much the priests tell you otherwise :)

Re:UCLA introductory programming classes should focus more o... by 52-6F-62 on Friday March 02, 2018 @01:41PM (#16504434)
>You certainly don't have to join a modern priesthood to gain access to high quality learning material, no matter how much the priests tell you otherwise

I've been reading that book, too, and agree with the sentiment

Re:UCLA introductory programming classes should focus more o... by BatFastard on Friday March 02, 2018 @01:18PM (#16504219)
99.99% of programmers will never need a machine level understanding of the programming language and architecture they use.

Really the only people I see might be machine level understand are 3D engine developers and high speed stock traders. VERY few other people need to understand how you need to organize your collections so that they are brought over in the correct page size from the L3 to L2 cache.

From what I have seen many programmers have no clue as to when to optimize something. They want to optimize everything which is a huge waste of time.

As for programming classes, they are pointless in modern society but most(ALL?) companies still like to see that you have jumped through the hoops correctly. And that you can be trained correctly to "Be a good team member".

Re:UCLA introductory programming classes should focus more o... by bradleyjg on Friday March 02, 2018 @12:54PM (#16503953)
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 o... by cm2187 on Friday March 02, 2018 @12:53PM (#16503949)
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 o... by techman9 on Friday March 02, 2018 @12:54PM (#16503957)
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 o... by starpilot on Friday March 02, 2018 @01:03PM (#16504059)
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 o... by vasilia on Friday March 02, 2018 @01:32PM (#16504352)
> better than assembly, or machine code,

I was studying assembly in the second year. What is the problem? It was really easy because in my early years I was writing 64k demos.

> or learning the basics of transistors, capacitors, signals etc.

It's the simplest part of all computer architecture. I think I can explain what is D flip-flop/transistors in one hour.

> Why does C++ have the "right amount" of abstraction, when it sweeps under the rug a vast body of physics and EE?

C++ has OOP, has a smart and raw pointers, STL(not the best, but better than C). Right now I'm working on a project where I need process more than 50Gb in 10 minutes. Python script uses 110Gb of RAM because there are no pointers. I don't know why the previous developer chose Python for this tool.

Re:UCLA introductory programming classes should focus more o... by cm2187 on Friday March 02, 2018 @12:52PM (#16503929)
C++ should be an advanced class, not an introductory class. That's the best way to put off someone from programming otherwise.
Re:UCLA introductory programming classes should focus more o... by czardoz on Friday March 02, 2018 @12:27PM (#16503632)
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.
Re:UCLA introductory programming classes should focus more o... by UncleMeat on Friday March 02, 2018 @02:00PM (#16504613)
Do other fields create their intro courses with the plan that people won't take any other classes and therefore not create a curricula that builds to more complex things?
Re:UCLA introductory programming classes should focus more o... by rrmm on Friday March 02, 2018 @12:28PM (#16503648)
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.

Re:UCLA introductory programming classes should focus more o... by fortythirteen on Friday March 02, 2018 @01:05PM (#16504086)
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 o... by filoleg on Friday March 02, 2018 @12:25PM (#16503611)
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.

Re:UCLA introductory programming classes should focus more o... by oso2k on Friday March 02, 2018 @12:37PM (#16503766)
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't care to understand if it is EFI or Carburetor.
Re:UCLA introductory programming classes should focus more o... by filoleg on Friday March 02, 2018 @12:54PM (#16503951)
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.