r/programming • • Jul 18 '16

Web programming is getting unnecessarily complicated

http://en.arguman.org/web-programming-is-getting-unnecessarily-complicated
324 Upvotes

258 comments sorted by

View all comments

85

u/vytah Jul 18 '16

I 've been recently dragged back into frontend development, with my latest experiences having been raw HTML+CSS+JQuery.

Node. Gulp. Bower. Less. Angular. WTF is going on.

I have managed to get around enough to get the work done, and I do understand why this kind of technologies has emerged, but I'm still not liking it. It all feels, to quote an old /g/ meme, held together by bubblegum and feces.

42

u/jesusalready Jul 18 '16

Last I was heavily involved in front-end development was ~2008/2009. Then it was straight JS with some jQuery help.

A project pulled me back into the front end late 2014 and hasn't let up.

Node. Gulp. Bower. Less. Angular. WTF is going on.

I joked that JS devs wanted more money and job security by creating all these different tools. Pretty much was told I was not wrong. Half these things feel like black boxes with poor documentation so that when something really goes wrong it can take several days to fix the problem, especially if it's affecting our build, etc.

0

u/[deleted] Jul 18 '16

[deleted] — view deleted comment

5

u/jesusalready Jul 19 '16

What happened to our front end team is that they found some node plugin that they just had to use. What it ended up doing once they added it to grunt was that it took our build from ~90 seconds to 4 hours and in the case of Jenkins, killed it altogether. They had a blessing from up on high so we had to get it to work.

Turns out the poorly written grunt plugin was scouring the entire HD twice each build because of a badly written wildcard somewhere deep in the source. We refused to fix it. Turned out they really didn't need it that badly after all.

6

u/everywhere_anyhow Jul 19 '16

Half these things feel like black boxes with poor documentation so that when something really goes wrong it can take several days to fix the problem, especially if it's affecting our build, etc.

I don't understand at all how you can say these things, as those projects are open source (the opposite of a black box) and have excellent documentation.

It seems your complaint might be with open source itself, where the warranty indeed is, "if the code breaks, you get both pieces". It can take days to fix problems in the build, that's true -- but you're not comparing this against your alternative, where the answer in some cases is either the same, or that you wouldn't take days to fix the build because some functionality you wanted was never possible in the first place.

10

u/hungry_for_laughter Jul 19 '16

I joked that JS devs wanted more money and job security by creating all these different tools.

See, I don't get this, because those things are all standard features of desktop or mobile development too. Web development isn't unique in having these things, it's just that they were added in later as the web went from a document system to an interactive application system. It's like saying "Desktop development is so crazy -- OpenJDK, Maven, Swing, XAML, Mono, WTF is going on? CPython and PyPy and pip, why's Python so unnecessarily complicated?"

3

u/jesusalready Jul 19 '16

Hence the joke (I agree not a very good one). So much had changed in ~6 years with how the front end was deployed as part of web application with all of these new tools, frameworks, etc. competing for attention. Some of the tools still seem immature to me (especially the build ones - I hate grunt), but I have enjoyed using quite a few frameworks and LESS / SASS is what I never new I always wanted for CSS.

→ More replies (1)

0

u/[deleted] Jul 19 '16

[deleted] — view deleted comment

44

u/gfody Jul 19 '16

You get virtually the same complaint from otherwise competent backend developers encountering their first "enterprise" codebase (see FizzBuzzEnterprise). It's always a legitimate complaint when the code & tooling complexity exceeds the inherent problem complexity by some enormous factor.

11

u/barsoap Jul 19 '16

It's always a legitimate complaint when the code & tooling complexity exceeds the inherent problem complexity by some enormous factor.

And it's always a legitimate complaint if you're forcing me to download a megabyte of javascript framework just so that you can write a javascript one-liner in half the number of characters.

Hopefully, web assembly will kill that kind of thing, devs will get all the abstraction they want without much if any overhead, at all: If you compile, you get inlining, and to keep your standard library on your dev box instead of hurling it all over the net.

0

u/[deleted] Jul 19 '16

[deleted] — view deleted comment

5

u/barsoap Jul 19 '16

There are tons of sites out there who use jquery for nothing but simple document.getElementByIds. Are those people clueless? Probably, at the very least they don't care. OTOH, when you look at stackoverflow questions about how to access elements, jquery is what you see as upvoted and accepted answers.

Though it shouldn't come as any surprise that mediocrity is industry standard in webdev.

(And, yes, it is in java-land, too. Too many enterprise code monkeys... in defence of java, though (I never thought I'd say such a thing), at least they're not prone to rapidly changing hypes).

EDIT: And now my Jasmine tea is over-steeped. I'm blaming you personally :)

→ More replies (1)

4

u/vytah Jul 19 '16

I'm not complaining about complexity, although I was a bit confused by it at the beginning.

My main problem is the general feeling of fragility and half-assedness of some parts of that ecosystem. Most components that the project was using look like some hipster hacked them together on his macbook over a single coffee in Starbucks. And it's Javascript, a language designed to chug along as long as possible, so everything kinda works – until it doesn't.

→ More replies (7)

4

u/[deleted] Jul 19 '16

The nice thing anyways is you can safely ignore a lot of it. There's a strong push towards just using as much vanilla Javascript as you can.

Node -- well if you're going to use it for server side code... please don't. Unless it's something so small it doesn't matter. If you're going to use it for running stuff like NPM or other task running stuff, at least that way it's only hurting you and not anyone else. It is nice if you're going to use something like browserify or webpack.

Gulp -- don't see the point at all. I use VSCode a lot nowadays and it's task runner works fine if I ever have anything more complicated to do than just compile typescript, which I don't.

Bower -- I also don't see the point in massive dependency chains just for a fucking website/web app.

Less -- And I'm fine with writing plain old CSS (although if you're maintaining huge projects, there's something to be said for having variables in CSS). Although I would like to say I really like Jade for HTML templating.

Angular -- I guess this is a stand in for all the client side JS frameworks. I agree they are pretty overwhelming, but for many tasks they're kind of overkill. Angular especially is the kind of thing that forces you to do everything else the 'Angular way' to make anything work, and it's annoying as fuck. Not easy to drop into an existing project. React is slightly better if you like loading 150kb of JS with your page.

When I do have to do web stuff, I've gotten down to a very simple set up now. I've been using Flask as a server side framework, and then everything is pretty vanilla from there on out except for TypeScript. I've messed with, from that point on, the ability to add in React if I need some seriously strong JS client side stuff done, but I think you often don't, and like I mentioned, Jade for HTML templating sometimes can go nice with the Jinja2 engine for Flask.

Even JQuery there isn't much reason to include nowadays if you're going to write plain JS/TS. I've never had a serious issue with DOM manipulation in modern JS.

Even though I defended web developers somewhere else in this thread and got shit on for it, and I would defend it as just as 'valid' as what any other developers do, the thing to remember is a lot of that community has been fueled by people that didn't really know what they're doing, and the obsession with buzzwords (especially the ones the JS community loves to integrate from the Ruby community... which has all the same problems) and the complex tooling kind of reflects that.

→ More replies (1)

2

u/FarkCookies Jul 19 '16

How is it principally different from desktop programming? Same ingredients: server, build scripts, package management, app styling, UI frameworks.

8

u/StrangeWill Jul 19 '16

Node. Gulp. Bower. Less. Angular. WTF is going on.

You're completely free to not use any of those tools. Problem is the only approach to fixing the needs that these tools fix without them is to go back to the drawing board on how websites work.

HTML sucks, browsers suck, client side scripting sucks, but it sucks significantly less than it used to with large code bases thanks to these tools.

15

u/vytah Jul 19 '16

You're completely free to not use any of those tools.

If I could rewrite the entire project from scratch, that is. I'm describing what I encountered when I joined the project, not what I picked.

0

u/[deleted] Jul 19 '16

[deleted] — view deleted comment

7

u/[deleted] Jul 19 '16

It sucks indeed. Because SGML was the worst possible option back then. Failed to separate presentation from the structure from the very beginning.

0

u/[deleted] Jul 19 '16

[deleted] — view deleted comment

8

u/kenfox Jul 19 '16

JSON is also a tree.

→ More replies (2)

3

u/[deleted] Jul 19 '16

It is only marginally "nice" now and only after decades of evolution. With all the redundant complexity generated in process. All of this because of the initial ill choice.

4

u/TarMil Jul 19 '16

You're completely free to not use any of those tools.

I wish. But many libraries I need rely on them.

→ More replies (1)
→ More replies (5)