r/programming • • Apr 07 '16

The process employed to program the software that launched space shuttles into orbit is "perfect as human beings have achieved."

http://www.fastcompany.com/28121/they-write-right-stuff
1.4k Upvotes

423 comments sorted by

View all comments

Show parent comments

81

u/neonKow Apr 07 '16

To add onto this, one of the great things about the web when it first appeared was how accessible it was to everyone. Here was a publishing platform that wasn't limited to publishers with millions a month to throw at publishing books or articles.

Everyone who thinks web languages are flawed because you can't launch spaceships writing that way are forgetting the forgiving nature of browser interpreted languages is what allowed so much individuality and creativity to bloom and create the internet we know and love today.

8

u/epicwisdom Apr 07 '16

That's not why people think web languages are flawed. Robustness is one criticism, sure, but I don't think anybody's main issue with JS is the fact that it's not robust enough for NASA...

3

u/neonKow Apr 08 '16

Keep reading posts here and in /r/ProgrammerHumor; you'd be surprised at how inflexible people are.

You'll see plenty of posts from people that think that static, type-enforced languages are the only thing that make sense, and that fast-and-loose nature of JavaScript is simply a sloppy design error.

In fact, one of the posts replying to me is about how unit-testing is the One True Path to programming correctly. Never mind that not every project fits into unit testing, or that there are a million more methodologies to QA than unit tests.

People with narrow experiences in software tend to be pretty narrow-minded. "No matter what your project is, you should use X programming methodology, have a 1:Y ratio of code to documentation, use a statically typed language like Java, and put braces on their own line."

12

u/nutrecht Apr 08 '16

You'll see plenty of posts from people that think that static, type-enforced languages are the only thing that make sense, and that fast-and-loose nature of JavaScript is simply a sloppy design error.

This is not people being inflexible. It's people gaining experience. Heck; you even see a move in the front-end space to stuff like TypeScript. Why? As it turns out static typing is kinda nice when you build big compex things. And more and more client side applications are starting to turn into big complex things.

There is simply a big immaturity and stubbornness in the front-end community and it's basically just 'growing up'. Angular2 is primarily based on TS. People found out that the way NPM handles stuff is far from ideal. Etc.

People with narrow experiences in software tend to be pretty narrow-minded.

Exactly. People who only used one language tend to think that language is perfect. People who used a lot of languages tend to think no language is perfect but that we should learn from each and take the best of each.

2

u/Ais3 Apr 08 '16

As it turns out static typing is kinda nice when you build big compex things.

May I ask why?

13

u/nutrecht Apr 08 '16

The compiler and IDE helps a ton in preventing errors that fully dynamic languages only show at runtime.

→ More replies (4)
→ More replies (1)

2

u/mreiland Apr 08 '16

I definitely land on the side of static typing, but that doesn't mean more dynamic languages don't have their place, just that static typing scales better. The question is if you need that scale, or if unit testing can help you scale far enough.

I agree wholeheartedly about the narrow experiences and being narrow-minded. I personally distrust any sort of extreme as it automatically means the person isn't putting enough thought into what they're doing. You should never value one goal above all else.

1

u/CuriouslyCultured Apr 09 '16

Static typing isn't just about catching errors, it's about giving the editing environment enough information to provide contextual assistance.

→ More replies (6)

1

u/Akkifokkusu Apr 08 '16

What does NASA build their (often fantastic) web front-ends with, fairy dust?

0

u/[deleted] Apr 07 '16

[deleted]

91

u/greenwizard88 Apr 07 '16

I don't think that anyone shits on javascript or html because it's not a good programming/markup language. I think people (or at least, I personally) shit on javascript because it's a scripting language that's been re-purposed for LOB apps, Photoshop-in-the-browser, servers, and god only knows what else.

Up until recently, "use strict" wasn't a thing. I'd argue that the benefit of not having any boilerplate language to write actually hurts the language, because now you have "programmers" making sites like forbes.com which downloads 35+mb of data just to load the home page.

As a programmer, if I prefer a strongly typed language, I'm also shit out of luck because my only choice is to use an esoteric language that compiles into javascript (I just called TypeScript esoteric, sue me).

I'm still running into API implementations that don't match, so even if you could dare call javascript accessible, it's not really unless you have a lot of domain knowledge, at which point it becomes a kludge. Which javascript polyfills are you including today?

To top it all off, the debugging tools are still crap. Today, I had a problem where a breakpoint would behave differently if the page was in an iFrame or not - but only the breakpoint, the application would still run correctly either way.

So, sorry to go off on you like that. I'm just really annoyed with javascript, and it seems to get worse every year, not better. I can't wait to see what web assembly brings. /s

18

u/Fs0i Apr 07 '16

Up until recently, "use strict" wasn't a thing. I'd argue that the benefit of not having any boilerplate language to write actually hurts the language, because now you have "programmers" making sites like forbes.com which downloads 35+mb of data just to load the home page.

Hey! It's only 15mb for me!

25

u/sc14s Apr 08 '16

Just about a MB for me.. Thank you Ublock Origin

15

u/Labradoodles Apr 07 '16

Clearly A/B testing at it's finest.

3

u/mus1Kk Apr 08 '16

1300 requests wtf?!

3

u/Fs0i Apr 08 '16

Awww come on. I only needed 15 seconds to load it with a 50 mbit-connection.

And the webserver likes the 1300 requests, it gets bored otherwise.

(But seriously, 1300 requests? Way to kill the server - and some clients)

1

u/[deleted] Apr 08 '16

Forbes website is an example of an extremely poorly engineered website.

I tried to comment on an outrageous article once (absolutely insane shit) and I had to disable my AdBlock.

Directly after, one of my cores pegged to 100%: Turns out, they had some kinda crazy infinite loop doing something in JS. Was super wild.

→ More replies (1)

15

u/morgan_lowtech Apr 07 '16 edited Apr 07 '16

now you have "programmers" making sites like forbes.com which downloads 35+mb of data just to load the home page.

By and large this is not the fault of bad developers and neither is it the fault of HR or poor hiring practices as /u/leptons states in a sibling comment. Forbes.com loads megabytes worth of stuff because it is working as intended. Have a look at http://builtwith.com/forbes.com, specifically look at the Advertising, Analytics and Tracking sections. There are more 3rd party libraries and services listed there than anything else powering site. These are requirements that come from above (usually the Marketing team and frequently anointed as top priority by executives.) I'm sure many of the developers would love to focus on performance, efficiency, stability, etc. but the fact of the matter is that those things don't impact revenue nearly as much as advertising and analytics do. It's not 1996 anymore, the web is now the main source of income (either directly via advertising or online sales, or indirectly via customer acquisition and brand recognition) for many companies that don't have anything to do with technology . The war for the web ended before we even knew it started and Wall Street won.

EDIT: In the interest of full disclosure, I work in CX in a strictly technical capacity. I deal directly with these developers, marketing folks and executives. It is big business right now.

0

u/[deleted] Apr 07 '16

[deleted]

→ More replies (2)
→ More replies (1)

0

u/[deleted] Apr 07 '16

[deleted]

→ More replies (6)

1

u/HenkPoley Apr 08 '16

TypeScript

And Elm.

1

u/aristideau Apr 08 '16

iFrame

well that's your problem right there

1

u/neonKow Apr 08 '16

People who don't care about writing lightweight code are going to write heavy code.

Between caching and de-facto common libraries like jquery, a 35 MB download the first time you visit a page with no prior browsing history isn't the same as a 35 MB download each time you visit the page. There is an incredible amount of optimization and caching going on. It makes about as much sense to criticize a fresh load of a site for its size as it does to criticize Minesweeper for being heavy because you have to install Windows first to run it.

Also, ads and tracking code adds a lot of overhead.

→ More replies (7)
→ More replies (3)

1

u/ciny Apr 08 '16

Everyone who thinks web languages are flawed because you can't launch spaceships writing that way are forgetting the forgiving nature of browser interpreted languages is what allowed so much individuality and creativity to bloom and create the internet we know and love today.

But let's be honest here, there are people who try to do exactly that. everyone of us knows at least one guy who always tries to hammer in a screw.

1

u/neonKow Apr 08 '16

Using Java is not going to stop that man.

→ More replies (1)