4

This is more of a story than an actual rant, but here it goes.

I was at my class and we were doing a small introduction about JavaScript. Our teacher tells us to build a small website using buttons and text boxes in order to make a calculator. He then says that, afterwards, we must copy and paste a segment of JavaScript code which he supplied on the PDF file (our teacher uses PDF files as some sort of worksheets).

I paste his code correctly on my HTML document and I try to test it. On the first box, I put 10, and on the second box, I also put 10. I was expecting that in the result box there would appear 20, but, to my surprise, nothing happened.

Instead of asking my teacher what was wrong, I decided to pay a visit to my good old friend Stack Overflow and I learned how to use getElementById().

I had some experience with coding earlier so I just sorted myself out. When my teacher comes to check my work, I said that his code wasn't working so I googled a solution and eventually came up with one.

He said: "Well, that's weird. That code is right, at least it worked for me."

I outsmarted my teacher.

I also realised why there are so much "it worked on my machine" jokes.

Comments
  • 0
    " This is our world now... the world of the electron and the switch, the beauty of the baud." - hackers manifesto

    Seemed fitting.

    Welcome to our world, where you'll slowly drift to the dark side. 🙄😊
  • 1
    Love how copy and pasting code is considered teaching :/
Add Comment