Wednesday, April 30, 2008

Exams

Almost done. Good. It gets harder and harder to study each day.

Monday, April 28, 2008

Hardcoded Years

A bug was opened at work recently reporting that the date selection for a number of reports would not allow you to select a year greater than 2008.
I decided to look into it and found the following code in the page:

<% selectValue = (new Integer(today.getYear() + 1900)).toString(); selectName = "endYear"; %>
<%@ include file="year_selectbox.jsp" %>

Ok, so off to this year_selectbox.jsp:

<select name="<%=selectName%>" class="formPadding">
<option value="1998"
<% if(selectValue.equals("1998")){out.print("selected");} %>>
1998
</option>
<option value="1999"
<% if(selectValue.equals("1999")){out.print("selected");} %>>
1999
</option>
......
<option value="2008"
<% if(selectValue.equals("2008")){out.print("selected");} %>>
2008
</option>
With this repeated for 1998-2008!


Hard coded years! Awesome! I checked the history, and this file has had no changes since it was first committed.
I considered replacing this with something more appropriate, but no one could tell me what behaviour it should have. It could:

Allow all years from 1998 to the current year + 1, + 2?
Allow all years from current year +/- 5?

So, I was told just to add a few more years to the code and leave it until we decide on something later. I just hope no one comes along 5 years from now, looks at my name in the version control history, and says, "What was this idiot thinking, perpetuating this horrible code rather than fixing it!"

UPDATE: In the end I decided to go with [1998, the current year +2]. I just couldn't bring myself to leave it as was. That being said, I'm sure 10 years from now and bug report will come in saying that the select field has gotten too big.

Sunday, April 27, 2008

TTC An Essential Service?

So, a lot of people keep bringing up the idea of making the TTC and essential service. Most really like the idea of making it illegal for the various unions comprising the TTC to strike. But what people like Adam Giambrone, the TTC chairman, keep trying to say in interviews is that it's not quite as simple as that. He says that taking away the right to strike means that the arbitrators who decided on the contracts are more sympathetic to the union and, in general, taxpayers and riders will end up paying more.

In my opinion, the TTC should be made an essential service. It clearly fits the definition of the term. Huge numbers of people rely on the TTC to get to work, school, groceries, etc. And in this time where people are increasingly growing concerned about the environment, shouldn't public transit be considered essential?

But, also in my opinion, the TTC effectively IS an essential service already. Within 12 hours of this strike, the Ontario premier recalled the legislature for the next day to force them back to work and appoint and arbitrator. So, back to work within 48 hours, with arbitration! Giambrone, when talking about the realities of the TTC as an essential service, says that there have been only four strike days since 1990. But, there have been multiple strikes since then, they've just been very quickly legislated back to work each time. So, if the government quickly quashes any strikes and appoints arbitrators to settle things, if we can't seem to deal with more than a day of striking at a time, then how is this really any different than an essential service? They spent a few weeks negotiating first. It just seems like they want to have their cake and eat it too.

But if every time a contract is up, negotiations fail anyway and we go to arbitration, does the city actually lose anything by making the TTC an essential service and automatically going to arbitration? It seems like we won't. And the TTC clearly seems essential.

Saturday, April 26, 2008

The Green Living Show

I find it somewhat ironic that the TTC strike has occurred on the weekend of the Green Living Show downtown, thus preventing people from taking public transit to go to it.

Annoying TTC Strike

What the hell? A strike with what, an hour's notice?! Where's the 48 hours that the union promissed us?

Seriously, I'm usually on the TTC's side when people complain about them. I defend their service, the people, the whole thing. I mean, they have a tough job, and I respect that.

But, what the hell? A little notice would be nice. The announcement didn't happen until 11pm. The deal that they had seemingly aggreed to wasn't voted down until 10:30? I leave home at 10pm, and discover at 1am that I can't get home by subway?! Screw you!

Sunday, April 20, 2008

An Overheard Conversation

An overheard conversation:

Person 1: Picture Elmer Fudd being raped by Porky Pig.
Person 2: But they were never in the same sketches...
Person 1: Uhhhggg...That's what you find wrong about that image???
Person 2: Well it's just not feasible.

Exams

I've been studying, or rather, thinking about studying. Thus, there have been few posts. That is all.

Sunday, April 13, 2008

Museum Station Done

So, I've previously posted about the renovations that were going on at Museum Station. Well, the work is done and the station had it's official unveiling earlier this week.



Any takers as to how long before the station's graffiti-ridden?

Anyhow, I say it's looking good. Hopefully many more stations will get a facelift soon, some really need it. Here are some shots of Queen's Park, and it's actually in ok shape as compared to some others.



Tuesday, April 8, 2008

Druggies

Stumbled this today. Psychedelic Star Trek scenes to a Jefferson Airplane song.

Monday, April 7, 2008

The Death Star Conspiracy

I read this rather amusing article on Debunking 9/11, a site devoted to debunking crazy 9/11 conspiracy theories, especially it appears, those involving the government somehow allowing, or even planning the destruction of the twin towers themselves.

Anyhow, this particular post is showing the conspiracy behind the destruction of the Death Star and the cover up instituted by The Empire. Seriously, are we to believe that an untrained moisture farmer from some random planet managed to fire two torpedoes into a 2 meter-wide exhaust port, destroying the most technologically advanced station ever? And how about the fact that he is reportedly Lord Vader's son? Anyhow, a decent read.

Sunday, April 6, 2008

Korea Town pt.2

More time was spent in Korea Town yesterday as we were looking to purchase a few games like Yute and Hwatu. We dropped into a store while searching and were compelled , by the sheer cheesiness of it, to get photo stickers of ourselves. Those photo booths are crazy, filled with all the odd cartoon overlays you could want. The results were amusing. Not sure what I'll do with these stickers, but oh the memories.

We then moved on to the Korean supermarket and found what we were searching for. That place has everything. I've previously posted images of one of the potato chip mascots I saw there, and yesterday I found more packaging that I couldn't help but sharing.

Yup! Another potato chip mascot! And some kid and a fox?

Then there are the gyoza flavoured chips. I bought a bag and was surprised that they really tasted like gyoza. I guess I shouldn't have been that surprised but I was. Fairly tasty, though not the best chip flavour I've had. I say worth trying once. But, finally....

I don't think I need to say anything witty about the above photo. It speaks for itself. Just rounding the corner and seeing a big pile of titi cock in front of you was pretty funny. I got a dirty look from a women when I snapped the picture though.

Thursday, April 3, 2008

Trekkie Geeks?

So, Savage Chickens has posted a cartoon for you to determine if you're a Trekkie.

It's amusing, but my first response when reading it was that Qapla' is spelt with an apostrophe. I noticed a comment to that effect burried fairly low down, appearently few others noticed, or cared to comment. Amatures!

(For you non-geeks, Qapla' is Klingon for "success", and is a word that is pretty much used for any occasion, saying hello, saying goodbye, saying goodluck, saying congratulations, etc.)