I’m happy to announce the launch of our open source Google Glass Lifestream & Backup Tool for Mac OS X. In order for it to work, you must first turn on debug on your Glass: Settings > Device info > Turn on debug (see notes below as to why we do this). After backing up [...]
Category Archives: programming
iOS internationalization from day one
A few days ago we did a private beta release of the Babatuba Collage App. Here’s the map from the first 72 hours: Babatuba was to be international from day one, this decision fundamentally directed the product. Many aspects of an application change as a function of your audience’s locality. Sina Weibo is popular in [...]
Caching with NSCache, or, The most underrated Objective-C Class
“There are only two hard things in Computer Science: cache invalidation and naming things.” —Phil Karlton There are four things you need to know about NSCache. The first, and most important: NSCache exists. I recently wrote a cache object in Objective-C, this was a mistake. I Google’d “objective-c cache class”: Top results looked uninteresting and [...]
It’s programming from here on out
There comes that point in every project where the “hard” part has been solved. Where the learning curve has been topped and one can start getting into the flow. The hacker equivalent to “smooth sailing from here on out”: “It’s programming from here on out.” Happy hacking.
Compiling vim with python support on Arch Linux; or, just using gvim
I was looking forward to using ConqueTerm on vim but was confronted with the following error: Conque ERROR: Python interface cannot be loaded Your ersion of Vim appears to be installed without the Python interface… Alas, the eternal struggle between convenience & elegance. Because I should be doing more important things than blogging, I slapped [...]
Bjarne Stroustrup Talk at UMich Notes
Bjarne Stroustrop 2011年 11月 09日 星期三 17:18:36 EST ——————————————————————————- Multi-paradigm is not good enough Light-weight abstraction – software infrastructure – resource constrained No one size fits all – 1st to market – If program fails, pepole die – 50% overhead implies the need for another $50M server farm What we want ——————————————————————————- Easy to understand [...]
Fun with Triangular Numbers + Triangular Corporate Logos
I’ve always been fond of triangular numbers [1] and found the pattern they create beautiful. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [...]
An elegant pythonic solution to – TypeError: is not JSON serializable
So if you ever have to deal with python and JSON at the same time, I’m sure you’ve run into this problem at least once. With Baybo, the typical example of this is failure for json.dumps to successfully coerce Decimal objects into strings (go figure). Anyways, the solution to the error above is simply: dictionary [...]
Working with utf8 (like Chinese) with sqlAlchemy + Elixir
Today I’ve been playing around with sqlAlchemy and Elixir. I was having problems with how some strings (Chinese Characters) were being encoded and stored. The issue was with the metadata.bind statement (create_engine() without Elixir) before it was: metadata.bind = ‘mysql://username:password@localhost/database’ You need to select utf8 encoding manually. metadata.bind = ‘mysql://username:password@localhost/database?charset=utf8′ or, plain SQLAlchemy: db = [...]
back button doesn’t revert, reload, retrigger scripts | jQuery + JavaScript
The answer to this tricky question, after much google searching came down to be the way in which the WebKit Cache works and how the unload event is not fired when the page is called from cache. the following solution worked for me; adding the onunload=”” to the body tag. another solution is to create [...]
