Insights from Our Experts

Blog image

Why I was bitten by python

Author Image

Arun H Das,Software Engineer

Why python, if there is an array of languages out there? Why did I specifically choose python? These were some of the main questions I faced during my “wannabe pythonite” phase of life, i.e. job hunting. I, personally, am so obsessed with python programming language and I am sharing the reasons; the reasons why it became so important, why I chose python over others. I am not a techie kind of guy so I am not familiar with the tech terms and concepts. I, as one average student, found python useful and good because of some specific reasons.

And by the way, I'm currently an intern(in python/django), at SayOne Technologies, and also a keen pythonite :)

 

>> Readability

Python is written in plain english. So, its easy to read. Anyone can understand a script written in python, because its English.

Readability was a primary consideration when Python’s syntax was designed. This emphasis on readability is no accident. The fact that its syntax is super-easy, verging on human language, is just gravy. The result is that you can read other people's Python with ease. It looks just like yours. Not only it is easier to read but also easier to maintain. On the long run python excels.

 

>> Object Oriented

Python is an object oriented language. Well, in today's scenario, almost all languages are object oriented. So one might think...why all the fuzz! Python actually stands out from others because of it's increased readability. In OOP, we consider everything as objects. It helps us to closely and easily associate real-world entities. For solving real-world problems. As an object-oriented language, Python aims to encourage the creation of reusable code.

 

>> Support

There are many python communities all over the world. It's open-source, meaning its free and its code is available to everyone! A supportive and welcoming communitysurrounding the language. Once again this is crucial for those who haven’t had any exposure to coding from a young age.


The Python meetups are inevitably the most welcoming, which makes them the perfect place for beginners to learn the ropes and meet future colleagues. Last year, in the month of August, we had a python meetup here in Bangalore,India: Pycon India 2015. Python enthusiasts, coders, programmers all gather in these meetups.

Python is popular. Python (programming language) language group on Quora has more than 26k followers. Ruby (another open-source programming language) has only 8.5k. Python's popularity means more books, more tools, more libraries, and more jobs. For whatever that’s worth there it is. Python has better support for scientific libraries that we use in our day-to-day work.

In stackoverflow, currently there are 108.5k followers for the python tag. Now that is something. This is just for the python tag. There are other tags for versions like python2.7 or python3.1.

 

>> Epic libraries

As mentioned above, python's popularity means more books, more tools, more libraries, and more jobs. For whatever that’s worth there it is. Python has better support for scientific libraries that we use in our day-to-day work. There are tons of libraries and it's getting updated continuosly(yes, some of it is getting updated now, as we speak or as I type this content).

To mention some of the “epic” libraries we use, it's numpy, scipy and pygame.

Numpy is for huge complex mathematical calculations and for matix handling. “Num-py”.

Scipy is for handling scientific stuff, its mainly used in research industries and also in business analytics. “Sci-py”

Then we have pygame, my personal favourite :) It is used for creating game. Yes, we can create games in python.

 

>> AI

Artificial Intelligence. The ability of a computer to think for itself. (So that it can make decisions for itself.) In simple words, to make a computer human. Generally for AI, logic programming language is used, like prolog. But now, python is also used. Because of it's strength and its human readable syntax and functionalities, it is now, oneamong the primary AI languages.

 

>> Big Data

As the name suggests, it's just big data. Very, very big amount of data. For example, our facebook profile contents(data). There are millions of users for facebook so millions(or trillions) of data. What if we need to take some value or data from this heap of data. This is big data analysis. Python can be used for this.

 

>> Web scraping

This is a miniature version of Big Data. Web scraping(web harvesting or webdata extraction) is a computer software technique of extracting information from websites. Scrapy is a tool for this. And scrapy is written in python!

 

>> BI

python language is growing. Now, its in used in Business intelligence sector. Python can be really helpful in business analytics division. It can take date, handle it, and make inferences from it. As we have seen above, that it's used for web scraping, so it can take certain values from the web and handle them. And of course it can create graphs from the data, statistics. This can be easily done if we include a simple package called matplotlib in the program.

 

>> Faster

Python is faster. By fast I mean reaallyy fast. But still, it has a downside of space consumption. Yup, python codes, eventhough they are super fast, consumes memory. But inorder to get maximum efficiency its okay to sacrifice a little bit of disk space :) .

 

>> Data structures

Python has a very good set of data structures. It has list, dictionaries, tuples and sets to handle data.

 

>> Balance of high-level and Low-level programming languages

A simple basic “hello world” program in C would have atleast have 3 lines of code. Whereas, in python there is only one line, actually 3 words: print “hello world” does the job. Wow right?

 

>> Django – the 'd' is silent

django is python's web framework. It's pure python. Django also follows MVC architecture and is maintained by DSF. Django's primary goal is to ease the creation of complex, database-driven websites. Django emphasizes reusability and "pluggability" of components, rapid development, and the principle of don't repeat yourself(DRY). Python is used throughout, even for settings, files, and data models. Django also provides an optional administrative create, read, update and delete interface that is generated dynamically through introspection and configured via admin models.

With the rise of django, it is now, very easy to create a web site. Django has an in-built database(we can include external db if we wish to) and has it's very own in-built server to perform testings.

There are other webframeworks in python like Flask, Bottle, etc but django is the widely used one.

 

>> Zen of python

Python has a motto, the zen of python and it's self explanatory and epic!
Below are some of the lines:

Simple is better than complex

complex is better than complicated

beautiful is better than ugly

explicit is better than implicit

flat is better than nested

sparse is better than dense

readability counts

if an implimentaion is hard to explain, it's a bad idea

 

>> It's freaking everywhere!

Anyone can learn and use python. It's not that big a deal. We can do cool stuffs like web scrapping in like 20 locs. Using python, we could develop anything, web application, desktop applications, anything. Also, because of it's portability, the creation can be done anywhere, by anyone. It is broad and scalable.

 

>> Applications

These are the main reasons why I am so into python :)

Google uses python. (Well, Guido van rossum works there now) Youtube, Instagram, Pinterests, Quora are all completely powered by django. Organizations like NASA uses python and django. Python is used in the ongoing research about the Higgs-boson particle/God-particle. MIT switched to python. Original bit torrent was written in python. And the list goes on...

 

Guido van Rossum is the creator of python language. And he was the one who made it open-source. The name is python because he was a great fan of Monty python's flying circus. Among the python community he is called the Benevolent Dictator For Life(BDFL). Python has it's root from the language ABC(very old one).