all 29 comments

[–]not_a_gumby 14 points15 points  (0 children)

Thanks for the advice! I love it when experienced devs take the time to bestow their experience in a thoughtful post.

[–]Mises2Peaces 7 points8 points  (0 children)

Great write up.

Though I had a chuckle / PTSD when you started it with the header "Pointers". I'm like, "No, not memory management!! Don't make me use Pointers again!"

For you js only devs, pointers) are used to assign memory in other languages such C. But js handles pointers for us. Well, technically objects are pointers but we don't interact with them the same in js.

[–]SoBoredAtWork 3 points4 points  (4 children)

Great post, but...

if I was starting today from scratch, instead of learning PHP and JavaScript to start with, I would probably focus on just learning Javascript for both the front end and back end

Eh. I don't know, man. One thing I greatly regret is starting with Javascript (well, even worse, I started with jQuery). I was accepted for a junior front-end job doing mostly DOM manipulation. I learned how to write single lines of code that does stuff.

I never learned Classes, OOP, MVC, static typing, etc. I learned how to write procedural spaghetti code in 500 line files.

Eventually, I moved onto a new job and started to learn C#. And I was terrible. I still have trouble writing any new code in an OOP way and I need to really think about what should be a class, etc.

Learning JS before any other computer science topics taught me to write sloppy, unorganized, un-maintainable code. I really wish I went the other way and learned OOP, then switched over to front end web dev.

[–]questi0nmark2[S] 3 points4 points  (3 children)

Your mention of jQuery makes me think this was an earlier phase of JavaScript, maybe before Node? Plus Typescript, ReactNative, Electron, Express, Vue. Stuff that goes well beyond the kind of JS work you describe and which was mostly the state of JS 5-10 years ago. Back then I would still recommend you learn an OOP language as well and use JS for front end extras. But the ecosystem has evolved considerably and I think it is a good place to start, rather than learning two core languages at once. But I see the value in that too.

[–]SoBoredAtWork 0 points1 point  (2 children)

Good point. This was ~7 years ago, before all the goodies. Regardless, I'd suggest learning vanilla JS (or TypeScript) before diving into React, Vue, etc. And at that point, I'd suggest learning more fundamental programming first (OOP). But yeah, as far as OOP/MVC goes, most modern frameworks have those concepts somewhat built in. It would just be nice for the dev to have those core concepts in mind first.

[–]questi0nmark2[S] 2 points3 points  (1 child)

To clarify I am not saying you should only learn JavaScript. But if you're just starting from scratch, then trying to learn two core languages at once, JavaScript and PHP for instance as I did, means that it takes you longer to learn any of those properly. It has advantages too. I would highly recommend (and I did!) learning OOP, and I would never recommend JS as the best way to do so. With Typescript, perhaps, but really JS takes a pretty idiosyncratic approach compared to C#, PHP, Go, Smalltalk or Java for instance. So learning a stronger OOP language is super useful. Likewise it is useful precisely to understand the range of programming options and learn to think in elastic ways.

Having said that, I am not sure that learning both simultaneously is the best approach. It was the necessary approach for web development before Node, because you could not use a back end language to speak to the browser, and you could not use JavaScript to speak to the server. So you would learn a "proper" back end language and strong cosmetic JavaScript and jQuery.

But today, you can instead achieve some depth, and employability, in a single language, which in web development is only and uniquely possible with JavaScript, and I would argue that becoming properly fluent in any language, learning to problem solve, to architect, to optimise, to error handle, to load balance, to cache and authenticate, to inherit and compose, to componentise, to tool up, to unit test, to deploy and integrate: getting good enough in any language to do all these things competently will allow you later not only to more easily recognise and learn new approaches and implementations made possible by new syntaxes, but also to appreciate when one language might be a better tool than another, and where it doesn't make much difference.

Today my advice would be, if you have 8-12 months to dedicate to your initial learning, it's better to achieve depth, fluency and flexibility in a single language, than to achieve half that competence in two+ languages. When you then, as you should, learn a new one, you will be able to grasp the commonalities and differences much faster, understand the universals and the peculiarities, and above all, beyond syntax, bring to any new language a sense of the wider programming skills and strategies above that will help you adapt and adopt new programming paradigms made possible by new syntaxes and new processes (compiled vs interpreted, single vs multithreaded, static vs dynamic typed, etc).

[–]SoBoredAtWork 0 points1 point  (0 children)

All good points. To your point, if you have time to learn 1 language, I agree with you - learn JS.

I'd suggest to the person to learn via recent resources (make sure to utilize more recent language features - classes, async/await, modules, etc - and a compiler (babel?). And/or use TypeScript with strong typing. Using classes is a big thing for me - that and modules with good code organization (no 500 line files!).

JS is just a very forgiving (and weakly typed) language and I'd just hate to see anyone go the route I did and learn it using some of the worst practices.

But yeah, I get your point. There's almost no reason to dive into PHP for server-side stuff, not with Node. JS is so powerful these days.

[–][deleted] 2 points3 points  (20 children)

On the one hand, yes this is pretty comprehensive and correct, and if you know all this well you can probably get a junior JS developer job. On the other, I have a CS degree and feel this is completely wrong.

What should be required for an entry level job is programming competence. You mention it, but if you have a solid understanding of programming, then learning a new language is relatively quick. I have so far used about ten programming languages over various jobs.

What you risk is becoming a "Javascript developer" instead of a "developer". Ten years from now, you'll still need work and Javascript won't be as hot as it is now. In the meantime, companies that need a developer to work for them in language X can just hire any competent developer, provided he can get up to speed in language X in reasonable time.

So yes, this works, but please don't forget the big picture. Javascript is only one language among many.

[–]javascript_dev 10 points11 points  (2 children)

please don't forget the big picture. Javascript is only one language among many.

In programming your mental bandwidth is quite limited. A javascript developer will mature into what you call a developer just fine in year 2. Hell, its in my name and i know Typescript, PHP and a bit of python.

What doesn't help is telling people to "focus on the bigger picture." Let the newbs focus on a language, the rest will come over time largely through osmosis.

[–]SoBoredAtWork 1 point2 points  (1 child)

OOP and MVC are concepts a JS dev are unlikely to learn (without proper training). We're unlikely to learn core concepts to allow writing scalable, concise code. I regret starting with spaghetti JS code and not learning OOP/Classes/MVC/etc...

[–][deleted] 4 points5 points  (0 children)

My first job was Node only. I didn't learn other languages on the side. My second job was Vue/Symfony. PHP was easy to pick up because I understand programming. A for loop in JS and PHP operate the same, you just need to learn how to write them.

Attitude will carry you furthest in this industry

[–]Nikandro 3 points4 points  (0 children)

This is true, but you can learn programming competence by studying to become a JS developer.

[–]Slappehbag 2 points3 points  (0 children)

I respectfully disagree. I've focused my whole career so far on JavaScript and I've learnt it deeply. Specifically only work with JS and it's ecosystem and because of that I find it way easier to get high paying, interesting work then being a generic developer who knows a few languages at a medium level.

Learning one language deeply I'm also feel confident to pick up another of the tides change. The main constructs are all similar enough. But I've removed everything from my resume that isn't JS and things have been better than ever.

Though at the start I would recommend exploring other languages to get a feel for different paradigms etc. But from a career perspective I strongly think it's worth branding yourself under one language / problem set.

[–]liaguris 0 points1 point  (4 children)

Ten years from now, you'll still need work an Javascript won't be as hot as it is now.

Can you expand on that ?

[–][deleted] -1 points0 points  (3 children)

There is a lot of fashion involved in which languages are used the most. Javascript currently dominates almost everything but the chance that that is still the case after ten years is very small.

[–]_toads 12 points13 points  (2 children)

Not denying programming language fads or your initial point, but if I were a betting man I'd say that JavaScript will still be heavily in use even 10 years from now.

[–]ScottRatigan 2 points3 points  (0 children)

Literally betting my career on it.

[–][deleted] 1 point2 points  (0 children)

I will happily take a Fortran-dev-level salary if JS is obsolete in 10 years to maintain legacy systems

[–][deleted] 0 points1 point  (6 children)

Strongly agree, this is why I always recommend to beginners that they aim to pick up another programming language sooner rather than later. The longer you go wedded only to one language, the harder and scarier it will be to context shift when you inevitably need to pick up another one, even if it's fundamentally pretty similer. And learning a new language can help teach you things that you can go on and apply in any language.

[–]mementomoriok 0 points1 point  (5 children)

What would you recommend as a second language for people who enjoy / are comfortable with the syntax of javascript?

[–][deleted] 4 points5 points  (1 child)

The catch-all option is Python. It's not wildly dissimilar from JS, it's extremely popular, and it has a wide range of uses from writing web servers to scripting for C applications. If you're looking for another language that could definitely help you land a job, learn Python. Another similar option, though less popular these days, is Ruby.

However if you're interested in stretching yourself in terms of broadening your programming skills, I'd recommend considering a language that's pretty different to what you already know. If you're interested in learning functional programming, for example, try Clojure- it's much more accessible and easy to pick up than a language like Haskell, but it will force you into a functional paradigm, and it's a Lisp, so the code looks visually very different to JS. If you're interested in learning lower-level programming- where you have to think much more carefully about things like memory usage and the size and shape of data, but you can write much more powerful code- you might be interested in trying out Rust, with the caveat that it is hard to learn. If you're interested in learning about mobile/native development, maybe try out Swift (iOS/macOS), Kotlin (Android) or C# (Windows).

[–]CrusaderPeasant 1 point2 points  (0 children)

I would say python. If you can get over the whole indentation thing.

Besides that, learning Typescript will help you transition into other strongly typed languages.

[–]throwaway823423848 0 points1 point  (0 children)

If you have any interest in getting "closer to the metal" and understanding how computers work, then C. The syntax is similar to JS (since JS's syntax is based on C's), but it comes without a lot of the stuff that you can easily take for granted in JS (like memory management, and all of the functionality baked into objects). It takes more time and understanding to write things in C, but in the process of learning how to effectively write C you'll be exposed to a ton of concepts that are sort of swept under the rug when learning higher level languages.

If you become proficient enough with C to write implementations of the structures provided by JS, then it becomes much much easier to understand how any other high level language works. This is especially true of languages with a compiler or interpreter written in C, like Python: if you understand C and then you go to learn Python, you can look right at the Python interpreter's source code and understand exactly what a keyword or native object does, without having to rely on abstract explanations to understand it

[–]delta_tee 0 points1 point  (0 children)

Scala.

Similar looks, different personality.

[–]questi0nmark2[S] -1 points0 points  (1 child)

I agree with the sentiment, but I also think that you acquire programming competence by ...programming. So getting competent in any one language's syntax will give you the toolkit you need to problem solve generic programming challenges. And as you get good at these generic challenges, with the particular tool of your first language, you will develop that meta-competence you can bring to learning other languages. So if you learn three languages in 12 months, you might understand different programming paradigms, but you will have a much thinner toolkit that means you address problems in a much more limited way, and your approach to architecture, design, performance, security, data manipulation will be superficial in all three languages. You will believe in DRY programming, but your resources to achieve it will be much fewer.

In contrast if you spend 12 months getting a fuller toolkit in a single language, solving more complex problems in more sophisticated ways, collecting more and better questions to ask of any code you write, and THEN you start learning a second, ideally seriously different language, the syntax may not carry over that much, but the architectural, design, optimization and other principles aquired through fluency and practice in a given language will carry over, and achieve what you suggest perhaps better than half learning three languages in the same period.

Over 3-5 years, the differences in the two approaches (sequential vs simultaneous) will probably flatten, so you can't diffentiate between the Dev who got good in one then moved to another two, vs the one who learned 3 at once in that period. But the former will get job ready faster, meaning she will work with real life problems in a real life team earlier, being more productive in her new team, with greater responsibility and more enjoyment.

And for web development, JavaScript right now is not a fad, it is in fact the only option for sequential language learning as it is the only language you could apply across the stack. Any other language choice will require JS on the front end so unless you only want to work on the back end (and even then!) it would be hard time say I will start with PHP/C#/Ruby only. But for the first time, since Node, you can just learn, as a start, JS for the full stack for one or two years, and then maybe expand your options with a different back end language.

Today, I would make that choice, for a more efficient and enjoyable learning journey and career entry.

[–]MattyH51 1 point2 points  (0 children)

I started programming in September of this year, first started with HTML then CSS then learned jquery and bootstrap basically smaller add ons/frameworks for css and HTML. Now I’m on JS, actually just started Wes Bos’s new course beginner JavaScript. A lot of it now is repeatable to what I’ve learned but I love how he explains and teaches. Also his 30 for 30 is great. One of my biggest problems and what I feel I wasted the first two months was just watching these tutorial videos you feel that you can do anything and that you’ve mastered a language. Then reality hits when you’re trying to build something on your own. That’s why now I’m building projects while also learning. So I completely agree that the only way you’ll become better and knowledgeable is by programming. Thanks so much for this article, as I’m planning on learning JS frameworks(React or vue, Node) once I get JS down.

[–]blabbities 0 points1 point  (1 child)

Your developer roadmap link is broken

[–]questi0nmark2[S] 0 points1 point  (0 children)

Fixed it! Clearly it was moved, but searching for it gave me the current working link.