25

Time to rant about JavaScript tutorials.

If you don't know the 'jQuery basic arithmetic' joke, Google it now. It'll make you laugh, promised.

In that manner i just remembered a JavaScript tutorial my fiancee tried to follow when she did an internship at the company i work for last year.

She was tasked to create a temperature interface for our server rack, which she wanted to do via an Arduino and a webserver aswell as an SQL database.

The Arduino part wasn't really a problem, but since she had no experience with js she very closely clinged to a chart visualisation tutorial.

All of that worked very well, but beeing the person i am i looked at the code and found something off.

The chart library had no dependencies to external libraries or any local files for any of them. Though the tutorial used a jQuery import.

So why did it use jQuery?
Well...
To load the chart initialization after the page has loaded.

So they pulled the entirety of jQuery in just to do what fucking window.addEventListener('DOMContentLoaded',function(){...}); could have done.

I wonder how many people who just want something to work did this shit. I hate it that so many tutorials do not adhere any kinds of standards, override behavior because they don't like it, even though it may have a very good reason to exist, pull entire libraries in for something vanilla <language> can do in 3 lines, etc.

Fuck.

Comments
  • 3
    Jquery arithmetic plugin made me smile.
  • 0
    @gintko this pretty much sums up PHP too, schools teach out spagetticode in both languages.

    I don't like PHP just because of it, but JS still has a better community, so im sitting here with React and Vue
  • 1
    Since I started not using jquery and have started using node the one thing that has started to bother me more than "nevermind fixed" is "just use jquery" and I dread the day I have to ask a frontend question and have someone suggest jquery for it
  • 1
    Btw googling jquery basic arithmetic now returns link to this rant.
  • 0
    @xecute You get personalized results
  • 0
    @xecute not for me.
    Damn, that would've been awesome.
Add Comment