Archives for the ‘Programming’ Category

The emperor’s new clothes were built with Node.js

There are plenty of people lambasting Node.js (see the infamous “Node.js is cancer”) but proponents tend to misunderstand the message and come up with irrelevant counterpoints. It’s made worse because there are two very different classes of people that use Node.js. The first kind of people are those who need highly concurrent servers that can […]

OpenStreetMap provider CloudMade shuts its doors on small users

(Original email at bottom.) CloudMade, a company selling mapping services (many based on OpenStreetMap data) that competed head-to-head with Google, let its users know that as of May 1st, they’ll stop serving anyone who’s not on an enterprise plan. This is rather sad, because they were one of the main alternatives for custom OpenStreetMap tiles. […]

Good things happen when you subtract datetimes in MySQL

Of course, you know that “good things” and “MySQL” don’t go together. File this one under the category of “small ways in which MySQL is broken”. Let’s fire up MySQL 5.1.72-2-log or 5.5.34-log. [code]mysql> create temporary table blah -> (alpha datetime, beta datetime); Query OK, 0 rows affected (0.01 sec) mysql> describe blah; +——-+———-+——+—–+———+——-+ | […]

tuntuntun – Combine Multiple Internet Connections Into One

GitHub repo: (proof of concept status) I was trying to play Minecraft by tethering over a Sprint data connection but was having awful random latency and dropped packets. The Sprint hotspot seems to only allow a limited number of connections to utilize the bandwidth at a time – a download in Chrome would sometimes […]

Googling for bugs: hundreds of date-formatting mistakes

Here’s something really easy to screw up: [php] <?php echo date("Y-m-d H:m:s"); ?> [/php] Spot the mistake? The “m” format code can only mean one thing, which is “months”, not “minutes”. Yet, when you’re writing code in a hurry, it’s so easy to quickly write this code and assume it works. After all, it raises […]

PHP’s wonderful pseudo-functions

There is a pseudo-function in PHP called empty, that tells you whether a variable is “empty” for someone’s definition of empty. The empty string, zero, null, and undefined variables are all considered to be empty. [php] <?php $x = null; echo empty($x); // prints "1" echo empty($nothere); // prints "1" [/php] Well, how did they […]

Getting the Sparkfun EL Escudo to work

I’m really disappointed in Sparkfun. I recently purchased the EL Escudo shield for driving EL wire with a microcontroller, and woe be upon anybody who doesn’t do hours and hours of Internet research before plugging the thing in. There were 3 years of questions from poor customers with only a few answers, and the few […]

Ubuntu works great with the MSP430 Launchpad

I got my MSP430 TI Launchpad more than a year ago simply because of the price. It was (and still is) $4.30 (with free shipping!) for a development board, two MSP430 microcontrollers, external crystal, and USB cable. Unfortunately, Windows was the only supported OS at launch time with a couple proprietary bundled IDEs. It still […]

Using the Chez Scheme debugger

Achtung! Chez Scheme and Petite Chez Scheme do not give the same debugging information. Petite Chez Scheme is often much less helpful than Chez Scheme, and is probably half the reason why nobody actually tries debugging programs in Chez Scheme. Here’s a sample, buggy program: [scheme](define myreverse (lambda (ls) (if (null? ls) ‘() (append (myreverse […]

Arrow Endianness: How GNOME got sorting backwards

Conventions are important, even when it seems like it doesn’t matter one way or the other. Just look at all the people who complain about the nerve of Steve Jobs to place the close-window button on the left. There’s no reason why the left side is better than the right side. Convention, however, says that […]