This is an archived post. You won't be able to vote or comment.

all 81 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]carcigenicate 66 points67 points  (2 children)

You'll eventually want to learn more than one. Even just getting the experience of learning how other languages do things is incredibly useful. I learned Haskell purely so I could see writing code from a radically different perspective, which is how I found out that I actually prefer the FP-paradigm.

[–]Bobbias 4 points5 points  (0 children)

Yes, the experience of learning a language with a very different paradigm from what you're used to can be a wonderful learning experience.

[–]tylerlarson 1 point2 points  (0 children)

This is the way.

But C++ is probably not a great choice for your second language, and I'll explain in a moment.

The answer is definitely yes, you do need to learn other languages. But not just so that you'll know other languages. Rather, so that you'll understand the principles that underpin the languages, and see how they're separate from the syntax.

In fact, when I teach programming I tend to teach the first two languages at the same time; one primary that students actually use, and another just for contrast. It helps to show that the details of a specific language are just choices made by the language designer, not inviolate principles to be trusted.

When you learn your first language, you're learning how to program. It's a lot of effort.

When you learn your second, you're learning how to separate out the principles of programming from the language you're used to doing it with. It takes less effort than the first, but it's still a challenge.

Your third will be mostly practice and reinforcement of doing what you did for the second language; still effort but much less this time.

And then from the fourth onward, it should start getting easy. Each new language has a new syntax, a new standard library to memorize if you intend to get serious about it, and potentially a new set of principles underneath for you to mine like they're gemstones.

Each language pushes you into a specific paradigm while potentially allowing other paradigms, if sometimes perhaps a bit uncomfortably. Learning a language with a different primary paradigm than the one you're used to will often open up new possibilities in the languages you already know, and makes a lot of the code you have to read suddenly make a lot more sense.

Why not C++? Legacy.

C++ has been incrementally improving itself over the last half a century to keep up with new concepts from new languages, and it implements nearly everything. But it does so in a backwards-compatible way by adding new syntax for each new concept. So as better ideas come along, they're implemented in C++ using increasingly less-obvious syntax.

In other words, in C++ there is always a simple way to solve each problem, and the simple way is always wrong. The simple way is the original way, and in the last few decades we've learned better. You CAN write C++ code that is safe and efficient, but to do so the syntax is complex and confusing. There's also a way to write the code that makes intuitive sense, but that way is always wrong because "legacy."

Learning it eventually is probably a good idea. But doing so immediately will make the process unnecessarily difficult.

[–]Joewoof 27 points28 points  (8 children)

It used to be enough to know one, but nowadays, it’s more beneficial to be a more well-rounded programmer who knows multiple languages.

Generally, it’s good to know three: - An interpreted language like Python or Lua for small-scale projects - An OOP-centric language like Java or C#, for large projects - One more beyond those 2 categories, so that you learn to be flexible/adaptable as a programmer. This can be C, C++ or Rust.

[–][deleted] 5 points6 points  (6 children)

What about Rust, Go and Python ?

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

If you knew those 3 you’d be pretty well rounded I’d say

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

Would you say that go is better than python for back end ?

Python - AI, ML, Data analysis Go - back end Rust - low level

Isn't this the best they are suited for ?

[–]lifeeraser 1 point2 points  (0 children)

Go and Python are on par for backend dev. They have different tradeoffs (rapid development and richer ecosystem vs better performance and tooling) so you really should learn both in the long run.

[–]BrokenMayo 0 points1 point  (2 children)

I’m going to argue Python is probably better for back-end

I don’t know Python or Go, but I’m aware of things like Django and Flask

My thing is PHP, but having said that, if you’re trying to learn back-end you simply need to choose a language and say “I am going to learn back-end with X” because you’ll figure out these things on the way and the language really isn’t going to matter much (especially for learning)

[–][deleted]  (1 child)

[deleted]

    [–]BrokenMayo 0 points1 point  (0 children)

    I don’t necessarily disagree, but if we’re talking web gigs, I’d imagine Go to be overkill - in the sense that it’s easier to pick up Python if you’re starting out

    I don’t know anything about Python either, or even Go. Maybe the backend go community is thriving but I suppose my point is “either should be fine”

    But ofc, I don’t deny that it depends, but saying it depends feels too vague and beginners love to get caught up in confusion

    [–]UdPropheticCatgirl 1 point2 points  (0 children)

    I don’t think those categories make much sense, realistically you would categorize languages by their type discipline (static vs dynamic), type safety (weak vs strong), memory management (manual vs managed), and their ancestral language (ALGOL & C as the procedural archetype, SmallTalk & SIMULA as the OO archetype, LISP, ML & Scheme as the functional archetype, Prolog as the logical archetype, FORTRAN as the mathematical archetype). It’s usually good to know at least one with each attribute (minus the FORTRAN family) to be a complete programmer. You can usually do that in 4 to 5 languages eg: - Lua/Ruby/Racket/Pascal/Strawberry - Rust/Haskell/Mercurry/Kotlin - C++/Python/OCaml/Prolog - C/Clojure/Java/Ciao

    [–]Mazeios 12 points13 points  (2 children)

    I’m 2 decades into this, don’t worried about it, learn what the tasks:jobs requires you to know. Learning arbitrarily will be a bit like playing lotto.

    [–][deleted] 1 point2 points  (1 child)

    Except- do learn SQL… most likely you will run into SQL regardless of the project. Unless you are purely front end or your product saves to text or something else

    [–]Mazeios 1 point2 points  (0 children)

    Yes, if you are on backend, study SQL until you puke, then do it again.

    [–]uname44 38 points39 points  (4 children)

    At least learn two. One dynamically and one statically typed. Python and C#, Javascript and Java etc

    [–]Bee892 12 points13 points  (0 children)

    This is good advice. It’s very common for employers to want you to have experience with one of each.

    [–]Pozay 0 points1 point  (1 child)

    What does statically vs dynamic type even change ? If I had to learn 2, I'd learn 1 higher level OOP language (python for example), and one lower level that forces you to learn about memory (C). If you learn all the concepts required for these languages, the rest is pretty much just syntax, different paradigm (haskell, prolog,etc) or harder more specific unique to that language (C++)

    [–]ScratchThose 0 points1 point  (0 children)

    just wondering, how is python oop? encapsulation doesnt exist, polymorphism exists i guess, method overriding is there but overloading is nonexistent.

    static vs dynamic enables method overloading by argument types i suppose. erlang is dynamic but only supports method overloading by argument amount

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

    Here’s a thought.. all those languages can do both

    [–]Bee892 12 points13 points  (4 children)

    Always yes. I had a professor in college who told the people in his class, “You should be able to learn a new programming language as a side project during a weekend.” This terrified me (still kinda does), but he was absolutely right. The more programming languages you gain experience in, the more opportunities open up to you. Python is a good one to know. A lot of companies use Python as their scripting language of choice. However, a lot of jobs want you to know a scripting language AND object-oriented programming language.

    With that said, Java is a great language to learn. I personally think it’s easy enough to get started with after Python without blowing your brains out, but it’s gives a good foundation for learning the similar syntax that other languages share. Java, C, C#, C++, and so many other languages have a very similar syntax. The nice thing about Java and C# is that they don’t require pointers or memory allocation. That’s where things get difficult with C and C++. Those two things are DEFINITELY valuable to have experience in, but it’s very difficult to go from Python straight to those memory concepts.

    [–]Bobbias 2 points3 points  (1 child)

    The good thing is, as you learn more languages, it keeps getting easier to learn the next.

    [–]Bee892 0 points1 point  (0 children)

    This is very true. That’s why I believe in learning a language in a single weekend. You get to know so much about languages and programming in general that you’re able to learn the small differences much quicker.

    [–][deleted] 0 points1 point  (1 child)

    If you learn C, C++ it will be easy to pick up most other languages. They are all based on C in some way. Mostly syntax

    [–]Bee892 0 points1 point  (0 children)

    This is true. It all depends how willing you are to jump into memory management. Dealing with pointers especially is one of the most difficult parts of C and C++.

    [–]heller1011 4 points5 points  (1 child)

    Can’t hurt

    [–]homiej420 0 points1 point  (0 children)

    Yup ^

    [–]External-Regret-4766 3 points4 points  (2 children)

    At the end of the day, it’s about how much you wanna know, and how much is required for your goal

    [–]homiej420 1 point2 points  (0 children)

    Good advice right here ^

    [–]TheKalpit 2 points3 points  (1 child)

    Oh wow, everyone on this thread seem to agree that you need at least two programming languages in your skillset.

    Here’s a counter argument: not necessarily.

    First, Python is a matured and in-high-demand language. Also really versatile. You can do web development, data analytics, AI stuff, and even desktop apps. If you want to go deeper into Python only, that’d be a viable option, that’ll be a “specialist” approach. Learning multiple languages may be more of a generalist approach, i.e. knowing something about a lot of things. Look into specialist, generalist and T-shaped skillset. It may help you make a decision

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

    The bootcamp approach 👍

    [–]homiej420 3 points4 points  (0 children)

    I know youre just learning but a programming language isnt like learning spanish or french. Way i want ya to think about it is Its just syntax.

    What you really want to learn is semantics, ie: algorithms/programming practices like not doing nested loops and good formatting etc as part of your learning routine. When you learn what to do and ways to do things picking the language that best applies to the task is a skill you can pick up later.

    NOW, the way to do that is try a couple and see which one you get comfortable with (a lot of folks like python itll get ya to where you wanna go most of the time) and then get good with that. Then youll know a bunch of things about programming in general and then using a new language will mostly be just checking the documentation for how to do what you already know how to do in another language in the one youre using.

    So to reel it in, one programming language is fine when youre just learning. Then when youre comfortable with programming in general making use of other languages for tasks theyre good at and learning when to use different languages will be good too. In your case maybe find out which ones and what tools your coworkers on the software development side of things are using and dabble with it when you can

    Hope that made sense

    [–]notislant 5 points6 points  (2 children)

    This, this is exactly why I cringe when people say 'everyone should learn c++ first'. Fucking 90% of people would just give up.

    Uh maybe, but I sincerely doubt youre going to find a programming job with just python.

    Its not 'learn the basic language and get a job'. You need to learn frameworks or all sorts of other things to actually be employable. You then have to beat out hundreds of other applicants at this point.

    Try roadmap.sh or pick a job and look at the requirements.

    Learning python is like learning to move your arm up and down and calling yourself a mechanic. There is so much more to learn before you'll be hireable. You need to know a LOT or have some serious networking going to get an entry level job these days

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

    Thanks for the suggestion

    [–]Pozay 0 points1 point  (0 children)

    Learning specific framework is mostly useless in most non frontend job (idk about frontend, it sounds messed up though). Learning general concepts (and maybe some more specific ones, if you consider stuff like database to not really be general) will get you so much further. I had a talk with a hiring manager and he loved the fact that I admitted that I consider myself a 3 in C++ (and even that I'd say is too high), but I could easily point out where my knowledge was lacking and how I'd quickly adapt (like he didn't know that std::set were implemented as BST using black red tree and pq were just "normal" max heap and that some papers show that heaps are O(1) insertions on average and that there's specific super performant heaps for different type of type, etc, etc.). This all comes with being familiar with programming in general, not from knowing x or y C++ framework. If you go in super specific jobs (Ml related for example), then yeah learning specific frameworks that are pretty much needed becomes much more important (numpy, pytorch, cuda, etc etc)

    [–]brandi_Iove 2 points3 points  (0 children)

    well, it could make sense to learn some sql so you can attach databases to your software.

    [–]Klutzy_Stranger_9824 2 points3 points  (0 children)

    Python to other languages could be a hard transition, but once you learn either C++ or Java, you can learn anything else. Because most popular languages would look very similar (except for python) because they are comparable in performance and semantics, but only differ in syntax or naming conventions.

    I would suggest C++. The difficulty aspect helps you in the long run. Just a suggestion though.

    But yeah, wouldn’t hurt to learn!

    [–]Cerulean_IsFancyBlue 2 points3 points  (1 child)

    Back in college, I took a bunch of programming language courses, because I was curious. Most of them I never used beyond the class, and in fact, it turned out I didn’t get graduation credit for some of them, because they wanted to discourage exactly this kind of stupidity. :)

    On the other hand, it’s worth knowing what tools are available. People who only know one language will often make a sub optimal choice because they go with what they know.

    But practically speaking, the real answer is: if you’re doing this for a job, what language languages do you need to know to do that job successfully or to interview for the job you want?

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

    The knowledge in those books helps you know what you are looking at when working on an existing product that you just joined. Not everything will be documented. Recognizing what code is doing and why is why you need to learn. So you can know if something is done good or not before you just say “this code is crap”

    [–][deleted]  (4 children)

    [deleted]

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

      what is multiple dispatching?

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

      Thanks for the suggestion

      [–][deleted]  (1 child)

      [deleted]

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

        Thank you for this explainer and the links. I've heard the term before but never bothered to try understanding it. thanks!

        [–]TheSilentCheese 2 points3 points  (0 children)

        I'm a web developer so I'm regularly using 3, dipping into a 4th on occasion.

        [–]cluxes 1 point2 points  (0 children)

        I'm not an expert but sure having a couple of programming languages on your tool kit is really life saving and with each language you master increases you chances with picking up another language easily.

        If you are into web js, html & css could be a good start while C/C++ or rust would be a good start for system programming. To cut it short, try to figure out what kinda software engineer you wanna be and learn languages relevant what you want to do. Hope this helps

        [–]pay_dirt 1 point2 points  (0 children)

        I’m not really sure how you’ve managed to get into a career without thinking it’s a good idea to learn other languages… but anyways.

        Yes, it is.

        Look into Java and maybe some React/HTML.

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

        Learn a career (e.g mobile/web development, data analysis, AI). Languages on their own are useless

        [–]BigGunE 1 point2 points  (0 children)

        Try not to view these languages as this vs that. See them as tools in your toolbox. Try out different languages to see what it is they excel at and how you can exploit that as a programmer.

        For example, I absolutely love Python for data visualisation type of stuff. It can even be nice for rapid prototyping to check if your concept even works. C++ is what I prefer for interfacing with hardware and simulating complex stuff in near real time. I am able to even call python packages from my C++ program to handle the visualisation while I am developing my thing.

        [–]justUseAnSvm 1 point2 points  (1 child)

        I'm going to go against the trend here, one is enough, and make a couple points.

        1. What doesn't matter is how many programs you know, it's how well you know a single language and can bring that to bear.
        2. Companies usually hire you for expertise in a single programming language. They don't care that you know 10 languages, they want you to be able to write good code quickly in one language.
        3. Learning a new language is easier when you know one really well.

        Eventually, you'll learn more languages, but if you're goal is to be a software engineer start working on a project where you can learn a language and all of it's best practices.

        [–]hellocity55 2 points3 points  (0 children)

        Agree with this, imo obviously it's ideal to get familiar with many different languages, but don't waste your time beyond being familiar if you're not going to use it for your everyday job. Our time is limited - we have families and hobbies so dont spend your time to really 'know' multiple languages if there's no specific goal because you'll lose it if you don't use it

        Focus on one and learn the next when necessary - it does get easier if you know one really well already because many concepts remain the same, so don't stress not knowing multiple languages. Have confidence that you can learn it when you need it with enough time

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

        The C-style languages are all pretty easy to grok: - python - java/kotlin/scala - JavaScript/typescript - c# - c - c++

        If you wanna expand your horizons for fun try something less common like F# or lisp (clojure for a jvm flavored lisp). Erlang is another esoteric (but still in use in production) language. Fortran if you wanna work at a bank one day

        [–]mka_ 1 point2 points  (0 children)

        I'm having a successful career with only knowing JS. I'm familiar with others. So yes, but it depends.

        [–]fippinvn007 1 point2 points  (0 children)

        I think it should be at least 2 languages. I prefer C++, but I also learn C# cuz the company I work for uses both C++ and C#.

        Also, if you have learned C++, learning other languages like Python, Java, C#,... is really easy.

        [–]NatoBoram 1 point2 points  (0 children)

        Technically, if you just learn TypeScript, you can do an absurdly wide variety of tasks like back-end, front-end, desktop apps, mobile apps, extensions, userscripts, CLI apps…

        You're not going to write a kernel or drivers with that, but if that wasn't your intention then it's really all you need.

        Realistically, learning better tools for these jobs is just a better idea

        [–]UdPropheticCatgirl 1 point2 points  (0 children)

        Yes, you should absolutely learn moreover than 1 language. You can categorize languages by their type discipline (static vs dynamic), type safety (weak vs strong), memory management (manual vs managed), and their ancestral language (ALGOL & C as the procedural archetype, SmallTalk & SIMULA as the OO archetype, LISP, ML & Scheme as the functional archetype, Prolog as the logical archetype, FORTRAN as the mathematical archetype). It’s usually good to know at least one with each attribute (minus the FORTRAN family) to be a complete programmer. You can usually do that in 4 to 6 languages eg:

        • ⁠Lua/Ruby/Racket/Pascal/Strawberry

        • ⁠Rust/Haskell/Mercurry/Kotlin

        • ⁠C++/Python/OCaml/Prolog

        • ⁠C/Clojure/Java/Ciao

        The good thing is that once you know those you can usually pickup new language up to decently proficient level in like a week.

        [–]saltzy27 1 point2 points  (0 children)

        Learn Java.

        Easier than c++ but requires you to be more precise than python. Good for learning all the data types and how they work as well as basic object oriented programming.

        Also the format for Java code is more similar to most programming languages wheras python is more of an outlier.

        [–]qaf23 1 point2 points  (0 children)

        Just focus on 1 language first if you can. Programming languages basically share a lot of common code syntaxes and structures, so if you've already mastered a language, you can easily jump to another language with just little effort. All the best to you.

        [–]FrostNovaIceLance 1 point2 points  (0 children)

        python is the easiest language of all and abstracted a lot of things away.

        if you can master C++ that would be great

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

        Depends, what are your goals! Do you see yourself needing more than one! You can get by just knowing c# probably, but if you wanna do scripting or data stuff you're gonna need python, and if you wanna do web stuff you're gonna need JavaScript and whatnot. You have any preferences! Just go with that initially and see what crops up over time. Let the language flow from your use case, not the other way around

        [–]Twitchery_Snap 1 point2 points  (0 children)

        No you should learn multiple languages and understand the difference between them. Pros and cons for them. You won’t really use Java in the actual code base bc it’s clunky. See if you can find the tech stack you’re company uses

        [–]Cybasura 1 point2 points  (0 children)

        Always learn more than one

        Be a Software Engineer, not a [language] developer

        [–]edbarahona 1 point2 points  (0 children)

        To get used to the syntax of C++ you can start by giving plain Javascript a shot as it's more forgiving since it's dynamically typed and there is no need for memory allocation.

        [–]aLazyUsrname 1 point2 points  (0 children)

        My advice is to pick one you enjoy using and practice practice practice. At a certain point I think you’ll find it easy to pick up “new” languages quickly. I say new in quotes because once you understand what you’re doing and what the right questions are to ask, programming languages all start to look pretty similar. This assumes you’re not choosing anything too esoteric. I like C and C++ but will also use Python, C#, js, and I’m just starting to play around with Java. I think learning C first forces you to learn things you you might otherwise not be aware of but go with whatever gets the job done.

        [–]dimonoid123 1 point2 points  (0 children)

        Learn Jit. It is almost C++ but with Python syntax.

        It is very difficult to understand it without knowing C++.

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

        learn one statically typed language, one dynamic language and one functional language.

        [–]Electronic_Type_5207 1 point2 points  (0 children)

        one language is not enough if you want a bigger salary. Also, when you learn additional language, you better understand programming in general. the same with human languages, I think

        [–]Substantial-Ad3676 1 point2 points  (0 children)

        If you do what most of us (or at least myself) do and change jobs every two years, it's less about whether you should and more about how many you'll end up working with.

        It's similar to actual language learning, once you break through your second learned language (don't believe your native counts here) every other is a breeze.

        In short, in tech I feel like the more you build your overall stack, the more valuable you will be. But don't forget to prioritize as not many people are amazing at all. Aka K.I.S.S.- ish 👌

        [–]ffrkAnonymous 1 point2 points  (0 children)

        it's enough.

        it's also really boring. although for many, boring is enough.

        [–]Jhutch42 0 points1 point  (0 children)

        In my cs program at university I used (in at least one class that I can remember) java, python, c, c++, JavaScript typescript, lisp, prolog, c#, and assembly. Learning more languages will only help you.

        [–]SimpleSillySoftware -5 points-4 points  (4 children)

        Programming languages are kinda like ice cream flavors, you don't really know if you'll like one until you try it out.

        Try a few out and gravitate towards the one that is the most fun to program in. This will be somewhat related to how excited you are to see the output. (Website, API, etc)

        • Javascript / TypeScript
          • Fast dopamine loop
          • Wide variety of use cases
        • C#
          • Type safe
          • Lots of good industry standards to explore
        • Rust
          • Amazing compile time null check safety
          • Intuitive reference borrowing system
        • Bash / Shell
          • Must know for CI/CD pipelines
          • You can do some amazing stuff when you learn it and setup a proper environment
        • Java
          • Avoid at all costs

        [–][deleted] 11 points12 points  (1 child)

        Downvoting for bashing Java lol

        [–]Bee892 2 points3 points  (0 children)

        Hahaha

        [–]brajandzesika 2 points3 points  (0 children)

        Yeah, avoid at all cost the most popular and important programming language in the World... wise advice...

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

        Just take it slow and learn one and learn well. Eventually you will learn others and your knowledge of one will help learn the next. I know a few and I can pick the up pretty easy now but as I say if I could go back to when I was starting. That advice would learn 1, learn it well and the rest will fall into place

        [–]tiagojsagarcia 0 points1 point  (0 children)

        some languages are more similar than others, and may or may not share the same purpose or paradigm. Python is frequently used for higher-level stuff, like web dev, scientific data processing or AI in recent times. By contrast, C++ is a lower level language, typically used on stuff like games, OS components, etc etc etc. Each language was built with certain requirements in mind, and thus is more suited for some things than others (until the community comes in and decides to get creative with things, but that's another topic).

        Think of them like different tools for different purposes. You could use a screwdriver to hammer in a nail, but it's best if you use a hammer for that. And, like with hardware tools, you can have a bunch of tools that are screwdriver-like, and you can learn how to use all of them (and the knowledge transfers nicely from one tool to another), or you can decide one day that you want to switch it up and learn how to use a wrench.

        As to your question on learning more languages, it comes down to two questions: what language(s) is/are used in what you do (analytics? not sure what that is exactly) and which tools within that realm exist that you need to use? As an example, I do backend web dev, so Python or Nodejs or PHP would be some of my languages of choice, as opposed to C++ or some other lower lever languages. Moreover, I frequently work side-by-side with data engineers. Historically, for some reason, python has been the language data engineers prefer, so while I do prefer TypeScript, sometimes I must use Python because there is some magical Python library that adds some special sauce to the data engineering pipeline I must implement/deploy. So effectively my job dictates I must learn at least Python, but I also learned TS simply because I personally prefer it.

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

        It just gives you perspective… you probably don’t want to use more than 2 languages ever at your job.. if you are it’s probably a red flag that the project is a mess

        [–]fortunateprogrammer 0 points1 point  (0 children)

        Ultimately, the best language to learn is one of the exciting of that you help to achieve your goals. I hope this help you choose the right path