356

Hi, I am a Javascript apprentice. Can you help me with my project?

- Sure! What do you need?

Oh, it’s very simple, I just want to make a static webpage that shows a clock with the real time.

- Wait, why static? Why not dynamic?

I don’t know, I guess it’ll be easier.

- Well, maybe, but that’s boring, and if that’s boring you are not going to put in time, and if you’re not going to put in time, it’s going to be harder; so it’s better to start with something harder in order to make it easier.

You know that doesn’t make sense right?

- When you learn Javascript you’ll get it.

Okay, so I want to parse this date first to make the clock be universal for all the regions.

- You’re not going to do that by yourself right? You know what they say, don’t repeat yourself!

But it’s just two lines.

- Don’t reinvent the wheel!

Literally, Javascript has a built in library for t...

- One component per file!

I’m lost.

- It happens, and you’ll get lost managing your files as well. You should use Webpack or Browserify for managing your modules.

Doesn’t Javascript include that already?

- Yes, but some people still have previous versions of ECMAScript, so it wouldn’t be compatible.

What’s ECMAScript?

- Javascript

Why is it called ECMAScript then?

- It’s called both ways. Anyways, after you install Webpack to manage your modules, you still need a module and dependency manager, such as bower, or node package manager or yarn.

What does that have to do with my page?

- So you can install AngularJS.

What’s AngularJS?

- A Javascript framework that allows you to do complex stuff easily, such as two way data binding!

Oh, that’s great, so if I modify one sentence on a part of the page, it will automatically refresh the other part of the page which is related to the first one and viceversa?

- Exactly! Except two way data binding is not recommended, since you don’t want child components to edit the parent components of your app.

Then why make two way data binding in the first place?

- It’s backed up by Google. You just don’t get it do you?

I have installed AngularJS now, but it seems I have to redefine something called a... directive?

- AngularJS is old now, you should start using Angular, aka Angular 2.

But it’s the same name... wtf! Only 3 minutes have passed since we started talking, how are they in Angular 2 already?

- You mean 3.

2.

- 3.

4?

- 5.

6?

- Exactly.

Okay, I now know Angular 6.0, and use a component based architecture using only a one way data binding, I have read and started using the Design Patterns already described to solve my problem without reinventing the wheel using libraries such as lodash and D3 for a world map visualization of my clock as well as moment to parse the dates correctly. I also used ECMAScript 6 with Babel to secure backwards compatibility.

- That’s good.

Really?

- Yes, except you didn’t concatenate your html into templates that can be under a super Javascript file which can, then, be concatenated along all your Javascript files and finally be minimized in order to reduce latency. And automate all that process using Gulp while testing every single unit of your code using Jasmine or protractor or just the Angular built in unit tester.

I did.

- But did you use TypeScript?

Comments
  • 67
    Many people forget that peoplehave to learn and don't know everything from the start. And many forget the that basic tasks can (and should) not be needlessly made complicated, especially when someone learns some basics.
  • 54
    What a rant !
    You just hit a home run on the first pitch.
    Welcome to devRant 😀
  • 7
    @ViRaS Thank you :-)
  • 10
    AWESOME RANT, HAHAHA!!! Welcome, diego!
  • 6
    This is so accurate 😂. Welcome to DevRant!
  • 5
    @sbiewald I am actually an apprentice (less than Junior, because I’m only been developing for a company professionally for 7 months).

    This was just how I felt during the first 3 months hahaha

    At least I know some stuff now :)
  • 0
    @capcj Thanks ^_^/
  • 0
    I'm Awestruck and now i feel like brainwashing another kid
  • 4
    This saved my day! Working on boring C# web stuff at work xD Thank you!
  • 3
    I am web frontend expert and I am also feel that whole world of front end going loony . there are some good idea else and there but the whole crap of TypeScript ( aka coffeeScript ) and compiling fucking javascript ( high abstract language if you remember ) make me crazy
  • 5
    Thanks, I just got cancer from reading that.
  • 5
    Some people just need to read Good Enough Software chapter of The Pragmatic Programmer
  • 2
    @ScriptCoded glad I could print out a smile :)!
  • 1
  • 0
    Nothing against this guy in the story, but that guy is a “JavaScript apprentice” in the same way I am a “Brain surgery apprentice”

    (I’ve never done brain surgery. I know what a brain is and I heard people do surgery on it, that’s about it.)

    Still I wish him luck in learning.
  • 1
    @leanrob I don’t get it.
  • 0
    @endor I don’t get it.
  • 2
    @diegovincent basically, I hate how some people tend to massively overcomplicate things just for the sake of applying the most general solution possible, when a few lines of code could have solved the issue at hand
  • 0
    @endor well said! :) I’m guilty of doing that as well ^_^’ I hope I learn to be a better engineer with the pass of time...
  • 3
    Looks like he's trying to make you quit JS by overcomplicating things. You shouls follow his advice.
  • 0
    @soulsuke I’m not. Is a joke. In terms of quitting or not programming I advice you to mind your own business.
  • 2
    @diegovincent Then don't declare your business globally :o
  • 0
    @soulsuke is not my business. Is a joke.
  • 4
    @diegovincent Man, chill down. First off, i did not say quit programming, but quit JS. As in "he'a trying to warn you JS is a mess, run while you can!". Don't take things too seriously or personally when it's not the case.
  • 3
    What are people's feelings on Google dart? I've been working with JavaScript in a summer course for a few weeks now and already kinda hate it. Wanted to go with typescript or coffeescript for a web app I'm making, but even those I keep hearing bad things about
  • 8
    Or... Just use plain old vanilla js.
  • 1
    I started learning js and ES6 1 week back. Still, I can relate. kudos bro.
  • 5
    "hi, can you help me start this campfire?"

    "Sure thing! So, for starters, to build a hydrogen bomb, you'll need..."

    welcome to JavaScript
  • 1
    @Midnigh-shcode oh my 😂😂
  • 2
    @ewpratten that’s a very good framework. Really lightweight! :)
  • 1
  • 0
    @Midnigh-shcode no, "welcome to retard programming". JS is a tool, if you misuse it, the blame lies with you and only you.

    And btw, that story can be told in a any language, Java devs unable to do shit outside of spring, php devs outside of laravel or symfony and so on...
  • 0
  • 0
    @Commodore nope.
    That’s not true.
  • 0
    I have read something similar but more in details on medium. Will try to find the link share with you guys.
  • 0
    you mention bower, nice, i tought people forgot about it! did i just mentioned rha it is nice to install some task runners like grunt or broccoli, and what about gulp?
  • 0
    @Commodore i do php (used to specialize on it, but then i started to value my sanity) and i preferred avoiding frameworks, always.

    yes, that's anecdotal evidence which doesn't prove or disprove anything, just saying.
Add Comment