Entries Tagged 'Technology' ↓

Jeff’s Christmas Wish List 2010

I have a dream gadget, actually, I have two.  It’s too late for these gadgets to be available for Christmas 2008, probably not even Christmas 2009, but 2010 is not too soon.  Thanks to the trend of gadget convergence, my Christmas wish list for 2010 has just two items.  Oh sure, some people want every tool and gadget in their home to converge into just one, but let me explain my two dream gadgets.

Gadget 1: My Pocket Media Device

Don’t worry, this is just a descriptive name, I’m sure that the fine folks in marketing will come up with a much better name for this device.  My pocket media device is about the size of an iPhone and has more than just size in common.  Of course, I expect this device to serve as my phone, messaging, and internet device.  I expect it also to play music, videos, and show pictures.  It should have GPS with turn-by-turn directions.  Flip it over and it should have a reasonable point and shoot camera.  This camera will have plenty of pixels and a good lens with zoom and auto focus.  If this device is going to replace a phone, music player, and camera it has to be good at all of them.  Very few phones are also good cameras; I want it to do both.  If I can talk interface for a moment, holding this device like a camera leaves my thumbs in the perfect position to pinch-to-zoom on the multi-touch screen.  Is this too much to ask?  I want a Phone-Messaging-Media-Camera-GPS-Gaming device that is actually good at all of it. Come on gadget-makers, get on that.

Gadget 2: My Netbook/Ebook Device

Netbooks are hot right now: they were some of the hottest devices of 2008.  What exactly constitutes a netbook is still a bit fuzzy.  Some say they’re defined by their impossibly small size, others their price.  I think the category is defined more by function.  A netbook should boot almost instantaneously, be heavily connected, and have a UI that provides quick access to the web, email, basic document editing.  Ok, it should have some sort of VOIP client and media player too, but since I already have a communication and entertainment device, I’m ok without those.  It certainly doesn’t need video editing, games, or a full desktop OS.  If twitter is what you do between blog posts then a netbook is what you use between trips to your desktop or full notebook computer.  This is not your everyday computer, this is the one you use while you’re out and need to do something quickly.  Ok, so far, I can get this device today.  Here’s what I want that’s different.  When the lid is closed it reveals an e-ink display for reading documents.  I want to be able to read books, documents, emails, whatever on a very low-power e-ink display.  Let’s take it a step forward.  If I’m reading a document for a co-worker or perusing my emails, I want to hit one button, open the lid, and the netbook will come right up to the document or email editor.  When I close the lid again, it’s my ebook reader once again.  I know that I don’t like reading on a back-lit display and I know that I don’t want to do daily tasks on an e-ink display, but why does that necessitate two separate devices?

Ok, there you have it, this is my 2010 wish list.  I want all of my devices to converge into just 2.  There’s one more very important thing, price.  If I have to spend $1000 for both devices, they’ll never take off.  Each of these devices should be a few hundred dollars and I guarantee that nearly every person in America will carry these two devices.  Come on gadget-makers, make my wishes come true.

Why my next computer may be a netbook

This post is the first in a three part series on the newest category of personal computers, netbooks and other minimalistic computers. If you don’t follow portable electronics, you may not be familiar with the term netbook. Netbooks belong to a new class of portable computers that are trying to fill a space between smart phones/PDAs and notebook/laptop computers. Unless you’ve been totally unplugged from technology news for the past six months, you’ve probably seen news stories about the One Laptop Per Child (OLPC) XO laptop and the Asus Eee PC, both of which are textbook examples of netbooks. Netbooks are cheap, small, low-power computers for doing just the computing basics. Why netbook? These computers are being aimed at a generation of computer users who exist completely on the Internet. Do you read your e-mail, get your news, pay your bills, watch your shows, and communicate with your friends and colleagues from within a web browser? Then you’re a prime candidate to purchase a new netbook. I sure am!

While some would credit the OLPC XO laptop with blazing the netbook trail, I think credit is due to Asus, the maker of the Eee PC. Please don’t think that I am trying to belittle the noble efforts of OLPC, but commercial success is not among their goals, unlike Asus. I have a hard time imagining the board meeting during which someone stood up an pitched the Eee PC. Let’s build a PC that is smaller and less powerful than a typical laptop, then we’ll put an OS that nobody has heard of on it, with an interface like nobody else’s, and sell it for half the price of the cheapest laptop on the market. Amazingly, somebody say okay and the rest is history. The Eee PC sold out before other computer makers could blink. Now the rest of the industry wants a piece of the action. The latest to announce an ultra-light, ultra-cheap netbook is Dell, who cleverly put a prototype into the CEO’s hands as he walked around the All Things D conference in May…bravo.

What’s so appealing about these minimalistic laptops? I work each day on one of the 10 fastest computers in the world, so I can tell you a thing or two about computer performance. Very few users need 1/10th the power that their personal computer provides, but every year we feel the need to buy faster and faster computers. Unless video editing, computer generated graphics, digital music production, or PC gaming is your cup of tea, you’re buying too much computer for yourself. While the aforementioned activities are becoming far more popular, likely due to the increased power available to computer users, an increasing number of people are using their computers almost exclusively as a portal to the Internet. If I can do this from a computer that’s lighter, cooler, cheaper, and probably consumes less power, why wouldn’t I? Even basic photo and video editing can now be done online. Face it, most people think photo editing means getting rid of red eye and cropping and they think video editing is adding transitions and music, all of which can be done online for free. Even when such activities need to be done on the local computer, netbooks have plenty of oomph to get it done for most people.

So where are netbooks lacking? Although one could do banking completely online, I feel that most people will still want Quicken or Money to keep their financial data close to home. I don’t blame them, that’s how I feel. While it may be practical to store one’s complete photo library online, it’s unlikely the someone will do the same with music and videos, so there still needs to be a machine somewhere in the home for multimedia storage hogs. Nobody is claiming that a netbook will ever be your only computer, but there’s been little talk about how to tie your netbook back to your home computer. I’ll address this more in a later post. The name netbook also implies that one really needs the Internet to survive with such a device. Cloud computing is the buzz work du jour, but wireless internet is not yet ubiquitous, so the netbook needs to remain useful, even when it is disconnected. Products such a Adobe Air and Google Gears seem so promising for such a computing environment, but they’re still very immature.

Personally, I think a netbook is a very appealing product. When I look at how my wife and I use our computers, I see us using a lot of computation power to do very little. I think a small, cheap laptop replacement is exactly what we, and most computer users, need for our day-to-day computing and I can’t wait to see future minimalistic computer products. I truly thought that my next laptop would be a Macbook (for reasons outside of the scope of this article), but now I feel fairly confident that our next computer will be a netbook. Portable, simplistic, cheap…it’s a win all around.

Be sure to come back for my next post in the series: Why Microsoft (and Apple) is missing the boat on netbooks.

Have you tried HAML?

A few weeks ago I heard about Merb on the RailsEnvy podcast and sat down to give it a try. I have some limited Ruby on Rails experience, mostly little things, and just wanted to play with the new Ruby web-framework. If you’re not familiar with Merb, it provides a lot of the same niceties as Rails, but while remaining completely agnostic about choosing things like JavaScript frameworks, Object-relational models, and template engines. This is how I discovered HAML (XHTML Abstraction Mark-up Language) or Markup Haiku, as the developer puts it. I’ll probably write about my experience with Merb in a future post, today I’m going to write about HAML.

So what’s HAML?

HAML’s designer calls it markup haiku. It’s a templating language that stresses structure and readability. HAML is a shorthand mark-up for defining the structure of a web page. It is a drop-in replacement for RHTML templates in Rails, although it also works in Merb and there is currently a PHP library in development.

What’s it look like?

Here’s a very basic page written in HAML. It’s important to note that HAML is space-sensitive, meaning that each nested element is indented with 2 spaces from the previous line. Likewise the resulting HTML will be well-formed and indented with 2 spaces. This may not be obvious in the output below.

!!!XML
!!!
%html{html_attrs}
  %head
    %title HAML Page
    %link{ :rel => "stylesheet", :type => "text/css", :href => "example.css"}
  %body
    %h1 HAML Example

Notice that html elements are marked with the % character. This is not just limited to valid HTML elements, any XML element can be noted this way. Notice that there’s no ending tags, HAML handles this automatically for you…very nice. If you’re a ruby developer, the stylesheet link line will look familiar to you. If you’re a python, perl, or PHP developer, this may look a little unfriendly, but should be understandable. The first two lines of the markup are my favorite part of writing HAML. As you will see below, those lines translate into the XML and DOCTYPE lines of the resulting XHTML document. Since I have to look-up these lines every time I write a new page, I love this markup. That’s enough suspense, here’s what it looks like in HTML:

<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>HAML Page</title>
    <link href='example.css' rel='stylesheet' type='text/css' />
  </head>
  <body>
    <h1>HAML Example</h1>
  </body>
</html>

What I Like About HAML

I am a stickler for readable code, so I really like both the HAML and resulting HTML. By forcing designers to indent each block of code HAML ensures that the code is readable and maintainable and also makes finding structural bugs easy. HAML also provides a nice shorthand for styled divs, rather than <div class=”foo”>, you can simply type .foo. This notation ought to look familiar to anyone who has ever programmed CSS. As long as the elements do not contain a lot of attributes, HAML’s shorthands are very convenient. Everything about HAML makes defining the structure simpler than RHTML (or PHP, for that matter).

What I Dislike About HAML

I have to stress the fact that HAML is for defining page structure. There’s no notion of inline elements (think <em>, <strong>, <a>) in HAML, only blocks. You can put standard HTML tags in the mark-up, and I’ve found it necessary to do this many times. For the sake of completeness, I’ve tried using HAML to maintain a static HTML page (admittedly, outside of HAML’s primary mission) and found mixing inline HTML and HAML structure a bit tedious. Problems don’t stop at inline elements, any element that require a lot of attributes, like an <a>, <img>, or <script> tag, are far more complex in HAML than in HTML. If you’re using CSS+HTML, this probably doesn’t affect your code too much, but it’s important to mention. In addition to these limitations, I find the choice to require exactly 2 spaces a bit arbitrary. It was probably a decision to make the parser simple and quick, but python, which also uses space-delimited blocks, is not so strict and has a very fast parser. This isn’t a big issue to me, since I generally use two spaces anyway, but if you’re used to 4 spaces or tabs, you may need to adjust. Finally, on several occasions the HAML parser on my machine would not parse the code, but the online parser would. The error messages from the local parser weren’t always helpful, but it tried its best to guide me to my error. It was frustrating, however, that the online and offline parsers had different behaviors.

Final Verdict

I must admit, when I first saw HAML, I thought to myself “What’s the point?” I was quickly won over. For what it is, a simple template language and RHTML replacement, HAML is very good. I love the quick shorthands and neat code. Its limitations are few and easy to overcome. It’s now my template language of choice for Rails and Merb. I’m reserving judgment about using it in PHP applications, but as the PHP library matures, I’d like to give this a shot. I’d really love to see a tool that will let me use HAML templates to easily maintain static HTML pages. If you’ve not tried HAML, I really do suggest it.