Coding coding coding

Despite the confusing title, in the past days I have been coding. A lot. Even though I am dying to leak information about what exactly I am working on, I still need to wait few weeks to reveal.

I thought anyway to write something about programming from the perspective of an applied mathematician. Research forces you to be humble, since failures - ideas that will not work, rejected papers, etc. - are definitely more frequent than achievements, especially for a junior researcher as myself. Coding has the special power - called debugging - to finish crushing your self-esteem.

However, programming is a skill that most mathematicians should have. A lot of current job positions - academic and not - require some programming skills and they can be useful also in teaching. The most popular coding tool among mathematicians - also in many industries - is MatLab. Its name comes from "Matrix Laboratory" since all its variables are considered arrays. It is a fourth-generation programming language, that means it is very user-friendly. MatLab is currently the tool from numerical computing. The fact that it is so popular, make it easier for the n00b user to learn it, since many online resources are available. For instance, every time I get an error I cannot understand, I google it and it never occurred that someone did not ask the same question before on the MathWorks forum.

Let me open a small parenthesis of life coaching right here. For "softcore programmers" like myself and most mathematicians, it is very important to adopt the most mainstream programming tools. Do not take any advice from computer scientists regarding this choice (*). This article showing booming languages that miserably died can explain. You need to choose a language that:

  • it's easy to learn, user-friendly and not bond to die soon,
  • it's widely used, that means there's plenty of debugging and learning resources online,
  • other mathematicians use or can easily understand.

Going back to MatLab,... When I think of it, I remember of one inscription carved in my home university elevator, "I hate MatLab" (true story). We all do, mate. It's a love-hate relationship. Anyway, MatLab can be a powerful tool for learning, teaching and researching.

License is expensive but education institutions get great discounts. If you plan to self-learn it, I suggest to start from the official tutorials. Your best tools will then be Google, the MathWorks forum and the function "help" (to know what that is, type "help help" in the command window). Many universities offer MatLab basic courses (sometime embedded in Numerical Analysis courses). You can find also some online courses, for instance one by MIT or one in Coursera.

MatLab can be frustrating, but luckily software engineers included some funny easter eggs. Try typing "why" in the command window. I got the following answers so far:

>> why
Because Nausheen obeyed some terrified young not excessively terrified engineer.
>> why
Because the hamster obeyed a bald mathematician.
>> why
Because he told me to.
>> why
Because he insisted on it.
>> why
They suggested it.
>> why
You wanted it that way.
>> why
The devil made me do it.
>> why
Some good and good and young and rich system manager wanted it that way.
>> why
Joe wanted it that way.
>> why
Cleve wanted it.

If you type "life", a simulation of Conway's Game of Life appears in a new window.

As far as I know, the most popular programming languages for mathematicians nowadays are: MatLab, R, C, C++, Mathematica (**). I warmly suggest to any mathematics student (postgrad included) to attend at least one course of general programme design and a course on one of those languages. In programming, motivation is essential, so I suggest to the same students to pick a problem in your favourite area and learn to programme with the final purpose to code a solver for that problem (general or for particular cases). I had a lot of fun when I learned C because the final project was making a Sudoku universal solver.

Now back to work. Hopefully I'll have some interesting contents to share about my codes soon. I wish you no bugs this week!

(*) To be politically correct, let me stress that this would be equally fool as to ask a mathematician for a trick to multiply numbers in your head. They would prove the most general case: "Here, now you can easily multiply numbers, regardless of how you define your product operation or the ring you are in. You're welcome!".

(**) Wolfram made available a light online free version of Mathematica called Wolfram Alpha. It works perfectly if you have basic needs, like plotting something or checking an integral.

Share on FacebookShare on Google+Share on LinkedInTweet about this on TwitterEmail this to someonePrint this page

Paola Elefante

Technical Project Manager working in Supply Chain Management solutions at Relex Solutions Oy. Proud mother with the best husband ever. Shameless nerd&geek. Feminist. Undercover gourmet.

Leave a Reply

Your email address will not be published. Required fields are marked *