Infinity File

Infinity File I’ve recently become addicted to Fab.com, a Groupon-esque website for designy products. I made my first purchase this past week, the Infinity File by designer Barbara Flanagan. It’s a modular desk-top organizer for anything from business cards to loose nick-nacks. I find it to be the perfect solution for small items that lie awkward in a drawer, but appear messy on the desk-top. It’s made from a single sheet of metal and holds a good weight. My only gripe is that the vertical stacking shown in its product shots is very wobbly.

Luminant Point Arrays by Stephan Tillmans

Luminant Point Arrays

My buddy Luke pointed me to this series by Stephan Tillmans entitled, ’Luminant Point Array.’ Each photo represents the turning-off phase of a different television. I’m in love with them and would die to have one hanging on my wall.

Day One — potentially my first successful journal ever

Day One

A few weeks ago, I tweeted about creating a private Twitter account to use as a journal. I dropped the idea after realizing that Twitter limits the number of viewable tweets to 3200. Cue Day One, a new OSX journal app. With a clean UI and simply gorgeous icon, the design alone sold me.

Day One

Its desktop version ($9.99) utilizes a menubar window for quick and easy entries, and an accompanying iOS version ($0.99) syncs through Dropbox. Notifications appear throughout the day, reminding me to make an entry, which is just the motivation I need to keep with it. The only downside I see so far is the lack of a global hotkey. No worries, as it’s expected early April. Kudos to Paul Mayne on a job well-done.

Comparing 64-bit numbers in AS3 and SQLite

When Twitter introduced Snowflake, their new ID generator, they also introduced 64-bit IDs. At first, I didn’t think much of this. When the Twitpocalypse occurred (Twitter IDs surpassing 32 bits), I updated DestroyTwitter to use floating point IDs instead of integer IDs. I figured with Snowflake that AS3’s floating point class, Number, had me covered. I was wrong.

It turns out AS3 doesn’t support 64-bit numbers. To support Snowflake, I have to update DestroyTwitter to use string IDs instead of floating point IDs. A handful of problems arise because of this. For one, I must reformat DestroyTwitter’s local SQLite database to use TEXT columns instead of REAL. Also, string comparison doesn’t exactly behave the same as number comparison. For example, 9 > 1 because 9 comes after 1.

To overcome this inconvenience, we need a more complex method of comparison than a simple < or >. We could left pad the string with zeros, but this is expensive in AS3 and impossible in SQLite. I prefer comparing the string lengths first, then the strings as numbers:

newID.length > oldID.length || newID > oldID

Just like AS3, SQLite lacks support for 64-bit numbers. You would think the same comparison method in SQL syntax would work:

length(newID) > length(oldID) OR newID > oldID

It doesn’t. AS3 and SQL differ in the way each handles conditions. In AS3, the conditions relate to each other. If the first condition is false, the second condition assumes the first condition is false. For example:

booleanA || booleanB

really means

booleanA || !booleanA && booleanB

SQL, on the other hand, treats each condition separately. It acts like this if it were in AS3:

if (booleanA) callMethod();

if (booleanB) callMethod();

As a result, our SQL comparison must be a bit more explicit:

length(newID) > length(oldID) OR length(newID) = length(oldID) AND newID > oldID

Hopefully, AS3 and SQLite will support 64-bit floating point in the near future. Until then, we’ll have to resort to workarounds like the ones above.

Today's Cuts

While slicing the bread for my sandwich this morning, I forgot I was holding the bread and cut into my finger. In a race to meet the shuttle, I found this more inconvenient than painful. I wrapped a scrap of paper towel around the cut, tied it with a rubber band, then replaced it with an actual band-aid once I arrived at work.

At lunch, I pierced my skin again while closing the refrigerator door—this time in the exact same spot on the opposite index finger. I recycled the previous cut’s band-aid, transferring it from one finger to the other.

Hours later, I washed my hands and removed the now worthless band-aid. The cut must have re-opened some time thereafter, resulting in a dense scab, raised from the cut. These photographs depict today’s cuts.

Todays Cuts

Todays Cuts

Letterpressed InDesign icons

Today, a few of my co-workers at Adobe handed out these letterpressed posters of InDesign’s type icons, as holiday gifts. Anyone can appreciate the detail on this print, but those who know the process should be in awe. I’m in love with it and just had to take a closer look. At 500%, the black ink looks like iron filings and the grey looks like one of my dog’s dirty stuffed-animal toys! I was told the local printers simply wouldn’t take the job because it’s too detailed, so they had it done in Santa Barbara—doesn’t surprise me. Seeing it in person makes me wish I took letterpress classes in college when I had the chance.

Letterpressed InDesign icons Letterpressed InDesign icons Letterpressed InDesign icons

A super ghetto way of getting a function path in AS3

In my recent collaboration with Kristofer Joseph, CandyPants, we needed a way to get the path to any function. At first, I tried describeType, which returns an XML object with all sorts of useful goodies about the provided object. Unfortunately, it’s not possible to send it the function you’re in without knowing it already. Luckily, I still have a hacky side that will consider the grossest code as a last resort. Here’s the result:

public static function getFunctionPath():String
{
  return (new Error().getStackTrace().match(/at [^)]+\)/g)[1] as String).substr(3);
}

Konami Code added to DestroyFramework

Konami Code

Sure, I could have spent tonight working on useful features for DestroyTwitter, but no, I wrote a KonamiCode. To use it, simply instantiate it with a stage and you’re good to go.

package com.destroytoday.desktop
{
        import com.destroytoday.desktop.KonamiCode;

        import flash.display.Sprite;

        public class KonamiCodeTest extends Sprite
        {
                public var konamiCode:KonamiCode;

                public function KonamiCodeTest()
                {
                        konamiCode = new KonamiCode(stage);

                        konamiCode.executed.add(konamiCodeExecutedHandler);
                }

                protected function konamiCodeExecutedHandler():void
                {
                        trace("woohoo!");
                }
        }
}

On a related note, I realized I’ve been neglecting GitHub for months, but now I’m back! I also plan to return to the experimentation game after reminiscing about my convex hull, delaunay triangulation, and voronoi studies at work today. When you develop apps all day, writing experiments can be a breath of fresh air, allowing a level of creativity you simply can’t get with apps.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5