Arman Akbarian
UNIVERSITY OF BRITISH COLUMBIA
PHYSICS & ASTRONOMY DEPT.

Learn Scientific Programming by Examples:

As far as my experience, learning a new programming/scripting language can be much faster by going through examples, particularly if you have already done programming in another language and are familiar with the concepts of programming, such as control structure, loops, data types and so on.

The following is a collection of code examples, some I wrote while I was learning a new language, some are developed as computational tools in my research, some of them are designed by my supervisor Matt Choptuik and used in his popular PHYS210 and PHYS410 computational physics courses in UBC. Lastly, there are few links that I came across on the web and found them to be good examples to learn the features of the programming language they are written in.

Most of the examples are focused on scientific computing. I will hopefully add more examples in C++, Python, Bash scripting and GPU Accelerators (OpenACC).


last update: Wed May 11, 2016