Programming language descission stress
Posted by appelperen@reddit | learnprogramming | View on Reddit | 11 comments
For the past half year I have been following The Odin Project and I have now completed all projects. While doing personal projects now I have found that I almost completely dont enjoy the projects I am making, particularly working in large frameworks like React or Nextjs. So I started thinking back on what I actually want to do.
While looking back on TOP(the odin project) I remembered that what I enjoyed learning most was a module about computer science concepts(Hash maps, linked lists, merge sort, recursion etc..). And with this I concluded that I wanted to start doing projects more oriented around learning and applying core concepts and I concluded that doing this in a web development space was not the right choice for me.
With this realization I decided I want to start learning java and start doing projects where I could learn these topics outside of a large framework.
My issue comes with advice from father, who has been in the industry a long time and has learned programming long ago in basic, started doing assembly java and has pretty much kept up with the field as it became more modern and now works with nodejs and react. He thinks it is a waste of time for me to learn java and that if I start doing larger projects in javascript I will eventually learn these concepts as I continue.
Now I dont know what to do anymore. Does half a year of javascript programming with experience in a couple backend and frontend frameworks enough for me to have developed a programming basis good enough for me to hop to another language? Or should I continue developping skills in javascript even though I currently dont feel like Im doing anything I actually enjoy?
CodeTinkerer@reddit
What do you dislike about Nodejs and React? Is it the complexity for no good reason?
appelperen@reddit (OP)
I dont really dislike node or react. My issue with react is that I simply spend most my time thinking about the design of a frontend application instead of actually writing code or solving a problem(this is because I'm only doing personal projects so if I want a fullsfack webapp I put in atleast some effort into the frontend). And I think node is great, and that I can do almost everything I wanted to do in node, but I want to learn java in order to broaden my view on programming. I am glad I did so because I have started learning new concepts and patterns that I did not know yet in js
CodeTinkerer@reddit
Unfortunately, a lot of programming are these clerical tasks (boilerplate code and other tedious, but necessary tasks) that have nothing to do with problem solving.
So you don't have a boilerplate template for the front-end? Is your front end always so different from one app to the next?
Finally, yeah, good idea to broaden horizons.
Wise_Marketing_4610@reddit
Hand-wringing about sinking time into learning particular languages should really not be a thing. Just as DSA are language-agnostic concepts, you can also abstract all programming concepts like control flow, syntax, assignments, memory management, etc. Learning to program can be similarly language-agnostic (you just need some language to use to reinforce and demonstrate those concepts).
The majority of well-worn engineers can switch between languages without much issue, as long as they're more or less in the same general paradigm (e.g. imperative), their documentation is good and you understand things like memory models and management (again, language agnostic).
This is all to say - your dad is probably right.
appelperen@reddit (OP)
Do you think the majority of well worn engineers can switch languages without much thought is because they have experience in a handfull of languages or because they have a lot of experience in a single language?
Wise_Marketing_4610@reddit
to the first question, it's almost certainly both, but more the former than the latter. it's probably not unlike learning human languages; a serious polyglot probably has a lot of useful muscle memory to bring to bear on learning any new language, but they started deeply with one or two.
on the 2nd, my personal take is yes. every programmer should learn C, however irrelevant to their career - but not at the expense of a language that is project-relevant. you need to be building something serious, that you're invested in, to make any real progress. whatever that project is, learn the tooling needed to make it, don't fret about transferability of understanding - it will come - and at some point learn C.
teraflop@reddit
You can learn CS concepts in JavaScript just as you could in Java, but it's definitely not a waste of time to learn Java.
For one thing, Java is still relatively in-demand in the professional world, so it's a useful skill to have.
For another, it's good to broaden your horizons by learning different kinds of programming languages. If you've only ever used JavaScript, which is a dynamically-typed language, it's a good idea to also study a statically-typed language such as Java to get a feel for how it differs in terms of style and design patterns.
appelperen@reddit (OP)
This is very close to my thought process on what I wanted to do. Would you agree that to become as versatile as possible you should then spend a decent ammount of time on a handful of different environments, or spend a lot of time in one language and then pick up new tools later on
AmSoMad@reddit
I think the part you're missing is: JavaScript, unlike the other languages, comes with built-in windowing, rendering, templating, and styling known as "the browser", "HTML", and "CSS". When you're first learning it, it can be daunting, because if you had picked Java or Python, you'd just be learning code, without all the excess.
However, you're going to reach a point with Java, where you need to build a user interface. You can do that using native graphics toolkits like GTK or Qt, or Java-oriented ones like JavaFX. You can also build websites in Java using Spring Boot.
But what you'll likely find out is, building a UI for a Java app is harder than building it in React (for example). And that building a fullstack application in Java, depending who you ask, is harder in Spring Boot (although it does offer some advantages) than building it in Next.js.
In addition to that, all of the "Hash maps, linked lists, merge sort, recursion etc" you mention, are also thing you'll do in JS (or TS).
So what I'm thinking is, you go introduced to fullstack meta web frameworks, which are intimidating, and seem like they're doing a bunch of stuff that "regular languages" like Java don't do. But that isn't the case. You'll be doing all the same data structures, and algorithms - for the most part - in JS Land, it's just that BECAUSE JS is easier, and also has built in windowing, rendering, templating, and styling... you're introduced to UI libraries and meta frameworks much earlier (like you were in TOP).
When you're tasked with building a full stack Java application using Spring Boot, chances are, you're going to be like "holy shit, this was so much easier in Next.js/React".
Additionally, Java is an OOP languages while JS is a procedural language. You can still write OOP code in JS/TS if you'd like, but I personally dislike OOP, I only work with it when I have to, and the differences can be drastic. Other's on here prefer OOP, and think it's better suited for certain tasks (which I often disagree with, but no use in beating a dead horse).
For example, here's a linked list in TypeScript:
And here's that same linked list in Java:
So it's not that you necessarily do different things in TS/JS than you are in JAVA, you're still going to do all the sorting, and algorithms, and DSA, for w/e it is you're trying to do. it's just that you were introduced to GUI libraries and metaframeworks in JS early, because it's a facet of the language itself (and as an "easier language", you're introduced to new things much quicker).
grantrules@reddit
Data structures and algorithms are pretty language-indepedent.. there's no reason to switch languages to write them. That said, I don't necessarily agree with your dad's view on Java.
AutoModerator@reddit
To all following commenters: please, do not bring up the old circlejerk jokes/memes about recursion ("Understanding recursion...", "This is recursion...", etc.). We've all heard them n+2 too many times.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.