Hacker News new | ask | show | jobs
by lmm 4523 days ago
There seems to be this puritanical view that beginners should always learn a low-level language because it's good for the soul or something. Which is bollocks. To take the Java example because I'm more familiar with it, if I want to develop a simple Web application with a single form in Java, yes I absolutely do want to install Spring, Spring MVC and Hibernate. If I'm doing this to learn Java with a view towards using it in larger applications, it makes sense to learn the stack I'm going to use for those larger applications. If I'm writing the app for its own sake, those frameworks still let me code much faster, and in a less error-prone way, than if I were using raw servlets or something. And what's the cost? A few tens of megabytes of libraries on the server? Who the hell cares?
2 comments

I do.

I worked on a few large scale java web apps and regularily had to find and fix performance issues. I'm not sure if it would have been possible for me to easily dig into GC internals or find bottlenecks in Spring itself, without some lowlevel understanding.

So first of all you need some kind of lowlevel understanding to understand a GC. Hell I've talked to Java guys that couldn't explain the difference between stack and heap.

And you need to be able to support the "few tens of megabytes of libraries" (which surprise, are not just a few tens of lines of code) for real projects. If shit hits the fan and you can't google the solution, you need to dig into the framework code.

Which is (I think) is why the OP sais, don't use a framework if you couldn't code it yourself.

Sure you can work yourself top down the stack, but chances are (from my experience with others) that since Spring just works (in most cases) and for small apps never really have to deal with the GC, they think it's okay to not understand that stuff.... until shit hits the fan.

The reason I don't buy this kind of logic is there's always going to be a layer you don't understand. I've had programs I've written break because of JVM bugs, are you going to say no-one should be writing Java if they can't write their own JVM? I've hit bugs in OS-level libraries, are you going to say that no-one should be writing programs if they can't write their own OS? (I mean, ultimately hardware bugs do happen, so you need someone who understands how to build a CPU out of transistors - but I've spoken to designers at Intel who've said that no one person understands the whole of a modern processor). I can understand not using immature or obscure libraries if you don't understand them, but Spring and Hibernate are about as established as it gets.

You have to start somewhere - and, sooner or later, you have to learn to debug other people's code or systems. (Which is actually pretty easy with modern tools; you don't need a deep understanding of spring to find a performance problem if you have a decent profiler)

Well actually that kinda is what I'm saying. You don't need to be able to hack out a complete OS from the top of your head. But yes you should have some basic understanding of how syscalls works, what a kernel is and what it's job is etc. And with some docs implement your own. I actually think that's reasonable. No one expects you to hack out a kernel that has feature pairity with the Linux Kernel. And a basic VM isn't really that hard, it takes bytecode and executes the corresponding operations.

Again, I'm not talking about a full blown JVM with feature parity and all the JIT optimizations. But actually given docs and some time even implementing a JVM should be doable, sure it will be slow but interpreting bytecode is really not that hard.

You just can't do this if you don't have a basic understanding of C or other lower level languages.

Also your CV probably sais Software Engineer and not Hardware designer. So I'd say hadware bugs are out of scope.

> yes you should have some basic understanding of how syscalls works, what a kernel is and what it's job is etc.

If we're talking about experienced developers then sure, at some point people should learn that stuff. But as a beginner it's impossible to understand everything at once; start at the highest level, the level you're actually going to be working at most of the time. There'll be time to peek behind the curtain and learn the details of what's going on at lower levels later - and good programmers absolutely should do this. But I don't think people should start off without frameworks any more than they should start off in assembly.

> Also your CV probably sais Software Engineer and not Hardware designer. So I'd say hadware bugs are out of scope.

If that's what counts then my first job title was Java Developer :P

One of my first full PHP projects was a WordPress site. I was very inexperienced at the time, but I remember being frustrated at the concept of the Loop, sub-queries, template overrides, and the like. IMO beginners should work without frameworks so that they know what's part of the language and what's part of the framework, especially when the framework has its own idioms and opinions about proper development.
That sounds more like a case of a bad framework (and bad language) than an argument against frameworks in general. Even if you only ever use a language's standard library, different projects will use different parts of it, so there's always going to be some new things to learn when switching projects.

Use an environment that matches what you want to learn, and one that promotes good development practices. But given how much modern programming is framework-based, that likely means using a framework.

Just to a offer an alternate experience, many of my first programming projects were implemented in wordPress.

These projects allowed me the opportunity to work on smaller subsets of problems than implementing a full-on CMS would have exposed me to as well as exposing me to many, many patterns I never would have encountered if I had to invent my own.

It was much more instructive to me to have to fix a small bug or implement a small feature that it would have been if I had to implement everything from the bottom up. I was also frustrated by many things in WP, but I believe that I could have been just as frustrated at any number of things in any system: that's just part of learning.

That said, I have always really enjoyed programming, and so the bad patterns and poor design choices that I see in wordPress weren't a big limitation on my learning, and I have since worked on a lot of of different systems, many of which have added new idioms to how I express myself in code.

I can see how people I know and work with don't progress very far in their programming skills because they can rely on frameworks or other code that they don't understand. But I have learned a whole lot by copying other folks' idioms.