Thursday, March 17, 2016

Third Week of LITG Program

The first three weeks in the schedule of the LITG program was dedicated to learning Python, the new programming language that I am about to explore throughout the program. Grasping the basics was not so hard with the proper guidance of my mentor. Also as a developer who has coded in several other languages such as Java, C, C# before I realized that the fundamental concepts and structures do not differ much among these programming languages. Yet laying a firm foundation with Python is of utmost importance to excel in the LITG program. As instructed by my mentor I referred the book 'Learn Python the Hard Way', available at http://learnpythonthehardway.org/book/.

This book is an excellent guide for any newbie to start learning to code in Python. It consists of a series of exercises from beginner level to more advanced concepts in programming such as inheritance, composition. The book starts with very basic concepts in programming such as adding comments, dealing with mathematical operators etc. The way the author has structured the book from easy to difficult tasks makes the learner much more enthusiastic to proceed learning. The author stresses not to copy paste the same code samples from the book but to code them by the learner himself to enhance the learning experience. This indeed helped me since typing is the best way to get familiar with the syntax of any new programming language. Also each exercise consists of a set of study drills which helped me further improve my knowledge related to that particular exercise. These study drills are actually extensions of the main exercise which instructs the learner to play more with the new facts learned with each exercise. The quizzes evaluated my learning, what I need to find out more and also what areas I am already proficient in. As a whole this book can be recommended to both beginner level programmers as well as to more advanced programmers who are beginners to Python. 

Now I would summarize the Python learning experience that I gained through this book. All python files are saved with the extension .py. Python is an object oriented programming language similar to Java meaning that it has all the common oop concepts such as classes, objects, functions, inheritance, compositions etc. Apart from that it is also a scripting language. Another important fact that I learned about Python is that it has modules which can be imported into any Python script. A module is a Python file with some functions or variables in it. Once the imported, the functions and the variables of the module can be used within the Python script. A class in Python is also like a mini module. Also every class inherits from a class named object which is quite strange and different from other programming languages such as Java. Inheritance(is-a) and composition(has-a) are two prominent relationships within any Python class. However the author of the book thoroughly discourages the use of multiple inheritance due to its complexity. 

The exercises of this book done by me are available at the github repository https://github.com/hansika/LearnPython. My usual practice is to add comments wherever necessary to make the concepts much more clear and also to make it convenient for me when I come back and look at these exercises after some time. I did as many study drills as possible to grasp the concepts more clearly. As soon as I found new keywords or new built-in functions I would search online for more knowledge regarding them. These extra facts that I find, I recorded in a separate file named information.txt which can also be found inside the same github repository. I can refer this file whenever needed to brush up and renew my knowledge. 

The path ahead in the LITG program would be challenging. Yet, with a firm foundation of language basics coping up with challenges would be much easier. I am looking forward to explore more in Python and enlarge my knowledge-base with the new facts I come across everyday. 

No comments:

Post a Comment