The Badass of the Week.

-- JavaScript:  A Brief Tutorial --
Update 4 November 2005 by Don Quixote


Are you interested in learning a new computer programming language that is nothing at all like HTML and requires fifty lines of code to do something as simple as allow a user to submit information to you via email?  Does the prospect of spending hours and hours scanning lines of code looking for a quotation mark that may or may not exist sound appealing to you?  Do you enjoy jamming pointy objects into your eye and feeling inadequate in every way imaginable?

If you answered "yes" to any of these questions, then JavaScript is just the thing for you!  It's a wacky programming language that's completely counterthetical to any form of logic ever devised by humans, and trying to teach it to yourself by reading online tutorials is about as effective as smashing yourself in the face with the claw end of a hammer is at making you remember your name better.  Still excited about it?  Here are some handy-dandy tips to help you on your one-way trip to internet-induced insanity.


Getting Started

Before you start your fascinating journey into learning JavaScript online, you will need to make certain that you have five things:

  1. Lots of spare time
  2. Access to the Internet
  3. Some type of text editing application
  4. A solid wood baseball bat
  5. A healthy amount of self-loathing

Got it?  Then you're ready to go!  The first thing you need to do is bash yourself in the head several times with the baseball bat in order to ensure that you forget everything you've ever learned.  If this means you're forced to pummel yourself into unconsciousness several times, you should probably do that.  It's the only way you'll be able to figure out the logic.

Second, get on the internet and find a JavaScript tutorial site.  Then find another.  Keep opening tutorial sites in various windows until you have at least twenty windows running simultaneously.  You will need to have at least this many open, since no site I've been to does a very good job of explaining what the hell all the jibberish means, but rather prefer to give you cut-and-paste bullcrap and then be like, "Look!  See how this works?  Try to reproduce it without cutting and pasting and you'll give yourself a fucking aneurysm!".  So I believe that if you read about twenty to thirty different sites at the same time, you'll be able to draw inferences from all of them and MAY actually figure out what the hell is going on.  Then you can try and reproduce it in Notepad or whatever program you're using.  But it won't work.  Because JavaScript is impossible and was created by God as a pox on all humanity.


Understanding It

"But what's so hard about stupid JavaScript?" I can already hear my Raytheon-employed computer science major friends asking me.  "Maybe you're just a complete fucking idiot unable to grasp the most simple of all computer programming languages.  You should try CSS+++, GCI or LMNOP!  Those will really kick your ass, dumbshit!".

Well to those people I say fuck you.  I didn't spend four years of my life writing emails in Binary, so I don't think it's too much for an idiot like me to want the stupid Internet to understand what I'm trying to tell it to do without having to learn the difference between an 'event' and an 'occurrence'. 

Anyways, here's an example of what JavaScript looks like:

If 		{
	suck.nuts(deez) && var i>0+4
     
     {"string.monkeysex.banana.value >= true"  onSelect="format(C:)")))

	document.email.coworkers.value == true }{}
				{
   onClick=('punch user in face with keyboard') }}}} )) (( )) ()

 }

if {
				this code doesn't work
	then { shoot me in the motherfucking face}} })"" '	'	'		
						else (don't)

		()xxxxx{:::::::::::::>

This is half of the code required to display the current time at the bottom of your webpage.  I think.  All I know is that if you misplace one single { or ", the entire page will show up as a blank screen and then your computer's power supply will overheat, causing a nuclear reaction that destroys the universe and makes you want to bash your monitor in with a crowbar.


Sometimes It Works, Sometimes It Doesn't

Here's a button.

Guess what it does?

JACK SHIT.

There are four hundred lines of code embedded in that button, but you'd never know because I'm too fucking stupid to figure out how to make it do anything other than sit there looking stupid.  Maybe it works on a different web browser than the one I'm using, but I doubt it.

Now the weird thing?  If I cut an pasted that same code into a button at the bottom of the screen, it might work.  Actually, if I cut and pasted it back into the same spot and refreshed the page, it might work.  Who knows?  JavaScript is a mystery.  Sometimes it works, sometimes it doesn't.  Sometimes it works and then suddenly stops working moments later for no reason at all.  Sometimes it just gives you an alert message that laughs at you and calls your mother a whore.


Event Handlers, Functions and Variables

Event Handlers, Functions and Variable are all things related to JavaScript.  What do they do?  It's impossible to know.  Tutorials all around the web will tell you how to use them and when you need to invoke them, but they never actually inform you how to define them or what the fuck they even are in the first place.  Maybe I should take a class.

But maybe I don't really care that much.







Main

The Complete List

About the Author

Miscellaneous Articles

RSS