Friday, April 30, 2010

Henry Ford's "Thoughts on Horses"

The idea of gas engines was by no means new, but this was the first time that a really serious effort had been made to put them on the market. They were received with interest rather than enthusiasm and I do not recall any one who thought that the internal combustion engine could ever have more than a limited use. All the wise people demonstrated conclusively that the engine could not compete with steam. They never thought that it might carve out a career for itself. That is the way with wise people--they are so wise and practical that they always know to a dot just why something cannot be done; they always know the limitation...

Recently, a friend was telling me that DSLR cameras will never be supplanted by cameraphones. As of 2010, it seems a silly proposition. But that's seeing camera technology as they are now, not what they will be.

I don't think DSLRs will ever go away, like the radio never went away. But I don't think it's infeasible that cameraphones will get better and better so that for many DSLR users now, it would get 'good enough'.

I sent him the post I wrote on this subject. But I don't think he read it.

Posted via web from The Web and all that Jazz

Thursday, April 29, 2010

Back to HATEOS and APIs

REST-like discoverability could also be a boon for some services. What if Twitter provided something like this along with a tweet’s JSON?

{  "actions": {  "Retweet" : { "method":"POST", url:"/1/statuses/retweet/12345.json" },  "Delete" : { "method":"DELETE", url:"/1/statuses/destroy/12345.json" },  "Report Spam" : { "method":"POST", url:"/1/statuses/retweet/12345.json", params:{"id":12345} }  }  }

YES. I had talked about this in the HATEOS post that I wrote a while back. Right now, only html is self-discovering. XML and JSON docs should also have self-documented descriptions of next actions a client can take. That way, you'd cut down on the amount of documentation requires to understand or use an API.

One good point brought up in the comments in that last point was that if I had internal links, a client is likely to know what to do with what it gets back. But if I linked outside of my service, say geonames.org, how would I understand the schema? There's no standardized set of tags for geolocation data, like there is hypertext data.

Until we get standard media types for specific kinds of web applications, I'm afraid we're stuck.

Posted via web from The Web and all that Jazz

Tuesday, April 27, 2010

How to kill an unresponsive ssh session

approach has been to switch to another terminal window or shell and then killing the process in question. Today I happened to be skimming through the ssh client’s man page and I found a section about escape characters. Suddenly I gazed upon the glory of the disconnect key sequence: a newline followed by ~.. It works like a charm. As always, I thought I should

That's something I've been looking for a while now. I don't know if this is just bad user interface, or if it's awesome that it has a surprise feature.

Posted via web from The Web and all that Jazz

Friday, April 23, 2010

Whiteboarding

Our new whiteyboard solving factorial problem

Posted via web from Dumping Grounds of the Web

Monday, April 12, 2010

Facebook | A Dismal Guide to Concurrency

Two people can paint a house faster than one can. Honeybees work independently but pass messages to each other about conditions in the field. Many forms of concurrency [0], so obvious and natural in the real world, are actually pretty alien to the way we write programs today. It's much easier to write a program assuming that there is one processor, one memory space, sequential execution and a God's-eye view of the internal state. Language is a tool of thought as much as a means of expression, and the mindset embedded in the languages we use can get in the way. [1]

There's a really interesting idea in this post. It's that in the CAPs theorem, consistency usually get the boot, and we find that it's not the end of the world. Updated state needs to propagate through the system, and hence, you get a speed-of-light effect like in the real world: light(information) has a finite speed, and you need light-cone diagrams to show you what you're talking about.

Posted via web from The Web and all that Jazz

Speed up Rails tests when using Compass

So here's a little tidbit.  When you're using Compass with Rails, check to see if it slowed down your tests.  I used test_benchmark, and saw that it increased my test times 3 fold.  I narrowed it down to the initializer/compass.rb files that gets loaded.  Tests should need to use Compass at all to make it work, and just wrap its contents, like so:

if RAILS_ENV != "test"
  require 'compass'
  # If you have any compass plugins, require them here.
  Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.config"))
  Compass.configuration.environment = RAILS_ENV.to_sym
  Compass.configure_sass_plugin!
end

And that'll do it.  

I got too lazy to put this in a gist.  It'd be really nice if posterous let you edit gists in-place in their editor.

Posted via web from The Web and all that Jazz

Friday, April 02, 2010

More Ubuntu-ing, less ranting about the iPad

The technorati over at HN are talking about Cory Doctrow's rant on the iPad.  

Much of the sentiment that I hear opposing it seem to be in the vein of:

The point is, Cory Doctorow is in a small, small minority. The minority isn't small because people don't know what he's saying -- it's small because they don't care. He's protesting the very philosophy that gives Apple products the quality that people who buy Apple products desire. And honestly, making the openness of Apple products your raison d'etre is a bit like getting furious about the mechanical details of your favorite brand of dishwasher. The answer is always the same: don't like it? Don't buy it.
 - Comment on HN

I think what Cory Doctrow is saying matters, but I don't think it's sufficient.

It might not matter much to most people in the world, at least not directly, if you assume most people are just consumers, not makers.  But it should matter to us as makers, and matter to those of us that want to cultivate and provide a place for future creatives.  Without a sandbox to tinker, you have less tinkerers.  

And in addition, we've seen that when you lower the bar, and invite "most people" to tinker, they will.  They'll be rough around the edges, but they will, and some of the stuff they produce are some good shit.  How many writers and video producers would you never heard of if not for blogging and youtube?

What's dangerous is not the iPad itself, but the perpetuating notion that people are just consumers.  The world can only suffer from less makers and tinkerers.  

I do agree that iPad is a fine machine.  And that Apple has presented their wares, and we have brought into their conditions.  To me, that means instead of railing against closed platforms like the iPad, open platforms really need to step up their game.  Open platforms need to take user experience and design into account, like what Ubuntu has done for linux.  

Open source/hardware are very good at building well known and well understood platforms, not new and innovative platforms.  

The best that open tablets can do is be very good and fast followers.  It's not sufficient just to rant.

Posted via web from The Web and all that Jazz