Once upon a time, some genius said:

The language you speak affects what you can think!

This is true for all programmers out there! Don’t we all just start thinking in terms of if conditions, loops and functions (methods) as soon as we face some puzzle or a logical problem. The joy you get is just unparalleled!

Python. Why?

So, as you read in the post heading, this is about Python which is not even remotely dangerous¬†as its reptile counterpart. ūüėČ Python is rated as one of the most used programming languages in 2015. We all use Google search right? Did you know¬†Google spider and search engine are written in Python? A lot of Internet services we use like Mozilla, Disqus, Quora, Pinterest, Reddit etc¬†utilizes python in some form. If you will go to Github and just try to search for Python you will be¬†baffled by the sheer amount of Open source Python libraries available for you to download and use for your personal projects. For anything you can think of, there exists¬†a python library.

Most popular coding languages of 2015

Most popular coding languages of 2015

So I started experimenting with the Python around a year ago, but just could not dedicate reasonable time to it. However I did finish the Codecademy track for Python over the course of time. Around a month back I decided to get my game together and started researching about awesome ways to code in python. I wanted an approach with some abstract stuff so that all my learning is not channelised in a single direction.

What is The Python Challenge?

As always, I decided to pay a visit to the fellow wise Redditors and there I discovered this gem called: The Python Challenge. Before jumping into the stream of praises for the challenge I would like to talk about what makes it awesome. So, this challenge was developed by Nadav Samet back in 2005. Yes! 10 years back when there was no HTML5, fancy JS scripts, ease of styling via CSS3 which is why when you will visit the site, it will bring back the old memories from last decade when broadband was in its infancy and we were limited to speeds around ~128 kbps (in India).

The Python Challenge

2000’s Web design

So even if the website may not be very polished but the challenges, I must say are very impressive. Once you start solving them it becomes an addiction¬†as the thought process which goes¬†behind the challenge is not linear as you progress. It’s purely random! You may find a level 5 too difficult only to solve level 6 in 30 seconds. You can solve a level in a multiple ways but I would encourage you to get your hands dirty with the python code/scripts. You will go through a range of challenges which will vary from solving a simple mathematical expression to image processing, decoding and encoding files. You will be surprised by how much you can achieve with a simple 3 line script.

As of today,1866203 visitors have attempted solving the challenge since May 2005. There are currently 33 levels.

How should I proceed?

Hmm, If you code in any other language and python is a bit new to you, you can learn the syntax and get into action in 1 day but if you are a bit n00b in programming and are looking for a break, this is the perfect opportunity to build a strong base. I would suggest you to complete the Codecademy track for Python first. It will take you close to 15 hours which ~ 1 week (2 hours/day). Python is really easy to pick up.

Most of you who are coders at heart would end up using it all the times when you have to do a quick POC where performance is not a concern. If you read this blog regularly you must have noticed I bought a Raspberry Pi last month. You can read my experience here. It really is a superb device and since Raspbian OS is forked from Linux, you get Python pre-installed. If you own it, you have one more reason to learn python.

Sounds good! Prerequisites?

  • Strong¬†logical aptitude with out of the box thinking
  • Python. duh (It can be done with Python 2 but I would recommend to use Python 3)
  • PyCharm¬†– The Most Intelligent Python IDE by JetBrains
  • Basic Python syntax knowledge
  • Internet & stuff

Start here -> http://www.pythonchallenge.com/

Forum for hints -> https://groups.google.com/forum/#!forum/python-challenge

*Although forum may not be very helpful, so feel free to ask for hints here in comments. ūüėé

My progress?

I started with this challenge 2 weeks back. As of today, I am on Level 16 and it has been a great ride. I look forward to completing all the 33 levels as soon as possible. I am pushing the code/scripts I write for all the levels to my Github repository. It may not be the best (production-ready) code as I started as n00b as it gets with Python. So please don’t come up to me to cry about how unpythonic my code is.

I plan to finish all the levels first by using as quick and dirty way it gets and then I plan to revisit all the levels and will try to make it as beautiful and pythonic as possible. Sounds good? Here’s my repo:

Python Challenge Attempt – GitHub

ūüí° Also, feel free to fork/clone my repo or raise pull requests if you think you can do¬†it in a better way (approach wise, not complexity wise).

So, go ahead. Try your best and share your progress in the comment section below. If you enjoy challenges, I am sure you will love this and who knows you will be the next Python big-shot. ūüėČ