The Redis Manifesto

Salvatore Sanfilippo, aka @antirez put up his Redis Manifesto earlier this week. While many of the points he makes are specific to Redis, a few should ring true to any programmer that considers programming to be more akin to art than science (which I do).

Anyway, I wanted to post some excerpts here so I don’t loose them.

4 – Code is like a poem; it’s not just something we write to reach some practical result. Sometimes people that are far from the Redis philosophy suggest using other code written by other authors (frequently in other languages) in order to implement something Redis currently lacks. But to us this is like if Shakespeare decided to end Enrico IV using the Paradiso from the Divina Commedia. Is using any external code a bad idea? Not at all. Like in “One Thousand and One Nights” smaller self contained stories are embedded in a bigger story, we’ll be happy to use beautiful self contained libraries when needed. At the same time, when writing the Redis story we’re trying to write smaller stories that will fit in to other code.

5 – We’re against complexity. We believe designing systems is a fight against complexity. We’ll accept to fight the complexity when it’s worthwhile but we’ll try hard to recognize when a small feature is not worth 1000s of lines of code. Most of the time the best way to fight complexity is by not creating it at all.

7 – We optimize for joy. We believe writing code is a lot of hard work, and the only way it can be worth is by enjoying it. When there is no longer joy in writing code, the best thing to do is stop. To prevent this, we’ll avoid taking paths that will make Redis less of a joy to develop.

STI: Blood Based Fuel Cells

A few months ago, a group of co-workers and I were sitting around brainstorming about the future of mobile devices. Specifically, we were interested in the limitations of current implementations. While we all had our favorites (screen, input methods, UI, software defined radio, location, etc.), the one problem that everyone agreed was the most pressing was the current state of battery technology. Obviously, if you don’t have power none of those other advances can happen.

Batteries are problematic for a number of reasons. Toxic chemicals and processes used in their production, weight, heat and even the size of current batteries make them less than optimal. It would be preferable to develop an energy source for a low-power mobile device that didn’t have these issues.

The movie “The Matrix” introduced (to popular culture at least) the idea of using a human body as a battery by capturing the heat created from normal metabolic processes. In theory, I suppose you could do something like this to power a device, but the efficient capture of radiant heat from your body would be exceedingly difficult. Some interesting work has been done recently involving the capture of kinetic energy generated during locomotion. Another great idea, but the apparatus need to capture that energy is cumbersome and heavy. Solar and wind power generation have their advantages in terms of being green, but you’re at the mercy of the weather. Are there other sources we might use? What about blood?
Well, not blood specifically. Rather, the sugars contained in our blood that powers our bodies.

The microbe Rhodoferax ferrireducens, discovered in the deep mud of Oyster Bay, Virginia is an interesting little bug. R. ferrireducens is able to consume regular sugars (including glucose) while at the same time producing a constant electrical current. Some experimentation has been done with this bacteria to generate electricity with some success. But as far as I can tell the sugar sources have mainly consisted of cane sugar, cereal grains and the like. My suspicion is that the development of a “blood glucose fuel cell” might be possible using this sweet-toothed bacteria and the glucose we carry onboard our bodies every day.

Here’s a simple mock-up of how it might work.
Blood Fuel Cell

Blood enters a chamber which is split in half by a plasma and glucose permeable membrane. Blood cells and other elements in the plasma are separated on one side of the membrane, and the bacteria on the other. Glucose flows between both with ease.

As the glucose is consumed by the bacteria, oxidation occurs. As a result, an electron is freed and picked up by an array of electrodes which are transferred to a device or stored by some method.

Of course, I’m not a biologist or electrical engineer. But it seems like it would be possible in theory. If you happen to be a biologist or electrical engineer, I’d be very interested to hear what you think of this idea. Possible? Crazy? Possibly crazy?

Update: It seems that quite a bit is happening in this area. Who knew?

STI: Lamp with Notes

As you may know, I hate having clutter on my desk. That was the point of the Monitor/TV Shelf I wrote about in an earlier post. But boxy stuff isn’t the only thing that I want off my desk. I want paper off it too.

Now, while I’ll in the infant stages of going paperless (more on this soon), I still have papers sitting around in piles on my desk waiting for me to do something with them. Bills, post-it notes, receipts, dentist appointment reminders, etc. I have a little desktop organizer thing that let’s me at least pile stuff in there, but again…that’s sitting on my desk and is still pretty much an unorganized pile of stuff. Stuff that I’ll probably forget about.

Go into any restaurant with a short-order cook, and you’ll probably see a metal wheel on which the wait staff place orders. When the cook is ready, it spins the wheel around to the next order, removes the order ticket, whips up a nice plate of hash and eggs, and spins the wheel again. It seems pretty efficient, and it keeps the order tickets off the counter.

That might be useful on a desk. But it would be a little weird to hang one of those from your ceiling. But what if you could integrate a somewhat smaller version on a desk lamp? Do it up nicely in brushed aluminum and a thick, heavy slab base and it might actually be nice to look at.

SpinningNoteLamp

STI: Consumer Specified Advertising

I hate advertising. Hate it. And it’s not because I’m not interested in what services or products are available. Got an interesting gizmo, doo-dad or jeejaw, and I’ll be the first in line to pick one up. The problem with advertising is that advertisers take a shotgun approach to targeting. This is especially true in television, where targeting seems to be focused on age or gender and not much else. The web is a bit better in that sites often have a much narrower demographic than, say, the latest NBC sitcom.

Still, this is a scattershot approach. Just because I’m on your site doesn’t mean I fit your demographic. For example, I just pulled up the site for the FOX show “House”. The advertisement was for Windows 7. I use a Mac. The main FOX site shows ads for AT&T. I already have AT&T. Those bits and my attention where just wasted because FOX (or its advertising network) attempted to guess what I wanted. Or, maybe they didn’t guess at all. Either way, it was opportunity lost for the host and the advertiser.

A better approach would be to actually ask me what I’m interested in. Then ONLY hit my eyes with advertising that appeal to my specific interests. This is what I call Consumer Specified Advertising.

as seen on tv

These interests might be general (gadgets, for example) or specific and time limited (vacations to Mexico in May). They might even vary during the time of day, or my current location. For example, if I’m working from my work computer, an advertiser might try to focus ads related to my work interests. While at home, I could receive ads for interests related to hobbies, etc.

Doing this on a site-by-site basis won’t scale of course. If I have to enter advertising preferences on every web site I frequent, I won’t do it. But if I could provide that information to a central location and let sites know about that location when I visit their pages, then it wouldn’t be such a chore. Additionally, my preferences can follow me to ever site I visit. By doing this, I hopefully never see another ad for mortgages or cruises when I’m not likely to purchase such an item.

So, here’s how I believe something like this could work:

  • Create a online service where I can store my preferences. My preferences consist of words chosen from a controlled vocabulary or loose folksonomy of topics. Each of these preference items are represented by a URL, which when resolved returns a list of synonyms or similar terms to the preference value I’ve set.
  • Serve my preference values from a single URL. Perhaps my preferences can be found at http://www.csa.org/thebrianmanley. Fetching that URL returns my list of preferences and some number of similar terms. Alternately, if I have a web site of my own, I can simply host a file containing my preferences there.
  • Tell my browser where my preferences URL can be found. Using a plugin of some sort, configure my browser to include a HTTP header that indicates where my preferences URL is. For example, a header such as “CSA-Profile: http://www.csa.org/thebrianmanley”. The browser should then, for every request I make, include that header.
  • Implement, on the server, a method to fetch my preferences URL, extract the preferences I’ve set and then find advertising that matches those preferences.
  • Profit!

It’s easy to see how you could also extend this in several ways. For example, including a list of my friends; their preferences can be fetched and used to enhance my own since we’ll probably have similar interests and tastes. Also, let me “announce” in my preferences what I’ve bought so that advertising for accessories, refills, whatever could be shown to me.

Yes, there are issues. How do you get people to opt-in to something like this? Is the promise of better advertising enough? You also need to get content providers to buy in and either partner with an ad network or create your own. Not a weekend project, for sure.

Now, somebody get cracking on this so I don’t have to see another stupid home mortgage ad ever again!

STI: LCD Monitor/TV Shelf

Desk clutter drives me insane. In theory, I could hide most of the the things ON my desk by putting them UNDER my desk. But for most things on my desk, that’s not practical. I need to see it, fidget with it, put a disk in it, watch the lights on it, etc.

So I came up with the idea of attaching a shelf to my monitor(s) on which I could place stuff. I built a prototype, but the build quality sucks and it’s less than attractive. Nevertheless, it works pretty well. I can put my XBox, my PS2 and a Roku player on top of a 26″ LCD television with no problem.

I think this is actually a marketable idea, but as usual, I don’t have the time or interest in actually trying to build a business out of it. So if you’re so inclined, please steal this idea, bring it to market and make a bunch of money. Just be sure to send me some for free!

Okay, so here’s the thing: Mount a bracket to the VESA mount found on most if not all monitors and televisions. To this bracket, attach a set of telescoping extensions arms; one going up to support the shelf, and one going down to add support. Slap a shelf-like surface on the top of the upward moving extension arm. Profit!

Rear View

Side View

Bucky, Bush and Bell: Is Total Recall on the Horizon?

I forget stuff. For example, I forget that this blog is here and that I should post something once in awhile. But I also forget important things; did I take my medicine? What did I eat yesterday before my headache started? How many cigarettes did I smoke today? Have I paid the mortgage this month? Who’s this person in this picture? What did I accomplish at work this week? You get the idea…

Buckminster Fuller (of geodesic dome fame) didn’t seem to have this problem. He simply wrote down or filed away everything into a giant compendium of his life which he called the Dymaxion Chronofile. “Dymaxion”, because he seemed to give everything that name. And “Chronofile”, because the files were created and kept in chronological order. Get it? Anyway, every fifteen minutes Bucky would note in a journal what he was doing or feeling or did or was about to do. His was probably the most documented life ever lived. If stacked, the pages would be 270 feet tall.

memex

Vannevar Bush proposed a machine, the “memex”, so solve this sort of problem for people like me (and you). Writing for the Atlantic in 1945, his article “As We May Think” proposed a wonder-desk that would store, catalog, classify and retrieve all the information that we generated or acquired as part of our day to day lives. This would be done “simply by the clever use of relay circuits”. Uh, right. Not in 1945 you ain’t.

Gordon Bell (of VAX fame) at Microsoft Research picked up on these ideas several years ago and decided to take a stab at documenting his life also. Box by box, he began scanning documents and photos, creating complicated directory structures and file naming conventions, recording phone calls, every email, means, biometric information, location information, etc. This “lifelogging” project and the resulting software tools were dubbed MyLifeBits, and is the subject of his book “Total Recall”. Oddly, he seems to have omitted any mention of Buckminster Fuller, but does tip his hat to Bush several times.

Total Recall is a fine book, if a bit light on the implementation details. Bell spends most of his time creating use cases and then demonstrating how situations can be improved when an “e-memory” is available to assist us. His scenarios include the typical office worker, health care, education, memorials, etc. Bell also considers the negative ramifications of storing everything. Obviously, if you store it, you can loose it or someone can steal it. Certainly privacy and security are issues when dealing with e-memory systems. We should probably spend some time figuring out the legal framework that will protect (or not) your life’s data. But I guess we’ll cross that road when we get to it. If you’re interested in this kind of thing, you might check out Robin Williams in “The Final Cut”, where all sorts of thorny issues surrounding e-memories are explored.

So while I’m convinced that storing everything is generally a good idea for us, society and future generations, I’m stuck on the implementation. When so much of our information is scattered among dozens of applications, devices and web sites, how could it be tracked, cataloged, annotated, archived and searched? A giant bucked of data in the cloud to which all your stuff is dumped? Distributed data stores that are crawled by software agents to gather information and synchronize it? Some hybrid approach?

This is fun stuff to day dream about. And I’m tempted to actually do some development of small tools to help bootstrap my own e-memories.

Concents, Avouts and Technological Monks

In his book Anathem, Neal Stephenson paints a detailed picture of a futuristic other-world in which the intellectual elite confine themselves in concents. These concents are comparable to the monasteries that we know today. But instead of religious contemplation, the avouts that populate these concents spend their days studying physics, mathematics, genetics, astronomy and other heady subjects. These avouts spend their lives in the pursuit of truth without consideration of fortune or fame.

CC BY-SA paukrus on flickr

While reading this, I could not help but find myself drawn to the idea that living in such a place could be utterly fulfilling. I’ve always been discouraged by the fact that we spend so much of our lives making a living instead of making a difference. What a joy if your entire existence revolved around nothing but the pursuit of discovery in the field of knowledge that you love, for the benefit of mankind, and without the overhead that modern life imposes on us.

There is little doubt that society is running headlong into a plethora of social, scientific and ethical problems. Global warming, energy demand, emerging diseases, genetic engineering, overcrowding, famine and war seem to be ever more present on the news each night. Government certainly won’t solve these problems, and the general public seems to dismiss them as either conspiracies or problems that can be ignored for the time being.

Would a system of technology focused “monks” be able to solve these kinds of big problems? How would it be funded? Who would be chosen?

Just a thought…