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.

Java: what’s the point?

Categories: Uncategorized

What’s the point of being type-strict if you can typecast anyway?

What’s the point of being object-oriented if the language is so byzantine it forces you into procedural hacks every second step?

What’s the point of having such a huge class library when at the end of they day, your Java implementation doesn’t behave consistently? (j2me, i’m talking to you and your Hashtable and Vector classes and their lack of toArray).

What’s the point of the compiler being so pesky and anal if it can’t even catch scope-related variable disappearance? in a method, a variable declaration will override an instance variable. I mean, if the compiler complains about *everything* else, why in hell doesn’t it complain about THIS?

Bleh.

El Chapubomber

Categories: Pinche México

Ahora resulta que el terrorismo y los bombazos llegaron a México, personificados en el infame chapubomber, que explotó en avenida chapultepec intentando demoler las oficinas de la ssp, parece que le falló la sincronia con el amigo que tenía el detonador. A quien quieren engañar? Toda la escena fue grotesca y completamente actuada, lo mas divertido fue la chambonez del personaje que no atinó a salvarse de su propio bombazo. La verdad si estos son los terroristas en México, estamos bastante a salvo.

Esta situación puede analizarse de tres maneras. La primera, asumiendo que “el terrorismo ha llegado a Mexico”. Si es el caso, como menciono, es poco de preocuparse, ya que si todo lo que pueden hacer los supuestos terroristas es inmolarse con un mínimo de daños materiales y humanos, no es de preocuparse; y si de hecho son tan torpes como para caer en esto, es cuestión de tiempo  antes de que simplemente los atrapen y se termine el asunto.

Si, por otro lado, es simplemente una puesta en escena; sea de quien sea, gobierno local o federal, cosa que es lo MÁS probable, resulta simplemente patético el caer en estos extremos tan ridículos para pretextar la acción que sea: militarización, criticar al GDF por su mala política de seguridad, pretender que México está en el primer mundo por el triste hecho de ya tener bombarderos suicidas. Curiosamente esta es la hipótesis más plausible, ya que ¿que otro fin podría tener este espectáculo? analicemoslo: el bombardero no acertó a su supuesto objetivo, y lo que es peor, ni siquiera tuvo víctimas de consideración (salvo él). Esto deja ver que el objetivo real era simular el ataque y sembrar el pánico y la incertidumbre. Cualquier terrorista por idiota que sea sería capaz de explotar en un vagón del metro atiborrado de gente y causar daños reales mucho más graves. Pero en este caso, el daño buscado, que es causar el miedo, ya está logrado.

Es triste ver que esta cruzada la emprenden las autoridades contra la gente, en vez de hacerlo contra quien debe hacerse. La tercera hipótesis diría que, dado que el objetivo supuestamente era la SSP, seguramente el perpetrador era algún grupo de delincuencia organizada; ni tardos ni perezosos los investigadores apuntan a las bandas de “Tepito” porque una de las víctimas del bombazo vive por ese rumbo, lo cual equivaldría a decir que yo soy terrorista porque vivo en Iraq o algo por el estilo. SI fuera el caso, preocupa que dichas organizaciones se sientan tan envalentonadas como para traer la guerra directamente a las calles; en ese caso lo que es obvio es que las autoridades están perdiendo la guerra contra el crimen; seguramente las organizaciones de malosos están envalentonadas al ver cómo unos miserables cárteles de narcotráfico le paran los embates al ejército.

Si fuera este el caso la situación tal vez es de cuidado porque seguramente los malosos irán afinando la puntería por así decirlo. Sin embargo en este caso la responsabilidad sigue siendo de las autoridades a quienes, véase por donde se vea, les ha quedado grande el trabajo de garantizar la seguridad en el país.

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.

Telmex bloquea puerto 25 (SMTP) para “combatir el spam”

Categories: Pinche México

Lo curioso es que mis niveles de SPAM no se han reducido ni tantito.

TELMEX está implementado medidas para ayudar a combatir el llamado correo basura o spam en sus servicios.

Estó afecta a los usuarios que usan su conectividad.

Basicamente, están bloqueando el puerto 25 (SMTP), el cual comúnmente es utilizado para el envío de correo electrónico.

Telmex tiene más información sobre esta estúpida medida en esta página:

http://www.telmex.com/mx/asistencia/correoelectronico/faq_puerto_25.html 

Aunque lo realmente interesante es el link para deshabilitar la protección, en la cual uno se declara como no-spammer y a cambio Telmex vuelve a habilitar el puerto 25.

https://www.beneficios.telmex.com/puerto25Prod/iniciaPuerto25Internet.do 

Telmex bloqueo puerto 25 smtp

ColdHeat soldering tool – don’t buy it!

Categories: Uncategorized

Coldheat pro
coldheat pro
How nice to begin the new year with disappointment. I bought a ColdHeat pro soldering tool, thinking I might use it for quick soldering jobs, since using the wired soldering tool is a bit of a ritual.

I made the fatal mistake of not reading the  reviews online (such as this and this), which warn that the ColdHeat might not, well, live up to the hype.

As it turns out, the reviews are pretty accurate. The ColdHeat turns a simple task, such as soldering two wires together, into an absurdly difficult affair. Something that would take even me, a pretty inexperienced solderer, a few minutes with the wired iron, turned out to be impossible with the ColdHeat. Maybe it’s just that I’m dumb; but the fact remains that the ColdHeat plainly didn’t work for me.

About my only consolation is that the thing was pretty unexpensive!

vi rocks!

Categories: English Geeky

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