Bug in the JavaScript

Поділитися
Вставка

КОМЕНТАРІ • 196

  • @EriAirlangga
    @EriAirlangga 4 роки тому +707

    Singing about JavaScript but this song was written in C

  • @piros100
    @piros100 Рік тому +43

    "'cause everything else was built properly
    but the front end's a pile of crap"
    🤣🤣🤣 I relate to that on a deep, spiritual level.

  • @tomaszswirski3161
    @tomaszswirski3161 2 роки тому +26

    Empty array casts to true so there is a bug in that song too

  • @aj.arunkumar
    @aj.arunkumar 3 роки тому +129

    "and your objects are hashes,
    but when your code crashes
    you'll find they were functions as well"
    man that was deep 😅

    • @luskira
      @luskira 2 роки тому +1

      hahahahhahahahaha

    • @TremereTT
      @TremereTT 2 роки тому +3

      I think the real problem is the speed JS changes...
      I learned it from the free PDF EleoquentJS.pdf and it's a bit older ... and today allmost nothing in there is usefull anymore.
      JS regularly throws whole principles over board.
      Making a JS App automantically comes with giant amounts of maintenance of the code...
      It's disgusting.

    • @Silverflame1
      @Silverflame1 7 місяців тому

      I thought that functions are objects in JavaScript (function objects) instead of the other way around.

    • @hubertnnn
      @hubertnnn 20 днів тому

      @@Silverflame1 Nope, historically the way to make objects was the crate a function that makes a hash, assigns fields to it and returns that hash.
      This workaround would behave just like a constructor in any other language.
      Later JS improved on it by adding more proper way of defining objects but to keep backwards compatibility you would still get the same hash as a result.
      function Bear() {
      var self = {};
      self.rightPaw = "honey";
      self.face="bee stings";
      return self;
      }
      var daddyBear = Bear();
      var mummyBera = Bear();

  • @shekhinah2185
    @shekhinah2185 4 роки тому +126

    There is someone who understands my pain.

    • @shekhinah2185
      @shekhinah2185 4 роки тому +4

      @Tripulse Sure, if you pay my rent I won't hesitate for a moment and quit my job at the IT department at my university.

    • @McL669
      @McL669 4 роки тому +2

      @Tripulse Some people don't have that luxury of choice...

    • @LiEnby
      @LiEnby 4 роки тому +1

      @Tripulse good luck making dynamic content on the web without it :)
      they removed / 'obsoleted'' literally all the other options.

    • @laurinneff4304
      @laurinneff4304 4 роки тому

      @@LiEnby WebAssembly exists. It still requires a bit of JS, but most code can be written in pretty much any other language

    • @LiEnby
      @LiEnby 4 роки тому +1

      @@laurinneff4304 i heard it cant interact with the DOM.

  • @julianapelnar518
    @julianapelnar518 4 роки тому +110

    It's Friday night, I have a drink in my hand, the code in front of my eyes... And the bug in the JavaScript. This is all so amusingly true it made me cry while laughing.

    • @TheRealCasadaro
      @TheRealCasadaro 3 роки тому +4

      This makes me afraid to be a real programmer.

    • @kongchan437
      @kongchan437 3 роки тому +5

      @@TheRealCasadaro what ? And miss all these fun ?

    • @maciejkirkicki7928
      @maciejkirkicki7928 2 роки тому +7

      The only solution is to code underwater so nobody sees you crying.

  • @slippery_gecko9274
    @slippery_gecko9274 4 роки тому +20

    After a while of programming in javascript ive encountered every bug this song mentions lol

  • @shinflagg
    @shinflagg 4 роки тому +45

    I really liked the string padding library reference :D

  • @bakane6030
    @bakane6030 3 роки тому +16

    4:40 Just how weird JS is, the empty array casts to true.

  • @player400_official
    @player400_official Рік тому +5

    The legends say that he’s still looking for that bug…

  • @andytroo
    @andytroo 3 роки тому +48

    I must have been working from home too long if my wife gets all these references ...

  • @joaoarguimaraes
    @joaoarguimaraes 4 роки тому +19

    I cried listening, thanks

  • @ImaginaryNumb3r
    @ImaginaryNumb3r 4 роки тому +25

    "Dynamic typing is an advantage, I can type less"
    "On average, each line of code is written once, but read ten times"

  • @florint.4620
    @florint.4620 4 роки тому +40

    Outstanding performance, great lyrics, 10/10 overall! Made my day! THANK YOU!

  • @NikitaSlastushevskiy
    @NikitaSlastushevskiy Рік тому +3

    It was an honor for me to be present at GOTO Amsterdam and hear this song live! It was AMAZING!

  • @aakritipiple600
    @aakritipiple600 4 роки тому +41

    Heart touching lyrics haha, you made my day man 😄

  • @Alexandru-OM
    @Alexandru-OM 4 роки тому +22

    i do front end coding and .... I like this song ! :D Cheers!

  • @LiEnby
    @LiEnby 4 роки тому +34

    "Now null is a reference to nothing, dont mix it up with undefined" 🤣🤣🤣🤣🤣
    "That Zero and NaN and Infinity man, Just remember which can be signed" 🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣
    "And you think your numbers are integers but your really in Floating Point Hell" 😂😂😂😂😂😂😂😂😂😂😂
    this is too fucking good.

  • @SnakebitSTI
    @SnakebitSTI 2 роки тому +6

    TypeScript might be the equivalent of hiding under the covers so the monsters can’t see you, but it does help me sleep better at night.

    • @h0ph1p13
      @h0ph1p13 Рік тому

      When you write the js you are the monster. 😁😁😁🙏😂

  • @andrewharrison8436
    @andrewharrison8436 Рік тому +1

    "nine o'clock on a Saturday" - you had me at that point.
    I remember an evening: I had a beer in my hand in the pub garden when my pager went off, please come into the office to fix a bug in someone else's code.

  • @poziomka8993
    @poziomka8993 4 роки тому +3

    I simply love that there is a bug in song about bug! Art!

  • @Gurmudgin
    @Gurmudgin 5 років тому +9

    Bug fixing, the bane of my existence, and all summed up in one song. Great job.

  • @ThaiTran-ly2ok
    @ThaiTran-ly2ok 4 роки тому +3

    "but we re sharing a string padding library".... man, please just stop, please. you are killing me =)) remember that old day though (well, not so old)

  • @ChronologicalLogic
    @ChronologicalLogic 4 роки тому +9

    honestly, this is a brilliant rendition of the original song, and with the know how of javascript (full stack front ender oriented here) this touches some personal notes hehe

    • @NN-kf7qo
      @NN-kf7qo 2 роки тому

      Full stack frontend? Isn't that just called frontend development?

    • @rishavmitra5732
      @rishavmitra5732 2 роки тому

      @@NN-kf7qo full stack, front end 'oriented'

  • @Juansecu
    @Juansecu 2 роки тому +7

    Hahaha, I love this song!
    It narrates what happens in the real world in many cases!
    Excellent job with the lyrics, btw!

  • @Fair_Ithilien
    @Fair_Ithilien 4 роки тому +18

    Well, this is perfect :D

  • @thehansr
    @thehansr 9 місяців тому +2

    "nine on a saturday" wow, im surprised he got that, currently 21:47 here...

    • @DylanBeattie
      @DylanBeattie  9 місяців тому +1

      21:00 exactly for me right now. 😉

  • @noxlaoy5119
    @noxlaoy5119 3 роки тому +2

    It's the beginning of 2021 and only 14 People DON'T have a bug in their JavaScript app

  • @ivanmarcelosil
    @ivanmarcelosil 2 роки тому

    Excellent and very very funny. Thank you for posting

  • @animusfault
    @animusfault 4 роки тому +2

    Good stuff man! It's been months since since I last touched web app project. These words hit home...

  • @alewar777
    @alewar777 5 років тому +3

    I wish you your well deserved glory!

  • @joswahnsun8428
    @joswahnsun8428 5 років тому +7

    Too real

  • @blinded6502
    @blinded6502 4 роки тому +1

    I listened to this song being played in Discord VC, and it was fantastic

  • @paulmansfieldcamuk
    @paulmansfieldcamuk 2 роки тому +2

    still relevant three years on!
    fanstastic tech version of pianoman.

  • @TheRealCasadaro
    @TheRealCasadaro 3 роки тому +1

    Dude, how have I not heard this before.

  • @omri9325
    @omri9325 4 роки тому +1

    You really put your heart into this song!

  • @elmarjuz
    @elmarjuz 2 місяці тому

    dude, this shit is traumatic, I swear I started to zone out into the low whirring of helicopter blades on "which ones can be signed"

  • @eduardosenturion
    @eduardosenturion 3 роки тому +2

    A masterpiece !!

  • @batbawls
    @batbawls 3 роки тому

    Came here looking for closure, found all kinds of memory problems

  • @jsonft5417
    @jsonft5417 3 роки тому +1

    today is just tuesday
    our app is mainly written in go
    but we have a few javascript files
    my day was, unintentionally, about finding a bug
    all i wanted to do was get some benchmarks i was asked for
    the bug was in the javascript
    the solution was delete a single line

  • @amuaddib6692
    @amuaddib6692 5 років тому +5

    Well done!

  •  3 роки тому +1

    2:20 When you sang HELL... I felt it...

  • @samuelschwager
    @samuelschwager 5 років тому +2

    A great contender to eternal flame (aka God wrote in Lisp)!

  • @ericduminil
    @ericduminil 2 роки тому +3

    Can someone please explain "at the end of 1969"? I suppose it has something to do with `new Date(0)` being at the end of 1969 in US timezones, but I couldn't manage to get a falsy value out of it.

    • @tvonwieseseen2774
      @tvonwieseseen2774 Рік тому

      Maybe it's because `new Date(false)` is legal and returns epoch 🙂. It also rhimes nicely, fits the metrum and (to me) alludes to eternity (HGTTG) /and/ the 60s.
      I♥how F12 gives anyone instant access to JS's power and delicate beauty. ♥

    • @traveller23e
      @traveller23e Рік тому +2

      If you try to get the boolean value of a date, it will basically do a cast to int and then to bool. Hence the Unix epoch being the only value that is false (all other dates parse to true).

    • @ericduminil
      @ericduminil Рік тому

      ​@@traveller23ethanks. What would be the corresponding js code?

    • @traveller23e
      @traveller23e Рік тому

      @@ericduminil I'm not a js dev these days, but googling some and playing around here's the fuller explanation: Normally time comparisons are done by calling the .getTime() function, because otherwise js just compares the objects (almost always returning false). However if you use getTime() (including implicitely via a conversion that calls valueOf) it becomes a number, specifically 0 for the Unix epoch which will evaluate to false. Here's some code that demonstrates it: var postEpochDate = new Date(1975, 6, 23, 12, 30, 0, 0);
      var postEpochDateClone = new Date(1975, 6, 23, 12, 30, 0, 0);
      var preEpochDate = new Date(1965, 6, 23, 12, 30, 0, 0);
      var epochDateProbablyWrongTimezone = new Date(1970, 0, 0, 0, 0, 0, 0);
      var epochDate = new Date(0);
      var testDates = [preEpochDate, epochDateProbablyWrongTimezone, epochDate, postEpochDate];
      console.log(postEpochDate == postEpochDateClone);
      console.log(postEpochDate.getTime() == postEpochDateClone.getTime());
      for(let i = 0; i < testDates.length; i++){
      console.log(testDates[i].toUTCString());
      if(testDates[i].getTime()){
      console.log("The above date evaluates to true.");
      }
      else{
      console.log("FALSE!!!");
      }
      }

    • @SmilingJ
      @SmilingJ 6 місяців тому

      Yes I have problems reproducing this myself. I think it's kind of funny and I wish I had a snippet to back that claim. But all my attempts failed so far 😢

  • @kongchan437
    @kongchan437 3 роки тому

    Billy would be so proud of you

  • @brianphillips7581
    @brianphillips7581 2 роки тому

    Beautiful!

  • @carlosazuaje8381
    @carlosazuaje8381 4 роки тому +4

    undefined is not a function

  • @GodmanGen
    @GodmanGen 5 років тому +7

    oooh man I love you! hahahah this made my day!

  • @lovefunnyflicks
    @lovefunnyflicks 3 роки тому

    Loved it. Hurrah for retirement.

  • @wilfriedklaebe
    @wilfriedklaebe 4 роки тому +1

    My first thought seeing the title was "to the melody of 'Born in the USA'"...

    • @ps3master72
      @ps3master72 4 роки тому

      Mine was "Life is a Battlefield"

  • @paulschmidt7473
    @paulschmidt7473 Рік тому

    That's why you write the front end in Python and the backend in C....

  • @donotenter578
    @donotenter578 2 роки тому

    Just shared this to my students. 😎

  • @soddoffbaldrick2209
    @soddoffbaldrick2209 2 роки тому

    Great work Dylan!

  • @TheConqueror253
    @TheConqueror253 2 роки тому

    God bless your soul

  • @Stepica
    @Stepica 4 роки тому +1

    Im in love

  • @trudyandgeorge
    @trudyandgeorge 4 місяці тому

    This is a masterpiece

  • @eyadbereh
    @eyadbereh 4 роки тому

    It would be unfair if i said this ain't cool
    You understood the pain ...

  • @MrSefsdf
    @MrSefsdf Рік тому

    This is pure gold :)

  • @franciscojavierlenatz1818
    @franciscojavierlenatz1818 2 роки тому

    You're a genius man!

  • @sebug
    @sebug 4 роки тому +2

    Dylan had me doubt there a minute, but luckily Boolean(new Date(0)) is still true :-)

    • @tech6hutch
      @tech6hutch 4 роки тому +1

      Boolean([]) is also true

    • @macarc985
      @macarc985 3 роки тому +1

      [] == false returns true though :)

    • @sodiboo
      @sodiboo 3 роки тому +1

      @@macarc985 But `new Date(0) == false` doesn't

  • @matswikstrom7453
    @matswikstrom7453 2 роки тому

    Amazing!

  • @markoshivapavlovic4976
    @markoshivapavlovic4976 3 роки тому

    shpagethi monster exist on the web its called JS compiler and the code it parses. JS source files are the shpagetti and it compiles non optimised to shpagetti as bad specification of the language itself.

  • @majitoo
    @majitoo 3 роки тому +1

    te amo, es viernes, y hay un bug en mi JS!

  • @sebasptsch
    @sebasptsch Рік тому

    What a legend

  • @thaier
    @thaier 3 роки тому

    THIS IS AMAZING

  • @CallousCoder
    @CallousCoder 2 роки тому +3

    Did you also play the mandolin and the piano?
    I love this song man!

    • @Posiman
      @Posiman Рік тому

      He only plays guitar.

    • @CallousCoder
      @CallousCoder 2 місяці тому

      @@Posimanand the harmonica

  • @arranmc182
    @arranmc182 Рік тому +1

    I still never will understand how Java & Java Script became so standard the amount of people that complain abut it would make you think its not worth the hassle but yet people still use it 🤣🤣

    • @fluffysheap
      @fluffysheap 2 місяці тому

      Remember that the only thing those languages have in common is the name!
      Everyone uses Javascript because on the web it's the only choice.

  • @poonkeith
    @poonkeith 2 роки тому

    I approved this code content

  • @ezequielortiz4188
    @ezequielortiz4188 4 роки тому

    Very good my friend, well done!

  • @loupax
    @loupax 4 роки тому

    Javascript broke my heart 💔

  • @Martinspire
    @Martinspire 4 роки тому

    I feel offended, but then again I asked for it...

  • @TriggerBiggs
    @TriggerBiggs 5 років тому +1

    Anyone else here waiting for Archeage Servers??

  • @michalc360_
    @michalc360_ 3 роки тому +1

    Has anyone tabs for harmonica? 😄

    • @michalc360_
      @michalc360_ 3 роки тому

      I found it 😅
      6 -6 6 -5 5 -5 4
      4 -4 3 -4 3 4
      -5 6 -6 6 -6 -5 5 -5 4
      3 -5 5 -4 4

  • @jorgeluis4389
    @jorgeluis4389 2 роки тому

    I feel you, man

  • @bobthehotbuilder9795
    @bobthehotbuilder9795 2 роки тому

    Always gets me

  • @markoshivapavlovic4976
    @markoshivapavlovic4976 3 роки тому

    JavaScript is bug by itself as a language and its standartisation.

  • @patch-files2160
    @patch-files2160 4 роки тому

    feature in the JavaScript

  • @MrCommonTater
    @MrCommonTater 3 роки тому

    The front end is ALWAYS a pile of crap ...

  • @udiazulay1571
    @udiazulay1571 3 місяці тому

    accurate in every aspect :)

  • @christhomasson4972
    @christhomasson4972 4 роки тому

    But the front end's a pile of crap! LOL!

  • @tarwin
    @tarwin 7 місяців тому

    OMG you know my pain !

  • @victoralvarez2956
    @victoralvarez2956 2 роки тому

    Now I just understand why my code won't run properly. Tutorial don't mentioned it -_-

  • @MuhammadUmar-jl5iz
    @MuhammadUmar-jl5iz 4 роки тому

    Wow Wow Wow Just Awesome

  • @rodolfoazevedo4082
    @rodolfoazevedo4082 2 роки тому

    I cried

  • @meepmeep4311
    @meepmeep4311 3 роки тому

    I live in floating point hell

  • @kimmilliner7300
    @kimmilliner7300 3 роки тому

    Love it..

  • @Kirifairy
    @Kirifairy 4 роки тому

    My love to JavaScript is like NaN == NaN

  • @AdamSmolarek
    @AdamSmolarek 5 років тому

    pure gold

  • @BrandonTran
    @BrandonTran 3 роки тому +1

    I'm here because I love Javascript and this song is my life :)

  • @Heinz9665
    @Heinz9665 5 років тому

    fascinating!

  • @bcgibson22
    @bcgibson22 4 роки тому

    You poor man!!!!!

  • @stack.1
    @stack.1 4 роки тому

    Daily life struggles 😭

  • @kirk-patrickbrown866
    @kirk-patrickbrown866 4 роки тому

    Feel your pain. ;D

  • @pav431
    @pav431 2 роки тому

    >But we're sharing a string padding library, cuz it's better than writing our own
    Oh, *that* one time, that was a lot of fun to watch as an admin, so many websites suddenly unable to compile and deploy :'D

  • @swyxTV
    @swyxTV 4 роки тому

    this is an american classic

  • @incrediblepony
    @incrediblepony 4 роки тому

    This hits too close to home...... fuck.... the worst part is... I wrote the fking frontend... FUCK!

  • @ganchodanailov5009
    @ganchodanailov5009 5 років тому +1

    Hhahahahahah nice work! :))))

  • @nicolaspauer582
    @nicolaspauer582 Рік тому

    And then start typescript 😂

  • @billyacuna5701
    @billyacuna5701 5 років тому +1

    nice

  • @nbdd0121
    @nbdd0121 4 роки тому +1

    Actually, `document.all` is also falsy!