A tale of learning Python and launching the Reworder app in five days (via Sahil Lavingia)

Reworder – A tale of learning Python and launching an app in five days.

Posted by Sahil Lavingia in Coding, Side Projects on 26 October 2010no comments-->

Reworder is done. You can use Reworder at… http://usereworder.com/. Its premise is simple: an automated paraphraser. It isn’t great, but it helped me learn a lot about Python. I truly believe that the best way to learn a language is to make something with it (I literally learned even Python’s most basic syntax along the way). The true is same with spoken languages: reading a textbook is nowhere near as useful as immersing yourself in a county and just trying to learn from scratch to get along (ugh, analogies).

Over the course of the past week or so, I came upon the idea for Reworder. I was already pretty dead set on learning a functional language (either Python or Ruby) because I wanted to get back into the web app game. I chose Python mainly because Google’s app engine allowed me to deploy faster, and Ruby seems like it has a higher learning curve. In the end, they’re probably very similar languages.

Anywho, I started off going through the tutorials for Google’s Python Class. These only took around an hour, and immediately I hopped on over to app engine and went through their Getting Started: Python tutorials. These took longer, mainly to wrap my head around of some of the more abstract concepts.

From then on, I fleshed out the basic designs, scrambled around Stack Overflow and similar sites looking for ways on how to clean output, url fetch, and a bunch of other things. I never touched Photoshop, so the design may be lacking, but it does the job and didn’t slow me down (just a few lines in CSS suffixed).

Overall, it took me five separate non-consecutive days spending around two to three hours on each day:

Overall, it was an awesome experience. I already dig Python, and Reworder is definitely not the last of my web-app projects. Actually, I’m already working on my second and third! This stuff’s addicting.

Lessons learned:

Of course, I learned a ton of stuff along the way, and hopefully this list will help a bunch of beginners out.

  • App engine is fast and awesome, right now. However, if your site gets really popular, you may consider moving off of it. This is going to be a pain. I have no idea how I’m going to export the data from any of my app engine projects, so if you’re serious about a project, look into this.
  • Use APIs and libraries. My God, there is so much already built out there on the web. Even though Reworder is extremely small in scope, I’ve already used two APIs in the current version. I use text-processing.com to tag each word with a part-of-speech (noun, adjective, verb for example), and Big Huge Lab’s API to fetch synonyms.
  • Set tabs and use them. It took me too long to learn this: make sure you use tabs to format all of your Python code. It’s annoying as heck now, because half of the time I have to deal with indentation errors (and spending minutes trying to figure out when I used too many or too few spaces). Either solely use tabs or solely use spaces, they don’t work well together, at least in my experience. Read Style Guide for Python Code for more advice on this front (thanks Dan!).
  • People love breaking stuff. Like seriously, even after just tweeting and blogging about my little project, people were sending hundreds of requests to the site – many trying to somehow break it. Luckily, I had fluent-in-Python friends to help me out along the way.
  • And that leads to my last point, ask for help. Who would have thought that reaching out to other developers would work so well? And sometimes I didn’t even have to. For example, after a tweet about the text-processing.com API, the developer behind it @replied me offering his help. And damn, did he help. I probably saved hours thanks to him.

Stats, because numbers rule.

  • Over 5,000 visits to Reworder.
  • Around 10 hours to build and “launch” the site.
  • Over 2,000 rewords and counting.

I don’t expect it to maintain these levels of course, but they’re food for thought.

And that’s it really. In summary, Python is awesome (sorry Ruby folks, I’m sure you guys rock too). App engine is awesome. Learning stuff is awesome. Seeing thousands of people use your stuff is awesome. Seeing your site get exploited is less awesome. But the overall experience: well worth it.

Now, time to learn Javascript…


Like this post? You should follow me on twitter here.

Stumble It!Share on FacebookSave to del.icio.usEmail this


Posted by Chris McCoy
 

How to Learn Python Programming -- a children's book for beginners like me

Click here to download:
swfk-mac-0.7.7.pdf (1.33 MB)
(download)
This is my first step to learning!

Posted by Chris McCoy