In defense of crappy programming languages

I've been doing a lot of Javascript and Python lately, and they're both kind of crappy, quirky languages, but are fun. There aren't many languages that aren't quirky. C and Scheme and Lisp come to mind. Maybe Java and C#, too.

ImportError: No module named site (Python, Apache2, Django, virtualenv, Dropbox)

I was getting a lot of this error:

ImportError: No module named site
ImportError: No module named site
ImportError: No module named site

Javascript Double Exclamation

It's a way to cast any variable to a boolean.

var x = true;

!!x === true; // this is a fact

Sometimes, we do a check on an object:

if ( {

However, if we assign a variable like this:

var isFoo =;

isFoo will now contain a reference to 
If you want isFoo to contain the truthyness of, you do this:

var isFoo = !!;

A Few Ideas for Mobile Augmented Reality Apps

I've been playing a game called Ingress and it's got a lot of interesting ideas in it, because it's like a tour guide to public artwork. Here are some ideas for more apps, specifically around LA.

LA tour of the Mexcian-American war.

LA tour of the old Chinatown and the New Chinatown.

Something that lets you record audio at a location, and when someone else goes to that location, they can hear the audio.

The same thing for historic photos and photos.

The same thing for poetry and spoken word texts and written texts.

The same thing for music.

Nesting Angular Directives

I've been learning how to write directives, and it's really tough to grok how to do it. This blog post's been rewritten three times so I don't come off as totally ignorant about the "right way" or "the Angular way" to do things.

What I'm trying to do it implement a menu display with lightweight, role-based control over what is displayed.

My first iteration was done entirely with controllers, HTML, and jQuery and plain Javascript. That was clearly not the Angular way, so I revised it a little bit - CSS animations, and let's use directives.

Angular Service and Factory

I was reading the docs, and read things that seemed to contradict what I thought. I thought that Services were singletons, and Factories were instantiating new instances. It turns out that's not quite right. It's explained well here.

Base32 Encoding and Decoding in Javascript

This is a simple implementation of base 32 encoding and decoding that conforms to RFC 4648.


I just had to update my JS toolchain of node on up. NPM is insane. Not just the tool, but the packages.

CSS Animations using Transitions with Conditional CSS, Stacked Rectangles

This is a somewhat elaborate example of how to use conditional CSS and transitions to create a fluid, responsive stack of rectangles that are polite enough to stack up when the screen is narrow. The idea is I'm working on is to have a menuing system that stacks when the screen shrinks.

CSS Animations via Transitions

I don't know anything about CSS Transitions, so I made this little demo to try it out. It's ultra-simple, and I normally wouldn't post this kind of thing, but the examples I saw were a lot snazzier, so it was harder to read the code. (To this end, this is probably too fancy.)

CSS Animations via Styles (similar to jQuery animations)

This article is a little obsolete, because the latest way to do animations is via CSS Transitions but browser support isn't all there yet. This explores how to do CSS-style based animations, where the animations are controlled via Javascript code that adds and deletes class names from the className property.

Cloud Storage Reviews Dropbox, OneDrive, Google Drive, iCloud

If you want to read some professionally written reviews, I read these:
PC Advisor
PC Mag
My review will be a lot shorter: Dropbox. Explanations below.

Sending an Email When an Event Happens (Windows Server and Powershell)

So... we got these servers a couple years ago, and the event logs don't email me things anymore. It was one of those things that I forgot to check because it's something you just don't check, but it's important. I ended up seeing the alerts late. No harm - no foul, but it still sucks.

The problem is, the latest Windows servers don't have a built-in feature to email events from the event log. The fix is to run a PowerScript script to send the message.

Netgear GS105PE VLAN Configuration Notes

The docs are kind of sparse on this, and they really push the simpler "port based vlans". That's not what you want. You want the advanced 802.1Q setup, which is the type of VLAN used on most managed switches.

Script to Turn IP Camera Uploaded Images into Videos (Unix)

This script combines individual photos into a video, and adds a timestamp to each frame. It's a poor mans security camera video maker.

Syndicate content