Hacker News new | ask | show | jobs
by eksemplar 2777 days ago
To what end? Would you also teach someone binary, assembly and C before you taught them JAVA?

I see your approach in a lot of fresh graduates. They’ve learned things from the ground up, which means a good chunk of what they’ve learned is useless historic knowledge that doesn’t actually teach you a lot about how the modern eco-system of the web works.

That’s time they could have spent learning docker and authentication security. I mean, it’s often the one guy/girl who’s spent their free time setting up ADFS authentication in AWS for the fun of it, who gets the job.

But why wouldn’t you teach them that instead of teaching then legacy shit they’ll never use that also isn’t really that handy for understanding how things work now?

We’re supposed to stand on the shoulders of giants, and having struggled with apache or better yet the IIS, is just so utterly useless.

3 comments

There is still a good reason to teach C and assembly even if they end up never using it in the real-world. Just having to manually manage memory teaches one how to be careful because the result is a hard-to-debug segmentation fault if one isn't. It is also teaches how the machine works at a low-level which is extremely helpful in writing performant code in any other language.

Should they learn older technologies like Apache or IIS? No, learning those technologies teach few, if any, transferable skills. Should they build a web server from scratch in C? Yes, that definitely teaches transferable skills even if they use Node or Go or whatever the latest web tech stack is later. Should they also learn the latest web tech stack? Absolutely.

Does C really teach you how to be careful with memory in JAVA?

I think teaching big O is and focusing on efficiency is much better than teaching someone C. Especially in the modern world where garbage collection isn’t bad and memory is abundant.

I mean, we use a lot of Python and a lot of JS, both are fairly inefficient. On the tech side, but it’s very productive on the human end, and Human Resources are a lot more expensive than memory.

If you spent 1 week writing something that was half as efficient as if you’d spent two weeks on it, that extra week of pay, will still be paying for for the additional hardware after you die of old age.

Not the best CS lesson of course, but having hired people who learned C before X, they really don’t seem to have learned the memory lesson anyway.

I have definitely run into memory bugs in managed languages that someone without my experience would have no clue how to debug since the managed language hides that information. Having said that, learning to be "careful" is much more than just avoiding memory bugs. It is about learning to avoid mistakes by really thinking about the code you are writing so that you don't end up screwing yourself or the team later. That can be applied to memory management, class design, API design, complex algorithm development, etc. There are many ways to learn to be careful but manual memory management is one of the best because the consequences are so severe, in terms of debug time, if you aren't careful.

Big O is useful but I think its usefulness is overblown. There are cases where understanding how the kernel allocates memory or how CPU caching works or how networking works, you can develop an algorithm that is inefficient in terms of Big O but is still performant. Sometimes you can even beat the best theoretical algorithm. The reason is that k is extremely important. If I can make k extremely small using my knowledge of the computer and n is within reason, then Big O often doesn't matter. So I don't have to waste time implementing fancy algorithms as a result. But I also have a better feel when Big O does matter. If I can't make k small or n is a huge number or both, then I spend the time on algorithm optimization and then understanding Big O is helpful.

I will give you a real example with GPUs. Let's say you want to do some GPGPU and you have data that is too big to fit in RAM. How do you process this data efficiently? Knowing how the GPU works is very important to solving this problem. You could spend days, weeks, years optimizing the crap out of Big O in your code, but it won't really move the needle in a lot of cases because that isn't the bottleneck. The primary bottleneck in this case is the PCIe bus and a high-level understanding of how it works is needed to keep it full of data as the GPU is processing it. Once that is solved, the next bottleneck will likely be the data format. The GPU is most efficient when each data sample is independent which is related to how the GPU cores work, caching works, etc. So putting the data in GPU-friendly format (not always possible) will make everything go faster even before worrying about Big O.

What C does is it forces you to learn how the computer really works because it is hard to be productive in C without that knowledge. And that knowledge is largely transferable.

I certainly agree with learning and using Python or JS when it makes sense because they are very productive languages. But from an education perspective, people who only learn JS are less likely to be able to solve the really hard problems because they lack that foundation of how the computer works. And there are plenty jobs where that doesn't matter too much but you should probably have at least one person around that really understands how the computer works for the times when it does.

I wouldn't teach binary, assembly and C before teaching Java. That's a bad analogy. It's different with the web. You have to understand what clients and servers are, and it's much more clear with a basic apache setup than it is with, say, the node.js ecosystem which blurs that line between client and server to a confusing degree.
So you would advocate for, say, learning JSX and react before learning how to use vanilla JS, and maybe a little bit of JQuery to manipulate the DOM, or learning HAML before learning HTML? No wonder the current generation of junior devs is so damn confused.
I think you should learn the foundations of JS before you use a JS library, but I see no value in teaching people JQuery before you teach them react.
I politely disagree. JQuery is (largely) syntactic sugar over the built in node selection engine and various CSS properties, animations, etc, that are built in and very much a part of normal everyday browser javascript. React is something else entirely, and creates a system parallel to the DOM rather than simply using the DOM the way it was intended. You have to understand the DOM and how it is typically used before you jump to something like React, and a great way to do that is vanilla js with a little JQuery sprinkled in. There is less friction this way, and it demonstrates the impetus for separating javascript from HTML and not using selectors for everything. Otherwise you miss the point of why React is good, and you run the risk of misusing (or in the very least under-appreciating) it. People with all this background still often make terrible React apps, so imagine how bad the people who don't even understand what or why React is will do.