Archive for the ‘Babbling’ Category

20 years later… (or: the ends justify the means)

Tuesday, December 22nd, 2009

20 years ago, on this day, Romania’s president at the time, Nicolae Ceauşescu, fled under pressure from the large popular uprise which we call The Revolution.

Three days later, they were executed, after something that pretended to be a trial. Over the past days, a Romanian newspaper ran the timeline of the events, tracking the movements of Ceauşescu and his wife. The trial was filmed, and it exposed the truth about “revolutions”: in order to gain legitimacy, both for the Romanian people and for the foreign governments, they needed to show there was a trial. They also needed the former president executed, partly as an attempt to stop the attacks from terrorists (special forces allegedly trained by the former president as elite units that would protect him) against the population and the military forces.

20 years later, said terrorists are still nowhere to be found. The attacks were just various branches of the military not knowing what to do, and pulling the trigger against each other.

20 years later, the goal of the trial is ever more obvious: the new political class (which was really not that new to begin with) needed no roadblocks from the old president; they wanted the president eliminated, and they came up with a plan that would help their recognition from the rest of the world as a legitimate government.

The accusations against Ceauşescu were not sustainable in a real court. 20 years tend to erase some of the bad memories from the terrible times of his reign, so I may be missing a lot of the details about how bad it used to be (and, believe me, communist Romania was bad). But the new political class decided that the ends justify the means.

In the end, I personally believe that people give the institution of presidency too much credit. (And this applies not just to Romania, pre or post December 1989). I believe Ceauşescu was being presented with a very rosy picture about Romania, by the people around him, some of them who eventually were the ones to kill him. He was an old man, some argue he was senile, and the powers behind the curtain liked the status quo, until it became non-profitable. He was merely a symbol – the symbol of the extreme-left communism, in a Europe that was trying to get rid of the East-West separation. He probably truly believed in his ideas, completely oblivious to the real economic and social facts. His ignorance could be blamed on his age or medical conditions, but I would much rather blame it on his entourage that handled the smoke and mirrors.

December 22, 1989 – I remember that my parents were coming back from a visit from my grandparents, and I was home, alone, vacuuming and cleaning up for Christmas. And, for some unknown reason, I turned on the TV. This makes very little sense now for me, just like it probably does not make any sense for you – but we were only having 2 hours of TV per day, and most of it was just news anyway. There usually was nothing (as in no signal) on a Friday morning. And yet, there he was, talking about something I did not pay attention to. And then the audience (which was normally cheerful and would acclaim him after each sentence) started booing him. That was unheard of! An hour or so later, when my parents came home, they would not believe me.

And from that point on, Romania was glued to the TV – the same thing we all ignored for the most part until that day.

A new low in spelling

Friday, December 18th, 2009

Saw this last night on one of the local TV stations: “Happy Holiday’s!”

I’m sorry, I meant, on one of the local TV station’s. Because noun’s should have apostrophe’s.

Fall activities

Thursday, October 15th, 2009

A quick update on my non-work related activities.

A lot of orienteering lately:

  • Quick white course at Lake Bond with my daughter a few weeks ago.
  • A very eventful Birkhead Wilderness run. You can read the report in the comments – I don’t think there was one single participant to get all the controls right. I messed up the first two and had a relatively clean run after that, especially after I started to pace count.
  • A quick Bond Park sprint. I kind of had the home field advantage, and I was still slower than the fast runners.

I ran for the first time with the Raleigh Trail Runners. I knew I signed up for pain, and pain it was. 2.5 miles at a slow speed, 6 uphill sprints on the Graveyard Hill at Umstead (off of Old Reedy Creek), and back 2.5 miles; last 2 miles were 7:50 and 6:50 minutes respectively. Maybe we were trying to make it back before it got too dark. As I said to the other (3) runners, it’s no surprise so few people sign up for hill sprints.

My daughter started to take piano lessons, so a piano had to be acquired. We got a digital piano which seemed like a good compromise of quality vs. price.

Between fixing stuff up around the house I’d like to get back to some recreational programming (picking up Flex would be nice).

python: the dangers of assert

Wednesday, July 1st, 2009

I ran into a piece of code that looked like this:

import threading

class A(threading.Thread):
    def run(self):
        self.foo()

    def foo(self):
        assert(threading.currentThread() != self, "Blah?")
        print threading.currentThread() == self

a = A()
a.start()
a.foo()
a.join()

In the original code, there was no a.foo() invocation, because that would have triggered the assertion. Or so it was thought. I added it for my own edification.

The intention was for the foo() method to be callable only from within the running thread. In my quick test above, a.foo() should have failed.

There were two problems with that piece of code. First, it was not failing. Second, in python 2.6 you get a warning whenever you use assert with paranthesis. This is very deliberate, since assert is not a function. Using paranthesis will simply pass a tuple to the assert construct, and the tuple will always evaluate to True.

Very dutifully, I removed the paranthesis, and moved on to do some other things (and I even forgot I did it). A few days later, a coworker reported problems with the code.

As it turned out, the assert was hiding a very old bug – the condition should have checked for equality, not inequality. But since the condition _and_ the error message were paranthesized, the code passed no matter what you did. Removing the warning uncovered the problem, probably 3 years later.

Probable causes for errors

Monday, June 1st, 2009

If you needed an excuse-of-the-day look no further than the DMTF specs for CIM.

The CIM_Error class has a ProbableCause property which can have a long list of values:

http://msdn.microsoft.com/en-us/library/cc150671(VS.85).aspx

“Toxic Leak Detected”, “Ice Buildup”, “High Winds”.

In a way, I feel refreshed to see the potential causes for the world’s problems are no more than 129.

Dinner in Vienna

Friday, May 8th, 2009

Flying back from Romania, we had a one-night layover in Vienna, Austria, and we spent the evening sightseeing.

Here is the dinner-on-the-run we got from a supermarket (we wanted to use the daylight for pictures, so we chose to eat at the hotel instead of a restaurant in the city).

The Limburger was not “ripe” yet (i.e. it was still firm; as with the Camembert, if you let it outside for a few hours, it will become soft and spreadable – and extremely smelly). Off the supermarket shelves, one only gets a hint of how rotten it will become.

In the train that was taking us back to the hotel, every time I was opening by backpack, I was afraid the HAZMAT unit will show up and throw us out.

The cheese strudel was pretty good too, but it had no good story behind it.

reCaptcha

Tuesday, February 24th, 2009

Today I finally got to read about the idea behind reCaptcha. Yes, I am behind.

I found it both very clever and a step closer to the Matrix.

Scheduled Service at Car Dealership – Long Rant

Monday, February 16th, 2009

For about 7 years now, I’ve been changing the oil in our family cars (and doing other maintenance tasks too). It originally started as learning something new, then I thought I am saving some money. Now I think I am saving time, because I can change the oil in the middle of the night, in my garage, instead of trying to work my schedule and the kids’ around an appointment at some shop I might trust (no, I no longer trust Merchants or the like, but that’s another story).

Actually, I think in my ‘04 Matrix the only oil change I did at the dealership was the first one. And I planned on having the first oil change in my wife’s Honda Fit done at the dealership too, with the next ones done by yours truly.

My wife’s previous car was a Toyota Corolla, so it’s been very easy – both cars accepted the same oil filter and the same oil grade. The Honda being different, I did a bit of research on the Internet for good oil filters, got scared by shipping prices and decided to buy an oil filter at the local dealership when I do the first oil change.

So I did. Oil filter was $7 and change (plus $0.32 for the washer that Honda recommends to replace with every oil filter change – no comment on this). A bit more than buying it online, but less if I were to include shipping for a single item. It’s obviously better to buy a multi-pack and save on shipping, or buy a quality non-OEM filter (since the OEM ones are not necessarily the best or reasonably priced, according to several forums). A quart of 5W20 oil was $2.57 per quart (regular, not sythetic) – again, not a terrible price for a retail quart – but I decided to not buy the oil just yet. This was at the parts store inside the dealership.

After the oil change, I looked on the invoice. OK, $16 for labor, $7 for the oil filter, $0.32 for the washer, 4 quarts of oil at $2.57 per quart, plus taxes – somewhere at $35. They threw in a free carwash too.

But then, I started to think. OK, the oil filter was the same price as the one in the parts store. If I can buy online 6 oil filters for $27.19 and 6 washers for $0.96, I am sure their real price is much lower. Maybe it was separately packaged just like the one in the store, so whatever.

However, I know from watching the Toyota dealer perform oil changes that they do not waste their time with oil in quart-size bottles – Fred Anderson had an oil circuit that was probably fed from barrels of oil sitting somewhere in the corner. Manufacturers usually choose the same oil grade for most of their fleet, so it makes sense for the service shops to buy it in bulk. I am sure Honda does the same (if they don’t, they’re morons). But I don’t expect them to invoice me for the oil at the same price as the retail store.

One of the big revenue streams for car dealers is service – and they probably want customers to return. I would have been happy to see on the invoice the oil being $0.50 per quart (probably more than they pay) with a labor of $30 instead of $16 (since it took exactly an hour for the whole thing). Looking at things side by side, I may have said: ok, I definitely can’t beat the price for the oil filter they buy in bulk, or the oil they buy by the ton, and the labor is reasonable – I’ll be back here for the next oil change!

But if what they charge me for parts is what I would pay for parts at their store, which I know I can beat by shopping on the Internet, then their story for convincing me to be a returning customer is a lot less compelling.

Sorry Honda, I hope you can do your service better next time (when I buy the next car from you).

python 2.6 lameness

Thursday, January 22nd, 2009

Python 2.5 added a new field, “message”, to the base exception class.

Python 2.6 deprecates it.

We have code (using python 2.4) that was setting “message” and “status” (related to HTTP) in a perfectly legitimate way, that now spews warnings.

Excuse me, why do I have to change code that was working just fine?

Check Engine Light

Wednesday, January 14th, 2009

The check engine light in my 2004 Matrix came on yesterday morning. I was kinda alarmed, so I stopped at an Advance Auto Parts. They helpfully checked the code in the OBD2 and turned out it was the first oxigen sensor.

I picked up a universal Bosch oxigen sensor (the OE one was not in stock and $30 more expensive). Last night I got it installed – took me about an hour because I didn’t cut the wires long enough, and the PosiLock wire splicing that was included in the kit was a pain to get right.

After installing it, I started the engine – the check engine light was still on. I was hoping it will turn itself off while driving to work this morning, but after about 10 minutes it didn’t. So I called the store and they asked if I did reset the computer (remove one of the battery connectors, preferrably the negative, for 3-5 minutes).

That seems to have done the trick – funny this step was not included in the directions.

Total cost: $75 parts, 1 hour labor.