How would you describe Python? If someone asks me – few words will come up in my mind immediately. Those are : easy to understand, harder to master, multipurpose and powerful.
But what is it capable of? What are its strengths and weaknesses? Why do people choose it over/in addition to other programming languages? Let’s try to figure that out.
I remember the day when my kid came back home after his first day in school. He asked me just one question : “Dad, why didn’t you tell me that it’s going to be a 10 years prison?”. It seems like Python was designed with a great will to avoid such questions. It has simple syntax and handles a lot of complexity for you, allows beginners to focus on learning programming concepts and not have to worry about too many details. It also helps you to save your time. Let’s take the most common first program “Hello, World” code in different programming languages as an example :
Python. What is it used for?
Python is a general-purpose programming language. It’s widely used in many fields. You may find the list of the most common spheres below:
- Web development
Python can be used to build server-side web applications. There is a number of useful frameworks (such as Django, Flask, Pyramid) that were created to simplify your web development process and help you to do more with a fewer lines of code. Django is the most commonly used one nowadays.
- Scientific and mathematical computing, machine learning
Python is being really attractive to data science community due to the strength of its core libraries (NumPy, SciPy, pandas, matplotlib) and high productivity for prototyping and building small and reusable systems.
- System automation and administration
Python is widely used for system automation and administration. It has a number of libraries and tools to help such as Fabric, Salt, Psutil and others.
- Security and penetration testing
Python is used by technologists to build custom tools to test their infrastructure. Scapy and Twill become great assistants there.
- Scripting (general and application-specific)
Python is generally included by default in most Linux installations. It’s also embedded into many popular 3rd party programs such as FreeCAD, Blender, Maya, Gimp and others.
Mapping and geography
Python is a scripting language incorporated into many GIS software applications such as ArcGis, QGis and others; yahoo maps were developed using python.
Automation of some routine tasks
You may always choose your own way and scope of tasks to be covered by Python. Here is a quick example :
Python. Big players
Huge companies used and still using Python to create and/or maintain their projects. You may find the list of examples below :
- Google (various apps)
- Yahoo Maps
- Many others
Python the good
Python is recommended for people making their first steps on the road of programming, while also widely spread among highly experienced developers. And that’s for a reason.
Easy to learn, easy to read
It has low syntactic overhead. Code reads very much like English. Development process becomes faster.
Versatile, multi-purpose programming language
You can use python to do almost anything (analyse data, build websites, maintain servers, create games. This can be a neverending list.)
Lots of useful tools and libraries and frameworks
Depending on what field you wish to use Python for it provides you with a set of tools, frameworks and libraries to make your work more comfortable and efficient. You may follow the link: https://wiki.python.org/moin/UsefulModules to check the list of most commonly used ones.
There are tons of useful documentation available and a huge, friendly community standing behind Python. You won’t be left face to face with the questions or problems appeared related to your code or other stuff.
Python the bad
No one is perfect. The Same rule can be used for Python. Sometimes, when you need high performance Python is just slow. It’s not the best choice for memory intensive tasks or high-end programs that take a lot of CPU. Lower-level languages such as C or C++ should be able to cover such tasks in more efficient way, still that’s like comparing a motorbike and a truck. Each of those covers the scope of its tasks, you can surely try to transfer 1000 bricks on your bike, but I wouldn’t recommend you doing that.
Community is constantly working on the performance improvements to be implemented. One of the examples here would be PyPy. It is a fast, compliant alternative implementation of the Python language.
Python. Applying for a job.
Companies such as Google, Yahoo!, Disney (and many others) all use Python. Once you’ve brought your knowledge to a decent level – you shouldn’t be worried much of the lack of job offers. Every year demand for the Python programmers grows up.
Just a little but very useful tip for those who are applying for a job:
Due to the common complexity of the job descriptions (that do not always match the actual needs) and other factors you can face during and before the interview – the main question you should ask on the interview is: ”How would you describe a perfect candidate?” As a result, you receive a clear and honest answer, cut all the conversations that are not related to the actual needs and install a small reminder about yourself into the employer’s mind.
Python. The Future
Python is constantly evolving. More and more companies are using it for a broader range of appliance from social networks, through automation to science calculations. It’s an incredibly popular language and it’s not going to die anytime soon. Community works hard on the improvements and from release to release more and more stuff is being covered. Where will Python bring us in the nearest future? There is no definite answer to that question and that’s making me even more curious.