Ian Lewis
Ian Lewis is a web developer living in Tokyo Japan. His current interests are in Django, python, alternative databases and rapid web application development. About Me...
  • Google IO 2009

    This year I attended Google IO and had so much fun that I think I'll have to break it up into several blog posts. Google IO is held in San Francisco and is the #1 Google event of the year. About 4000 or so developers attended the event which was held in the Moscone West Convention Center. In this post I'll kind of give the history of the events leading up to the event and some context.

    One day in late January or so, Google announced that registration for this year's Google IO was open and there was a subsequent conversation on twitter that ensued which led to id:tmatsuo, id:a2c, id:voluntas, myself, and several others proclaiming they were going to attend this year's event.

    I found out that the office of one of my old classmates, Bob Ippolito, is close to the event so I sort of jokingly invited myself and id:tmatsuo to stay at his office. You might know Bob as the co-founder and CTO of a company called MochiMedia, or as the author of numerous pieces of well used free software such as simplejson, MochiWeb, MochiKit, or PyObjC or as the coiner of the phrase JSONP (Note the date of the blog post). He has consistently gotten into things before they become big, including technologies such as json, erlang, Non-RDBM databases and often gives talks about them which essentially give you key insights into the future of web programming.

    ded by offering to let me and id:tmatsuo stay at his apartment. However, when it came close to the event Bob realized that he was going to be at another conference for Flash developers in Boston, which meant that we would only have one day where we were both in San Francisco. Bummer! But he let us stay at his house even though he wasn't going to be there saving us a lot of money. He was very gracious.

    Me and Bob

    Unfortunately, a few folks such as id:voluntas couldn't go to the event because of overreactions by their employers to the outbreak of swine flu but almost everyone that did go arrived in San Francisco on May 26th. I'll continue in a later blog post!!

    Send feedback このエントリーを含むはてなブックマーク はてなブックマーク - Google IO 2009
  • Python Onsen

    dcf_0208 dcf_0207 dcf_0206

    This weekend I went to the Python Onsen (Japanese) organized by voluntas. Python Onsen is an event where people who like or are interested in python get together at a Japanese Ryokan/Onsen and program/mingle/study together. The event started Friday but I had to work so I joined everyone yesterday. If you aren't famaliar with the Ryokan experience check out the Ryokan link. Essentially you have a traditional style room and traditional meals are served twice a day (with generous proportions).

    In between meals there was a lot of programming and talk about programming. I was recieved pretty well considering that I was the only non-Japanese in the group of 28 or so people. I spent the time here working on a form maker project for google app engine which will be using JSON quite a bit for server communication and API interfaces. It is programmed on the client side using the google web toolkit and it during the course of development it became clear that there would be a need for a way to validate incoming JSON on the client and server (for error checking and security) as well as making the interface easier to deal with. Currently the typing of the JSON data makes dealing with it in Java a real pain.

    We realized this could be done with a schema, kind of like XML Schema. Something that could be used as a way to define the structure of the JSON and thus allow programs to validate it. So after searching a bit we found the JSON Schema proposal. JSON schema is maintained in JSON and can be maintained inline so if it is, it doesn't solve any security issues, but it looks like a good way to validate and do error checking on JSON data that might be coming from an external (or internal) source. So one programmer whipped up a simple validator in python which I will hopefully be working on and using on the server side of my application while I'll be going ahead and creating a clent side schema and JSON parsing library over top of, or separate from, the existing JSON library for the google web toolkit.

    Pretty good for a two day hackathon.

    Send feedback このエントリーを含むはてなブックマーク はてなブックマーク - Python Onsen
  • Google Developer Day 2008

    I went to Google Developer Day 2008 in Yokohama Japan yesterday. The keynote speech was pretty much the exact same info as was given at the keynote at Google I/O where Google announced their direction, moving forward the web as a platform.

    Keynote

    As with the Google I/O keynote it was mentioned how Google feels that Computing power and accessability have kind of flip-flopped over the years. In the mainframe era you had computing power but no accessability, in the PC era you had accessability but lost relative computing power, and now in the web era we are getting back computing power in the form of cloud computing but we are loosing accessablity to those resources. They plan on fixing this with the, so called, three Cs. Client, Connectablity and Cloud.

    The first refers to the browser, so Google wants to make the browser richer in order to give us accessability to the computing power that they can provide. They are doing this with Google Gears and some other handy browser plugins.

    Connectability refers to allowing everyone equal access to resources and making sure every one can connect. This means making sure that internet lines are fast, airwaves are open etc. They see mobiles as big in the future so they hope to help the connectability problem with Android, their free, open operating system for mobiles.

    Cloud refers to their vast data centers. They hope to give access to these resources through products like Appengine where developers can access the vast resources and scalability that Google's data centers provide.

    Appengine Hackathon

    In the afternoon I attended the Appengine Hackathon which was presided over by Brett Slatkin, who is none other than the guy in the Appengine demo video. It was interesting because from the e-mails I recieved about the event, I figured it would be in Japanese but it ended up being entirely in English. Many of the Japanese folks had trouble following along so I tried to help where I could.

    In the beginning, Brett talked about Appengine and used an example wiki as a demo app. Then we went into coding our projects. At the end some folks showed off their applications. Despite the language barriers many folks came up with some really original, and cool ideas. The first was created by a Google engineer, who said he would set the bar low but ended up with one of the better applications. His app read calandar events from RSS and allowed users to add comments to it. He also implemented memcache support. There was an application with the idea to attach pictures based on the hostility/mood level of a chat message or Twitter tweet. There was a social bookmarking app, and an app to allow live translating of a django application.

    For what it's worth I presented my application which I hope to make into a workable form application builder. I haven't uploaded it yet so you'll have to make do with my first Appengine application, a prefix calculator with a simple rest api.

    Dinner

    Afterwards I went out to dinner with a number of folks who participated in the Hackathon. It turned out to be a lot of fun and I made a lot of new friends many of whom are now in my twitter contacts ;) All in all a hugely satisfying experience.

    Send feedback このエントリーを含むはてなブックマーク はてなブックマーク - Google Developer Day 2008
  • Google Developer Day 2008

    Google Developer Day Japan 2008 is being held on June 10th at Google's offices in Shibuya and I've registered to attend this year. There were a number of sessions that people could take part in but I decided to register for a Google appengine hackathon. I'm pretty curious about appengine since I've been working at becoming more familiar with really newly evolving technologies and not necessarily ones that have been around a while. Newly evolving technologies is something I've always felt I've had to catch up on since starting programming in high school. Going to high school with folks like Bob Ippolito (Mochikit, simplejson) and Konrad Rokicki who started coding stuff when they were in early middle school didn't help my self esteem.

    Anyway, in the spirit of learning about Appengine I took a dive into the documentation and learned a few of appengines silly limitations but I came up with a simple application that utilizes the simple python library I created for prefix back in college. I put it up in my mercurial repository under prefix-appengine if you care to take a look.

    The main work is done in two handlers which are essentially the controller part of the MVC pattern. One simply renders the page as a template, which is really simple since there isn't any template code, and the other implements a simple rest API that I use for an AJAX call to evaluate an expression given by the user. Using JSON seemed like a waste since there was only one returned value.

    class PrefixHandler(webapp.RequestHandler):
        def get(self):
            self.response.out.write(template.render("main.tpl", {}))
       
        # def post(self):
        #     self.redirect('/')

    class EvalHandler(webapp.RequestHandler):
        def get(self):
            expression = self.request.get("exp")
            values = {}
            try:
                output = prefix.parser.parse(expression).evaluate()
                values = {
                    "value": output
                }
            except ValueError, arg:
                output = "ERROR: " + str(arg)
                values = {
                    "error": output
                }
            self.response.out.write(simplejson.dumps(values))

    The rest of the code is in the javascript which I just wrote strait into the template file because I was lazy. The javascript uses jquery to do an AJAX call when the button is pressed and update the HTML DOM.

    var lastvalue = "";

    $(document).ready(function() {
      $("#eval").click(function() {
        expression = $("#exp").val();
        $("#output").html("Loading..");
        uri = "eval?exp=";
        uri += encodeURIComponent(expression.replace("Ans", lastvalue));
        uri = uri.replace(/%20/g|>, '+');
        $.getJSON(uri,
          // Callback
          function (data) {
            output = "<font color='#FF0000'>ERROR: Invalid response from server</font>";
            if (data.value != null) {
              output = expression + " = <font color='#00FF00'>" + data.value + "</font>";
              lastvalue = data.value;
            } else {
              if (data.error &amp;&amp; data.error.length>0) {
                output = "<font color='#FF0000'>"+ data.error +"</font>";
              }
            }
            $("#output").html(output);
          }
        );
      });
    });
    Send feedback このエントリーを含むはてなブックマーク はてなブックマーク - Google Developer Day 2008
  • In the 'states

    I'm in the 'states for a couple weeks visiting family. It's the first time I've been back to the 'States since moving to Japan. Things pretty much feel like I left them.

    My mom and dad are healthy but my grandfather went into the hospital this week so we went to visit him yesterday. Everybody said that it was crappy waiting around at the hospital but it turned out to be a good experience meeting and visiting with family members. Reiko enjoyed it a lot. My grandfather is returning home today after getting his gallbladder removed so everything seemed to work out ok.

    This week will be pretty bus, visiting with friends and travelling. We're going to visit a college professor, one of my friends from high school, and go to another party with friends from our old  Northern virginia Japanese meetup group.

    Send feedback このエントリーを含むはてなブックマーク はてなブックマーク - In the 'states
  • Awaodori Festival

    This past Saturday Reiko and I went to the Awaodori Festival in Kouenji with our friends at the Japanese-English Language and Culture Meetup. Awaodori is a type of dance that originated in the Shikoku island of Japan (One of Japan's four main islands) but has become a staple of summer festivals all around Japan.

    It's kind of a silly kind of dance with lots of different variations but in it's basic form involves a kind of walking where you put your right arm forward when stepping with your right foot and the same with your left. The patters emerge from that, some involving somewhat elaborate dances with lanterns.

    The dancers are followed by drummers, flautists, and small gong like bell ringers. Essentially the beat of the processing dancers is kept up by the percussionists that follow them. I uploaded some movies so you can get the idea.

    Anyway, Reiko and I really enjoyed it. It seems to be a Japanese staple summer festival along with fireworks and Obon dancing. Though, being a staple event in the most populated metropolitan area in the world means that the event was horrendously crowded. There was a never ending line of people coming out of the station which gave the police the rather unforgiving task of crowd control and security (in this day and age a large crowd of people is a terrorist bullseye). There were so many people that they had to set up a route for which the people could walk as to not jam up while meeting friends. But there are always those who don't want to follow the rules and go wherever they please without obeying the wishes of festival organizers.

    However, managed to keep at least a semblance of a complete group, and found ourselves a nice spot to watch the parading dancers. Japan in the summertime is humid, stuffy and hot, but fun you have drinking and hanging out with friends at the summer festivals makes up for it.

    Send feedback このエントリーを含むはてなブックマーク はてなブックマーク - Awaodori Festival