Farm Development

Thoughts on The Future

back to all thoughts

Making Erlang indentation-sensitive

posted in Erlang, Python, The Future by kumar on Monday Apr 28th, 2008 at 5:56p.m.

Ulf Wiger has been experimenting with making Erlang indentation-senstive. He followed up with a Part 2 after comments.

For most people who start working in the Erlang language, the most annoying new concept is all the various line-terminators you have to know. Damien Katz sums this up nicely. All these explicit terminators might make other people's code easier to read but writing code should be easy too (they are equally important). Mue says just get over it but as a Python user I agree that Erlang would be way better off if it was indentation-based so this was an interesting experiment.

As for Python, I'm still shocked to hear people say "Python would be nice ... if it wasn't for that whitespace thing." Who is perpetuating this? I have no idea. The next time you hear someone say this, pass along Python: Myths about Indentation!

PyPi (Cheeseshop) on Google App Engine

posted in Google App Engine, Python, The Future by kumar on Tuesday Apr 15th, 2008 at 9:55a.m.

Like many of you, I've had my jaw on the floor since the release of Google App Engine. Although there are skeptics out there, a careful read of their terms will show you that it's for real — Google has released GOOGLE to the world and it's not for scary marketing purposes. In fact, I've been growing tired of paranoid Google haters; I'm hoping this will shut them up for a while.

Why is App Engine such a breakthrough? The concept of a hosted web application is nothing new but it has never been done this well. Mundane server maintenance? Gone. Infinite scalability? Check. 100% uptime? Let's face it, if Google went offline you'd probably be down in a nuclear bunker playing Parcheesi.

So ... how should we leverage this tool for the greater good of the community? I can't count the ways without getting dizzy. How about let's start with a mirror of PyPi, the Python Package Index?

PyPi on the App Engine

I barely spent two days on it, but here it is: http://pypi.appspot.com/. Test it out, play with it, try to break it.

As Python grows, especially due to App Engine, PyPi needs to scale too. Zope has put together a PyPi mirror but that's the only other one I know of (actually, I can't even find the link to it right now). Coincidentally, PyPi even went offline for a few min while I was writing this blog post.

Issues...

You Can Help

I'm not dedicated to this project, I just thought it sounded like a good idea and would be a fun way to experiment with the App Engine. If anyone is interested in working on it just let me know --kumar.mcmillan@gmail.com. If there is enough interest I'll put it on Google Code. Possibly the most exciting feature of App Engine is the Datastore API (aka BigTable) and Ben Bangert agrees. It's a little hard for me to wrap my head around it but so far the Expando class—besides being the coolest name for a class—seems to work great for storing package data. If EGG-INO grows a new parameter, it just gets tacked on to the row dynamically.

This has also been a great way to dig up bugs, some of which have already been fixed.

Software is written by hand

posted in JavaScript, Python, Ruby, The Future, Whatever by kumar on Friday Dec 21st, 2007 at 3:36p.m.

...that's right, it's not molded or prefabbed, it's not made on a production line or in a lab. Are we insane??! Here is a hilarious probe into the darker side of this art we call programming.

How To Get Started Writing Open Social Applications

posted in JavaScript, Presentations, Python, The Future by kumar on Sunday Nov 18th, 2007 at 11:58a.m.

I started learning about Google's Open Social API and gave a lightning talk on it at the last Chicago Python User Group meeting. It wasn't much more than a brief overview and fodder for "diving in" to the Open Social platform. Here it is again, in more of a tutorial form, so dive in!

What Is It?

It's a set of programming interfaces to let you build "applications" that run inside social networking websites. By applications, think "widgets." The interfaces consist of a JavaScript API to build the screens and interactivity and a REST API (Atom publishing API + XML) for the "container" site to implement.

The official "container" sites so far include Friendster, MySpace, Orkut (Google's own), Hi5, Ning, and several others. Some interesting facts from the video : Orkut has an overwhelming presence in Brazil and India and Hi5 is the largest Spanish-speaking social site. Ning is unique in that it's a "meta" social site. It's a social site that enables you to build your own social sites until your head explodes.

The Role of An Open Social Application

I predict that the dark energy of the universe (that is, energy generated by the free time of cunning web developers like you and I) will bring hundreds of cool social apps into existence. It's the same collaboration concept that makes open source software so successful. And more similarly, what makes Firefox so customizable through Extensions. This kind of thing gets me excited about the Web reminiscent of when RSS became a standard. To be honest, I don't think social networking is that interesting and I am still waiting for the fad to die out, but Open Social might encourage other sites to standardize additional container/application APIs.

Let's See Some Code

To test out an Open Social app you can use the Orkut Sandbox. It needs to conform to the Google Gadget API; here is the simplest app you can build:

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Boring Hello App">
    <Require feature="opensocial-0.5"/>
</ModulePrefs>
<Content type="html">
<![CDATA[
    <script type="text/javascript">
        
    function start_hello() {
        document.getElementById('message').innerHTML = "Hello!";
    }
    _IG_RegisterOnloadHandler(start_hello);

    </script>
    <div id="message"> </div>
]]>
</Content>
</Module>

Since this isn't very exciting and doesn't show off and of the API features, there are plenty more examples in the Open Social docs.

Some Gotchas

The Orkut sandbox has a fierce cache. To use your application uncached, you have to add this on to the end of your app's URL:

http://.../?...&bpc=1

Since the app is just HTML, you can use the script tag to pull in 3rd party JavaScript libraries. But keep in mind you will face some problems due to to JavaScript's Same Origin security policy. Although, the JavaScript libs automatically available will probably let you do most of the remote-call things you need, like fetching JSON. There also might be some workarounds with the Dojo framework's iframe strategy.

Have fun!

GTAC Highlights Part 1 - Selenium is Alive and Well, Model Based Testing Is Smart, And...

posted in GTAC, Java, Python, Ruby, Testing, The Future by kumar on Saturday Aug 25th, 2007 at 5:34p.m.

I just got back from the GTAC (Google Test Automation Conference) in New York and had a great time. It spanned 2 days and had a single track — this made it very laid back (no headaches trying to decide what talk to attend) and the timing was perfect. Especially since my traveling managed to dodge one of the worst summer storm systems to hit Chicago in at least a decade!.

I've put together some highlights using the notes I took at each talk. Please bear in mind that this is not a comprehensive report on the conference and may contain misinformation (feel free to comment with corrections). The Google folk did an impressive job of posting video of most talks online within hours. A youtube search for GTAC lists them all. Or ... you can watch them from a playlist

Allen Hutchison - First Principles

Patrick Copeland - Keynote

Simon Stewart - Web Driver for Java

Ryan Gerard and Ramya Venkataramu on Test Hygiene

Matt Heusser & Sean McMillan - Interaction Based Testing

Adam Porter & Atif Memon - Skoll DCQAS

Apple Chow & Santiago Etchebehere - Building an Automated Framework Around Selenium

Doug Sellers - CustomInk Domain Specific Language for automating an AJAX based application

Risto Kumplainin - Automated testing for F-Secure's Linux/UNIX Anti-Virus products

Jennifer Bevan & Jason Huggins - Extending Selenium With Grid Computing

That's all I have time for at the moment. Check back for Part 2 - coming soon!

Humans are here to stay!

posted in The Future by kumar on Wednesday Apr 4th, 2007 at 10:15p.m.

Slashdotters are getting bummed out that Amazon is trying to patent its Hybrid Machine/Human Computing Arrangement. The bitterness seems to be in the gist of "computers are taking over the world, oh no!" or something.

As some comments note, this is a logical follow up to the Amazon Mechanical Turk, a web service of sorts that provides real human intelligence as a "processing node." I know a lot of people like to rant about the impending apocalypse but I think what Amazon are doing is really smart. They are basically saying, look, there are a lot of problems that are hard for computers to solve but trivial for humans to solve. Say, for example, given 50 images, find how many of them have a Dalmation puppy in them. That's hard for a computer but takes a real person milliseconds.

This may not be a future proof example, as this visual cortex simulator idea suggests, but let's face it, computers are not the answer to all our problems and they never will be, no matter how much they advance. We will always need humans! In fact, desktop computers suck so bad we have a long way to go before they are even understandable by the majority of people. Sorry, I just can't get on this doomsday view about how robots are going to take over our lives. I think, if anything, Amazon is setting a very positive trend for the future.

Why People Don't Use Hand Dryers

posted in Python, The Future by kumar on Wednesday Feb 14th, 2007 at 10:32a.m.

It's because they don't know that you have to 1) wring out or shake off extra water then 2) rub your hands vigorously under the dryer. If you don't do that, it doesn't work (unless it's some turbo dryer I've seen in restaurants recently). Most dryers do not have these instructions printed on the dryer. Are people stupid? I won't answer that, but let's be fair, it's not very intuitive. Tools need to be intuitive and dead simple to succeed in today's society. This is why a lot of people curse computers and/or hate certain desktop apps.

Having said all this I was a little surprised to hear that Humanized—a Windows application [1] that works like Quicksilver in that you can just start typing something you want to do—is gaining popularity. I was surprised because I thought mainly programmers thought "with their fingers" since they [at least I...] find 10 fingers to be some of the most useful tools on the body. However, it also doesn't surprise me because this is a very intuitive way to work: start typing (or, possibly, start saying) what you want to do ... then watch it happen.

Does this mean we are about to see a counter-revolution to the mouse? I certainly hope so.

[1] behind the scenes I believe Humanized is written in Python and Freetype, but that's not so relevant.

Recent Projects

  • Wikir

    converts reStructuredText documents to various Wiki formats.

  • fixture

    Python module for loading and referencing test data.

  • nosetty

    A plugin to run nosetests more interactively.