Weblog Archive

Python update

Mon, 22 Jan 2007 at 20:41 • Chyetanya Kunte • Filed under Noteworthy, School Days, Self

I have spent a week learning Python, so far in my spare time, and I find it extraordinarily beautiful. It is as if this language was designed to take the pain out of typical programming language headaches.

As I get introduced to each function, I can already think of ways in which I can use its capability in the code I would write. I never thought like that about any other programming language, I have learnt. I swear! And, I am still learning procedural programming, and have yet to touch upon object-oriented methodology.

How I wish, I had discovered this in the early nineties, while I was in college, and was more enthusiastic about such things. How I wish Civil engineering departments in institutions around the world finally put the age-old prescription of FORTRAN to rest, and replace it instead with Python.

Digression: The reason I really took to programming was to reduce repetitive term-work, and not because it was part of my course. My first major coding started when a professor, teaching Water Resources Engineering in my under-graduate course (circa 1991), gave us a pile of gravity-dam stability problems, which we were to submit as our term-work.

It was near the end of term and we were really deep in our year long portion to cover1. The-term work would take out my precious time from my other studies.

I solved one problem manually, which made me realize the enormous amount of work we were given. The time constraint was squeezing out every minute of what was left before our exams.

Fortunately, the set of problems were similar and I had just about three cases that were slight variants of each other. So, I wrote my first program that actually solved my problem. Then, I validated it with the work I had done by-hand previously. The results matched.

But, I didn’t want to cheat, so I told my professor that because of time constraints, I had written a program that could calculate it for me, instead of solving all of the given problems by-hand.

I was expecting him to ask me to do according to the practice and as per term-work criteria for students. That is solve and report in our journals by-hand. No one had ever submitted a computer output as a term-work before. So, I wasn’t even expecting anything else.

But, my professor’s reaction surprised me. He asked for the results from my hand-calculations and then checked the computer output. And because he didn’t much understand my program, he asked me to print intermediate results from the program to further validate and cross-check the program’s ability. I did that and they matched too (obviously).

To my joy, he was impressed and went on to allow me to submit the computer outputs, and asked me to include the program source and validation report in my journal. I was only too happy to oblige.

As I learn Python, it surely brings some of that enthusiasm back.

  1. We had no semester system, so we actually started studying towards the year end. :) []
[ Ads ]

Related posts

Following list is auto-generated, based on this post's context as possibly related. You may, however, occasionally find some in this list unrelated, but nevertheless, we sincerely hope that you'll enjoy them too.

Respond privately

Comments are closed, but you may respond privately to “Python update.” (Your response will not be published.)