- cross-posted to:
- videos
- cross-posted to:
- videos
is it scalable? no.
is it maintainable? no
is it portable? not really
we rewrote our codebase around... 9 times this month :data-laughing:
JavaScript, it's such a messy language...I love it. No, I wouldn't recommend it.
Okay but what other language would throw you an error like [object Object] and refuses to elaborate.
java.lang.NullPointerException
would like a word, but at least that usually comes with a 50,000-line stack trace. Unless you're working with some piece of shit enterprise software vendor whose "platform" suppresses those after about 20 lines, and the thing in your code that caused it is on the 35th line in the trace.Newer versions of Java also have a feature ported from another JVM that shows the variable that was null and what method call caused the NPE to happen. NPEs are the opposite of generic, although you have to find why the the thing was null in the first place.
We had callback hell, and then we went to promises. await came out, we went back to promises, now we rewrote everything back to callbacks because it's just more comfortable.
too relatable :agony-shivering:
at least you know it's bad
there really is no alternative to javascript right now
javascriptist realism moment...
it is easier to imagine the end of web development than it is to imagine the end of javascript :very-smart:
also loved the bit about rather using Rust or WebAssembly, "they say adoption is coming... they said that ten years ago :deeper-sadness:"
https://www.youtube.com/watch?v=0jK0ytvjv-E
Rare gems in the trashfire that is youtube. Thank you.
I once started re-writing a (small-ish) enterprise codebase from PHP to Java (mix of Spring and EE). Then the NodeJS hype bubble hit, and I conned my IT director into letting me try that out as an alternative option, on the basis that it should be easier to do rapid development in JS, and that finding JS developers should have been easier than finding Java devs. (The real reason was resume-driven development, but I digress.)
About three months into the project, I threw up my hands and said fuck it because of this kind of shit -- it was the same kind of bullshit as any long-lived PHP project, just happening in real time. I migrated the backend back to Spring, this time with Kotlin instead of Java, and kept the frontend as JS. Maven is so goddamned flexible that yes, you can invoke NPM builds from a Maven module, and bundle that with your final output JAR. Between Spring Data REST and a decent frontend framework, it was great; I just wish I'd had time to learn TypeScript and React for the frontend stuff. Something something, a pox on the house of jQuery.