
While going through Magnus‘s book “Begining python from novice to professional“, I was on chapter 11, and being a system admin, mostly sys ads don’t care whether the scripts written are object oriented or procedural, we njust need the script to be working, as most the time the requirements are urgent.
The chapter 11in Magnus’s Book is well explained, its excellent, specially the polymorphism part, its beautifully explained. At the end of the chapter Magnus has written “Some thoughts on Object Oriented Design”, which i think are really practical and should be followed while writing the code. I am posting some of the tips here. Hope you find it useful.
Tips for Objet Orientation :-
• Gather what belongs together. If a function manipulates a global variable, the two of them might be better off in a class, as an attribute and a method.
• Don’t let objects become too intimate. Methods should mainly be concerned with the attributes of their own instance. Let other instances manage their own state.
Read more…

Now I am not gonna write any history about the Python programming language, If you would like to know the history and other related stuff you can check out python on wikipedia. Working as as system admin, most of the time many of us are hooked on to the bash and shell scripting, as that is the simplest programming stuff that admins can learn quick and easily and implement it. Because most the scripts written by admins are kind of Monitoring, Backup, or updation scripts.
Last month i got hooked on to the Python programming language, for the past few months i visited some tech blogs and got some good articles on the Python thing and started visiting python.org quiet often and reading about the number of organizations and success stories, thought of giving a try, I planned to learn it all by myself, first thing started googling online pdf stuff to learn python as a beginner. After going through many online tutorials and pdfs i Slected the Beginning Python: From Novice to Professional By Magnus Lie Hetland, great stuff and it helped me in learning and understanding python, i loved this Book, it cleared my basics on python (well, i didn’t do the projects that were mentioned, but i would suggest, if you select this same book, please also try for the projects, it would give you a good hands on). after that my 2nd Book was Python:Create-modify-Reuse By Jim Knowlton, This was a good book to get further practical in Python and gave me quiet little confidence that yes i can write python code. My 3rd and 4th Books which i still keep at hand for my reference are the Python for Unix and Linux System Administration By Noah Gift & Jeremy Jones, And Python CookBook By Alex Martelli & David Ascher. As for the Python CookBook, the Book is quiet Heavy to be carried daily to Office, so you can refer it online at the Following URL:- http://aspn.activestate.com/ASPN/Cookbook/Python.
Read more…