Programming languages

Discussion in 'Tech Discussion' started by Fallen Hero, Apr 27, 2017.

  1. Truerror

    Truerror Well-Known Member

    Joined:
    Jan 10, 2016
    Messages:
    546
    Likes Received:
    292
    Reading List:
    Link
    Yes you did.

    Many, not most. The ones that do are noticeably slower than their compiled counterpart (except for React-Native, which is acceptable). The mobile and desktop are much less forgiving about perceivable delay than web. You might be able to get away with a 4 second lag on the web, but half a second delay in your web app will get users to leave you a single-star rating. And really, this is the reason why HTML uptake on mobile is rather slow, despite the apparent ubiquitousness of JS - Lots of people know about it, they just choose to not use it.

    As for desktop? Well, that's even worse. There are many desktop clients, but the majority of them are either used in-house in a company (though I admit it's usually a web client in this case) or needs to be performant, so HTML is out of the question. And you're not going to write enterprise software with JS. To risk exaggerating things, I'd say that would be nothing less than a violation of the programmer's human right - there's a reason why static languages (C# and Java) are chosen for that.

    The reason why things like the left-pad incident occurs is because it is actually a good practice in the Node community to make small modules (though I never thought it'd be that small). My memory is hazy, but a core contributor to Node encouraged this practice to avoid callback hell. The npm is highly populated - there's a module or pretty much everything, and including them in your project is simple, so there's not much incentive to include things in Node's standard library. Of course, this creates a very complicated dependency which means you can't do anything without a build tool. And even with build tools, if anything goes wrong in one of the myriads of dependencies, well, there goes your build.

    You're right about JSON though.

    Also, this is a moot point but I'd argue that, if we just count the number of platforms, JS is not that far ahead in terms of ubiquitousness. C# is also rather ubiquitous. Really, have you seen a pure HTML5 game on PS4?
     
  2. lnv

    lnv ✪ Well-Known Hypocrite

    Joined:
    Jan 24, 2017
    Messages:
    7,702
    Likes Received:
    9,044
    Reading List:
    Link
    No I did not. There is a difference between calling something a dead end and dead.

    HTML uptake has initially been slow but has been improving significantly as performance continues to improve. Not to mention developers becoming more familiar with best practices for coding HTML5 apps.

    There are plenty of applications switching to using HTML5 and JS. Even I was shocked when many apps I use, latest versions went with HTML5/JS for front end. Even in the enterprise.

    The same issue that happened in Node can happen in Python. The problem is not in the language but the repositories. This is why I like CPAN, it gets dependencies done right.

    Pretty big margin between JS and C#
    https://insights.stackoverflow.com/survey/2016

    Isn't most of PS4 UX made of HTML5 and WebGL?

    Not to mention, isn't UnityScript based on Javascript?
     
  3. Truerror

    Truerror Well-Known Member

    Joined:
    Jan 10, 2016
    Messages:
    546
    Likes Received:
    292
    Reading List:
    Link
    Really? Because I'm pretty sure in this context, calling a technology a "dead end" (meaning no future in it, so to speak) is essentially the same as calling it "dead". Because if it has no future, why should people invest in it?

    Best practices? And what are these best practices? Who defines them? The community at large? Because from what I see, the JS/Node community is one of the most (if not the most) divided community among programming languages. Yes, even with Python developers divided between 2.x and 3.x, it's still more unified than JS/Node.

    So enterprise has finally started adopting HTML5 for their web clients? Good!

    Yes, it can happen in any ecosystem. But here's the thing: It's much more likely to happen in Node than anywhere else smply due to how te community takes modularization to the very unhealthy extreme. I have never seen, in any language ecosystem before, a one-liner module. And it's used extensively. According to that article I linked, it was downloaded more than 800k times at the time. So no, it's not the repository that's the problem, npm works just fine. It's simply how the Node community is build.

    I told you before, Node uses callbacks a lot, which resulted in callback hell. To counter this, people followed several best practices: shallower codes and modularization among them. Someone from the node community (can't remember, maybe a core contributor or someone from Joyent) suggested that people should modularize as much as possible. Which resulted in dependency hell.

    Yes, indeed. Now I wonder why they're not using it for games.

    UnityScript? You mean that additional language in Unity that almost nobody uses? Even those who initially use UnityScript usually backpedal in the end and go for C# instead. I myself have seen two such occurrences.

    Edit: To close this off, let me link you two articles written by a Python developer who moved to Node:

    Why I’m Switching From Python To NodeJS
    After A Year Of Using NodeJS In Production


    Ok the font came out weird...

    Do note that the guy wasn't half-assing this. He and his team were pretty serious. They used Node for production code, so not some trivial test app.

    Now, remember what we're debating about here: Suitable learning language for beginners. Do you seriously want new programmers to learn that one-line modules are the way to go?
     
    keklel likes this.
  4. -X

    -X New Member

    Joined:
    May 28, 2017
    Messages:
    1
    Likes Received:
    0
    Reading List:
    Link
    Hmm... Learn C, C++, and Qt framework?
     
  5. xViper

    xViper Well-Known Member

    Joined:
    Dec 29, 2016
    Messages:
    303
    Likes Received:
    255
    Reading List:
    Link
  6. keklel

    keklel Well-Known Member

    Joined:
    Apr 27, 2016
    Messages:
    434
    Likes Received:
    169
    Reading List:
    Link
    How do you even debug node js code? The stacktraces I get are always long and useless.
     
  7. Mitch528

    Mitch528 Active Member

    Joined:
    Oct 20, 2015
    Messages:
    13
    Likes Received:
    22
    Reading List:
    Link
    C# is best girl.

    Seriously. It's a really great language and the .NET Framework is awesome. Now that Microsoft is going more towards open source development, it's getting better and better (as seen with .NET Core). With .NET Core, C# applications can now become cross-platform (I'm excluding mono here, because it's just plain awful). The C# syntax is also nice, and it keeps on improving with each subsequent version.

    There's a lot that you can make with C#. Windows applications (Desktop & UWP), Web applications (ASP.NET MVC & Core), games with Unity, mobile applications with Xamarin where you can write once and deploy everywhere (i.e. iOS, Android, Windows Phone) using Xamarin Forms or even just code them by using their respective native SDKs, all with the C# language.

    In my opinion, C# is a great language to get started with. The syntax is easy to get the hang of and understand, the framework accompanying it is really powerful and it has many libraries that you can use with it (which is always a plus). It's just an awesome all around language. Anyway, that's just my 2¢.
     
  8. Truerror

    Truerror Well-Known Member

    Joined:
    Jan 10, 2016
    Messages:
    546
    Likes Received:
    292
    Reading List:
    Link
    I'm sure the pros have tools to have them. Unfortunately, I've not delved that deep into Node's ecosystem, so I don't know what tools (if any) are popular for Node devs.
     
  9. yuzuki

    yuzuki [sweet night] [plum blossoms]

    Joined:
    Nov 24, 2015
    Messages:
    662
    Likes Received:
    4,875
    Reading List:
    Link
    :O big conversation unraveled.

    I still don't think my opinion has changed at all though.

    The first language that an amateur chooses to learn really depends on what OP wants to do -- and also whether OP is interested in pursuing computer science seriously as a career or not.

    If OP wants to take one CS class to learn programming and be done for life (not really programming seriously in the future):
    • Python -- will be your best general-purpose language.
      • Don't learn C/C++; it's not worth your time
    • Python because it's practical. I wasn't a CS major in uni, but I use it at work (which is not CS-related) and my skills are valuable because before I came along, everyone was doing tedious manual labor. If you need to crunch random data like how much money to charge X person in a huge list of attendees based on the number of events they selected on a google form, and whether they made early/late registration fees, etc. python is my go-to language for writing scripts to processing things. Web scraping, bots, automation, etc.
    • Python's main advantage is its fast prototyping. If you need something done, and something done quick, that is where python shines.
    • Python comes pre-installed on most linux and mac distributions. I can get onto someone else's macbook and write a simple script in 5 minutes and accomplish something that would have taken someone else in the company an hour to get done manually.
    If OP has a specific goal (e.g. make a game), learn the language you need to accomplish that goal.
    • For example, if you want to make a visual novel, learn Ren'py
    • Of if you want to make a windows desktop app, learn C#
    • Or swift for a mac desktop app.
    • For web development -- if you want to make a single-page web app, you'll need javascript.
      • If you don't need a single-page app, then you don't need javascript. Any old CMS will work.
      • My point is, pick the language for what you need it for.
      • If you're a photographer and want to make a website to showcase your portfolio, you don't need to go full-stack javascript.
    If OP wants to become a software developer:
    • Take a class. You'll need your data structures and algorithms and understanding of how pointers and things work.
    • Recognize that you'll be working in teams in the future. Not everyone in a software dev team is going to be working on UI/UX. Focus on what you like, and if you like databases, that's fine too. The important thing is to get a good foundation and good habits. If you have a good foundation, you'll be able to pick up pretty much any language that you need.
     
  10. keklel

    keklel Well-Known Member

    Joined:
    Apr 27, 2016
    Messages:
    434
    Likes Received:
    169
    Reading List:
    Link
    I dunno, what if he wants to program an Arduino? Seems pretty CS-y to me.