python

Python – Why should I learn

Python – Why do I care to learn

Hello friends, in this article I am going to share my view as why the Python language has got so much of spot light. So much so, that people may feel that something is amiss if they do not know python. And I have observed this not only among the students and freshers but also among the experienced developers. Among the former ones it is a step towards improving the prospects of getting a good job and among the latter ones, it is not only about improving the job prospects but also an inquisitively, “What’s in it? Let’s explore”. So, let’s explore some of the features (out of lot many) that make this language as one of the sought-after language

First

I am easy to get with. the foremost reason of Python is that it is very easy to learn. Let, me share a quick example, by writing the very first program, yes, it is “Hello world”. Following is code snippet of Python and two most popular languages Java and C++.

Python Code

print(“Hello World!”)

C++ Code

#include
  int main() {
    std::cout << "Hello World!" ;
    return 0;
  }

Java Code

class HelloWorld {
  public static void main(String[] args) {
  System.out.println(“Hello, World!”);
  }
  }

So, for the starters it is not as intimidating as the other two languages can get initially. As in the example above a developer just has to type one “print” statement to print on console, as against 4 lines of code in the latter two. The syntax is quite simple to follow. Do note, it initially gives jitters to programmer who are used to braces “” while coding which is not following in Python.

Second

I support you. One of the most sought-after criteria in learning any language is the available support. And here too Python does not lag behind, though being the second oldest language. Yes, you read it right. Python came into being in 1989. And C++ and Java were in 1983 and 1995 respectively. There is a Big and active community available to provide support. There are a lot of guides, tutorials, program samples, videos available that aid in learning

Third

I am everywhere. There are thousands of packages available to cater various needs of developers (Python Package Index (PyPI)). And these are actively updated and maintained. A few of the very well know areas where Python has made an impact are

  • Data Science / Machin learning / Big data – these are some of the hottest keywords in the industry at present and Python language provides numerous packages to implement these concepts to improve on. Some of these packages are…

    • NumPy (package designed for mathematical and scientific computations)
    • Pandas (a data analysis package, suitable for managing large data sets)
    • Matplotlib (a library for plotting data)
    • SciPy (based on NumPy and used for more complex mathematical and statistical computations)
    • Kera – for Neural Network API
    • Natural Language Toolkit (NLTK) – for natural language processing
    • Some other packages are Statsmodels (for statistical computations), Plotly (for 3-dimensional data visualization), Seaborn (an extension of MatPlotlib)
  • Web Development – When we think of it, a lot many things come to our mind with regard to DB, security, user admin, session management, URL routing etc. and along comes a lot of work to do make it work. Python’s answer to this is

    • Django – open source framework used for developing data-driven sites. It is known as “batteries included” framework that provides code to manage DBs, security, URL routing, templates and forms and allows developers to focus on application development Some other known packages are Flask, Web2Py, Bottle, Falcon etc
  • Test Automation – Another area which is very hot in demand today. As IT industry is moving towards CI/CD automated test cases is a pre-requisite. And, Python, here to provides a number of packages that help with automation of test cases. Some these are mentioned below.

    • PyTest- a well featured testing framework
    • PyUnit – automation framework for UNIT testing
    • pyWinauto – to automate Windows GUI
    • Requests – for REST API or any HTTP related testing

Other areas where Python has made an impact are Games development, Business applications, GUI applications, Network programming. To summarize, one language and many opportunities in the industry

Fourth

Catch them young. Today, due to its easy availability of so many libraries, it is also being used extensively both in schools and colleges to execute various academic projects. And enabling students to code from simple scripts to complex game programming. Considering that students should know programming as well, again Python makes a very good choice here as well.

Here are some more points that deserve a mention which helps its learners to be a better and mature programmer as well

Fifth

I got some style. This language, has its own style guide (PEP-8). And this tries to give a consistency so as to improve the readability of code by laying down some guidelines to follow. For example, “Use 4 spaces per indentation level”.

Sample Code

def function_name(var_one, var_two):
print(var_one)

And it is this indentation that makes the “print” statement body of the function “function_name”. Another example is “Limit all lines to maximum 79 characters”. And we have packages like “pycodestyle” that checks for code conformance as per PEP-8 and “autopep8” goes a step ahead and reformats the code. And all this is to inculcate the culture of consistency and making the code easily readable, understandable and maintainable

Sixth

I have my own guidelines. Python language, as it has matured has come up with its own commandments that developers should follow. This is “PEP 20 – The Zen of Python”. Summing up, Python language, has not only matured along the time but also has succeeded in creating a patronage by providing not only numerous packages and libraries that can be applied in varied industries and domains but provides a strong support base to present and future Python programmers. Making it a very suitable language both for the new and experienced programmers. We at MACL, provide an introductory course on Python that will help you not only to learn the nitty gritty of the language but also will help you to gain in experience on some of the most popular packages (NumPy, Panda, MatPoltLib, Django, Flask, PyUnit, JSON, etc) of this versatile and high in demand language.

%d bloggers like this: