Heyy, I’m learning programming and trying to choose a focus, I saw you can make web/backend w node, desktop (bloatware but discord uses it so if it works it works), games (not AAA and not optimized for performance but it shouldn’t matter for indie too much) Is there anything that compares? I wanna focus on one thing instead of spreading myself over a ton of languages, I do feel js is interesting for this, but I’m just starting out, so looking to hear some thoughts of people more familiar with programming.

  • Treczoks@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    6 days ago

    There is no “most versatile programming language”. That is a myth.

    The choice of a programming language for a project depends on the projects requirements. It could be a script language like Python, PHP, JS, or even Perl or Bash. Or something compiled like C, C++, Rust, or even Pascal or Prolog. It always depends on the project.

    Heck, if you have to build something sticking to a COBOL or FORTRAN system, using anything else would probably a stupid idea in the first place.

    So if anyone tells you “Programming language X is the one and only solution for everything”, it is more an admission of a severe lack of knowledge and experience.

    • skibidi@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      6 days ago

      While this is true, I will say there are some languages built for very specific problems that make poor tools for general use.

      Trying to build a distributed web app in Matlab or Mathematica would either be a flex or a complete waste of time, for instance.

  • Kaligalis@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    7 days ago

    The best language for starting is the language you find easiest to learn.
    But Rosetta Code lists a lot of programming tasks solved in a lot of different languages. Just browse a bit and if you’re lucky you just fall in love with one of the languages. Then, difficulty doesn’t matter.

  • crimsonpoodle@pawb.social
    link
    fedilink
    arrow-up
    1
    ·
    5 days ago

    Don’t worry too much about your first language. I hemmed and hawed over it a lot; but eventually if you keep learning most languages are easy to switch to except lisp and that one weird condenced one.

  • jimmy90@lemmy.world
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    7 days ago

    rust is now the most versatile language. however it is not yet the most popular or easiest language

    it’s pretty great tho

  • one_old_coder@piefed.social
    link
    fedilink
    English
    arrow-up
    41
    arrow-down
    3
    ·
    7 days ago

    Python or C++ are way more suited to build all the applications you listed.

    And IMHO JavaScript is one of the worst language ever created. PHP is also a very bad language, it seems like the web attracts all the bad stuff.

      • Randelung@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        6 days ago

        As much as I like Rust, it’ll be hard to dethrone python as the ML or data science prototyping default. It’s a great orchestration language.

    • SlayersFan@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      7 days ago

      so python/c can be used for web/backend desktop gui apps, mobile apps and games? I’m not talking just about what’s the “best” language but the more versatile, also i haven’t included it, but speed of development (how long it takes to write the code for the programmer) is also a plus

      • one_old_coder@piefed.social
        link
        fedilink
        English
        arrow-up
        13
        arrow-down
        1
        ·
        7 days ago

        Most modern games are written in C++. If you need speed using a high-level language, there is only C++ (or maybe optimized C#).

        • gastroglizzy@piefed.social
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          2
          ·
          7 days ago

          optimized C#

          No. C# runs inside of the .NET common language runtime, which is Microsoft’s version of the Java Virtual Machine. It’s basically the layer that handles garbage collection and all the other conveniences people expect from modern languages. Because of the overhead associated with all that, C# will never have performance comparable to C or C++.

        • SlayersFan@lemmy.worldOP
          link
          fedilink
          arrow-up
          1
          ·
          7 days ago

          Mhmm, but to start out i feel its best to focus in one programming language only, if under those parameters python/c (whatever c variant) are better than javascript, while it might be better in theory to use the right tool for the job, that takes way more time than doing everything with a less optimal more generalized tool (i think)

          • CompactFlax@discuss.tchncs.de
            link
            fedilink
            English
            arrow-up
            11
            ·
            7 days ago

            If focusing on one language, learn one that is good because you’ll have to work in other languages eventually and a well structured language will make that a lot easier than a less well structured one.

            I’m not a swe but I learned fundamentals in C++ (probably wouldn’t recommend that), work frequently in PowerShell, have played in C# a bit, and I’ve worked in Python a bit as well. Python seems like a really good place to start, today.

            Another note - front end and back end isn’t usually the same skill set even if it is the same language.

  • CameronDev@programming.dev
    link
    fedilink
    arrow-up
    12
    ·
    7 days ago

    Once you learn and master one language, the main concepts will usually transfer across, and with minimal effort youll be able to pick up any other language.

    So starting with JS is fine, but don’t be afraid of switching later down the line. Choose the right tool for the job.

  • tuckerm@feddit.online
    link
    fedilink
    English
    arrow-up
    7
    ·
    7 days ago

    Knowing Javascript is super useful. You’ll get a lot of people recommending other languages, mainly because Javascript has its quirks that will bother you eventually. Those are valid criticisms of Javascript. But it is useful because of how universally available it is. Web apps get hate for being slower than native apps, but it is nice being able to put a browser-based project together, knowing that basically every computer on earth will be able to run it.

    I think your general idea is correct. You’ll probably also find that, once you know one language, you’ll end up picking up others much more quickly.

    I’ve always thought that it’s easier to learn something if you are somehow drawn towards that thing. So if you find Javascript appealing, go for it. Don’t bother trying to learn the “perfect” or “best” programming language; there isn’t one anyway.

  • gridlock@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    6
    ·
    7 days ago

    Learn what looks like it makes sense to how you think. I’d argue Python is still #1 with js at #2. There’s still a ton of crusty Perl and Java holding more than you want to know together as well, so you have choices.

  • pmw@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    7 days ago

    Javascript is used everywhere, yes, but you definitely should spread your focus to other languages as a student. At minimum definitely dig into C for low level understanding and rigor, and a “real language” like C# for exposure to all the great features and paradigms in that world.

  • fediUser@lemmy.zip
    link
    fedilink
    arrow-up
    6
    ·
    7 days ago

    If this is your first language I wouldn’t focus on variety too much. Just pick something and start building. Once you pick up one language, the next one will be easier. On that note, Typescript (JavaScript with type enforcement) is a great first language. It’s multi-paradigm so you get exposure to lots of concepts and can use it in many different ways. That means you can learn tons of concepts without having to learn the syntax of another language first.

    Make sure you use typescript, not JS. I’m assuming this is a learning experience for you. You’ll learn about type enforcement, get much more out of your IDE, build safer programs, and be better prepared for your next language.

    DM if you have any questions about getting started as a developer.

  • dontbelievethis@sh.itjust.works
    link
    fedilink
    arrow-up
    6
    ·
    7 days ago

    I would Start with rust today. The compiler always tells you what is wrong and there is a clear way of doing things. It is a bit harder to pick up but you will get a better understanding of why things work.

    The learning material is also good.

    For me the JS ecosystem is a nightmare. It changes so frequently and it seems not to be the place where thoughtful engineers build stuff. Just the wild west. To exhausting for me.

    • VigorouSchematic@fedinsfw.app
      link
      fedilink
      English
      arrow-up
      4
      ·
      7 days ago

      My current favorite language is Rust. But I would never advice beginners to start with. Rust requires a deep understanding how memory works. Without the knowledge it is just fighting the borrow checker, which can be fustrating for beginners. For the same reason I would never advocate for Java: it is pretty hard to write java without understanding the oop paradigm.

  • NoLemurs@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    7 days ago

    Learning more programming languages isn’t the hard part of becoming a decent programmer. You’re optimizing for the wrong thing here.

    You should choose a language that works well for the specific projects you think you’re going to do in the near term. Depending on exactly what sort of projects you want to do, Python, Typescript, C++, and Rust are all languages I might recommend. I wouldn’t recommend raw Javascript for anything other than doing some tutorials before learning Typescript.

    Without more information, I’d recommend Python.

    • SlayersFan@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      7 days ago

      While it might not be the hardest part, I do feel it is a factor, so all things being equal i think it can help to choose a good first programming language that will help out the on-boarding process.

      • NoLemurs@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        7 days ago

        What I’m trying to say is that you should choose the programming language that will make your learning and early projects easiest.

        Learning a new language later is not hard. Trying to use the wrong tool for the task when you’re just learning is hard, and will teach you the wrong lessons.

  • VigorouSchematic@fedinsfw.app
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    Personal opinion. JavaScript is a weird language. You can make non-web applications, but thats not the main use case so the road can be bumpy.

    Almost any general language can be used for anything, including web stuff. But the language design will heavily influence how hard to achive the same thing.

    If you are a beginner, focusing one one language is a good start, but learning another, then another is the best path you can take. So you can choose the right tool for the job.

    I would advised to learn a strongly typed language, it seems harder at first, but type-checking makes your life way easier. (So if you stay on the javascript route, use typescript)

    My usual advice for beginners is python with strict types. It is as generic as it gets, easy to pick up, and has a ton of library and stong communities.

    Ignore stuff like Rust and new fancy languages for now. (Even tho my favorite language is Rust) I think learning C is a prerequisite for Rust or at least a deep understanding how the computer works.