Courtesy of Twitter

Archive for November, 2007

Why I Help Others

Tuesday, November 27th, 2007

Simply because of the great feeling you get when you suggest something to someone and they take it on board and compliment you for it, like this person:

Kathyscode wrote:
Radar,
I read through your 10 section Rails instructional this morning and really enjoyed it. Thank you!
I thought you might be one of those exalted GODS that really know this stuff …

Thanks Kathyskode!

Next: A summary of Railscamp.

Poker Night

Thursday, November 22nd, 2007

I was invited to the APL Poker Night held at the Southern Hotel in Gawler by my dad and Joe on Tuesday night. Usually on Tuesday nights I have dinner with dad at his house, but he wants to learn how to play Texas Hold ‘Em.

There’s a lot of difference between the poker nights I hold and what seems to be the “official” Australian League way of playing it.

To begin with, all four suits are organised in a square shape on the table, with each card within the suits visible. Then the cards are turned face down and shuffled on the table by moving the piles around with the players’ hands. Then each player picks a card in order to determine who gets to be dealer.

The selected dealer then shuffles the deck as much as they wish whilst the blinds are posted. Originally the blinds are 25 (small blind)/50 (big blind) and are posted by the two players to the left of the dealer with the person to the left posting the small blind. The blinds are raised every 15 minutes to 50/100, 75/100, 100/200, 200/400 and 500/1000. There is 30 minutes of play in the first round, and then a 20 minute break (which is way too long, imo), and then back into the game until the final table. Before the third and final round there is another break, but I’m unsure how long that is.

Then the dealer places a red card next to the person to the left of them and the deck of cards next to that. The person to the left then cuts the deck, puts the top half on top of the red card and moves the bottom half on top of that pile. The dealer then deals to their left in a clockwise fashion, giving themselves the last card. Each player gets two cards.

A round of betting commences. All players must bet if they want to stay in, the minimum bet being the big blind. All players can fold at any point and may not retract their cards. I don’t know if there’s a re-raise limit, we never got to that point. It would be good to point out at this point you *cannot bluff*, it is impossible. You will get called (someone else matches your bet) and you’ll be in the deep end. Once everyone’s bets are equal, the chips are put into the middle.

One card is then burnt off and then the flop is put out. Another round of betting happens. Players can choose to check (not place out any money), or bet the minimum or more. If a player has checked and another player on the table has bet, then the player must bet if they want to stay in. It is still impossible to bluff, you will get called. All bets are equalised and then the Turn card is put out.

Another round of betting, and the River card.

Another round of betting and then the remaining players can choose to turn over their cards or fold. The player with the best cards win.

The next round the player to the left of the dealer of the first round now becomes the dealer.

Enough of the rules, here’s how my night went.

I started on table 3 with Joe to my right and dad started on table 1. Joe was the dealer, so I posted small blind. I did very well for the first round, becoming the chip leader for the table. During the break free nibblies were given out and players got to take a break for 20 minutes. After the break it got a little more serious. By this time, the blinds were raised to 100 and 200 and people seemed a little more cautious on betting. I kept getting Queen/2 as my dealt hand, which was frustrating after fishing for the queen for two hands and losing both of them.

There were a few memorable hands in this second round.

The first was with Aaron, a player sitting across the table from me. I was being cocky and thought I had a good hand with two pair, so I bet large. The conversation went something like this:
Dealer: *deals out the flop*
Me: *bets 500*
Aaron: So you want to play then?
Me: *nod*
Aaron: Alright, I call.
Dealer: *deals out the turn*
Me: More please. *puts out another 500*
Aaron: Still playing? I call.
Dealer: *deals out the river*
Me: *check*
Aaron: *check*

Aaron got a three of a kind and won. The bastard.

The hand after that I got dealt a little better so I was still cocky, but my ego had a sizeable dent in it from the previous hand. It ended up being Aaron, me and another player. From what I remember I had three of a kind and Aaron had two pair. I won my chips back, and a little more.

Another hand was with Woggy sitting across the table and to my right. The cards on the table were nothing special, beside a queen which paired with the queen in my hand. I had a Queen/4 and unknown to me Woggy (who apparently went to the Regional championships) had a Queen/2. So we bet large, thinking we each had a better hand. It turned out to be a split pot because the cards on the table were better than we had in our hands.

The hand Joe went out on he went all in with 100 (I think) and had a two pair by the end of the hand and Aaron had a full house.

The final hand I played in I was moved to table 1. I was dealer and missed burning off a card somewhere. I could’ve missed burning the flop card and if I did then a 6 that came out on the flop would’ve been the burnt card and there would’ve been the card immediately after the faux River card that was dealt. There were three or four of us left, with the guy across the table from me having a pair of sixes, but if I had burnt off the six in the flop like I was supposed to (and I’m sure I did), then he would’ve had nothing. The real river card that should’ve been dealt was a queen, and I would’ve won. I basically dealt myself out. I came 12th overall and I plan on doing better next time, maybe more caffeine would help.

Layin’ The Smackdown!

Monday, November 19th, 2007

There’s a forum on the internet called Rails Forum which is a support forum for Rails (duh). I’ve been helping out on the forums for a few months now and some of the things people do surprise me. Sometimes they are things like “why didn’t I think of that”, and other times it’s like “why did they do that?”. Here’s a thread that was one of the latter

A guy wanted to add values into a select tag using javascript. He used this code:

window.parent.document.getElementById(’client_name’).value = ‘<%= @client.client_name %>’;

I replied suggesting this code:

<div class=’code’>

$(’element_id’).innerHTML = “Option 1″
</div>
Which I know works because I’ve used it before.

Then he replies saying:

Viniosity said:
Ended up using:

window.parent.document.getElementById(’client_name’).value = “<%=client.id %>”;

Dear GOD why? At least ditch the window.parent, please!

And I replied yet again:

I don’t see how that would work. If you’re having a drop down list, and you’re setting the value attribute on it, well… there just isn’t a value attribute! Are you sure this is working because I think that it wouldn’t.

I could be wrong, as last time I checked I was Human.

Then he made a reference to me looking like a terminator in my current avatar on the forums

Then another guy jumped into the fray called boemitsu who came up with this little beauty:

boemitsu said:
From my experience, this does not work in IE until version 6…

UNTIL VERSION 6! Oh no! Lucky most people are running version 6 (or better or Firefox).

boemitsu also gave this gem of code too:

i=0
@var.each {|a|
page << “$(’id’).options[#{i}] = new Option(’#{a[0]}’,'#{a[1]}’)”
i = i+1
}

Maybe he confused JavaScript with Java?

I replied a final time:

Me, whilst laying the smackdown said:For a moment there I did that thing people do, you know, put one hand on the side of the face and slowly drag it downwards whilst making a groaning noise.

Then I re-read what you had written:
“This does not work in IE until version 6″

Thankfully there was this new operating system released back in 2001 (October 25th, for those of you playing along at home) called Windows XP. This operating system came standard with Internet Explorer Version 6.0 (six-point-oh). Unfortunately, the majority of people were still using Windows ME, or worse, Windows 98, so the “standard” back in 2001 was what came with those operating systems which was Internet Explorer Version 5.5 (five-point-five).

Fortunately the wonderful people at Microsoft decided that on 11th July 2006 that Windows ME and Windows 98 were to be no longer supported! Fantastic news for Microsoft, of course, this meant that more people had to “upgrade” to Windows XP, therefore giving Microsoft more money in which they were to put into a burning pit of lava they call “Vista”.

My point is this (and honestly, I’m surprised you’re still reading), Windows ME and Windows 98 were basically deprecated in 2006. This means anyone using those had to upgrade, meaning they are now *most likely* running Internet Explorer 6 or Mozilla or Opera or Safari or some other browser, and not Internet Explorer 5.5. If we were to support all the older versions of all the software ever created we would still be coding in Fortran and COBOL, or worse, Perl.

Thankfully, old technology is eventually deprecated meaning that, as web developers, we can say “that is no longer supported, please upgrade” and get away with it. Anyone still running Windows 98 and Windows ME deserves to be shot anyway.

That is all.

boemitsu, the man who apparently never sleeps, replied within an instant:

boemitsu said:
Well sorry that I have written mistakenly until version 6. It should have been version <= 6But anyway…you’re really a cool guy.

So apparently it doesn’t work in IE 6 (and I’m a really cool guy). I’m not sure on this myself (the not working in IE6), as I use Mozilla Firefox. I’ll investigate this later this week and report back.

About Time

Monday, November 12th, 2007

About time!

Responsibility for all infrastructure - including tracks, trams and trains currently owned by TransAdelaide - is being taken over by the Transport Department.

This has taken long enough, I only hope that the government can get it right.

Like Peppering

Friday, November 9th, 2007

So like all of like yesterday I was like doing work at like work and I was like working on like ticket printing and I like managed to like use like four like hundred tickets just to like get the positioning like right.

Now if I continued this blog post doing that it would get annoying, not only for me but for people who wasted their time reading all the “like”s.

The whole point of this blog post is to rant about how people, especially women (I’m not being sexist), pepper their sentences with the word “like” as a verbal filler, like the loud, fat woman on the train this afternoon.

“Hey honey, would you like to do that thing we did last week?” (”legal” usage)
“You know, like, what Scott and I did last week?” (”illegal” usage)
“Yeah, like we went out on the town and like drunk lots and then we like went to a hotel and like stayed the night” (No she didn’t get a triple word score for this)

Then my personal favourite:

“You know what I’m saying?”

I twitched, or was it more like a spasm? Or maybe a mini-seizure, not sure.

“Yeah! Like totally!”

Another twitch.

“Then like we can like go to the like Casino and like gamble and like stuff.”

This continued for the whole train journey.

Please, for the love of God. Do not pepper your sentences with “like”. It is a waste of breath, and a waste of time for whoever has to listen to your nonsense.

Poker Night #2, Revision #2

Thursday, November 1st, 2007

Ok… so I said I would hold a poker night at my dad’s house.

And then I said I would hold it at Ignite LAN.

And then Tom complained that “some people” wouldn’t want to travel to Ignite LAN.

So it’s back on Dad’s house. 6pm, November 10th.

Blame Tom, I do.