Weird Thoughts From Eric's Head

Tags - Categories : All | AJAX | BUSINESS | PERSONAL | PROGRAMMING | BOOK REVIEW

Hacking UBB with Cookies

This demonstration shows why you should avoid using cookies on a public computer. Make sure that all of your information is deleted someone can not do the following:

As I said earlier today I wanted to have some cookie fun. Well I opened up the cookie jar and pulled out a little tidbit of information. I found an interesting program called Cookie Editor and made my job a lot easier!

So I grabbed the cookie from a forum that I visit on a regular basis with my original screen name. The cookie stores my information so it knows who I am so I do not have to keep logging in. I copied the user id and the password fields into notepad.

cookie

I logged out of the forum and I went to my internet options and deleted all of my stored files and cookies to make sure that my original cookie was deleted. I logged back into the forum under another name that I got for testing purposes.

forum

I then went back to the Cookie Editor and looked for the new forum cookie and you can see that the information changed.

cookie

I replaced the user id value with the other name.

replace

I replaced the MD5 password hash with the other accounts.

replace

And now you just have to close your browser and reopen the webpage.

forum

You then see that the name has changed! Now you can post under this person’s account. I find this to be a little scary. I tried to do the same thing with hotmail but it did not work, it would change the email account, but would require a password. Over the weekend I might find out some other things but only time will tell.

Have a good weekend and stay out of trouble!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

The Loop

How do you keep a programmer in the shower all day?

Give him a bottle of shampoo which says "lather, rinse, repeat."

What I am working on:

I am working on another project with cookies! I am playing with cookies from websites and seeing what I can come up with.

You might be surprised what a person might be able to do with cookies that were left sitting on the temp folder. Hopefuly I will have a nice blog on this on Monday! Have a good weekend people!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

A lawyer joke

A lawyer is standing in a long line at the post office. Suddenly, he feels a pair of hands kneading his shoulders, back, and neck. The lawyer turns around. "What the hell do you think you're doing?" "I'm a chiropractor says the man. I'm just keeping in practice while I'm waiting in line."

"Well, I'm a lawyer, but you don't see me screwing the guy in front of me."

"I have nothing against lawyers! I watch Law and Order all the time and I wish I could be as witty as they are! (Protecting my butt in case I need one in the future!)

Bookmarklets

Bookmarks are not for webpages anymore! With this trick you can run code to make that site you are visiting under your control! Bookmarklets are a small piece of JavaScript code stored in your favorites. If you click on the following link, you will resize the window.

Resize to 800X600

Now you can store this link in your favorites. To do this right click on it and choose "Add to favorites." Now you can use the code whenever you want.

So when some annoying site has disabled you right click, you can goto your favorites and enable it with the following bookmarklet:

Enable Right Click

And another one I have is my cookie escape code so I can see what is in my cookies:

View Cookie

Also any JavaScript statement can be made into a bookmarklet! If you do a search on google, you can find tons of bookmarklets to help out your surfing needs!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

The smart computer

The Ultimate Computer stood at the end of the Ultimate Computer Company's production line. At which point the guided tour eventually arrived. The salesman stepped forward to give his prepared demo.

"This", he said, "is the Ultimate Computer. It will give an intelligent answer to any question you may care to ask it".

At which a Clever Dick stepped forward - there is always one - and spoke into the Ultimate Computer's microphone.

"Where is my father"? he asked.

There was a whirring of wheels and flashing of lights that the manufacturers always use to impress lay people, and then a little card popped out.

On it were printed the words "Fishing off Florida".

Clever Dick laughed.

"Actually", he said, "my father is dead"!

It had been a tricky question!!

The salesman, carefully chosen for his ability to think fast on his feet, immediately replied that he was sorry the answer was unsatisfactory, but as computers were precise, perhaps he might care to rephrase his question and try again?

Clever Dick thought, went to the Ultimate Computer and this time said: "Where is my mother's husband"?

Again there was a whirring of wheels and a flashing of lights.

And again a little card popped out. Printed on it were the words: "Dead. But your father is still fishing off Florida".

The JavaScript Hack Recap

Well I thought that I would bunch together my browser hacking with JavaScript posts together so it would be easier to find. When I get time I will add permanent links to the right under my calendar.

Hacking with your internet browser: JavaScript URL
Hacking with your internet browser: Query Strings
Hacking with your internet browser: Form Submissions
Hacking with your internet browser: Cookies

Right now I am doing research on MD5 encryption. I never sat down to learn how encryption works, but I thought that I would try and figure it out by looking at the code. MD5 is supposed to be unilateral. Al I know is this stuff is rather interesting and I am sure i will write a post about it in the future.

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

A Blonde Joke

One day, a blonde named Sally was putting together a puzzle. She was really stumped and very frustrated, so she decided to ask her husband for help.

''It's supposed to be a tiger!'' Sally cried.

''Honey," said Dan, "Put the Frosted Flakes back in the box!''

Time for a cookie hack

THIS IS FOR EDUCATIONAL PURPOSES FOR DEVELOPERS AND I AM NOT RESPONSIBLE FOR ANYTHING YOU GET IN TROUBLE FOR! THIS SHOWS YOU WHY YOU CAN NOT RELY ON JAVASCRIPT!

Cookies are a way that a browser stores important and unimportant data. They store anything from user names and passwords to the last time you were at a site to what pages you visted.

There are many expolits you can do with this if the page is not properly coded. Many forums can be hacked if they have html enabled and a password harvesting script could be easy implemented.

Now how does it work? I thought you could not see other cookies from other domains on your own site. Well that is the truth, but it is easy to get around and I will let you figure that part out, but I will show you the tricks of the trade.

Okay now the address bar is your friend if you want to see what the cookie is holding on any site. You access the cookie through the document object. For all the examples I will be using an alert to show the cookie instead of document.write. This way you do not have to keep reloading the page.

The first step is to see the cookie code stored on your computer. Goto any site that has cookies. (I ran all of my code at hotmail to see what they had going on there. I would post screenshots, but I do not want to give away my hotmail info!)

javascript:alert(document.cookie)
Okay this alerts all of the unformatted code of the cookie. Now we need to make some more sense of this so we will have to unescape the information. (basic idea: Escaping the code replaces special characters with a code so the browser can store it without problems. Unescaping replaces all of the gibberish with the characters you can understand!)
javascript:alert(unescape(document.cookie))
Okay you should be able to read it, but it is still a large jumbled mess so we need to space it out a bit. For this I will use regular expressiosn to replace the semicolons with two carriage returns. (If you are using document.write then you want to use html breaks)
javascript:alert(unescape(document.cookie).replace(/;/gi,"\n\n"))
Looking at the code I still see that there is escaped information in the strings so I am going to unescape the string again.
javascript:alert(unescape(unescape(document.cookie)).replace(/;/gi,"\n\n"))
Now what is left is a formatted bunch of strings. Yes the strings are encrypted, but you will find out that not everyone will encrypt the strings in their cookies! And if you look the source code you miight find out how to break encryption if they do not use server side code.

So for the developers how can you protect yourself? Encrypt your code and use a server side language to store your information!

Search through my blog to find other posts dealing with hacking with the browser!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

Your life as a computer

If you messed up your life, you could press "Ctrl, Alt, Delete" and start all over!

To get your daily exercise, just click on "run"! If you needed a break from life, click on suspend.

Hit "any key" to continue life when ready.

To get even with the neighbors, turn up the sound blaster.

To add/remove someone in your life, click settings and control panel.

To improve your appearance, just adjust the display settings.

If life gets too noisy, turn off the speakers.

When you loose your car keys, click on find.

"Help" with the chores is just a click away.

Auto insurance wouldn't be necessary. You would use your diskette to recover from a crash.

And, we could click on "SEND NOW" and a Pizza would be on it's way to you.

Trees and Books

Man I must complain about the tree pollen this year. It is bad, I walk out and my silver car is yellow. When I wash my windows it forms mud on the glass. I can not wait till the trees stop all of this mess!

For anyone that does not know I have spent the last couple of weeks developing a Table of Contents and sample chapter of a book dealing with JavaScript. I submitted my sample chapter last Friday and I am waiting to hear back. Writing a book is a little harder then I expected because you have to target abroad audience and you can not blow them away with terminology.

In the forum it is different, I can read what the person posts and with that information I can figure out how much they know. I then can explain the answer in terms that they can understand. Also with the book I had to figure out what is important for the reader to have in their hands. I am making sure that every common answer that I get in the forum will be answered.

This is one of the reasons I have not posted much in the last week. Plus work has been a little stressful at some points, but after all the hard work we will see how it turns out.

Tomorrow I will try to think of another Hack to write about!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

Before the computer

An application was for employment.

A program was a TV show.

A cursor used profanity.

A keyboard was a piano.

Memory was something that you lost with age.

A CD was a bank account And if you had a 3 1/2 inch floppy, you hoped nobody found out.

Compress was something you did to garbage, not something you did to a file.

And if you unzipped anything in public, you'd be in jail for a while.

Log on was adding wood to a fire.

Hard drive was a long trip on the road.

A mouse pad was where a mouse lived.

And a backup happened to your commode.

Cut - you did with a pocket knife.

Paste you did with glue.

A web was a spider's home.

A virus was the flu.

Television and Computers

Well I send my nights watching TV and writing my book on my computer. I sit on the floor with my laptop on my coffee table and type awhile while watching the tx over top of the screen.

I can not miss my shows like the 40 Law and Order versions the CSI shows, Survivor, hockey, American Idol, and my Screen Savers. These shows are the way I waste away my night time.

I am not sure what I would do without my TV, oh I might just saty on my computer longer and annoy more people! Could I live without a TV? Yes I could, I am happy with doing other things, but it feels good to Veg. out in front of the tube after a hard days work of sitting on my butt coding!

Now where is that remote?

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

Laxative Cough Therapy

A man is working at a pharmaceutical store, and he always gets the orders wrong. His boss tells him if he screws up one more time, he is fired.

An old man walks in and orders cough syrup. He can't find any so he gives him a laxative instead. The man takes the laxative and leaves the store. The boss comes up and asks why he gave the man a laxative in place of cough syrup. He points towards the old man who is suddenly leaning on a lightpost and says, "Look at him -- he's afraid to cough."

Crazy

I have not posted the past couple of days since my life has been a little crazy and I am searching for those few minutes of free time. I have had a few bad days and hopefully everything will turn around today!

We will see about that, but I can always wish. I promise to have some real posts soon!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

A good old joke

This is an old joke that has been used to explain many things, from women to kids to work. I think this fits in with my job lately!

"Salary Theorem" states that "Engineers and Scientists can never earn as much as Business Executives and Sales People."

This theorem can now be supported by a mathematical equation based on the following two postulates:

1. Knowledge is Power. 2. Time is Money.

As every engineer knows: Power = Work / Time

Since: Knowledge = Power Time = Money

It follows that: Knowledge = Work/Money.

Solving for Money, we get: Money = Work / Knowledge.

Thus, as Knowledge approaches zero, Money approaches infinity, regardless of the amount of work done.

Conclusion: The less you know,the more you make.

CLICK CLICK FIZZ FIZZ OH WHAT A RELIEF IT IS!

Today I have to add new roles to a bunch of employees for our one system. It takes four clicks to get to a user and their roles. It takes three clicks to add a role and it takes one click to save the role.

Now I had to do this for over 20 people and we are talking 4+ roles per person. My mouse wanted a vacation after doing the job! Usre interfaces are a pain in the butt to program, and I wish that someone would have made the interface I had to use today less click oriented, but I guess that was not on the top of their priority list.

Well it is time to enjoy my Friday coding the rest of the afternoon. I hope my regular readers that they have a good weekened and hack those query strings!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

An old but good Bill Joke

One night, a Delta twin-engine puddle jumper was flying somewhere above New Jersey. There were five people on board: the pilot, Michael Jordan, Bill Gates, the Dali Lama, and a hippie. Suddenly, an illegal oxygen generator exploded loudly in the luggage compartment, and the passenger cabin began to fill with smoke. The cockpit door opened, and the pilot burst into the compartment.

"Gentlemen," he began, "I have good news and bad news. The bad news is that we're about to crash in New Jersey. The good news is that there are four parachutes, and I have one of them!" With that, the pilot threw open the door and jumped from the plane.

Michael Jordan was on his feet in a flash. "Gentlemen," he said, "I am the world's greatest athlete. The world needs great athletes. I think the world's greatest athlete should have a parachute!" With these words, he grabbed one of the remaining parachutes, and hurtled through the door and into the night.

Bill Gates rose and said, "Gentlemen, I am the world's smartest man. The world needs smart men. I think the world's smartest man should have a parachute, too." He grabbed one, and out he jumped. The Dali Lama and the hippie looked at one another. Finally, the Dali Lama spoke. "My son," he said, "I have lived a satisfying life and have known the bliss of True Enlightenment. You have your life ahead of you; you take a parachute, and I will go down with the plane."

The hippie smiled slowly and said, "Hey, don't worry, pop. The world's smartest man just jumped out wearing my backpack."

Hacking with the browser: Form Submissions

This is a rather simple hack I have seen people use, and I have done it to show holes in people’s code that they thought was secure. I have posted high scores on games by just looking at the source code of the page and seeing where information is being sent.

Almost every web page out there that collects data uses form submissions. The data in the form is processed on the server side when the form is submitted. Now I have blogged about how people can use JavaScript to get around form validation, but there is an easier way. A person can copy all of the fields in a form and make a page on their own web space. They than can submit the form from their web space to yours by pointing the action attribute to your server.

Now the person does not have to worry about all of the validation that takes place on your page. This is another reason why it is important to validate on the server side. But you want to know how to protect yourself from this type of attack. The best way is to check where the form has been submitted from. If the location is not from the place you know it should be originating from then error it out and do not process it. It is that simple.

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

Little jokes

My sister opened a computer store in Hawaii. She sells C shells by the seashore.

Q: What does a proud computer call his little son? A: A microchip off the old block.

Q: What happens if you cross a midget and a computer? A: You get a short circut.

Picture a robot on a psychiatric couch: Doc, my intelligence may be artificial, but my problems are real.

The goal of Computer Science is to build something that will last at least until we've finished building it.

Yawn

Today has been a day full of yawns. I just keep yawning, I have no idea why. I got plenty of sleep, I woke up before my alarm went off and I have been working hard all morning.

I am wearing off on people, they walk into my cube and they start yawning along with me. Caffine does not help and I do not feel tired. Maybe my body is telling me to crawl under my desk and take a nap.

All I know is my stomach is telling me that I need food and maybe it is having a battle with my yawns. I have no idea, maybe I should do jumping jacks while eating my lunch and I will make both my stomach and my yawning happy.

Man this post on my blog makes no sense and nor do I care. Today is a fun day of meeting deadlines! I need to get back to work!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

Hacked off ears

There was this man who was in a horrible accident, and was injured. But the only permanent damage he suffered was the amputation of both of his ears. As a result of this "unusual" handicap, he was very self-conscious about his having no ears.

Because of the accident, he received a large sum of money from the insurance company. It was always his dream to own his own business, so he decided with all this money he had, he now had the means to own a business. So he went out and purchased a small, but expanding computer firm. But he realized that he had no business knowledge at all, so he decided that he would have to hire someone to run the business.

He picked out three top candidates, and interviewed each of them.

The first interview went really well. He really liked this guy. His last question for this first candidate was "Do you notice anything unusual about me?" The guy said, "Now that you mention it, you have no ears." The man got really upset and threw the guy out.

The second interview went even better than the first. This candidate was much better than the first. Again, to conclude the interview, the man asked the same question again, "Do you notice anything unusual about me?"

The guy also noticed, "Yes, you have no ears." The man was really upset again, and threw this second candidate out.

Then he had the third interview. The third candidate was even better than the second, the best out of all of them. Almost certain that he wanted to hire this guy, the man once again asked, "Do you notice anything unusual about me?"

The guy replied "Yeah, I bet you are wearing contact lenses."

Surprised, the man then asked, "Wow! That's quite perceptive of you! How could you tell?"

The guy burst out laughing and said you can't wear glasses if you don't have any ears!

Hacking with the query string

As I said in my previous article, this is for education for the webmaster to make sure their web page does not fall victim to these attacks.

The query string is a great way for a developer to pass information from page to page. People pass information like page numbers, forum numbers, post numbers and much more in the query string. Now that is okay when the information is not important, but I have seen people pass important information for shopping carts in the query string. That developer was making a stupid move. It is so easy for a person to change the information in the address bar and there is no way for the web page to know that the information is different from one page to the next.

Now Hotmail had a flaw a few years ago where you would log into an account. You would copy the query string from the first account which told the server what message it was looking at. You then would log out of that account and log into a new account. You would view a message and then replace the query string with the one from the other account. You then would be able to read the message from the first email account. This has now been fixed, but shows you how the query string can be flawed.

No I am a developer, how do I avoid this? The simple solution is to avoid query strings and rely on server side scripting and form submissions. Have the page submit a form and have the values get passed that way. But if you read my first article, you can find holes in this method too. Also you better make sure that the form submission is coming from your page and not from another domain! That is another hack that I will talk about later on.

Now you can see why security is important in a webpage that relies on the browser. The web developer should rely on the server and not the client side. Read through my blog under the programming category to figure out how to avoid problems. It will make your website safer!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

TOP TEN EXCUSES FOR FALLING ASLEEP AT YOUR DESK

  1. "They told me at the blood bank this might happen."
  2. "I wasn't sleeping, I was trying to pick up contact lens without hands."
  3. "I wasn't sleeping! I was meditating on the mission statement and envisioning a new paradigm!"
  4. "Amen"
  5. "This is just a 15 minute power-nap like they raved about in the last time management course you sent me to."
  6. "Whew! Guess I left the top off the liquid paper"
  7. "I was doing a highly specific Yoga exercise to relieve work related stress."
  8. "This is one of the seven habits of highly effective people!"
  9. "Boy, that cold medicine I took last night just won't wear off!"
  10. "Darn! Why did you interrupt me? I had almost figured out a solution to our biggest problem."

Monday Morning Blues

Today is just one of those days. Today should be a day off in my mind, Easter Monday, but I am sitting in my cube eating my Monday Morning Bagel and my iced tea. I do not even remember turning off my alarm this morning, but it went off. I got out of bed to see that it was raining out. It is cold and windy too. What a great combination.

It seems like no one wanted to crawl out of bed this morning. I pulled into the parking lot and I was the third car here. The other two were probably the security people. I came in early, but there are usually more cars here then that! I sit down to do my morning report and I find out that most of the processes failed. Means more work for me.

I am just afraid to see what happens the rest of the day today. All I know is I want to crawl under my desk and take a snooze, that is why I found that joke above. Is it 5 yet?

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

The CIA job hunt

The CIA had an opening for an assassin. After all of the background checks, interviews, and testing were done there were three finalists — two men and one woman. For the final test, the CIA agents took one of the men to a large metal door and handed him a gun.

“We must know that you will follow your instructions, no matter what the circumstances. Inside this room you will find your wife sitting in a chair. You have to kill her.” The first man said.“You can’t be serious. I could never shoot my wife,”

The agent replies, “Then you’re not the right man for this job."

The second man was given the same instructions. He took the gun and went into the room. All was quiet for about five minutes. Then the agent came out with tears in his eyes. “I tried, but I can’t kill my wife.” The agent replies, “You don’t have what it takes. Take your wife and go home.”

Finally, it was the woman’s turn. Only she was told to kill her husband. She took the gun and went into the room. Shots were heard, one shot after another. They heard screaming, crashing, banging on the walls. After a few minutes, all was quiet. The door opened slowly and there stood the woman. She wiped the sweat from her brow and said, “You guys didn’t tell me the gun was loaded with blanks. So I had to beat him to death with the chair.”

Coke or Pepsi that is the question

Every time you go to a new restaurant you always have to ask one question; “Do you have Coke or Pepsi products?” Now you know the answer will always will be the opposite of what you want. I am in the mood for Mt Dew, it will be Coke.

Now I do not taste a major difference between Coke and Pepsi. Some guy said that this was good and tried to produce the same taste in his kitchen. What came first the Coke or the Pepsi? I have no clue and I am too lazy to look it up. Any way I know people that will only drink Coke and will only drink Coke if the date on it is months away. If the expiration date is close, they will not drink it.

I rather pay $0.65 for a 2 liter bottle of store brand and dump my Captain into it then spend the $1.39 for a name brand bottle. If you look at the ingredients, all of them are there that rot away your teeth and make you run in circles. And it tastes the same to me.

So I ask you one question on this Good Friday: “Coke or Pepsi?”

My answer: "Whatever is on sale!"

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

You know you drink too much coffee when...

1. Juan Valdez names his mule after you.

2. You chew on your roommate's fingernails.

3. You can jump-start your car without cables.

4. You do twenty miles on your treadmill before you realize it's not plugged in.

5. You can't remember your second cup.

6. You have a picture of your coffeemug on your coffee mug.

7. Starbucks has a mortgage on your house.

8. Your birthday is a national holiday in Brazil.

9. You don't sweat -- you percolate.

10. You grind coffee beans in your mouth.

The coffee pot

Well I walk in every morning to work and I can smell the scent of coffee in the air. When I first started working at my job, there was always two pots of coffee on the counter, but about a month ago it was changed to one. That was good news since before you had a 50/50 chance you were not drinking the coffee made yesterday or hours before.

I just wonder how certain people actualy sleep at night. I see them with a mug in their hand all day. They have to have caffine in their veins 24/7. When these people see an empty pot, they freak out since they have to wait an extra minute to get their coffee. At least it is fresh, but it does not seem to matter.

There are some people that leave their coffee just sit there and get cold. I have no clue how they can even stick that in their mouths! There are the people that stick ice cubes in their coffee, you have people that use half of the sugar container, you have people that drink it black, and you got the people who use enough cream to dry out a cow.

Now I am lucky if I drink one cup of Java a day. I perfer my big blue glass of iced tea that I make from the canister. But if I do drink coffee, it is with creamer and no sugar.

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

Nerds In season

A truck driver hauling a tractor-trailer load of computers stops in a bar for a beer. As he approaches the bar he sees a big sign on the door saying "NERDS NOT ALLOWED-ENTER AT YOUR OWN RISK!" He goes in and sits down.

The bartender comes over to him, sniffs, says he smells kind of nerdy, asks him what he does for a living. The truck driver says he drives a truck, and the smell is just from the computers he is hauling. The bartender says OK, truck drivers are not nerds, and serves him a beer.

As he is sipping his beer, a skinny guy walks in with tape around hisglasses, a pocket protector with twelve kinds of pens and pencils, and belt at least a foot too long. The bartender, without saying a word, pulls out a shotgun and blows the guy away.

The truck driver asks him why he did that. The bartender said not to worry, the nerds are over-populating the Silicon Valley, and are in season now. You don't even need a license, he said. So the truck driver finishes his beer, gets back in his truck, And heads back onto the freeway.

Suddenly he veers to avoid an accident, and the load shifts. The back door breaks open and computers spill out all over the freeway. He jumps out and sees a crowd already forming, grabbing up the computers. They are all engineers, accountants and programmers wearing the nerdiest clothes he has ever seen.

He can't let them steal his whole load. So remembering what happened in the bar, he pulls out his gun and starts blasting away, felling several of them instantly.

A highway patrol officer comes zooming up and jumps out of the car screaming at him to stop. The truck driver said, "What's wrong? I thought nerds were in season." "Well, sure." said the patrolman, "But you can't bait 'em."

Prices in the vending machine

The other month the jacked the prices up in the vending machine at work. Now a candy bar costs $0.80! Lets see here if I goto the store I can by two of them for that price. I am just wondering how can a candy bar cost that much money?

I still love the fact you can go to the store and by a 2 liter bottle for $1.35 and a 30oz bottle for $1.19. Now I just do not understand why it costs so much more a oz for the smaller bottle. Maybe they are using thicker plastic!

And do not get me started on a bottle of beer at a bar and the cost of a six pack! That is all I have to say today!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

Three engineers and three accountants

Three engineers and three accountants are traveling by train to a conference. At the station, the three accountants each buy tickets and watch as the three engineers buy only a single ticket.

"How are three people going to travel on only one ticket?" asks an accountant. "Watch and you'll see," answers an engineer. They all board the train. The accountants take their respective seats but all three engineers cram into a restroom and close the door behind them.

Shortly after the train has departed, the conductor comes around collecting tickets. He knocks on the restroom door and says, "Ticket, please." The door opens just a crack and a single arm emerges with a ticket in hand. The conductor takes it and moves on.

The accountants saw this and agreed it was quite a clever idea. So after the conference, the accountants decide to copy the engineers on the return trip and save some money (being clever with money, and all). When they get to the station they buy a single ticket for the return trip.

To their astonishment, the engineers don't buy a ticket at all. "How are you going to travel without a ticket?" says one perplexed accountant. "Watch and you'll see," answers an engineer. When they board the train the three accountants cram into a restroom and the three engineers cram into another one nearby. The train departs.

Shortly afterward, one of the engineers leaves his restroom and walks over to the restroom where the accountants are hiding. He knocks on the door and says, "Ticket, please."

Common Downfalls of JavaScript

I have heard over the years that people say that JavaScript is not a powerful language and I just laugh. People say that it is only good for menus and form validation and the rest should just be left alone. I will admit that JavaScript is limited in what it can do, but I will never go as far saying that JavaScript is not a powerful language.

JavaScript has some downfalls that I have run into. JavaScript can not handle large nested loops in a timely fashion without freezing the browser. JavaScript can not write to databases or store information permanently. JavaScript can not be relied on since it can be turned off. Also there are some other minor issues that I do not feel like going into!

But there are ways around all of the downfalls. You can better structure loops so you do not need so many iterations. You can mix in a server side language or use active X if you are only planning on using IE. You can use no script tags to hide information on the page.

JavaScript can be powerful and I was told that I was wasting my time developing Artificial Intelligence games. I developed a series of games online that use planned out algorithms to solve the best possible move. Yes the algorithms can be improved, but they give the average person a run for their money. All of the skeptics finally admitted that it is possible to make games without flash or applets.

One example of a game: Reversi

JavaScript game programming is a great way to learn programming and I will write about basics of developing a JavaScript game in the future.

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

Redneck Computer Terms

Backup - What you do when you sight a skunk in the woods.
Bar code - Them's the fight'n rules down da local tavern.
Bug - The reason you is a giv'n for calling in sick.
Byte - What yer pit bull dun to cusin Jethro.
Cache - Needed when you go to da store.
Chip - Yer cusin's uncle's mother's boyfriend's name.
Terminal - Time to call da undertaker.
Crash - When you go to Junior's party uninvited.
Digital - The art of counting on your fingers.
Diskette - A female Disco dancer.
Hacker - Uncle Leroy after thirty years of smoking.
Hardcopy - Picture looked at when selecting tattoos.
Internet - Where cafeteria workers put their hair.
Keyboard - Where you hang the keys to the John Deere.
Mac - Big Bob's favorite fast food.
Megahertz - How your head feels after seventeen beers.
Modem - What ya did when the grass and weeds got too tall.
Mouse pad - Where Mickey and Minnie live.
Network - Scoop'n up a big fish before it breaks the line.
Online - Where to stay when taking the sobriety test.
Rom - Where the pope lives.
Screen - Helps keep the skeeters off the porch.
Serial port - A red wine you drink with breakfast.
Superconductor - Amtrak's Employee of the year.
Scsi - What you call your week-old underwear.

People and computers

There are always people in your life that think they know a lot about a subject but have no clue. Just because they spend hours on a computer surfing porn does not mean they should be a computer wizard. Some people do not realize that having a tech job is harder then it appears because you have to deal with people that have no clue what a toolbar is. I know people that think this, but it takes a lot more than surfing the net to solve problems.

Some adults say that it is hard to talk to kids so that they can understand what they are trying to say, well the same goes for people that have no clue how to do anything more then type a word document or send an email. It just amazes me that I work for a technology company that deals with computers. Certain people that work for this company can tell you all the specs of the newest servers, but have no clue about how to run anything on their own computer. Yes there are things that I have no clue how to do since I never had to do them! I do not expect a person to know how to drop their IP and reassign it, but I would think they would know how to delete temporary internet files or open up two instances of a browser.

I just love talking to people that say they know what they are doing. Some of them think that we are really smart and say yeah I know how to do that. A couple of minutes later I get a call saying that they forgot how to do it. But if the world did not have these types of people I would not have a job!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

Surgeons

Four surgeons were taking a coffee break and were discussing their work.

The first said, "I think accountants are the easiest to operate on. You open them up and everything inside is numbered."

The second said, "I think librarians are the easiest to operate on. You open them up and everything inside is in alphabetical order."

The third said, "I like to operate on electricians. You open them up and everything inside is color-coded."

The fourth surgeon said, "I like technicians...they always understand when you have a few parts left over at the end..."

Plastic surgery

Well people it is about time that you grabbed that scalpel and did some magic to your WebPages. WebPages today are easier then ever to change and manipulate with CSS.

CSS makes it easier, in most cases, to make the WebPages look the same across all platforms and all browsers. In the past you could not say that.

CSS can allow people to avoid tables for layouts, which cause longer loading times and inconsistency across IE and Mozzila.

This was talked about in the forum here: 2 Column Layout without tables and To Use or not to use Divs

External style sheets are the way to go, you can make color changes across your whole website with one click! In the past I would have to change every single page. This allows the developer to save time! If a client says I want red and green instead of blue and yellow it will take 2 minutes to fix instead of a whole day!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

Another Microsoft Joke

A project manager, a computer programmer and a computer operator are driving down the road when the car they are in gets a flat tire. The three men try to solve the problem. The project manager said: "Let's catch a cab and in ten minutes we'll reach our destination."

The computer programmer said: "We have here the driver's guide. I can easily replace the flat tire and continue our drive."

The computer operator said: "First of all, let's turn off the engine and turn it on again. Maybe it will fix the problem."

Suddenly a Microsoft software engineer passed by and said: "Try to close all windows, get off the car, and then get in and try again."

Helpdesk Support

For those who do not know, I work as a developer and application suuport at a large hosting company. I support 8 applications. All of the employees log their problems into a web based helpdesk application which my partner and I coded in .NET. A common problem with one of the applications is the person can not log into a program. The computer settings are not set right in their internet browser. When they try to access a page, it prompts them their password over and over. This usually ends up locking many people out of their accounts.

Well the solution is to walk them from tools to internet options to the security tab then scroll to the bottom of the window and look for the “security heading”. Now under that heading is “Enable Windows Integrated Authentication (requires restart)” and we have the people uncheck it and click “apply” then click “OK”. Well some people it takes like a minute of coaching to tell them where the tools menu is on top of the browser is located. Others tell me they know what they are doing and five minutes later they say, now where is that option! I love those people!

Well whenever anyone sees that “requires restart” line they always tell me well it says I need to restart my computer so I am going to reboot. I always have to tell them I do this all the time and it means to close all of your browser windows and the setting will be applied. Then they ask me if I am sure. I do this for a living do you really think I want to waste any more of my time and say oh you got to reboot! After they finally listen to me! Amazing without the rebooting they can log in and the people think I am a miracle worker.

Now we should not run into this problem if the people who do our image of XP would set it up correctly. We always tell them they need to fix it, they normally do, but when they release the image after that then it is back to the wrong setting. I just want to scream at that part of the IT building, but if they would fix that setting then I might not have a job!

The thing I always ask people is this: "Are you doing any important work right now on your internet browser? I am going to have to close all of your windows to fix the problem." The people will say no. Then when I walk them through the steps and I tell them to close all of their windows I get this: "You mean I need to close them all? I am doing important work here!" I wish I could reach through the phone and slap them on the back of their head!"

Well life as a developer and helpdesk support can be rather funny. I am sure I will add other stories as my blogging life continues. And for my normal readers, "I think they should push the car back up the hill and try it again!" If you did not get that then I think you should look at my other blogs and find the joke I am referring too!

Eric Pascarello HTML/JavaScript moderator at JavaRanch.com

Lawyers

A very successful lawyer parked his brand-new Lexus in front of his office, ready to show it off to his colleagues. As he got out, a truck passed too close and completely tore the door off of the driver's side. The counselor immediately grabbed his cell phone, dialed 911, and within minutes a policeman pulled up. Before the officer had a chance to ask any questions, the lawyer started screaming hysterically. His Lexus, which he had just picked up the day before, was now completely ruined and would never be the same, no matter what the body shop did to it.

When the lawyer finally wound down from his ranting and raving, the officer shook his head in disgust and disbelief.

"I can't believe how materialistic you lawyers are," he said. "You are so focused on your possessions that you don't notice anything else."

"How can you say such a thing?" asked the lawyer.

The cop replied, "Don't you know that your left arm is missing from the elbow down? It must have been torn off when the truck hit you."

"Ahhh!" screamed the lawyer. "Where's my Rolex!"

My Local and Global Problem

It took me awhile to find a joke that dealt with an issue I had yesterday while programming. I spent an hour yesterday trying to figure out why my boolean flag kept saying it was undefined. I placed response.write's everywhere trying to solve this problem. After scratching my head I realized that I declared the variable locally and not globally.

This joke above reminds me how global and local variables work. For those of my readers that I am boring since they do not know programming I will explain what local and global variables are. Global variables are what the world can see. Every function can see it. Local variables can only be used by a single person. No one else (other functions) cares about the local variable since they have no clue it exists. Yes I am a nerd seeing the connection between the man's watch and car being global and his missing arm as local.

The more I blog, the more I realize I am such a geek. I spend my free time looking for a joke that can help me explain points in programming! But at least I am trying to have a blog a day to make your boredom go away and please come back another day! That was just corny and made little sense!

Eric Pascarello