Monthly Archives: May 2012

Platter cake banner

Knowledge as Interconnected Nodes

In this article I will rant about a subject that I know nothing about. I think I’ve got some pretty good ideas, though.

What does it mean to know something? To know what a Lenovo Laptop is? To know how to play the guitar? Knowing something is very base in our minds as human beings, so basic that we barely question what it means to know something. How does our mind piece together data and conclude “I know X”? At the most basic level, via experience. The brain perceives events via its sensors – eyes, ears, tongue, skin, etc. – and stores data regarding those events in memory. Let’s say you ate some cake. It was one of those generic platter cakes you find at Safeway, so it was a bit dry and the frosting was sickly-sweet. The frosting was mostly white, but red letters spelled out a crude but funny in-joke for your co-worker, whose birthday you were celebrating. That last bit wasn’t so much a descriptor of the cake, but its importance will become apparent later. Now, when you think of cakes, specifically cheap platter cakes, what are the important characteristics you remember? Sweetness (sometimes too much!), rectangular shape, spongey inside that’s not as sweet, etc. Thinking of abstracted things (like a non-specific platter cake) doesn’t link to a bunch of pictures of cakes you’ve saved in your mind, it links to ideas that you’ve linked to platter cakes in the past. You can imagine each of these abstract objects as a node, whose defining characteristics are manifest as connections of certain strength or proximity to other nodes that characterize it.

Think of the platter cake as the node of interest: we know platter cakes. Platter cakes are connected to various nodes: it has a strong connection to sweet, a strong connection to celebration, and somewhat weaker connection to gross, etc. You can imagine that the abstract idea of platter cakes is portrayable as a long list of connected nodes and their affinities. For example, through a very convoluted memory of my own, platter cakes are also tied to 9/11. That 9/11 node connects to many other nodes, some of which may be ideas, some of which may be memories, but looking into the node that is 9/11 my brain automatically explores the other paths to a certain extent, filling out the idea of 9/11 that takes it past a series of characters to a collection of memories, ideas, and feelings. This description elicits images of the brain being a computer in a vast net of nodes (ideas, memories, etc) chasing nets around and receiving external stimulus via its sensors that may push it towards certain nodes, or even create new nodes.

This idea of knowledge as a connection of nodes also explains the “Eureka!” momemts that people experience. Their brain is sitting there, racing around its node-track, when some external stimulus pushes the brain in a certain direction. Perhaps it is puzzling about why objects are intrinsicly drawn towards the earth, and suddenly an apple strikes them in the head. In reaction, the brain examines the situation, checking out nodes connected to apples, etc, creating connections between nodes where it sees them, when suddenly, the track is completed! The disconnect between one set of nodes (theory) and another set of nodes (reality) had been connected via a short route! The brain races to compare other nodes in the close proximity, and discovers other connections that can be made. Sometimes, this leads the person to experiment more, gathering more data, and creating more connections until the idea is more complete and explainable to others in a way that will allow them to create the necessary nodes and connections. This even sheds some light on why two people that both “know about the same things” have trouble having in-depth communications about them. This is particularly true in the more abstract engineering practices.

Engineering itself is very much centered on individual contributors coming together to figure out problems. The problems discussed on the broad spectrum are usually not very abstract and are easy to imagine. Those problems share connections with very common nodes and connections, like those involving system architecture and communication. But, when the problem becomes deeper, and the separate parties have come to understand the same idea in different ways (described the same phenomena with different nodes and interconnects), it becomes difficult for them to have efficient conversation, as they spend time and effort fitting the other person’s ideas into their own web of nodes. When companies impose standards or hold large training sessions, engineers can much more easily discuss the topics due to the commonality of their node placement and interconnection.

mrs the hammer banner

Sangria de Mayo and the Importance of Branding

Sangria de Mayo is a wonderful holiday that my friends and I love to celebrate.  It involves participants concocting and bringing their own custom batches of sangria, a classic summertime alcoholic beverage.  Invariably, the best sangrias are designed from the ground up with a core motivation in mind.  This post is not about designing sangria, though.  It’s not about design choices at all.  It’s about marketing.

Sangria de Mayo was a recent pleasure of mine, as I’ve only attended the event in this year and the one previous.  Lets talk about the first one.  In keeping with my recent graduation from Washington State University, I figured I would show up to this party and show people how it was done right.  Sangria?  More like an opportunity to get people to drink hard A and wine at the same time.  So, I concocted the most imperceptibly alcoholic sangria I could – a mixture of Merlot, greapfruit, limes, lemons, vodka, and everclear.  Honestly, the taste that masked the alcohol was bearable at best.  In my excitement, I decided the beast needed a name: the hammer.  I’m sure you can infer why.  The real surprise was its amazing success:  I arrived at a party with a healthy supply of competitors; there were many flavors of delicious (sometimes beautiful) sangrias, and yet, mine was the first to run out.  Puzzling, in a singular instance.

Fast forward to a year later (tonight).  Sangria de Mayo is happening again, and I’d like to make a good showing.  Last time, though, my sangria was a bit abrasive: it was very much “in your face”.  You had to want it.  Instead, I chose to go for a white zinfandel base with sugar, fizzy energy mix, dissolved sugar, mikes hard lemonade, and everclear.  Even more everclear than last time.  And honestly, it was pretty good.  In keeping with its predecessor, and the pacman naming theme, I named the batch “Mrs. The Hammer”.  That’s all distracting from the point, though.  I showed up to the gala about 2 hours after it started (I can’t even call it fashionably late at that point – maybe Diablo 3 late?) and my batch of sangria was spent within the hour.  I received laments from other sangria makers that theirs hadn’t gone so quickly, even though they had shown up before I did.  Why was my sangria so popular in the presence of other, tastier sangrias?

 

The answer is marketing.  Others brought their sangria in a plastic drink carafe, others in emptied water containers, etc.  The most extensive labeling in theirs was sharpie on plastic in Spanish.  Mrs. The Hammer, though, was scrawled dangerously on a strip of white duct-tape in rough letters.  Customers (party-goers) saw the label and felt something: something dangerous, something mysterious, and something that would obviously make them have a fuck load of fun.  Without even considering the marketing I did in person, the package itself screams “yeah, this will get you crunk.  And you will like it.” Add to that the mystique of the genesis story, and the subtle description of its making leading gradually from the white zinfandel to the raspberries and eventually to the everclear.  The sangria is the embodiment of that girl/guy you don’t want to date, but god damn do you want to go have a night out with.  The branding is consistent, it speaks to the target audience at the party (people trying to have a good time), and it creates something for people to talk about to each other.  Even if they are disdainful, it still furthers the mystique of Mrs. The Hammer.  It’s the naughty one.  It’s the one that, secretly or not, everyone wants.  It’s branding.

And that’s the story of why my probably mediocre sangria always gets finished first.

coverflow banner

Coverflows on Android

You know what’s a sweet user interface element?  Coverflows.  They aren’t that great for what they were initially used for: selecting albums to listen to based on their album cover.  Turns out people really do know what albums are called, or just want to see the artist/track title.  But!  You know what they are great for?  Selecting objects (in the software sense) with the identifier as a picture instead of text.  This is primarily limited to selecting photos, and even then, some may say that a simple grid is more utilitarian for this task, and I would tend to agree, but this doesn’t address a big problem with selecting from a grid: it’s ugly!  Google tried to do what it could with the Gallery app, but the grid of picture stacks still looks plain.  It also separates different categories (stacks) in a way that isn’t ideal.  Anyway, for the applications I am pursuing, I want something that places more emphasis on the content of each picture, which has led me to the coverflow.

The first, and largest, problem with this is: there isn’t any sort of standard coverflow implementation that has been made for android yet!  I’ve seen examples in which people expand the Gallery view – which by default displays a horizontal list of pictures – such that it would rotate the pictures based on their position.  This has a variety of problems associated with it, though:

  1. Object spacing within the list is constant.  What you want is to have rotated images have increased density.  This way, you can see the edge of many pictures to give the user more information about what is further down the line in the list.
  2. The gallery extension is very slow!  Seriously.  My Galaxy SII couldn’t handle a 5 picture list.  And yes, the bitmaps being displayed were of appropriate resolution.
  3. The extension of the gallery, while convenient, isn’t constructed around the objective of creating a coverflow.  Things like minimum object spacing, maximum object rotation, focal length, etc. are all very awkward adjustments to make.

So!  What does this mean?  That I have to create a coverflow package, of course!  Due to the overtly 3D nature of the coverflow view, OpenGL ES2.0 will be utilized to create a lighter weight coverflow view with proper rendering of elements.  The topology of the package will be:

  • Coverflow (extends GLSurfaceView)
    This will be the top level class through which users will interface with the coverflow, setting separation, rotation shaping, picture size, etc.

    • CoverflowRenderer (extends GLSurfaceView.Renderer)
      This object will handle rendering of the coverflow, and will receive configuration specs from the parent Coverflow class.  It does the heavy lifting and will contain all the ugly code we don’t want the use to have to mess with.
    • CoverflowSquare
      The coverflow square class will contain all pertinent data required for each square in the coverflow: path to the picture to be displayed, size, byte buffers for rendering in OpenGL, etc.  It will contain limited APIs for updating byte buffers.

So far, I’ve got a cursory version of each of these made.  The coverflow renders the list with unity separation between pictures, rotates pictures based on position, and has a single pole IIR filter implemented to mimic the critically damped spring settling effect for when a user flicks it.  Oh!  It also ensures that it settles on an integer position, thus ensuring that a square is dead on, or “selected”.  The view is very snappy and is working exactly as expected.  Here is a washed out laptop webcam recording of the coverflow in aciton:

Going forward, I plan to clean up the code to increase usability, and implement more features to make the coverflow as pretty as it deserves to be.  When it gets to a respectable point, I’ll post the code somewhere so that others can utilize this view as well.

Thanks for reading!