//Comment This Out

Sunday, February 27, 2005

Poorly Written Code

Last Friday, at work, I was looking at some of the code in our codebase and found the following: for ( ; ; ) { // do something if (some condition) break; // do something } Yes, someone wrote a for loop, without any arguments! What really bothers me is that this is something most first year CompSci students wouldn't do, or at the very least, taught not to do this. A few days before that I also came across this type of code: if (A) methodA(); else if (B) if (!C) methodA(); Not as bad as the above code, but still very confusing. I rewrote it as the following: if (A || (B && !C)) methodA();

Thursday, February 10, 2005

Take The Car

It was recently anounced that the TTC will be raising its fares, again. As can be expected, the usual collection of complaints have been brought forth. They say that every time the TTC hikes fares they lose riders, thus they end up losing the money that they hoped to gain through the increase. Which leads to less money to invest in upgrading services, which leads to losing even more riders, which leads to raising the fares to compensate, which begins the cycle all over again. Then they have to approach the government for more funding, which means, etc. etc. It is my belief that the real reason the TTC loses riders and/or the faith of the public is that their services have declined over the years, not how much their services cost. Compared to other cities, Toronto's public transportation is reasonably priced, even with the price increases. But my main concern is getting from point A to point B quickly as possible, painlessly. And it is not quick and it is not painless. If I had a car, I would never take the TTC. Also, over the past few years, the TTC has been slowly replacing their aging fleet of buses with new ones. Unfortunately, they are not as good as their older buses. They have been using what I called "mini buses" for the past few years, especially on the Bathurst St. route. These mini buses are much smaller than the regular sized buses so they fill up more quickly. In their infinite wisdom, they put some of these buses on busy routes during rush hour so many of their riders have to wait for the next bus where there will (hopefully) be more room. There are also many design flaws which I could gripe about but I'll leave that for another time. Other buses which they have recently installed are also not as big as their full sized buses but are bigger than the mini buses, so room is not at such a premium. However, one of the problems they all have in common is that they seem to be of inferior quality. I have seen rust form over the doors of one model. The mini buses air conditioning leaks inside during the summer. The back doors rattle when the bus is in motion. And, the seats seem to be spaced closer together compared to the older buses, which is not good for the over 6 feet crowd, of which I am a member. For that matter, I greatly prefer the old models from the 1980s, of which the TTC still has many in service (late 80s). They have big rear windows, are more roomy, and also look nicer as well. I find it strange that while cars in the 80s were boxy in appearance and became curvy in the 90s, buses followed the opposite trend. They were curvy in the 80s and became boxy in the 90s. Now that were are in 2005, you still have the feeling that you are in a big, black box. I remember from the early 1980s when I was a kid, their buses had big padded seats covered with a black cover (since replaced with a brown cover). They still have a few kicking around though it is quite rare. I have ridden on three of them in the past five years. It was very comfortable, much better than the red fuzz they cover the seats with now. (In their defense, the padded seats were suseptible to vandalism and are harder to clean.)