Posts

Showing posts from 2014

The 5000mph car

Image
If your car dealer offers, for the additional sum of $500, to upgrade your car to a top speed of 5,000mph, would you take it? When it comes to broadband Internet access, people have been downing the Kool-Aid with exceptional enthusiasm. In some cities with weak or non-existent consumer laws, ISPs are offering 100Mbps, 200Mbps, 500Mbps and 1Gbps service. Each bigger number option (note I do not say faster option) costs a few dollars more than the smaller one. In some places, the ISPs have stopped offering 100Mbps altogether and start at 200Mbps. The reason couldn't be more obvious. The cost of providing 200Mbps is the same as 100Mbps. The small print in the T&Cs' essentially allows the ISPs to not do anything other than provide the specified speed between the customer and their first node. So, a higher priced product means more profits. Buying 200Mbps or 500Mbps is exactly the same as buying a 2,000mph or 5,000mph car respectively. People can easily relate to the...

Serializing that convoluted cookielib.CookieJar

The Python cookielib.CookieJar object is a very convenient feature to manage cookies automatically as you traverse a series of Http web requests back and forth. However, the data structure of the class is a convoluted collection of Python dict . cookielib.CookieJar has a _cookies property which is a dictionary of a dictionary of a dictionary of cookielib.Cookie . To understand the data structure in the CookieJar object cj , try: for domain in cj._cookies.keys(): for path in cj._cookies[domain]: for name in cj._cookies[domain][path]: cookie = cj._cookies[domain][path][name] print domain, path, cookie.name, '=' , cookie.value However, the class-defined __iter__ method makes the above effort unnecessary if you just want to find the value of a cookie. The __iter__ method returns a cookielib.Cookie object for each iteration. You can simply go: for cookie in cj: print cookie.domain, cookie.path, cookie.name, cookie.value # etc I...

Eurail Pass - No more valuable

Image
Thirty-five years ago, I traveled Europe on a rail pass as a student. Recently, we planned for a trip as a family of three. We almost bought the Eurail Pass - €576+€490x2 - but at the last minute we decided to drive. The main reason we found the Eurail Pass not suitable was that despite the high cost, nothing can be a be planned with any degree of certainty. In France, the number of seats available for Eurail Pass holders are limited and nobody could say how limited. With such unknowns, it was difficult to book hotels. The other main reason was that lots of time would be spent waiting at train stations to catch connections. As we flew into Amsterdam, we booked a Hertz car from Schipol Airport. The total rental bill for sixteen days worked out to only €483.96. Hertz Rental Record (ignore pen marks) Notice that there is a Location Service Charge of 18% or €61.01. I didn't see it till I got home. From my experience with Hertz in the US, this is usually because the car is re...

Speed Unlimited

Image
After five minutes on the famed autobahns , you get a full realization of the often quoted " you are more likely to die from an auto accident than an airplane accident " or " commercial flying is safer than driving ". First of all, the lanes are a bit undersized. For a saloon car, there is about a meter left on each side for most parts of the network. Next, the traffic is heavy! This is probably due to the complete lack of tolls. If you are on the outer lane to pass another vehicle, you have less than 10 seconds to complete your job, because that is the time when another vehicle will come charging down behind you. Tailgating is dangerous, but at the same time you hate to be traveling too "slowly". So passing often is a necessary evil. And it is a sheer act of terror. Most of the time, it is necessary to pass at about 130kph. At that speed, and with a high sided truck about a meter next to the right, the fluid mechanics sent my rental car sligh...

Smart Phones are so passé

Smart phones and tablets are so last decade. New features have already plateaued, and everyone who is anyone or no one, 5 years old or 100 years old, has, not one, but a couple. Samsung and Apple are resisting the race to the bottom, and still winning. I don't miss a thing with a sub-$200 full-price Asus 5.5" full HD LTE phone. It is no more about which phone is more capable, because they are all similar. It's about how you use them, just like this .