Root finding, interpolation and python

I prototyped the codes to find the root of a function, using the bisection, newton-rhapson and secant methods. And then i tried writing a code to do polynomial interpolation. Both of these codes need refinement, the latter more than the former. But i finally wrote code, after two days of putting it off and doing other chores instead of this. And the reason i finally did so was, partially, python. Well, apart from my mood being better today than in the days before, I think trying to write the code in python is what kept me going, instead of say c or fortran.

The reason why I prefer python and ask beginners to use it is because of how easy it is to write a prototype in python. The number of steps from idea to a model are the least in python, in comparison to c or fortran. Relaxed syntax constraints, dynamic type allocation, variable initialization. I don't know which of these, and many other such differences, is the reason why i prefer python over C. Maybe I have an intrinsic bias because I started programming seriously in python, although the first programming language i was introduced to was C. And it maybe easier for people comfortable with C to convert ideas to models in C. Long story short, there is no need for a debate on which programming language is better. There should be a debate however on how to teach programming concepts so that students grasp them faster and become capable of using them as tools.

Popular posts from this blog

Arxiv author affiliations using Python

Farewell to Enthought

Elementary (particle physics), my dear Watson