6 ms·
I think you have to look at the reality of the situation. The last 10 years have created a legion of developers who are really only familiar with JavaScript.
by redleggedfrog 7y ago
I think you have to look at the reality of the situation. The last 10 years have created a legion of developers who are really only familiar with JavaScript. They have never used a proper programming language and have either never learned or have forgotten what it takes to make solid software.
But in reality, that's fine. They'll muddle through on something like this, finally getting it to work through endless tinkering, and it'll be fine.
Remember, the entire internet now pretty much runs on this premise. And it's fine, right?
- joekrill 7y agoSo what exactly makes a "proper programming language"?
- apta 7y agoNot JavaScript
- amluto 7y agoIn the context of a critical, long-running, resource-constrained system, a language + runtime that can have deterministic memory usage. So: not JavaScript and probably not J2SE either.
- NotAnEconomist 7y agoHaving written in it for a while, JavaScript just kind of is "meh". TypeScript, for instance, is a much better development experience in terms of language constructs, but that only makes the package management situation stand out more.
- redleggedfrog 7y agoI could see how that would be considered inflammatory, but it was not intended that way. I have a somewhat fuzzy definition. "A programming language that has more 'intent' to it." For example, Rust. The designers had definite ideas about what they were creating, noted the trade-offs, and implemented features based on those decisions. You can say that about lots of languages - Java, C#, Swift, or if you need to go back 10 years, Java <g />, C, or maybe even Python. JavaScript on the other hand was cobbled together in a few weeks by some poor fellow who was under impossible deadlines. And it shows. We've all seen the "Wat" video. Programming in JavaScript is a minefield of bizarre phenomena. Function scopes as namespaces. Nutty math. It succeeds in spite of itself because, a. It's rarely used for anything truly important, and b. It runs on the most popular run-time environment on the planet. Not that you can't do great things with JavaScript. But just about any other language would have been preferable.
- moron4hire 7y agoMost of the "wat" video's complaints also apply to Python. And JavaScript has had many more years of considered design and development than when JQuery or Node made it popular.
- orf 7y agoThey really don't.
- londt8 7y agoYou are thinking of something else than python? Python has strong, dynamic type system with little implicit type conversions.
- deathanatos 7y ago> Most of the "wat" video's complaints also apply to Python. No, they don't. All of Wat's complaints against JS, in order of presentation: > [] + [] ; JS: '', Python: [] Python uses + between arrays for concatenation, just like strings, which I think is reasonable. JavaScript does random crap. > [] + {} ; JS: '[object Object]' (that's a string, not an object), Python: TypeError. Again, Python's output here is reasonable, JS's is off the deep-end. > {} + [] ; JS: 0 (the integer) Python: TypeError Again, Python's output here is reasonable. JS appears to demonstrate that + isn't commutative, but that's too rosy a picture: in this case, + actually is commutative, as ({} + []) and ([] + {}) are the same string, but without the parentheses we get 0. Yes, the lack of parentheses changes the value JS emits.¹ > {} + {} ; in Wat: NaN, in Chrome/Node: '[object Object][object Object]', in Python: TypeError Similar to before, Python errors out on the garbage, JS just keep computing ever more insane values. > [longer example, but boils down to "wat"+1 doing something and "wat"-1 doing something else for comedic effect. Python TypeErrors on both of these. Python certainly has its own warts, but they are not as ridiculous as the warts that JS carries around. ¹AIUI, {} + [] is parsed as empty code block, implicit semicolon, unary plus, empty array. The parentheses force the grammar to evaluate the entire thing as an expression, so ({} + []) parses instead as a parenthesized empty object, binary plus, empty array.
- 7y ago
- bobcostas55 7y agoIt's one where empty array plus empty array does _not_ equal an empty string.
- Avshalom 7y agointegers.
- maxerickson 7y agoCashew nuts!
- jvanderbot 7y agoIt's classic s/w. Over budget, under spec'd, and arbitrarily the language of the internet.
- mtberatwork 7y ago> and arbitrarily the language of the internet. I think you mean the Web.
- zaarn 7y ago> The last 10 years have created a legion of developers who are really only familiar with JavaScript That probably played 0 role into this. When the project was created, about 20 to 15 years ago, people put in the design specs. The language selection was JS, Python 1.5 (1.5, not 2, not 3, 1.5, released in 1999) and a custom script language. NASA decided for JS because Python used more memory. The JS that is being run is essentially IE6 or IE5-level, so none of the modern features introduced in IE8 and forwards that make it all so easy. I'd expect more modern variants of JS (TypeScript) or even something like Rust to make an appearence in 15 years or so. Atleast for these kinds of missions.
- plopz 7y agoYeah, in 2003 this version of js worked with vxworks and didn't leak memory like python. I'm sort of surprised they didn't go with tcl though.
- harshreality 7y agoThe reason they didn't choose tcl had nothing to do with the language. > 2. An attempt was made to port each scripting engine to the VxWorks real-time operating system on a flight-like Power PC by embedding it into a payload flight software application. TCL was dropped from the study when it could not be successfully ported to VxWorks. JavaScript, Python and G-script were successfully ported and a series of tests with prototype flight software applications were run in order to rank them against the success criteria. https://www.scribd.com/document/407354589/Event-driven-James-Webb-Space-Telescope-operations-using-on-board-JavaScripts https://www.scribd.com/document/407354589/Event-driven-James...
- plopz 7y agoAhh, that makes sense then.
- cartoonfoxes 7y agoI would have assumed porting TCL would have been the most straightforward of the bunch. What features made it so difficult to work with?
- nepeckman 7y agoThis language choice was made 10 years ago by developers working for NASA. While I think it was a questionable choice, I don't think it was a hype driven choice and I don't think its accurate to say these developers only know JavaScript.
- mturmon 7y agoCome to think of it, STScI, which is where those developers worked (and maybe still do), was always a favorable environment for Python. Back in the early 2000s, before Numpy was a thing, STScI developed an image-file-reader for Python called PyFITS, and an underlying array extension to Python that allowed multiple base types, slicing, etc., called numarray (e.g., see https://scipy.github.io/old-wiki/pages/History_of_SciPy.html https://scipy.github.io/old-wiki/pages/History_of_SciPy.html). In some sense, STScI might have been expected to prefer Python to JS.
- wayneftw 7y ago> 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 done C, C++, C#, Java, Basic and Python for a living in the past and I always make rock solid software. JavaScript is by far the most productive programming language that I've used to do this. People who think there's such a thing as an objectively "proper" programming language that they haven't even named are actually the problem with this industry, not JavaScript developers.
- lallysingh 7y ago> I always make rock solid software Everything else you claim is suspect because you said this.
- wayneftw 7y agoThere's really nothing but an opinion in my response (and in the item I'm responding to) and a bit of bragging certainly doesn't invalidate that in the slightest. Besides that, if you think that there are no people out there who can consistently write solid software, well...you're just flat out wrong. (And if you think you can't find them on HN, well wrong again...)
- citrablue 7y agoI think the apparent hubris is what they're referring to, and that it is a negative indicator of developer self-awareness, while humility and willingness to acknowledge past mistakes are positive signs. Honestly, if you've always delivered rock solid software, you're some sort of mythical creature.
- ben_w 7y agoThere’s a comic, I forget where, that says the difference between good and bad developers is that while both cause the code reviewer to exclaim “WTF?”, the bad developers causes far more of them. :)
- bregma 7y ago> Remember, the entire internet now pretty much runs on this premise. And it's fine, right? Oh, great, a space telescope run like the internet. Now every 2-bit remote galaxy out there is going to be making toxic comments about the Earth and human civilization as we know it. Be careful not to mention things like white dwarfs, or you'll be in for it from all sides. Thanks JavaScript. Way to ruin the night sky for all of us.
- JamesWebb 7y agoJWST will orbit earth, they won't know about it in remote galaxies.
- seniorsassycat 7y agoJwst will orbit the Earth sun l2 Lagrange
- seeker61 7y agoDon't worry a little banner will appear in front of it telling the real truth about 9-11
- beamatronic 7y agoYou have viewed 2 of your 5 complimentary images for this month
- ergothus 7y ago> 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.
- eitland 7y agoGood 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/ 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.
- deleted 7y ago[deleted]
- benj111 7y ago"They'll muddle through on something like this, finally getting it to work through endless tinkering, and it'll be fine" This is NASA we're talking about. For a satellite. There will be no muddling, or tinkering. Nasa isn't in the market to hire any old web dev you know. This is rocket science. Edit: On second reading you may not be a serious as I first thought :)
- deleted 7y ago[deleted]