News for hackers. Stuff that matters.
Re:James Webb Telescope will run a proprietary JS interprete... by ergothus on Wednesday April 24, 2019 @11:06AM (#19739087)
> They have never used a proper programming language and have either never learned or have forgotten what it takes to make solid software.

I've been coding since I was kid, and professionally for over 20 years. I've used a few different languages, in a few different contexts, but Iv'e done JS in front/backend for the last 7 years or so and I find statements like these utterly tiresome. Sure, there are lots of naive JS devs...but I can say the same for Java, or any other language that is "a proper programming language". A lot of JS code is written to optimize for things that may it not seem like "solid software" - but I've seen a lot of terrible "solid software".

When we collectively realize that our industry is so young, that the best practices of yesteryear are often now viewed as mistakes (and that the practices from before that were maybe the right idea...), and that we really DON'T KNOW the correct answer, maybe then we'll stop loving to hate on people who are doing work that we might not do so well at if we tried it.

I don't know your intentions in saying what you said, but in general there is a LOT of smug looking-down on web development in general and JS development in particular. Arrogance is not a good look, and derision is worse. The industry has improvements it can make, certainly, but this is something true of us all, not something restricted to one sub-group while everyone else is doing thing The Right Way.

Re:James Webb Telescope will run a proprietary JS interprete... by redleggedfrog on Wednesday April 24, 2019 @12:24PM (#19739986)
Sorry, no, there was no smugness. I agree with your points here quite firmly. I guess my tone didn't carry.
Re:James Webb Telescope will run a proprietary JS interprete... by ergothus on Wednesday April 24, 2019 @12:36PM (#19740121)
Thanks for saying as much!
Re:James Webb Telescope will run a proprietary JS interprete... by eitland on Wednesday April 24, 2019 @11:26AM (#19739321)
Good coders can be productive and write good code in any mainstream language, contrary to what is said in the famous "PHP: a fractal of bad design"[0].

That said JavaScript has a number of the same problems as PHP and pointing this out should be equally acceptable as pointing out issues with PHP[1], and while I'm impressed that it was created in three weeks and impressed with the JS community we shouldn't pretend it is a very well designed language. People being productive in JS is pretty much a result of an amazing ecosystem, not because of the language.

For a very simple example of what JavaScript could have been, look at Typescript: anything you can do in JS you can also do in TS. In fact, "porting" from JS to TS is as simple as changing the file extension.

Yet except for the need for transpiling TS is massively easier to work with and can eliminate whole classes of problems when used correctly.

Source: Have programmed and maintained others creations in JS and later TS.

[0]: https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

[1]: I also have programmed my fair share of PHP code. It doesn't have to be bad. But I'll happily admit that it isn't the prettiest or most well designed language I know.

Re:James Webb Telescope will run a proprietary JS interprete... by ergothus on Wednesday April 24, 2019 @12:33PM (#19740103)
> pointing this out should be equally acceptable as pointing out issues with PHP

Not the best example, considering that PHP has done its time as whipping boy. I've never been a PHP dev and I did my share of trash-talk against PHP instead of learning about the aspects that I could learn from.

My problem isn't that it's "unacceptable" to point out issues - it's that people aren't doing so CONSTRUCTIVELY. Instead, it's about finding the lesser social class to dump on freely.

For example - I have serious concerns/doubts about typescript and how it props up a tool-enhanced crutch for programming-as-communication that ultimately leads to lower-quality code. You would likely disagree and would raise your concerns about JS without TS. We can have a lovely conversation comparing points and, while it's probable neither of us is convinced by the other, we both walk away with a better understanding of the perspectives of others and impacts of code choices.

OR we could imply that JS isn't a "proper" programming language, and thereby JS devs aren't "proper" programmers and we can pat them on the head and tell them to run along and play.

Back when I was doing a lot of Perl dev (before my Java days) I noticed that the weaker Perl devs would hate-on Python (and the reverse), while the stronger Perl/Python devs would hang out with the stronger Python/Perl and compare notes. It took me a while to figure out why that made sense. The two communities had a lot of explicitly different philosophies, yet were really able to learn from one another and occasionally both languages improved as a result.

If JS isn't someone's preferred approach, that's fine...but that doesn't mean they are "lesser". They're _different_, just like different problem domains are _different_. That doesn't make them immune from criticism either, but I'm far more interested in those looking to broaden their views rather than broaden the reach of their current viewpoint.

Re:James Webb Telescope will run a proprietary JS interprete... by eitland on Wednesday April 24, 2019 @01:29PM (#19740760)
Thanks for being so calm. In hindsight I regret my comment.

Reading your comment now and rereading your comment I realize you were defending Javascript programmers, not the language. (I guess we'll have to disagree about JavaScript the language :-)

I agree we shouldn't attack programmers because of language choice. And I am happy that I pointed out that I am amazed by the JS community as it hopefully shows that I wasn't trying to attack anyone.

Re:James Webb Telescope will run a proprietary JS interprete... by ergothus on Wednesday April 24, 2019 @01:50PM (#19740996)
Thanks for clarifying - I hope I didn't come across too defensive. It's definitely become a sensitive spot when so many are dismissive, so I might lash out at those undeserving of it.

As for the language - JS definitely has its warts and its holes. It's not a language I love, but it IS a language I greatly enjoy developing for. Then again, I thought Perl was a great language (albeit with its own warts) so my views are fairly unconventional. Definitely though, I tend to think that languages fall into a more complex graph than just "better" and "worse", or even "better at X" and "worse at X".

Re:James Webb Telescope will run a proprietary JS interprete... by imtringued on Wednesday April 24, 2019 @11:45AM (#19739552)
I completely disagree. It is physically impossible to be more productive in a C++ project that takes 5 minutes to compile compared to almost any interpreted language with a debug cycle spanning seconds. It's that simple. The next issue is the ecosystem. Often the language itself is completely irrelevant if the ecosystem is good enough but here is the thing: ecosystems are tied to languages. Yes I can be productive in "crappy language X" if I recreate the superior ecosystem of "super language S". I am not a superhuman lifeform that has the power of hundreds of bright human brains (millions of bad ones aren't enough) and the corresponding two hundred hands required to interface with the computer.

No. I will just pick a good ecosystem and the language it was built around and be happy instead of proving that you can build a skyscraper out of feces by producing steel via nuclear fusion.

Re:James Webb Telescope will run a proprietary JS interprete... by Jtsummers on Wednesday April 24, 2019 @12:04PM (#19739782)
It's very possible, but instead of debugging you spend more time thinking so you're making fewer iterations.

That said, I really enjoy Common Lisp for being compiled (good performance versus interpreted) and the speed of compiling (compiling single functions at a time) so you get the same time-to-execution as your interpreted languages. Better, actually, if you change the function definition in place when you hit a condition.

EDIT: I hit submit before finishing my thoughts.

C++ isn't that bad. 5+ minute compile times can be tightened down if you have a good structure for your codebase. And if it remains at 5+ minutes, that's what unit testing is for (shouldn't need the whole build to execute) along with a build pipeline. Submit the change and get results after a few minutes. Distcc and other systems can also aid for the really large projects. Another factor to consider, to test that interpreted (presumably dynamically typed) program you have to have more tests than the C++ program needs. Static typing (even though I have issues with C++'s type system, it's still ok) covers a lot of the areas that you have to manually create tests for in dynamically typed languages

Re:James Webb Telescope will run a proprietary JS interprete... by MagicPropmaker on Wednesday April 24, 2019 @11:47AM (#19739579)
We do Erlang and C++ for CUDA programming where I am. It would be nearly impossible for us to write good code for what we do in, say PHP, or even Java.