Friday, February 27, 2009

Last night's presentation (2009-02-26)

Last night, I gave a presentation on my Google App Engine application at the NYC Cloud Computing Group's (semi-regular) monthly meeting held at Gemini Systems down in the Financial district (thanks for hosting us, Mick!). I must say, it went over much better than I expected.

I've been concentrating on my Android Developer's presentation slated for March 10th and didn't give enough attention to the NYCCC presentation, but then I never think I give enough attention to the job at hand. Anyway, I put together a NeoOffice (that's OpenOffice for the Mac, doncha' know) Impress presentation which was filled with bullet points. The difference this time was I showed each bullet point individually. Simple technique but it kept everyone with me instead of having some people listening to me and others reading ahead.

The original idea was to have a hands-on workshop, so I had planned to give the presentation, lead everyone in programming a simple app, then show a simple app that I had written to "scratch an itch"

However, given that I was sharing the evening with Dustin Whitney who was discussing Amazon Web Services and we each had only an hour, that idea went out the window real fast. Instead, I gave my presentation and then walked through my App Engine datastore for my Tag Your World program.

As I said, it went over very well. The audience was full of questions and kept me on my toes. I really like presenting to a technical audience.

At the end of my hour, there were still questions and comments, but I had to turn things over to Dustin. After a five minute break, Dustin gave a good presentation on the CloudTools that he has built and showed us some of the ways he uses Amazon Web Services in his day job.

Overall, it was a great meeting. Good presentations (if I do say so myself), good audience, and good food. I can't wait to see what John has slated for the next meeting.

Tuesday, February 24, 2009

World Domination is one step closer!

I spent half of the day getting my Android app, "Tag Your World", to download locations from my Google App Engine application! And it works!

Okay, it's not perfect, mind you. I'm not authenticating or anything so I'm just pulling down the "public" info. However, Lenza just posted some code on how to do that so I should have no problem! Thank you, Lenza!

Now I can finish my presentation for this Thursday (although I'd really like to hack some more ;-)!

Monday, February 23, 2009

Not much to report, I'm afraid.

I had two job interviews last week. I'll report on those once I hear back from them.

I'm working on a presentation on Google's App Engine for the NYC Cloud Computing Group this Thursday (20090226). Problem is I can't find the right hook to make it entertaining.

Yes, you can make a technical talk entertaining. I'm also working on a presentation for the NYC Android Developers Group about my App Engine and Android ecosystem. The hook there is (I hope) very entertaining: a Lessig-style story followed by a functional demonstration followed by code discussion and Q&A.

I need to get at least two more functions working to pull off the demo. If I'm lucky, I might be able to demo my talk at the next ABE-PM meeting or even the LUG/IP meeting (although I think the next one is spoken for already).

I'll let you know.

Tuesday, February 17, 2009

That was a short day of programming

Today I decided to work on the Google AppEngine (GAE) side of my application's ecology. If you have a Google account, you can see it here. I know, not much to look at.

What I wanted to do today was to get the AppEngine and the Android talking to one another via RESTful calls. I wrote a routine to take the data from GAE and convert it into a type of KML format. When I uploaded it, I found I couldn't save or update data. :-( There is something wrong with the urlfetch() call; strange becasue I didn't touch that code. Now I'm waiting to hear back from the GAE mailing list.

Maybe I'll go work on a website for this app for marketing purposes.

Monday, February 16, 2009

I just spent the last twelve hours hacking on my Android app, Tag Your World. I made some progress but the code is still pretty bad (whaddya' expect? It's still my first Java program!).

Most of the morning was spent figuring out how to parse a JSON-formatted KML response from Google's Maps API. After looking at various XML parsers, most notably SAX, I decided I might as well just do it manually.

By "manually" I mean I took the JSON string, converted it into a JSONObject and looped through the keys. When I found the "Placemarks" key, which holds several addresses of different resolutions (address level, street level, etc.), I converted that to a JSONArray and passed it off to a function which populated an instance variable ("my first use of polymorphism!" he says proudly).

Overall, I went from a JSON string -> JSONObect -> JSONArray -> JSONObject just to fetch the first address line in the KML. There's got to be a better way! I find it hard to believe that there's no easy way to take a KML-encoded string and magically produce a Java object. Unless I'm on the bleeding edge and I don't know it.

Spent the evening doing some cleanup work (the TimePicker wasn't handling hours properly) and adding a few cute features (Satellite View v Map View).

The next major thing I need to do is to integrate the Android app with my AppEngine app to show them both off at the next NYC Cloud Computing Meetup on the 26th and the next NYC Android Developer Meetup, whenever that will be.

On top of that, I've got two day-long job interviews this week! For someone who hasn't had any work for awhile, I'm awfully busy!

Sunday, February 8, 2009

Thoughts on Ocaml

I'm interviewing with a financial company in Manhattan. The position requires wearing many hats, but it's mostly administration. However, I will be doing a little bit of coding, mostly in the basics (shell, Perl, Python) but also in Ocaml. So I spent the weekend writing two programs in Ocaml based on the problems listed over on Project Euler, numbers 8 and 18 to be specific. This was my first foray into functional programing. I must say I like the paradigm although Ocaml itself leaves something to be desired.

Functional programming treats functions differently than in imperative programing, i.e. "normal" programming. In FP, functions are treated more like mathematical functions, so it is well-suited for some of the problems over on Project Euler. Not everything can be done in a non-imperative way (circular data structures, for example) but it is a good tool to have in your developer's tool box. I was pleased to see that Perl is considered a good functional language, so this weekend's exercise will definitely have an effect on my usual coding style.

Ocaml itself, well, I dunno. It's a relatively young language, started in 1998, so it doesn't have a lot of libraries or even tools; I couldn't find a decent IDE that was being actively developed. Now, normally, un*x/Linux is my IDE (Vim, make, etc.) but I do like to use a graphical IDE every now and then (my current fave is Eclipse) especially when learning a new language/framework.

Since I code quite a bit in Perl, I'm used to using Vim and the internal Perl debugger, a paradigm that Ocaml fits into very well, but the Ocaml debugger needs some work. In the last program I wrote, it kept telling me I had a syntax error on blank lines and even on a line after the end-of-file.

I think I'll go learn Scheme to learn more about functional programing and, of course, Perl.

Sunday, February 1, 2009

Geocoding on Android

If you want to do geocoding, that is, if you want to get the latitude and longitude of an address in Android, do not use the Geocoder object. Yes, yes, I know that's what it's for and the docs give you very simple examples but they fail to mention one thing: it doesn't work!

I lost three frackin' days trying to figure out what I was doing wrong until I came across this thread. Turns out there's a bug in Android and forward geocoding doesn't work. Sure, it's been fixed in "cupcake" (the next version Android that is, as of this moment, pre-alpha) but you figured someone would have seen my posts of the past three days and said something about it.

I guess no one is geocoding on the Android, eh?