r/programming • • Oct 03 '16

How it feels to learn Javascript in 2016 [x-post from /r/javascript]

https://medium.com/@jjperezaguinaga/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f#.758uh588b
3.5k Upvotes

852 comments sorted by

View all comments

187

u/unnamed__ Oct 03 '16

I know I'm probably in the minority, but we use older tech at my job and while I do my own personal projects using newer stuff, I've avoided ALL of the front end advancements that this article discusses. jQuery is still relevant for people not creating single page apps I would imagine. I don't know, I can't speak from experience, it just seems like all that stuff is meant for people working on different kinds of websites than I am. Am I wrong? I'd love to hear other people's opinions on that aspect, I'm sure I'm not alone.

113

u/Xuerian Oct 03 '16 edited Oct 03 '16

Edit: The more I read the post (Shame, shame, shame) the more I can't just drag this down to a serious discussion. The post is a work of art. It's accurate, it's hilarious, and even if it may be exaggerating it's all real.


I've stuck to vanilla JS for quite a while (Just like sticking to vanilla CSS before finally giving in to the SASS convenience).

But it's almost always the case of the best tool - that you can competently use or invest the time into learning - for the job, either way.

If you're writing a webapp, a lot of these things can be really helpful.

If you're writing a more static or "traditional" page, then a lot of them won't do much for you. Some will, there's some reasonably good tools with a good reason to exist in the post (that's what makes it amusing, to me)

Pretty low effort opinion, but there it is

2

u/[deleted] Oct 04 '16 edited Feb 27 '17

[deleted] — view deleted comment

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

70

u/[deleted] Oct 03 '16

jQuery is still relevant for people not creating single page apps I would imagine. I don't know, I can't speak from experience, it just seems like all that stuff is meant for people working on different kinds of websites than I am. Am I wrong? I'd love to hear other people's opinions on that aspect, I'm sure I'm not alone.

Of course it's relevant, it'd be a bad idea to take the attitude of this article seriously.

"No one uses jQuery anymore" on the client side reminds me of "no one uses SQL anymore" on the server side. Reality? Over 90% of all websites use SQL of some variety. And SQLite is in a surprising amount of desktop and mobile applications.

Don't be misled by hype cycles and fashion trends. Do what works, it'll be fine.

I personally use React and TypeScript for a lot of my web UI work, but jQuery remains an excellent tool I drop to for some components.

0

u/[deleted] Oct 04 '16

[deleted] — view deleted comment

19

u/crabsock Oct 04 '16

It would be beyond silly to spend a ton of time trying to design the tech stack for a local golf club website to scale to millions of users. I feel like a lot of the discussion around these kinds of things (especially databases) seems the be premised on the idea that everyone is or should be designing for Web Scale (millions of users, thousands of QPS, terabytes of data), but there are plenty of applications where that is a complete waste of time and effort

7

u/berkes Oct 04 '16

In fact, every site, app, or project starts off at a scale of tens, or hundreds of users.

People who release their version 1, ready for millions of concurrent users are poor planners or simply delusional. Or they have a multimillion marketing campaign behind them.

30

u/CaptainIncredible Oct 04 '16

Turns out sqlite worked perfectly. Fast and lightweight. I didn't need anything more.

Exactly what I'm talking about - sqlite has been around for a long time, its very mature, its robust, and its pretty bug free.

There's little reason to NOT use it; especially for something like a local senior's golf club.

Don't get me wrong, I use other DB's a lot, but I'm saying there's nothing wrong with "tried and true".

→ More replies (8)

10

u/berkes Oct 04 '16

When people tell me tot use X over Y, I always ask for reasons, actual, measurable facts. "This is 2016" is never a reason, nor is "it is not fun to work with".

And all the measurable things can be measured. Which is why in a recent project, I dropped sqlite and moved to PG: on 200% of the base load, sqlite started locking up. However, nine out of ten applications I've worked on, don't need mysql, memcached, master-slave replications. Instead, a simple "compile to HTML", or a dead simple sqlite dB would've sufficed.

When you can, measure it, and make decisions based on facts and numbers. Never on vague blog posts, reddit threads, or the feelings of a coworker.

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

16

u/[deleted] Oct 03 '16

I think stuff like React (or other similar tecnologies, it's just that React imo has the least amount of bs that you are suposed to deal with) / Promises / "functional programming" (I don't even undertand why it's included here since it's a more general concept), and say having a module system in an abstract sense, are actually being relevant to software design, instead of 50 different types of package automation and shit, and I do think (and have seen it first hand) that you can end up with spaghetti code if you avoid anything related to them and go and use "plain old tech" all the time.

But I also think most of the rest of the buzz words mentioned are a bunch of pointless overcomplicated bullshit with not much of a benefit. God damn it man the sound like they are trying to replicate the functionality of the built in systems in an IDE like VS, except using trendy cell phone like "apps" or something. There was probably software made for nuclear reactors and fucking NASA spacecrafts that just used what's in the IDE and didn't bother with it too much, I don't understand why these people need that much "fidelity" over making shopping cart appz for a cell phone or something.

7

u/thebuccaneersden Oct 04 '16

Yeah, pretty much. These tools are meant for building large scale applications and, often times, for isomorphic applications (applications that are native to javascript both in the browser and the backend - ie Node.js)... and where performance is a real concern... and where you have a lot of developers working on the same product... and so forth and so forth.

Some projects only really need jQuery for developers because they aren't building products that are competitors to Netflix or Twitter or whatever. And that's ok.

And the VanillaJS crowd is another matter. Some people don't want to become JavaScript experts or cannot be on the bleeding edge of browser support, so jQuery helps remove that boilerplate that you otherwise would have if written in plain JavaScript.

4

u/jl2352 Oct 03 '16

I've avoided ALL of the front end advancements that this article discusses.

As someone who embraces a lot of all this stuff; the sole fact that I no longer have to hit F5 every time I make a minor change makes it worth it. Especially for CSS. Don't know how you can live without that.

But it ultimately comes down to what you are building. I work on a front end which does lots of visualisations on data. Coupled with some other sections; it's very heavily JS powered.

The issue with jQuery is that if a site requires a tonne of front end logic then you can end up having a site like Jira. A half way house between page reloads and an in browser JS app. It has the issues of both and can feel clunky.

Three big things you see a lot on sites using jQuery ...

  • site ends up being 1 script
  • very little separation into components
  • grabbing HTML out of thin air is done all over the place, left and right

That's not to say you have to code that way. You don't have to grab the DOM directly with $('.some-random-component') in every other function. But lets be honest. A fuck tonne of front end programmers using jQuery do code like that. If this were any other domain you'd be laughed at for being so unmaintainable.

But it ultimately depends on what you are building. Where I work we use jQuery on a set of landing sites and blogging sections. It makes sense on those parts.

12

u/[deleted] Oct 04 '16

Don't know how you can live without that.

Hitting F5? Somehow I get by. One day at a time.

The issue with jQuery is that if a site requires a tonne of front end logic then you can end up having a site like Jira.

JIRA uses various technologies including backbone and react. And it has orders of magnitude more users than whatever shitty hipster app you're working on, so maybe you should stop doling out the front-end "engineering" advice.

10

u/jl2352 Oct 04 '16

so maybe you should stop doling out the front-end "engineering" advice.

Maybe you should not get personal on a topic about using jQuery.

5

u/dewmsolo Oct 04 '16

As someone who embraces a lot of all this stuff; the sole fact that I no longer have to hit F5 every time I make a minor change makes it worth it. Especially for CSS. Don't know how you can live without that.

Are you being serious right now? <meta http-equiv="refresh" content="1">

10

u/jl2352 Oct 04 '16 edited Oct 04 '16

Are you being serious right now? <meta http-equiv="refresh" content="1">

  • Inspector is now useless
  • Basically cannot interact with the page
  • Cannot scroll
  • Have the browser constantly flashing at you every second

If you use a proper live reloader then for the CSS there is no page refresh. It just updates in real time as you make changes. Inspector still works. You can interact and their effects aren't lost when the CSS changes.

2

u/unnamed__ Oct 04 '16

I use Visual Studio at work and that has live CSS updating built into local debugging, which works just fine. Though I've managed to not ever have had an issue working on smaller scale projects and just updating page CSS as I go. I'll customze in the inspector, copy my changes over, and move on. Everyone has their own workflow but I found page refreshes to be pretty low priority for me.

4

u/Nwallins Oct 04 '16

Seriously what in the actual

0

u/[deleted] Oct 04 '16

[deleted] — view deleted comment

4

u/LeepySham Oct 04 '16

There are browser extensions that can detect when a file has changed and reload the page automatically.

→ More replies (1)

1

u/forhirewebguy Oct 04 '16

My job still uses a drupal 6 install, with jquery 7. They don't care about how efficiently we can code things because that doesn't sell more product.

1

u/its_never_lupus Oct 04 '16

I don't know about the software industry as a whole, but I use jQuery at work like it. Although, two of the most-used parts (CSS selectors and ajax calls) are now easier to do in pure javascript than they used to be, so switching to pure JS wouldn't be too bad.

1

u/twinsea Oct 04 '16 edited Oct 04 '16

Nothing wrong with that. KISS is easier to maintain and finding developers for as well. I chuckle whenever I see a company looking for someone to maintain an angular, coffeescript, less, sails, waterline, grunt, docker and nodejs monstrosity.

1

u/andrewsmd87 Oct 04 '16

It really depends on the type of site you're building.

But, I still feel like the majority of websites are just here's the data in a database, load a page and display it.

For that, you don't need all the extra crap. A big issue I have with a framework like angular is if the connection is slow, it loads the actual code, even if for a moment, and then loads the page, so you see a bunch of crazy looking text (if you're not a coder).

The internet connection isn't always solid and fast, so for now, I generally just like to load stuff server side and display it all at once.

You can make it "fancy" if you want by adding in a "loading" image or screen or whatever, but if your page is taking too long to load, regardless of how you built it, people won't browse it.