Courtesy of Twitter

Archive for July, 2007

Traffic Light & Train myths

Tuesday, July 31st, 2007

Here’s some common false myths about traffic lights that people seem to live by:

1. The traffic lights will never change again. You do not need to run when the little man is still green or flashing. If the traffic light for the traffic going your direction has changed orange, and you’re still in the middle of the crossing, do not dawdle. You will get beeped at. If you are 100m away and the light has just changed, do not run. Not only do you look like a complete idiot when you do, even if you walked you could’ve still made the lights. If you do not make it by the time the light has gone red and the traffic going your direction’s light has gone orange, do not attempt to cross. You will again get beeped at. Wait patiently on the corner, press the button, and wait until the light once again goes green. I promise you it will.

2. Pressing the button a billion times makes the lights change quicker. When you press the button the first time to cross the road, this inserts a small statement into the traffic light’s programmed loop that basically is “turn the light green and make the things make the noise”. Further subsequent button pushes do not magically make the traffic lights some how speedier.

3. Along with that, slamming the traffic light button does not make it change faster. It is not a strength contest. You will not win a prize if you slam it so hard the clink can be heard on the opposite corner.

And here’s some they have about trains:

1. There are no more trains for the rest of the day. People will run at 5:53 to get on the 5:53 train. I see it happen every day. The train LEAVES at 5:53. If you are still running at 5:53 to get on the 5:53, you are wasting your energy. There’s another train, 12 minutes after it. I’m sure waiting for it won’t kill you.

2. Train seats are luggage storage. Every day I see someone put their bags on the seat next to them . The train inevitably gets full and people are left standing up whilst these people have their little bags on the seats people could be on. Here’s something you might not have thought of. Take the bag off the seat, and put it on your lap. Hey presto, a free seat and your stuff’s still safe! Or even, put it on the floor if there is no one across from you.

3. Everyone else doesn’t mind listening to what shops you looked at. When having mobile phone conversations, it is not necessary to dictate your entire 45-minute conversation in the loudest voice possible. Mobile phone technology has come a long way, and so you, believe it or not, are able to speak as if the person is right next to you, in a low-civilized manner. If I wanted to know what shops you looked at, I would approach you and ask you. I honestly don’t care that you visited JeansWest.

That is all.

Traffic Light & Train myths

Tuesday, July 31st, 2007

Here’s some common false myths about traffic lights that people seem to live by:

1. The traffic lights will never change again. You do not need to run when the little man is still green or flashing. If the traffic light for the traffic going your direction has changed orange, and you’re still in the middle of the crossing, do not dawdle. You will get beeped at. If you are 100m away and the light has just changed, do not run. Not only do you look like a complete idiot when you do, even if you walked you could’ve still made the lights. If you do not make it by the time the light has gone red and the traffic going your direction’s light has gone orange, do not attempt to cross. You will again get beeped at. Wait patiently on the corner, press the button, and wait until the light once again goes green. I promise you it will.

2. Pressing the button a billion times makes the lights change quicker. When you press the button the first time to cross the road, this inserts a small statement into the traffic light’s programmed loop that basically is “turn the light green and make the things make the noise”. Further subsequent button pushes do not magically make the traffic lights some how speedier.

3. Along with that, slamming the traffic light button does not make it change faster. It is not a strength contest. You will not win a prize if you slam it so hard the clink can be heard on the opposite corner.

And here’s some they have about trains:

1. There are no more trains for the rest of the day. People will run at 5:53 to get on the 5:53 train. I see it happen every day. The train LEAVES at 5:53. If you are still running at 5:53 to get on the 5:53, you are wasting your energy. There’s another train, 12 minutes after it. I’m sure waiting for it won’t kill you.

2. Train seats are luggage storage. Every day I see someone put their bags on the seat next to them . The train inevitably gets full and people are left standing up whilst these people have their little bags on the seats people could be on. Here’s something you might not have thought of. Take the bag off the seat, and put it on your lap. Hey presto, a free seat and your stuff’s still safe! Or even, put it on the floor if there is no one across from you.

3. Everyone else doesn’t mind listening to what shops you looked at. When having mobile phone conversations, it is not necessary to dictate your entire 45-minute conversation in the loudest voice possible. Mobile phone technology has come a long way, and so you, believe it or not, are able to speak as if the person is right next to you, in a low-civilized manner. If I wanted to know what shops you looked at, I would approach you and ask you. I honestly don’t care that you visited JeansWest.

That is all.

Valhalla July Event

Saturday, July 21st, 2007

[url=http://www.valhalla.net.au/forum/viewtopic.php?p=88572#88572]Read my post on the valhalla forums[/url]

Was a very awesome night, and even though Paul, Thommo, Rick and Tom didn’t go, I sat with Devastator and had a good time.

I won the competition for Quake 3 Corkscrew and received the gift basket which contained:

2 cans of Fanta
3 cans of Coke
1 block of Kit-Kat Chocolate Overload Chocolate
1 230g packet of Smiths Thinly Cut Original Chips
1 Box of Arnott’s Savoury Shapes
1 Packet of Smarties
1 Block of Peppermint Aero
1 Bar of Chocolate Aero
1 Crunchie
1 Cherry Ripe
1 225g packet of Allens Frogs Alive (Red Frogs)
1 225g packet of Allens Party Mix

I’ve been going to Valhalla for two years and I finally remember to bring my mousepad and win a competition. Coincidence? Probably.

Goodbye another weekend.

Traveling Salesman

Friday, July 20th, 2007

At work we have been discussing the Traveling Salesman Problem. This is classified as “NP-Hard”, according to the Wikipedia article for it, and there’s a few good reasons why. First of all, I’ll explain what it is.

We have a traveling salesman, let’s call him Bob. Bob starts in Adelaide and can go to one of many destinations around the world, and for each destination there are many routes. Say Bob has 10 destinations to choose from (he’s a very exclusive salesman) now each of these 10 destinations link to the other 9 destinations, creating 90 links in total. Bob starts at destination #1 (Adelaide) and can travel to any of the other 9 points. The problem with this is: we cannot read Bob’s mind. We don’t know if Bob wants to go from Adelaide to Perth (and in some cases he will need to go to Sydney first… I’ll explain later), Adelaide to Los Angeles, Adelaide to New York, you get the idea.

Now expand the number of points to around 100. That’s 100 x 99 routes, or 9,900 routes. That may not seem a lot but you see that the problem is getting exponentially out of hand.

Now imagine that Bob is not a person, but a packet in your computer. Bob can go to many different websites, like Google, Youtube or this site. Bob must pass through many routers (points) before he reaches his final point. To do this, Bob first goes to the home router, the home router connects one of the Internet Service Provider’s routers. This pattern continues until the link is established to the final point.

We know what the start destination is, and we know what the end destination is and we pass that information on to the router. The router then looks in it’s routing table and finds one of the many routes that lead to that final point, and pass it on to the next router. Each router knows of it’s neighbours and nothing more.

Point 1 knows that it can get to point 3 through 2, 2 knows that it can get to 4 through 3, and 3 knows that it can get directly to 4. It’s a beautiful part-solution to the Traveling Salesman Problem.

* About the Adelaide to Perth through Sydney. For those of you who don’t live in Australia I’ll first explain that Adelaide is in the bottom-middle of Australia, Perth is on the West coast and Sydney on the East coast. Sometimes when flying to Perth you need to catch a flight to Sydney and then to Perth, which is incredibly stupid. What happened to direct flights?

When Duplication May Seem Necessary

Wednesday, July 11th, 2007

At work we’re making a management system for Ferries, Accommodation, Rental Cars, Coach Tours and some other things. I’ve been assigned to work on the bookings section, which has proven to be quite difficult.

We have a table called Services, which keeps track of bookable items for the various items. The bookings table is linked to passengers and vehicles via has_many associations, and whenever we create a new booking we need to assign brand new passengers every time, so say if I travelled to Kangaroo Island every week, they would enter my name 52 times in a year. I know, not everyone travels 52 times a year, but over time this builds up.

Eventually the passengers table is going to have duplications where it seems that it is necessary because there is no way to uniquely identify one “John Smith” from another “John Smith” other than extra redundant data like an address field. Then what if there’s two John Smiths (Father & Son) living at the same address, how do we know which one is which? This is why we need duplication in our table, we simply have no convenient way of being able to choose which passenger is which. The system will eventually also need a way to keep track of “frequent flyers”, people who travel frequently, and I don’t know how they’re going to implement that.

It didn’t feel right. It still doesn’t feel right. There’s an easier way, unfortunately I don’t know of it. Maybe some of my readers might know.

——————

I’ve also booked out *another* weekend. If anyone’s planning on inviting me out to anything (hahaha, I should become a comedian), don’t.

Friday night I’m apparently going “out” (read: across to the boardroom) to have drinks with Marketing.

Saturday Morning I am moving to my Mum’s house. It’ll be unusual to see this room semi-empty.

Saturday Afternoon-Night I’m going out to 24-hour motorbike thing where it’s a huge 250km cross-country course motorbikes ride aorund and every six hours they pass nearby. It’s interesting to see how much they know about their bike when they’re in the pits. They know that if it’s making a certain noise that a spoke may be loose. The only shame is that you sleep in six hour blocks. Last time I slept on a “slight” slope, and kept sliding to the other end of my tent. This time I hope to find flat ground.

Sunday afternoon, my time to relax.

Every weekend I go “I have nothing planned for next weekend” and usually by Wednesday it’s all booked out. Eventually I’ll find one.

He Who Codes In Ruby…

Thursday, July 5th, 2007

Tonight I was wondering what to have for dinner. I couldn’t decide if I should go out and get takeaway or go out and get some ingredients for food and cook it, so I made this:

[code]options = [”Hungry Jacks”,”McDonalds”,”Subway”,”Cook it yourself, you lazy bogan!”,”Something from Fish & Chip Shop”]
puts options[rand(options.size)]
[/code]

Ruby in Schools

Monday, July 2nd, 2007

Tom Tuddenham, a fellow Adelaide Ruby Users Group (hereafter referred to as ARUG) member, and I have been talking for a little under two weeks now about Ruby in Schools, [url=Ruby-School-Tafe.html]and it went something like this.[/url]

So we may be presenting together at the next ARUG meeting, next Tuesday.

—-

Also, my new computer rocks. I would blog more but Supreme Commander needs my attention.