So it’s been slightly over a month since I’ve been with Insync (google docs sync not the band). Thought this would be a good opportunity for me to give an update on what’s been going on and how I’ve been getting on with Python. (Btw, they are looking for a few Level 80 troll eating amaterasu sprouting ninja samurai ronin assassin fireman to join the company in Singapore and Philippines.)
Currently, I’ve been working on mini apps. I’ve set myself a target of producing one mini app a week until I’m deemed good enough to work on production related tasks. My mini app ideas are very simple with the objective of getting something working out as soon as possible. This is also a lot more fun than doing books and tutorials like what I mentioned previously.
Mini App1: Twitter Tag Cloud
Enter your twitter username and it generates a tagcloud of words based on your last 100 tweets. It’s not a ‘smart’ tagcloud in that common words like the, he, she shows up. Ignore the oAuth part in the title. Leftover CSS 😀
This was created using Python, Django and Python-Twitter library. Models weren’t use as there were no databound elements in the app.
Mini App2: oAuth Twitter Status Getter
Ok for some reason, the app doesn’t seem to be working now. I’ll probably have a look at it later BUT it’s suppose to do this: Authenticate using oAuth with your twitter account. It then grabs the last 50 tweets from your timeline. There is an input box that allows you to change how many tweets that get displayed. This number is databound such that the next time you log in to the app, the same number of tweets that you set previously is displayed. I’ll update with screenshots once I figure out what the hell is going on.
FYI, for the technical savvy, I am getting BadStatusLine when twitter redirects the user back to my application.
Mini App3: Flickr Photobrowser
The latest and the greatest. This app is currently live on my free EC2 instance. Check it out here (**UPDATE** I’ve taken this down to save me some EC2 hours). For those who can’t be asked to click, see the screen shot below. Basically, input your Flickr username and it gets all your public photos and displays them in a gallery with pagination. Did you hear that? Pagination baby. Paginationpaginationpaginationpagination. That’s nice, I like the sound of pagination. Oh, there is also has some nice CSS mouseover effects applied to it.
This was by far the most complicated app of the 3. It took me a while to figure out the pagination feature on Django. Setting up Apache and mod_wsgi on Amazon was also tricky as it was my first time setting up a webserver. The documentation was bloody intimidating at first glance but just keep your head down and bang a few walls with it, you’ll pull through just like everyone else. The Flickr API itself was fairly straight forward but I didn’t do anything that required authentication. That just messes things up.
And yes, that’s me with the ultraman facial pose.
**update** Just realized my little app is not a hundred miles away from http://instagrid.me/ which was recently launched.
- If you want to play around with RESTful services and API’s, Twitter is a good place to start.
- I found myself doing quite a fair bit of stitching together code and then augmenting it for my own purposes as opposed to writing the entire app from scratch.
- Deployment has been my greatest source of grief at the moment. There’s quite a fair bit to know about the web development that is really not related to coding.
At this moment, I still haven’t figured out how to get Django, Apache, mod_wsgi and EC2 to play together nicely.
- For morale reasons, you would probably want to make your app live on the internet and ‘show off’ to everyone and say: Hey! Look at me, I made this! On this note, I think being able to deploy a Rails app onto a service like Heroku is definitely one big plus for going with RoR for a beginner. Having said that however, I understand the learning curve for RoR to be steeper initially compared to Python/Django.
- Be prepared to get your hands dirty in shell/bash (or command prompt in Windows). I spent 30 mins wondering why ‘cd projects’ didn’t exists only to realize bash was case sensitive. And while you’re at it, say hello to this primitive thing call Vi or Vim. I still don’t quite know what the difference is.
- I know a lot of you guys are going to be bouncing between concepts and jargons. It takes a while for everything to sink in so don’t worry if you don’t get it the first time. For example, I’m only just beginning to understand what a web server actually does and the role it plays in the ecosystem.
- Less reddit, more code.
- I estimate I’ve spent less than 50% of my time actually coding in Python and more time messing with sys admin stuff and Django.
That’s all for now.