Daylight Savings Time: what’s the point?

Categories: English Pinche México

What’s the point? even studies in the USA find out that DST actually costs more money than it saves. If it’s so ineffectual in northern latitudes, what the freaking hell are we doing following DST here in Mexico?

A study performed in the state of Indiana found out that DST costs upwards of 7 million dollars, money that wouldn’t be spent if there was no DST. Here in Mexico the benefits have always been marginal at best; particularly since as consumers, we see no benefit at all; my electricity bill hasn’t shown a reduction due to DST. I’ve always held that a measure with such a high social cost absolutely needs to carry a tangible benefit for the average person; I don’t care if the government were able to defer infrastructure investments or the state-controlled electricity companies saved a huge amount of money; I care about my power bill not decreasing, while at the same time I have to suffer having my bio-clock all messed up for 6 months at a time. Yes, there are those of us who don’t adjust after a week or a month; I’m still having trouble getting up in september and days seem to last less while under DST.

And I mean, if all of Mexico is more southern than Arizona, and Arizona doesn’t observe DST, why the goddamn hell do we? huh?

BerryUnitConverter 1.1.1

Categories: English

After only 1 day, I made 2 releases of BerryUnitConverter. We’re now at version 1.1.1 and along with a few new units, it can quickly swap origin and destination units. More info at BerryUnitConverter’s page.

Bluetooth PAN on Linux – howto?

Categories: English Geeky

So, I bought a cheap-ass (115 pesos) bluetooth adapter, thinking I might use it to establish a PAN between my macbook and my desk computer; this is due to a) no CAT5 cable and no IP address for my laptop on the lan, b) no WLAN coverage up here. I know Bluetooth will be kind of slow but it beats having the macbook with no connection at all.

I followed the excellent [HOWTO written by Zdenek Bouresh][1] and things didn’t seem to work; the macbook wouldn’t find the Linux PC and so couldn’t pair to it.

It turns out that having ISCAN (whatever the hell that is) on your bluetooth device is imperative for it to be found. You can check if you have it by running hciconfig and you get something like this (look for ISCAN and INQUIRY on the third line; if like in this example you don’t have it, then something’s still wrong):

hci0:	Type: USB

 BD Address: 00:11:67:88:06:17 ACL MTU: 1021:8 SCO MTU: 48:10

 UP RUNNING PSCAN

 RX bytes:1377 acl:0 sco:0 events:46 errors:0

 TX bytes:672 acl:0 sco:0 commands:39 errors:0

So how to enable ISCAN?  Oddly, /etc/bluetooth/hcid.conf already contains a line that says:

iscan enable; pscan enable;

However it looks like it doesn’t work. So what I did (quick & dirty) is add this command to /etc/rc.local:

hciconfig hci0 piscan

Also, it appears as though the default startup script starts pand too quickly, and hcid hasn’t had a chance to initialize yet; as a result, your log file will show :

pand[5218]: Failed to connect to the local SDP server. Connection refused(111)

What I did was insert a 5-second sleep in /etc/init.d/bluetooth,  at the beginning of the pan_start function.

Voilá, now my macbook sees the linux computer, a passkey exchange is initiated (and managed on the linux box via kbluetooth, I highly recommend it). The Mac gives a list of “services you want to use with your device”. If you enable PAN only, it will probably say “there were no supported services found on your device”. I guess if you also enable Bluetooth DUN you’ll see this service. Regardless, when you click “continue” a cheery message says “congratulations” and states “your computer and device were configured with the following services” and “use as a personal area network” will be shown.

As you dismiss this dialog, the bluetooth icon on the status bar will sprout a new option, “join network on whatever”. Clicking this will initiate a connection attempt.

Again, the HOWTO refers to creation of a dev-up script but I found I also needed a dev-down.  so in /etc/defaults/bluetooth:

PAND_OPTIONS=” –listen –role nap -u /etc/bluetooth/pan/dev-up -o /etc/bluetooth/pan/dev-down”
``
`
/dev-down contains:

#!/bin/sh

ifdown bnep0

sleep 2
/etc/init.d/dhcp3-server stop

and it looks to be working now 😉

 [1]: http://www.howtoforge.com/bluetooth_pand_debian_etch

Oscar Pistorius and the IAAF fiasco. Let him run!

Categories: English

the future of runningSo the IAAF has ruled Oscar Pistorius can’t run in the Olympics. They argue that Oscar’s prosthetics actually give him an advantage over other runners, making him faster and more efficient.

IAAF: Give me a freaking break. This is just finding excuses to not let the man run. Why? because of the fear he might upset the status quo. It’s actually because they’re afraid he might be faster than the competition. And the main excuse is that he is aided by his prosthetics. This is just lame; it’s not like he has an entire country’s financial and scientific might behind him. He bought his blades from a sports company, this means it’s widely available equipment; from this perspective, cyclists who have custom-made high-tech bikes should also be banned from competing against those who can’t afford anything but a production bike.

The man is fast enough that he might be a match for “able” runners, and there’s concern that the blades give him an unfair advantage; plenty of talk about how the blades “waste” less energy than a runner’s feet. The interesting part is that they know *exactly* how much more efficient Oscar’s blades are. So what the heck? build him a set of blades that give him *no* efficiency advantage, and see how he performs. That would level the playing field, and it would be fair.

Disqualifying Oscar because he’s more efficient would be like rejecting a taller runner, because his longer stride makes him more “efficient”. Or how about implementing weight categories in distance running? after all, lighter runners have an advantage over heavier, larger ones. Yes, you don’t see that happening, do you?

Oh, so the complaint now is that he’s the only one of all the participants who could use his blades, and this gives him an advantage nobody else could have. Yes, we wouldn’t want to have all our best sprinters cutting off their feet and trading them for blades, would we?

Guess what: it’s happened before. An athlete being so gifted, he could use a custom-made sporting implement; one that actually gave him an advantage, and one that nobody else could use.

Sergei Bubka used a special pole for his jumps. His strength and agility meant that nobody else could use the sort of pole he did. And indeed, he is the *only* pole vaulter to ever surpass 6.10m; his 6.15m record will *not* be broken unless someone who can also leverage the tool, the pole, comes along.

And yes, he was allowed to compete only because he was *not* disabled.

How’s that discrimination for you?

Oscar, they’re afraid of you. So what you need to do is stop fighting the system; enter the paralympics, where all the other double amputees who also have an advantage will run as fast as you; a level playing field. Or wait; actually they won’t, because Oscar’s merit is not only about his blades; it’s about his prowess and hard training. Because the fact remains, you can buy the blades in a freaking store. Yet you don’t see double-amputees outrunning cars on the street. It’s about the man, not the artificial feet he wears.

What Oscar Pistorius needs to do is break the 100m world record. That will be fun to see; a double amputee with no actual feet running *faster* than “able” men. Yep, that’d be fun to watch.

Reasons to leave Mexico #4

Categories: English Pinche México

Gas prices suck. Most everyone knows this, but the situation in Mexico is really byzantine.

In order to help their finances, the government has been increasing gas prices since Zedillo’s presidency (1994-2000). The increase has been slight, one cent per month. However, during Calderón’s period, the increases have been more frequent and more expensive, as the useless government increases its greed and ineptitude, having the common people pay for it. During September alone, we’ve had something like 6 increases, and more than 20 since the year started. Gas has increased from 6.40 pesos a liter in 2006, to 7.40 in 2008.

Why is this happening? the government tells us that the gas they sell to us is subsidized; since they have to buy it from the USA at high prices, and that the increases are meant to level our gas prices with those of most countries. Then they have the gall to claim that Mexico’s gas is among the world’s cheapest. What a load of crap!

For starters, as long as they are importing fuel, they might as well buy it from Venezuela, where gas prices are a low 33 cents per liter. Buying from the USA is stupid, since they buy most of their oil from Mexico anyway. So yes, indeed the most reasonable solution would be to build a few refineries here in Mexico and produce nationally. After all, the government should be sharing the country’s resources with the population.

Then there’s the matter of oil prices. Oil goes up in price and the gas goes up as well. However, here in Mexico, things are so backwards that, when oil goes down, gas keeps going up. What gives?

Finally, those who compare gas prices in Mexico to other countries and find they’re similar, are missing one very important point: most of those countries have salaries that are way higher than in Mexico. So what good does it do that mexican gas is 10% cheaper than USA gas, when my salary is 1000% lower?

To add insult to injury, here in Mexico City owning a car is more of a liability than an advantage. You pay a fortune in gas and ownership taxes, but environmental programs forbid you from using your car several days a month (where’s my tax break for this?). When you do get to drive your car, you do so at a snail’s pace; estimates say that the average circulation speed is 15 km/h; a bicycle would be faster. But of course, the lack of road culture means riding a bike everywhere is tantamount to suicide. To top it off, either while driving or with your car safely “parked” in front of your own house, you risk being mugged, carjacked, or having your car vandalized for no apparent reason.

So there you have it; Sarcastically, I think the government’s plan is to make cars too expensive and troublesome to maintain for everyone, so that we have to travel by bike or on foot. Yeah sure, then Mexico will be at the forefront of environmental awareness! Give. Me. A. Break.

vi rocks!

Categories: English Geeky

everyone’s first vi session. ^C^C^X^X^X^XquitqQ!qdammit[esc]qwertyuiopasdfghjkl;:xwhat

Django vs. ruby? & me

Categories: English Geeky

Sucks or rocks? googleometer gives us a parameter.

20,900,000 pages mention ruby on rails, while 1,560,000 mention django AND python.

These are our baselines. Now for the rocks:

714 pages think Django rocks. 1,000 pages think ruby on rails rocks.

The sucks are as follows:

541 pages think ruby on rails sucks. 147 think Django sucks.

Of course since I can’t grok Python I still think Ruby rocks most.

Vlad, Capistrano incompatible with Dropbear?

Categories: English Geeky

I tried to deploy to a remote debian (etch/testing) server running dropbear instead of openssh. Rake blew up (Vlad impaled it?) with an error such as this:

Writing configuration file to /***/mongrel_cluster.conf.
rake aborted!
execution failed with status 255: ssh www.****.com mongrel_rails cluster::configure -N 2 -p 8000 -e production</pre>

-a 127.0.0.1 -c /****/current -C ****/shared/mongrel_cluster.conf

This was strange because when I checked on the server, all of the tasks were being executed correctly, and dirs and files were created.

I switched to OpenSSH and the problem went away.

It looks like, even if the command executed is successful, dropbear sometimes ignores the return code and exits with 255, which confuses rake. This doesn’t happen with OpenSSH.

It looks as if the problem is with dropbear, as I had the same issue when trying to deploy with capistrano (crapistrano?). So I guess I’m back to plain old openssh…

Buzzword of the day: “rich”

Categories: English Geeky

rich: n. Laden with useless features and incredibly difficult to use in real life.

Example:

ZK is a Web framework designed to enable Web applications to have both rich user experiences and a simple programming model. ZK includes an AJAX-based event-driven engine to automate interactivity, a rich set of XUL and XHTML components to enrich usability

Translation: ZK has a boatload of components which you will never use; those you do, will be incredibly hard to program even though they include basically text fields, buttons and checkboxes; and all this will result in a molasses-slow experience for your end-user.