Archive for February, 2009


Urban Legend: Swiffer is dangerous to pets

According to Snopes.com, swiffer products are _not_ dangerous to your pets. I had been guilty of perpetrating this myth. Someone smart told it to me, so I believed it.

That is, of course, unless you clean your floors with gasoline.


Things I’ve learned about programming: Simple API

I’ve been a programmer for about 15 years. I’ve rubbed shoulders with some pretty smart people. I’ve also had the pleasure to work with people who can’t quite grasp complex programming tasks or methods.

I _used_ to be a little pendantic. Granted, there is the occasional dope who is completely worthless and drags the team down. More realistically, though there are people who are more skilled in other areas, but can’t seem to formulate a consistent programming model in their head. They can do basic functional programming, but anything as complex as a void pointer is beyond them.

I completely respect this. Depending on the situation, it makes sense to have a core of competent programmers who understand the most bizzare software. They hack together a complex system, erect an API your mother would love, and then protect the users from the monstrous insides.

I’ve gotten flak from this from software people before, but let me explain my situation: I work with people who can design analog electronics where the lsb is in nano-amps. Nano-Amps. The same hardware can scale to hundreds of volts or amps, depending on the mode. This person is excused from knowing more than basic functional programming. These engineers are fully capable of figuring out complex loading, oscillating, timing, and noise problems. I can live with some API restrictions.

I’ve violated every rule or good idea I’ll put forth on this website, but here are some rules I can live with (C++ centric):

  • Replace anything with an index with an STL class or equivalent. std::Strings instead of char[] arrays, vectors instead of int[] arrays, and any number of multidimensional classes.
  • Replace for loops with for each loops. I know, it sounds trivial, but I’ve seen people fiddle with the conditional term on a for loop trying to get it right. Guessing to get it right. If they use a for each loop, they can skip iterators, and focus on getting simple tasks done.
  • Don’t use variable length function signatures, unless you are creating a wrapper for an existing function such as printf, or the like.
  • Opening a file, printing to a file,  and printing to the screen is hard for some people. Build them some tools that do both. Make sure they never have to see a pointer.
  • Don’t ever put preprocessor #ifdef statements in between { } brackets. 
  • Keep your functions below 20 lines. This isn’t even close to achievable, but it’s a good design goal. Once a function starts getting too long, it gets hard to understand. 

Some of you may be reading this and thinking that this is obvious. The rest will be thinking that I’m overly dumbing down the richness for the few. The thing that I’ve seen cost the most is code maintainence. 

I can build really awesome code, but when I move on because I’m bored and a hardware engineer has to decypher my code, I feel nothing but pain for them.

I’d rather leave my coding ego at the door and leave some code that is easy to change.


Topobo Kinetic Robot System

topobo
Now here’s a toy worth goofing around with. Although crazy expensive, it might be worth it, if only to have something to annoy my cats with. From BoingBoing Gadgets:

Topobo is a construction kit with “kinetic memory”, which mostly means that you teach the little motors in its joints how to move by physically twisting and shaping them with your hands. Some parts will respond directly to your ministrations, while others are slaved to “queen” parts and mimic her movements.


[via BoingBoing Gadgets]


Humorous DIY Van Ad

This van ad presents a weird intersection of events and circumstance.

Someone had the inventor’s spark. They built a better mousetrap (valve). That person was paired up with someone with some marketing spunk. That person was paired up with a budding copy writer with an advertising writing style from the 50s. Next, add someone who can print a reasonably good (yet pixelated) image on the side of a van. Lastly, find a van owner willing to brandish the ad on the side of their vehicle. Possibly even someone who would install said mousetrap (valve).

I have a sneaking suspicion that all of these roles were satisfied by one person. That mixture of ingenuity, action, and unintended kitsch make this world a beautiful place. Here’s a vote against specialization.


thumbnail


Guy Building Giant SpiderBot In Vermont Wilderness

From Bot Junkie comes a (long) series of videos of a REAL man. If the zombie apocolaypse happens (oh, and it will happen), I’m going to this guy’s house. He’s basicly building a giant hexapod robot that he can drive around in. Here’s a picture of his plans:Giant Robot Guy's plans
Check out his website. I havent’ gotten through all of the videos, but in order to build his robot, he first has to build a workshop. So he starts there. Did I mention that’s he’s completely off the grid? Yeah. Dude is making this robot from scratch, with very little resources. 
 

 
[via BotJunkie]


Young Republicans Keepin’ It Hip

From the Full Gisburg.


Microsoft SongSmith produces comedy gold

There’s plenty more where that came from too.  Glorious.


Long Exposure Photography

Long Exposure Photography
Here are some pretty nifty long exposure photographs. Recently on a rock climbing trip to Joshua Tree some buddies and me took some of our own long exposure photographs, just goofin’ around really. Here’s two:

Mayor Awesome in light
Mayor Awesome Lifting Weights

Pictures were taken by my buddy Val.


The Obameter: Tracking Obama’s Campaign Promises

Obama Meter
Politifact.com has a nice list of campaign promises made by Barack Obama and the current status of those promises. You can check it out here. It would have been nice to have a list like this for the last administration handy, and also a list of all of the scandals the GOP was dealing with. It seemed like for a few years, there was a new scandal every week. There were simply too many to keep track of. With this list we can at least keep track of this administration’s promises. Here’s a link to the only (so far) promise that has been broken.


Hey, thankless Jerks: Donate to This American Life. Right now.

If you’re a member of the white liberal yuppie elite, you probably listen to This American Life [wikipedia][podcast]. If so, you should go and donate at least $1. It costs them $150,000 a year to host the podcast.

Think about it. For the cost of $1, you can support something less inane than “Two and a Half Men” or “Everybody loves Raymond.”