Archive for August, 2008

I was registering for an account at a local auction site (which shall remain nameless), the zip code combo box threw me off:

Posted by Roy in Software Developer | 3 Comments

In my continuing quest to become better than everybody else, I spent some time today learning Django (a Python webapp framework) and the Google App Engine.

I tried following the tutorials included in the Django Book for a while, but I’ve never taken too well with just typing up examples from a book, so I decided to write something from scratch. I decided to write a simple message board application.

I wrote the message board pretty quickly using Django; it took me about 2-3 hours to have a bare-bones message board up and running. (I was watching Speed Racer at the same time.) The UI is horrendous of course, but it’s functional, with categories and topics, etc.

Now to deploy the message board app somewhere. After a bit of searching around, I couldn’t find any suitable free Django webhosting. So I went with the backup plan: I’d upload the project to the Google App Engine.

I’ve had a Google App Engine account for a while now, but haven’t done anything with it yet. Unfortunately, a Django app can’t be ported directly to GAE as Google has their own datastore implementation which won’t work with Django’s models. So I spent the rest of the day porting/rewriting the message board app for use with GAE. Google has their own guide for this sort of porting here: Running Django on Google App Engine.

Some problems encountered when porting:

  • Can’t seem to use the list_detail generic view; I get errors about undefined user attribute on the request
  • Sometimes after editing a view, I get random “NoneType has no attibute get” errors. Restarting the dev_appserver fixes this.
  • Unlike Django, GAE models don’t have an “id” primary key. Instead, you must use object.key() which returns some sort of hash string (making for very inconvenient urls)
  • I’m having errors raised during 404s; the problem is mentioned in this thread which should already be fixed but I’m still encountering it. I’ll investigate it later.

The final product is here: Random Encounters Message Boards. I don’t know who would actually use the site, but I think there’s some people I know reading this blog who wouldn’t be able to resist testing it!

The next step would be to improve the UI of the app!

Posted by Roy in Geeky, Software Developer | No Comments

I needed to transfer a file to my phone today, but could not find my USB cable. I figured I’d try out the Bluetooth with the laptop.

After around 30 minutes of struggling with the unintuitiveness and some helpful googling I finally was able to transfer my file using the ff steps, for future reference:

1. Turn on Bluetooth on the Acer Aspire using the Bluetooth button.
2. Right-click the Bluetooth icon on the systray -> Show Bluetooth Devices -> Options -> tick “Allow Bluetooth devices to find this computer”
3. Enable Bluetooth on the N73 via menu -> Tools -> Bluetooth
4. Scroll right on the N73 and the Paired Device screen is shown. Choose Options -> New Paired Device
5. The N73 should list your computer name (mine is PANDA!), select the computer name and you’ll be prompted for a passkey. Don’t input anything yet…
6. Back to the Vista PC, right-click the Bluetooth icon in the systray, then choose Add Device.
7. Tick “My device is set up and ready to be found.” and click Next.
8. The wizard should list your phone. Choose the phone and click Next.
9. Tick “Let me choose my own passkey”, and type a passkey.
10. You get the message to “Please enter the passkey on your Bluetooth device now”, so do just that.
11. The bluetooth connection should be all set up, to send a file to your N73, right-click the bluetooth icon and click Send a file
12. You’re done. Hooray!

Side note: After step 10, Vista seems to want to install drivers for the N73…but it doesn’t seem to be necessary

Blogged with the Flock Browser

Posted by Roy in Daily Life, Geeky, Hardware | No Comments

Aug. 22, 2008

Upon the prodding of Mikong, I attended the recent Barcamp Manila held in Ortigas last Thursday. I wasn’t really sure what to expect, as I’ve never attended any such conference before, and I’ve never been particularly involved with the local developer community, but I said I’d go anyway, I figured it’d probably be fun.

The event was held at the Orient Square building at the offices of Exist Global and Morph Labs, who sponsored the event. I was a bit worried since I’m going in without having a presentation, although everyone is encouraged to present. Turns out I needn’t have worried - over 80 people attended the event, there wouldn’t have been enough time for everyone to present!

All in all, the talks were interesting, with a wide range of technical topics discussed involving multiple programming languages including C++, Java, Ruby and Python (with much playful jeering between the many Ruby advocates and the few Java developers). There was even a short comedy sketch by Mario Carreon.

It felt good getting to know the community and meet some new people and see the cool (and geeky) things local developers are doing. Although I code day in and day out for work, I could probably still learn a lot from the development community. The uptake of newer technologies is a lot faster in the community than at work, so somehow it’s a refreshing change of pace.

Hmm…I wonder if I would be able to rustle up something to present at the next Barcamp?

Posted by Roy in Software Developer | 5 Comments

Blogged with the Flock Browser

Posted by Roy in Software Developer | No Comments

Aug. 18, 2008

Am I the only one getting these random JavaScript alerts (obviously debugging messages!) on the new Facebook today?

Posted by Roy in Geeky, Software Developer | No Comments

Aug. 8, 2008

I joined this year’s Google Code Jam.

It’s part of my characteristic competitiveness and arrogance that I actually imagined I had a chance at winning the contest. No such luck, see my results. I was eliminated in the second online round. That I managed to get there at all was surprising considering the level of difficulty.

I’m not really a com-sci guy, so I’m weak with regards to algorithms, I don’t always know what the best approach for particular classes of problems - I usually just brute force it then try to optimize based on my on-the-spot analysis of each problem. It seemed it wasn’t enough; there were a lot of hardcore guys who were able to get perfect scores, and I salute them.

I’m not sure whether I’ll still participate next time, as the problems don’t seem to be geared towards someone of my skillset. Still, the fact that I managed to pass 3 rounds (including the qualifier) indicates some potential for winning. And I was one of only two Filipinos who made it to round 2! Good luck to the last guy…

After the code jam, I’m thinking of taking a look at TopCoder.com which hosts weekly programming contests. I’m not sure whether I’ll really have time, but I’ll probably try it once or twice to see how well I fare.

This was a very humbling experience; even though I consider myself a pretty good programmer, there’s always someone better.

Posted by Roy in Geeky, Software Developer | No Comments

Aug. 8, 2008

I’ve been submerged in work for the past two weeks or so, not having much time to do anything else aside from work and the DS, which lets me sneak in some Professor Layton, FFTA2 or Civilization Revolutions while waiting for bug fixes to be confirmed.

So I took a break this weekend and won’t be reporting back to work until Wednesday. No plans really, just some unplanned downtime to unwind a bit…

Blogged with the Flock Browser

Posted by Roy in Daily Life, Work | No Comments