News for hackers. Stuff that matters.
Re:A JavaScript Nightmare by MichaelRo on Sunday March 17, 2024 @02:05AM (#39732280)
I didn't quite understand why they had to debug on the spot, thus working like 36 hours uninterrupted or so.

A sane working environment would file a priority 0 bug and address it during working hours.

I'm not throwing a rock but oftentimes this sort of heroic behavior is self-inflected.

Also why is heroic debugging required on something that is not production? The article mentions it was a "quick demo". Then who gives a shit? There's time to investigate. And this would/should NEVER happen to production. The whole point of testing and staging/UAT environment is to catch this sort of problems. Again, a normal day at work in software engineering and not something to kill yourself living on amphetamine like a commando behind enemy lines in WW2.

Re:A JavaScript Nightmare by rezonant on Sunday March 17, 2024 @03:58AM (#39732721)
When you are not experienced on the platform you are building on, all debugging is heroic.

It's really strange that they would invest all this time as if they are keen to understand the cause of why it happened, but then be satisfied when jiggling the handle solved it. The real cause ultimately is a process one (developer discipline) or a pipeline one (bad build/test/deployment processes). They got close to realizing it and then blamed the language instead of what appears to be bad practices happening on their dev team.

Re:A JavaScript Nightmare by peschu on Sunday March 17, 2024 @03:25AM (#39732567)
it‘s called „motivation“
Re:A JavaScript Nightmare by atoav on Sunday March 17, 2024 @03:40AM (#39732628)
Jup, and if your employer doesn't stop you or even expects such behavior that is called a bad work culture.

Sure, I would also do long programming sessions on my own things every now and then, but those happen because I am in the flow and it feels like more work to come back into it the other day. But those are my own projects. I don't owe this to my employer. If they want that they could offer me double my current salary and even then I would insist on only doing it when it makes sense to me.

Re:A JavaScript Nightmare by number6 on Sunday March 17, 2024 @04:42AM (#39732908)
How would the employer know?
Re:A JavaScript Nightmare by atoav on Sunday March 17, 2024 @05:37AM (#39733110)
In my case my superior comes by in my office or sees I made a commit and tells me I should stop working (I tend to forget to look at the time if I am in a flow).

But I also live in Europe and my superiors want me to come in with a fresh mind, instead of burning myself for things that should be normal work.

Re:A JavaScript Nightmare by warkanlock on Sunday March 17, 2024 @05:58AM (#39733194)
OP here; thanks for reading everyone!

While I agree with everything you have said, and it's been my motto since I read, "I'm sure you're joking, Mr. Feynman." The point of the post was to point out (maybe I did it wrongly) that those things you have described are pretty impossible given the ecosystem we have nowadays in Javascript (as a whole!). Of course, you can try to theorize and try to get a hypothesis on things and then try to prove those, but it's just too hard to keep track of everything.

In addition, we are using lock files and good practices but it's just too much to handle for our small team (small startup) so we will plan to migrate onto a more stable platform.

It's really funny the heated arguments this post generated but I have been using Javascript for 12 years to these days, still this looks as a nightmare to me.

Tsdoing has a good video trying to install React from scratch, that's exactly how I felt during this debugging process

Another random story from this week: we have been using `nanoid` to generate IDs internally for an internal tool. Apparently, they did a breaking change release, and now you cannot use it anymore on commonJS env. See my point? where's the hypothesis we can make? It's hours and hours spent tinkering with code and other people's dependencies, and if, as you said, put a theory that theory won't match if you think how real systems work (the networking section on the blog post)

Re:A JavaScript Nightmare by MichaelRo on Sunday March 17, 2024 @10:32AM (#39734727)
Well your reply still doesn't explain the administrative (not technical) reason why you had to spend some 36 hours uninterrupted hunting for this bug. Particularly since it was 'a demo' and what broke was 'PDF export', while other exports still worked. Hardly the end of the world if you ask me.

Technically though, I have hardly met this dependency update problem with C++ simply because dependencies are rarely if ever updated. Android on the other hand was a nightmare. I had colleagues quitting in a rage and swearing to never again touch Android in their life. Probably half the effort was spent fixing crap that was broken by updated dependencies. Luckily I'm back to C++ now and hope never again will I have to touch such a crazy system. The whole 'update for the sake of update' seems to be a grave problem of the Android / Kotlin / Javascript universe. The mentality is like 'bread won't be sliced anymore, eggs won't hatch, sun won't rise if we don't absolutely have the latest bleeding edge alpha version of all libraries'.

Re:A JavaScript Nightmare by rezonant on Sunday March 17, 2024 @05:44PM (#39738323)
> The point of the post was to point out (maybe I did it wrongly) that those things you have described are pretty impossible given the ecosystem we have nowadays in Javascript (as a whole!).

That's the thing, nothing you have asserted as impossible actually is as you'll see throughout this thread. I have been writing JavaScript/Typescript professionally since for about the same amount of time and I am not intimidated or challenged by my projects in the way you lament about.

That being said, if you've been at it 12 years and this is still your opinion, fair enough, try something else then.

Re:A JavaScript Nightmare by warkanlock on Sunday March 17, 2024 @06:38PM (#39738691)
You don't have a mechanism of trust in Javascript. Typescript up to this point is just sugar syntax. npm is a dumpsterfire (see npm everything package)

If you are not intimidated by the complexities of this Babel tower, it's up to you. For me, this was just a personal catharsis in my personal blog that I wrote mostly for me (and I didn't share it here)

I believe there's no point on discussing this with particularly you since you have been commenting all around trying to just confirm your view instead of just comprehend that this is not sustainable for new developers (try to follow the conversations on packaging, lol)

It's simply too much burden just to maintain someone else mess. We will pay a high bill in the future for all of this.

Re:A JavaScript Nightmare by rezonant on Sunday March 17, 2024 @09:05PM (#39739577)
> I believe there's no point on discussing this with particularly you since you have been commenting all around trying to just confirm your view instead of just comprehend that this is not sustainable for new developers

I don't need to confirm my view at all. Advocating for one's view doesn't imply a lack of conviction, rather the opposite.

No need for a personal attack here. It's definitely sustainable for new developers who learn the stack. It has a learning curve but so does everything else. I've built applications in just about every stack there is (except for the more esoteric stuff like OCaml, Erlang, etc) and over those years complaints like those you raised are easily levied against any language or stack that is practically used in the industry. The common thread is that these sorts of complaints arise when there are more unknowns for a developer than knowns-- and as developers we are in the business of eliminating unknowns. When you encounter unknowns and your response is "this is why this tool isn't fit for use" instead of "let me turn unknowns into knowns", this is often the result.

> (try to follow the conversations on packaging, lol)

There isn't a packaging system out there without complications, but my posts regarding NPM's behavior points to how it actually already works to reduce or eliminate the version pinning failures you appear to have hit. Now if you are using very old versions of the tooling or if you do things like remove or ignore the version pinning tooling and how it should work, then yes the kind of problems you hit can happen. But that does not mean this problem isn't already solved, or at least the problem becomes an education one; which is why I'm out here trying to solve the education problem.

> It's simply too much burden just to maintain someone else mess. We will pay a high bill in the future for all of this.

That's, like, your opinion man. I've yet to find a development stack without it's costs, and once you are fluent in how to work in the ecosystem, Javascript's are not significantly higher than any of the others. And personally the cost/benefit of the Typescript ecosystem for me is quite rosy compared to the limitations of other stacks. I'm clearly not alone in that calculus.