Skip to content

2010

I promise, this won't happen often.

I usually write to share my views, mostly to clarify what I think about a particular subject--to find out how I really feel about something. When it's a hot topic, I try to stay objective—though I usually fail miserably, and will likely continue to do so if those on the other side of an issue are acting like idiots. But at least I try, right? (Seriously, those linked articles are the results of my trying to stay objective.)

But there are just things in this world where only one side is right, where it's impossible to say "Let's just agree to disagree." Where the other side is so disastrously and dangerously wrong, that it causes the blood of those on the right side to reach boiling point.

So. That said, I'm going to try and clear this up. I hope this ranks high enough in search engines' rankings, so that I can pretend that there's hope that this "issue" will be put to rest once and for all.

YOU ARE WRONG. PHP'S create_function DOES NOT EQUATE TO REAL LAMBDAS IN PYTHON.

IF YOU BELIEVE THIS, YOU ARE A MORON WHO DOES NOT UNDERSTAND WHAT LAMBDAS ARE, AND YOU SHOULD STOP PROGRAMMING FOR THE SAKE OF THE CHILDREN AND THE FUCKING WORLD.

Source.

Closing barn doors and runaway horses

There's been word about requiring the Comelec to publish the source code used by the voting machines deployed for the previous election. Apparently, this has been an item for a while (a piece on GMA's site is dated 26 September); only got wind of it last night, while watching the news.

This elicited two reactions: first, I should probably watch the news more often. Second, talk about doing too little, too late.

Well, the second reaction, truth be told, had been laced with a lot more hatred, profanity, cussing and very non-kid-friendly cursing. But maybe it's just me.

Let me just spell it out, for those not so quick on the uptake.

The election's done. We have a president who looks like he's still surprised by his winning to this day, and keeps expecting a celebrity to jump out behind the bushes and tell him it's been a joke the whole time. We also have a vice-president who's managed to steal his post from right under everyone's noses.

So we still have the baranggay and SK elections. Whoop-te-fucking-do. The main bout's over, the actually-famous band has already played, the grand prix has been won. Even if third-parties are able to prove the voting machines' complicity in the recent thefts of particular government posts, what good would it do? Not being defeatist, or overly cynical (well, maybe the latter), but that's how government works. It'd take a chain of events as massively improbable as that in Piers Anthony's Bio of a Space Tyrant to change all this.

They only guarantee source code; nowhere does it say that it has to be the source code of the operating system that actually went into the voting machines that people used. Not unless each and every single voting machine is disassembled can we verify that they used the exact same operating system image.

The operating system isn't the only point of failure. This may not be obvious to non-code monkeys. Let me clarify. In the last election, the "results" were transmitted, via HSDPA connections, I believe, to a central server (and possibly a backup; I can't remember) guarded and held under lock and key. And, right there, I've just mentioned at least three separate points of failure, all capable of being independently targeted and manipulated. Here's a picture:

  1. The operating system can be "buggy", such that it doesn't report failure to write to whatever media it uses to store its results. This way, a disk (I think they use some sort of solid-state drive) preloaded with rigged results can be shipped with each voting machine, with the read-only switch turned on. This is simple enough, and hard enough to verify (since, presumably, they'd have had more than enough time to cover their tracks this way). Or, you know, attach the preloaded disks to a port that the operating system doesn't expect to find them in. Easy enough to miss, even if you're a hotshot code monkey.
  2. HSDPA connections. Admittedly, a little more far-fetched, but not altogether impossible. Plus, have we already forgotten the lax security that allows bored Globe and Smart employees access to our individual SMS messages (which are, by the way, stored as plaintext on their servers). If you had money to burn, how much would you be willing to pay to bribe overworked and underpaid technicians into manipulating digital streams of data?
  3. The servers. Ohmighod, the servers. Take number 1, except, this time, it's even easier. Ignore anything the machines in the field send you, present preloaded data. You only have to rig one or two machines, instead of all the machines in the field.

If you're a belts-and-suspender type of criminal, combine two or more of these for even better results. And these are just the things I've come up with while being simultaneously engrossed in an episode of House M.D..

Oh, hey, also, a little birdie told me that a certain diminutive political hack shelled out 10 million bucks for each offspring to win. No crackpot conspiracy theories on how much he had to pay for himself to win, though; sorry.

Anyway, I don't really have a point to all this, I suppose. I just wanted to point out how massively stupid this attempt to get pats on the back is. And, more dangerously, whoever takes a look at the source will probably find nothing. This will serve only to bolster the confidence of the unwashed masses over this inherently and, dare I say, fatally flawed technology.

I've no better solution to offer, so I guess this is pointless criticism. The only thing I can suggest is that we go back to the old ways. Not that I like the idea of hundreds of thousands of teachers manually toiling away, inefficiently counting votes. But at least it's a methodology I can actually trust more than this newfangled electronic voting crap.

I'm a programmer. My livelihood depends on my skill at pushing electrons. And, yet, I'm telling people constantly that the taxpayers' money—our money—have been wasted by the self-absorbed elitist jerk that came up with this bill in the first place.

It's time to admit that our first attempt at electronic voting has failed. Miserably. Not only are we unable to get results that's trustworthy, we can't even get it as quickly as US citizens can. Maybe in ten years' time, we'd have perfected the technology.

Or, more likely, we'd have no further need for it, after Binay has turned this country into an even bigger mess than it currently is.

The definition of insanity is doing the same thing over and over again, expecting different results each time. But this... we'd be playing craps with the future of our children. Not only is that insane, it's dangerously stupid.

Steal This Education

I think copyright infringement may save millions of lives.

Allow me to explain.

So starts a pretty well-thought-out essay from Dan's Data. Read it: it won't take too much of your time, and may give you a different way of looking at the bandwidth you're using up.

How I doubled my bandwidth by playing with routing tables

A while back, I availed of Sun's postpaid HSDPA service, primarily as a stopgap until I could finagle a proper hardline connection. I kept it, so I could work, even in the middle of a farm, as I stated in a previous post.

Except I haven't been to that farm in a while. Hell, I haven't gone anywhere in a while. I'm either working, sleeping or studying. For the past 2 or 3 months, the Huawei dongle that Sun provided went unused (except the one time my mom borrowed it to use during a trip to Baguio). Aside from that, it used to see daylight only when I take it out of the drawer when I clean my office. Or, you know, when I took it out to take a picture for use with an entry.

I'm still paying monthly fees for the thing; I'm locked to it by a 2-year contract. So I figured I should find a way to actually make use of it.

Back when I was still using Windows, I remembered a little trick you could do with dial-up connections. You could trunk them, resulting in a single virtual connection with bandwidth that's effectively the sum of its individual connections. I figured if Windows could do it, GNU/Linux should also be able to, no sweat.

As most of you know, I'm a code monkey by temperament and vocation; what system and network administrations skills I have, I learned by virtue of being the most qualified one in the family to take it up. So it took me a while to figure out, but, by ghod, was it worth it when I finally managed to do it.

In the interest of saving other people much hair-pulling, incomprehensible mumbling and outright violent tantrums, I'm writing the instructions down.

The situation

The DSL connection I'm using can do bursts of up to and around 120 to 140 kB/second, or about 1 mbps. Nothing to write home about, but it works out okay. For the past couple of days or so, I've noticed problems with my main connection's bandwidth shrinking to pretty much nothing, before going back up to its normal state.

This happens without rhyme nor reason (that I can figure out), although it's probably my lousy v7 Linksys router signaling its impending (and none-too-soon) death. Although it could also be the telco's fault; the ineptitude of PLDT's "technical" staff is legion.

As you can probably imagine, I got a little bit of a push from being annoyed by this.

Sun's HSDPA connection, meanwhile, averages about the same. True, Sun says I ought to get up to twice as much bandwidth, but I'm literally 4 feet away from a dead spot in every direction--I'm taking whatever I can get.

The payback

When I finally got this setup working, I managed to hit a little under 200 kB/sec before (it seems) a bunch of seeders called it a night. Sadly, I was too stunned and giddy after I got it working that I didn't manage to grab a screenshot as it was going down, so you're going to have to trust me on this one.

The screenshot I did manage to grab is shows an ongoing torrent while the YouTube video clip in the background is still able to buffer quite a sizable percentage. Normally, even when only about 50 kBps of my downstream goes to torrents, I'm unable to build up that much of a buffer in YouTube.

The build-up

While guides abound, none of the ones I dug up explained clearly the difference between bridging, bonding/link aggregation, and a bunch of other networking terms that seem to require a CCNA to understand. Also, all of the guides I've come across assume that you're trying work with two or more ethernet adapters.

After multiple cursing rounds that would make any tanned and salted sailor blush, I finally hit the right sequence of incantations required to get it working. And, no, you don't need to actually need to be a CCNA (or have one by your side) to get this working; you don't even have to read the links in the previous paragraph.

The setup

If you're using a GPRS "modem", as I am, I'm assuming you've already managed to figure out how to connect to your provider. Personally, I use the stock ppp package, with a custom chat script, to which I've also added custom ip-up and ip-down scripts.

Having facilities for post-connection and post-disconnection scripts isn't required, of course, but helps in making things run smoother.

In any case, here're the commands you need to run, presented without comment (those come afterward):

ip route add $PPP_NET dev $PPP_DEV src $PPP_IP table gprs
ip route add default dev $PPP_DEV table gprs

ip route add $HOME_NET dev $HOME_DEV src $HOME_IP table home
ip route add default via $HOME_GATEWAY table home

ip rule add from $PPP_IP table gprs
ip rule add from $HOME_IP table home

ip route del default via $HOME_GATEWAY dev wlan0
ip route add default scope global \
    nexthop via $HOME_GATEWAY dev $HOME_DEV weight 5 \
    nexthop via $PPP_NET dev $PPP_DEV weight 1

After pulling the plug on your HSDPA connection, you need these commands to ensure that traffic flows normally through your remaining connection properly:

ip route add default via $HOME_GATEWAY dev $HOME_DEV

Here're what the variables above should be:

  • $PPP_NET is the network segment your HSDPA connection tells you you're a member of. For my Sun connection, it's 10.64.64.64.
  • $PPP_DEV is the PPP device your connection is attached to. Most likely ppp0, unless you have another PPP connection.
  • $PPP_IP is the IP address your provider has assigned to your connection.
  • $HOME_NET is the network segment your wireless connection is associated with. Mine's 192.168.1.0/24.
  • $HOME_DEV is the device associated with your wireless connection. Probably wlan0.
  • $HOME_IP is your wireless connection's IP address.
  • $HOME_GATEWAY is your gateway's address. If you only have one router, this'll be your router's IP address.

The identifier after table in the above commands is an arbitrary string. You probably have to edit the iputils configuration first; on my Arch Linux install, the file I needed to edit was /etc/iproute2/rt_tables.

Of course, this isn't limited to pairings of an HSDPA and wireless connections; this would work just as well with wired connections. Just replace $HOME_DEV with the appropriate ethernet device name (e.g., eth0). The weight values can be tweaked, as well; think of it as an affinity indicator for packets. The higher the weight, the more likely it is that a given packet will go through that particular route.

(This is probably incorrect, or, at best, inaccurate.) Near as I can tell, what we're doing is we're setting up the routes for each connection. Setting each individual connection up, as it is, to be able to perform by itself. Then we tell GNU/Linux about the two separate routes we've set up, and let the system figure out how it's going to use it. We also tell the system that no matter what happens, particular IP addresses have to be reached by a particular route. This lets me still reach (and be reached by) the other computers in my network without a hitch.

The letdown

It's not all sweetness and light, mind you. There are some caveats to this setup.

As an example, take this publicly-private tracker I've recently become a member of. It tracks ratios using a member's IP address; since I'm reachable by, and (worse yet) can reach them using, two addresses, my ratios have become a little off.

(I've since added a rule that connections to that tracker have to go through my home network; though as to why I never thought about doing it earlier, I can only plead being tired. And lazy. And, also, being a n00b.)

So, if you frequent a site that tracks you by IP (as opposed to cookies), you should add a rule that restricts traffic to that site's IP address to a specified route. Switching between two or more routes might lead to hair-pulling, and people only have so much hair.

(There are likely incomplete thoughts, errors and whatnot in this post; if so, excuse please, and let me know. I'll get to them eventually--right now, I just want to catch up on my sleep debt.)

[Update: Here's another screengrab, this time of bwm-ng, done while I was pulling Evolution from the repos:

Yep. 340+ kilobytes per second. A little under 3 megabits/sec. It's like my connections, together, are the little pipes that could. :D]

Why Wi-Tribe is doomed to failure

Being on the Intartubes is pretty big deal in my line of work. I remember a time when I had to strictly limit my time online: connect to grab email from a POP3 server, disconnect, read and possibly reply to emails, then reconnect if there were any outgoing emails to be sent. I longed for a time when I can be constantly connected, when transferring gigabyte-sized files wasn't just a pipe dream.

Nowadays, I only think about my Internet connection when it's being flaky, or when it's (gasp!) down altogether.

Up until a few years ago, though, Internet connections with decent-enough speeds were limited to when you were in a place that can be reached through hardlines. Want to browse the Web while in the middle of a farm in (well, nowadays, not-so-) sleepy Malolos, Bulacan? If you existed in the Philippines in pre-2006 (near enough), tough luck.

Post-2006, and you've got more of a chance.

HSDPA devices proliferate in the country, being offered under mostly similar terms by three largest telcos (Smart, Globe and Sun). And they're mostly not half-bad; just don't expect to be able to transfer multi-gigabyte files without going bat-shit insane.

Earlier this year, a new contender in the wireless "broadband" competition emerged: Wi-Tribe.

Hold up—that doesn't seem right. Calling them a contender implies that I think they have a chance. Which they don't.

First off, they seem to confused as to what they are. They're offering a fixed-base wireless Internet connection, similar to what I know Globe offers. Except their service doesn't come with a phone line (nor do they offer one). Anyway, since it's a fixed-base connection (meaning, it requires AC power), that means no dice if you want to surf in the middle of that farm I mentioned earlier (plus, their base is bulky, to boot). Which is why I thought it was weird (and stupid, and even kind of funny) that the couple of salespeople I talked to tried to push their product on me as a replacement for my HSDPA connection.

The lack of a phone service isn't probably a big deal-breaker for most people, since you either already have a landline, or rely on mobile phones. But, then again, if you already have a landline, why go with Wi-Tribe? Hardline connections are more reliable, and are often faster in reality. The ones who usually go with wireless, fixed-base connections are those who live in areas that aren't serviceable by PLDT (the Philippine telco; like Ma Bell, except the Philippine government never got it through their heads that they should break it up).

Nor are their plans unlimited: they cap it at about 12 gigs per month, with some sort of promo that allows you to go up to 48 gigs, if you mostly use it during off-peak hours). If you go over, you pay them a bit more. Overages; they still make me cringe to this day. I guess I'm pretty far from the baseline, since I regularly eat up more than 50 gigs per month. But, still, offering capped plans in this day and age? Hey, Wi-Tribe: 1998 called, and they want their pricing scheme back.

Again, for those people, there are alternatives. And all of them don't have their transfers capped.

From where I'm sitting, it looks like the only ones who'd go for Wi-Tribe are those who are desperate to be on the Intarwebs, have been passed over by PLDT and Globe and/or Smart, aren't aware of the HSDPA plans available from Globe, Smart and Sun, and only ever go to Facebook to play games.

But here's the kicker. Here's where I really get pissed.

It's as if Wi-Tribe deliberately want geeks to fuck off.

Never mind the transfer cap, never mind the ignorant salespeople, never mind the convoluted pricing scheme.

They're either fucking liars, or are extremely stupid.

See, Wi-Tribe brands their service to be 4G. It's plastered all over their tents, their site, and every promotional copy of theirs I've come across. 4G. When, strictly speaking, they're not even fit to be called 3G. They're not lying "just a little bit", not fudging their numbers to attract customers. No, they're outright trying to fool the public by claiming to be 4-fucking-G, one fucking generation ahead of the competition, bitches.

Never mind how my HSDPA connection promises me a best-effort of 2mbit/s, while they only do fucking half.

Quick, you've got a product or a service; who do you rely on to spread the word? Early adopters. And when your product is tech-heavy? Who should you target first?

Geeks.

Geeks who read. Who know how to fucking use a fucking search engine to verify your claims. 4G?! Pshaw. I spit in the general direction of your transfer caps and barely 3G service.

No self-respecting geek would want to be seen with this thing. If I go into another geek's house and see that bulky Wi-Tribe base glowing ominously in a corner, I'll know that this is a faux geek, easily seduced by marketing speak.

No, thank you. I'll stick with the stupid "techs" over at PLDT (and their "engineers" who don't even know what the fuck pinging a server or doing a traceroute means); at least, when my connection works (which is about 99.9% of the time), it's great. I'll even stick with my Sun HSDPA connection, which I hardly use, and becomes flaky if the wind even so much as blows a little too strong or some shit. At least I knew what I got into, and I'm perfectly happy paying for it for the rare instances that I use it.

I will not participate in a scam of a product that, seems to me, deliberately flips the bird towards the people they should be courting.

Blog topics on the backburner

Haven't done a substantial post (well, what passes for one around these parts) in quite a bit. Not that I've ran out of ideas; in fact, I've got a few. Just haven't figured out which one to tackle first. Which, I suppose, is just another way of saying I haven't mustered enough passion to write a 1.5k+ word post on any of these ideas.

Anyway, my regular visitors here (Yes, I mean you. You know who you are.) know how cantakerous and snarky I can be, if I can be bothered enough to care about something. And I'm building up quiet a steam; might be good for a rant or two. Here's a list of topics I'm thinking about writing; if you favor one (or two), let me know either through the comments, or IM.

  • Why Wi-Tribe is doomed to failure: Wi-Tribe is a relatively new (here, anyway) wireless Internet service; I don't think they have a snowball's chance in hell.
  • Telecommuting in the Philippines: Why it sucks, why it can't help doing so, and why it'll continue to suck for quite a while yet.
  • Abortion: Oh, come on. You knew I'd write about this eventually.
  • Comparison of the credit card system here and in the US: Why the situation here is worse.
  • WTH happened to XEmacs?
  • Drunk driving, breathalyzers, and privacy

You might notice that, out of six topics, only two are in any way related to tech. And, of those two, the angle I'm going for one of them (tellecommuting in the Philippines) is going to result in a post that's barely related to tech.

Maybe I should switch careers? :P

I blame @NathanFillion for this

I drive a 25 year old Mitsubishi Lancer SL that's a little worse for wear. Suprisingly (for other people, not me; I love my car), it can still do up to 8 kilometers per liter. And that's with me driving like a maniac--I tried taking it easy for about a whole month, once, and I managed to get it up to about 10 kilometers per liter. This is in the city, by the way.

My car, which I've called Alice long before it was mine (I'm her third driver), has definitely seen better days, and while I have no plans of ditching her, I have been thinking about getting a new (or newer) car to supplement her. (Well, mostly, the plan is to get a family vehicle, and keep Alice for myself, to terrorize pedestrians and other motorists with.) Originally, I was thinking about a used Evo IV, or maybe an Impreza STi; lately, the target has been a brand-new Mitsubishi ASX GLS SE.

Well, no longer. Thanks to this tweet by @NathanFillion (What, seriously? You don't know Mal-freaking-Reynolds?), I have now reconsidered my choices.

Now, I want the Arcimoto Pulse (image links to more pics).

Despite the maker's goals, it'll cost me even more to own and operate this vehicle than it would for me to just keep Alice serviceable for the next, oh, I don't know, 5 years maybe? They're estimating most US-based customers will save at least a thousand USD every year in fuel alone. I ran the numbers on the calculator they provide on their site, and my savings come out a little over half their projections.

And that's discounting custom duties, importation tariffs and whatever the hell else I'm going to need to pay on top of the sticker price, unless Arcimoto sells them here directly (which, while possible, is highly unlikely--still asked them when that's going to happen, though).

Still... Damn it, I want it, and I want it now. I don't care that it's currently even more impractical for me, or that it'll be practical only for a few years (by my reckoning).

Captain Mal Reynolds has decreed it to be desirable, and I agree.

What? You'd dare oppose Captain Reynolds?

Sometimes I wish I could be like Krang...

You know him. The dude from Teenage Mutant Ninja Turtles. You know, the living brain without a body? That way, I could just continue focusing on building up my brain, and not have to bother with such tiresome shit as... well, maintaing one's body.

I pulled a back muscle the other night while shopping for groceries. It was stupid, because it was entirely avoidable. I managed to forget something most self-trained body-building jocks never figure out: You lift with your legs, not your back.

So, now, I can't walk properly, have to go through convoluted positions just to get out of bed in the morning, or lift anything heavier than a cup of coffee (and even that with difficulty). At least I didn't pull my muscle by ghoddamned sneezing (which was what happened about a year ago).

Yeah, yeah, I know. I need to get into shape and shit (what, round isn't a shape?). But, for gosh's sake, I'm a code monkey. My work ties me to a chair for more than 12 hours each fucking day. And, really, it's such a bother, trying to maintain one's body. Or, as I just told Danes, my calorie-processing, weather-proof support infrastructure for algorithm generation.

Somebody figure out a way to upload a human brain to the Intarwebz, plz. And I mean RIGHT NAO. kthxbai.

No more corruption!

Finally, I'm done with all the stupid, nonsensical, infuriating, productivity-draining video corruption issues I've been having on my laptop.

The bug is still there, I'm sure (I've seen it trying to peek its head a few times over the week): it's just that I haven't had enough uptime in over a month to get the bug to trigger itself hellaciously like before.

See, I haven't been able to get my laptop to hibernate properly for over a month. When telling it to hibernate, it goes through all the motions (pausing all processes, flushing caches, &c.) just fine. But when it gets to the snapshotting part, it just sits there and sulks.

No amount of keyboard bashing will get it to even acknowledge that it knows what the hell a keyboard is, no evident disk activity (as signaled by the laptop's disk activity blinkenlight), the CPU fan spins down after a while but that's it. Nothing else. It doesn't proceed to take a snapshot, or try and do anything that I can figure out.

At that point, all I can do is turn the power off.

Still, everytime I call it a day, I try to see if, maybe, this time, it'll hibernate. See, sometimes it does. But there's no rhyme or reason to it; nothing to give a clue as to what I should probably avoid if I intend on having a repeat performance.

I'm getting sufficiently pissed to really, really, really consider switching to a BSD full-time. Probably FreeBSD. Honest, I'm considering it. I have everything I'd care about losing backed up, anyway. Except the backup's encrypted with LUKS, which FreeBSD doesn't support, so I'd likely have to redo everything, but I don't care.

At least, with FreeBSD, I know I can't suspend to disk, so I don't even try. It's not a Russian roulette deal that often leaves me with orphaned inodes and an increased risk of losing something important (even with backups, it's still an annoyance).

Probably after I'm done with the Lisp project.