I reminded my students of this all the time. Often, right after they–or a second pair of eyes–found their mistake. It’s never the computer. It’s not the Internet and it’s not even your code: your code is probably working just fine but here’s two truths about code:
- It does what you tell it to
- It doesn’t do anything else
If a buttload of your text is bold and red when you only wanted one word bold and red, you forgot to tell the page to stop making things bold and red. The code did what you told it to–start making text bold and red. The code doesn’t do anything you haven’t told it to do–stop making text bold and red.
Maybe you did write that code–change an image using getElementById, for example. So why isn’t it working? You probably misspelled something or forgot a semicolon, comma, parenthesis, or any number of things.
It’s your fault. It’s not the browser, the computer, the Internet, Verizon, or your host/server. It’s okay to blame Verizon anyway, as long as you know in your heart that it’s your fault and you need to find where you screwed up.
- What did you tell the app/page to do?
- What did you neglect to tell the app/page to do?
If those two factors are hunky-dory, find your spelling mistake.
It’s always your fault.