13
Majstr
4y

Who ever come to idea to put JavaScript as backend language is insane.

I am coming from Java and now I am doing some work on Node project and I am loosing my mind.

Everything is an object but you have no idea what are his properties. There are call back, async, sync and mix. I don't even want to try debugging. There is no classes only object and a lot of functions everywhere.

The whole story with Node versions and playing with NVM. Don't even let me talk about Node modules.

Frustration and long development.

Comments
  • 4
    Go with typescript. It makes more sense coming from Java as you'll have types
  • 0
    @Rambolus I would but project is already running it just need updates and some new features.
  • 0
    Well the benefit is that any valid js is also valid typescript so if the room is there you can do the new parts in typescript and leave the old parts in js and on compile combine it all
  • 1
    I was thinking like you when I started my study program in a company a few month ago, but then I realized I was overthinking everything, and debugging isn't that complicated. Just take some time to wrap your mind around it and I hope it'll get easier for you
  • 1
    Use vs code the debugger there is awesome. Saved me a lot if time.
  • 1
    @react-guy Slow down.

    I was coding in PHP, Python for years too. Also some Objective-c, Kotlin, C.

    And I can say this half baked language called JavaScript is bad and all of its tools (NPM, frameworks, ES6, webpack...).

    Hate it!
  • 1
    @Majstr well let's agree to disagree. Started with c++, BASIC, then PHP, learned Java at uni, the Scala. I can write code in almost any popular language.

    When node came out I looked at it and now JS/ES6 is clearly my favorite language.

    Why?
    - it's easy for prototyping (YES! it is. You just need a bit more practice)
    - it's being actively developed by a bit community, meaning it's easy to find cutting edge techs in npm.
    - you don't have to reinvent the wheel all the time. Npm is there.
    - the js community has a "move fast, break things" philosophy, which I like.

    But yes, you'll have to unlearn some of the concepts of object-oriented. Js has classes and objects BTW. They just don't work like Java / c++ classes.

    Besides : how do you feel about PHP?
  • 0
    @react-guy I was also working with JavaScript for some time. Just not with node. And a little with typescript.

    But there is always some problems. And way to many choices. A lot of frameworks. All are half baked. Millions of settings for everything. When you learn something, something new comes out. And they change one thing that was bad but make three more bad things.

    Nothing fun at all.
  • 0
    @Majstr like I said : practice. There are a lot of different options in other languages as well. You probably can tell what to use there, but not yet in js. I was there too.

    Pick a framework that was here for a while (react, express) and you should be fine.
  • 0
    @react-guy there is code completion and you need it more than java bc js syntax is all over the place

    Maven shits on npm

    Idk what you mean by this, its not fp, and there are callbacks in java (also async, my guess is op's using java6)
  • 0
    @yellow-dog I am using latest Java. Maybe just this guy who started this project I am working on went nuts with callbacks.
  • 0
    NUDE JS.....

    I tried learning that sh*t and gave up halfway.

    I convinced myself, as a python, ml, dl, ai guy that I can make do without this hell on earth called nudeJS

    (╯°益°)╯彡┻━┻
Add Comment