News for hackers. Stuff that matters.
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.