Day 1 - Introduction to Fundamentals of Programming (For Mathematicians)

Video

Motivation

These days, more and more technical skills have become essential for the modern mathematician, but our education has not kept up. The skills we are learning in this course are skills that many working mathematicians and graduate students have had to pick up on their own in order to do their jobs, at one point or another.

All of the technologies in this course are things I am still learning about, and are near and dear to my heart. I hope in time I can convince you that they are worthwhile and that you will become fond of them as well.

This can be a long, frustrating process and can leave serious gaps in knowledge or flaws in practice. I'm hoping that we can do this another way.

Structure

By necessity, we will be doing this class online. However, I am hoping to preserve as much of the benefits of same-room interaction as possible. This course was designed to be a lab course, and was designed after some excellent lab courses run by Professors William Stein at UW and Kevin Cooper at WSU.

Because of that, each lecture is going to have three parts.

From 12:00PM to 12:10PM EDT, we are going to get everyone set up and ready to start.

From 12:10 to roughly 12:30, we will briefly go over relevant parts of the previous day's worksheet, and introduce new material. During this time, please mute your mics and use the "Raise Hand" feature to ask questions.

From 12:30 to 12:50, we will break out into individuals or groups to start through the current day's worksheet.

From 12:50 to 1:00, we will discuss the current day's worksheet.

Then, at your leisure between 1:00PM and 12:00PM the next day, you will finish the worksheet.

Grading

This class is pass/fail. To pass this class, you must do three things:

  • Attend the majority of classes, and watch the remainder - or make other arrangements in agreement with me
  • Finish all the worksheets in a timely manner - I understand that it is not always possible to do your homework that day, but the class builds off itself so people need to stay as current as they are able.
  • An end-of-semester project of your own design and scope, with progress made to your own satisfaction.

Software Installation

For this course, we are going to be using the following software installed locally. For everything on this list, you can use an alternative, but you will be responsible for any translating that is necessary.

  • Atom text editor
    • Hydrogen
    • latex
    • language-latex
    • platformio-ide-terminal
  • bash (git bash on Windows / system native)
  • miktex on Windows / MacTex on MacOsX / native texlive on Linux
  • anaconda python 3.7 on Windows + Mac / native python3 on Linux
    • Jupyter
    • Numpy
    • SymPy
    • MatPlotLib
    • Pandas
  • sqlite3 (from Anaconda if used, or your native package manager)

Advanced Users - Managed Python Environments

Often people will install all their packages to a central place in their computer, but people have found that - for the purposes of consistency, or to use incompatible packages/software - it is better to keep your software more local.

This is very useful if you:

  • Want to use multiple versions of python or of certain libraries
  • Want to test your software with minimal requirements, to prevent interference
  • Want to create something sharable that you know will work
  • Want to avoid unintended consequences elsewhere in your system

Anaconda Environments can be set up on a computer, user, or directory basis.

Python Virtualenvs are similar, but are exclusively directory based. This is useful for software development, but - if you find yourself using the same tools in many different directories - can become cumbersome to set up.

Feel free to create an environment for this course, if you want to keep the python here separate and contained.


Today's worksheet, on Brightspace, should help verify that you have the software installed and in the correct path. If all goes smoothly, we should be done before the end of the first hour - in which case, we'll have a light day. For those of you following along without enrolling, after installing, open a new terminal (in Atom, if platformio is installed, click the plus button in the lower left corner) and run:

conda list --export > python_packages.txt
apm list --packages --installed --enabled --bare > atom_packages.txt
pdflatex --version > latex_version.txt
sqlite3 --version > sqlite_version.txt

Check the outputted files to make sure you have all the software listed above.

Good luck over the summer, and happy programming!

Best, Clinton

Department of Mathematics, Purdue University
150 N. University Street, West Lafayette, IN 47907-2067
Phone: (765) 494-1901 - FAX: (765) 494-0548
Contact the Webmaster for technical and content concerns about this webpage.
Copyright© 2018, Purdue University, all rights reserved.
West Lafayette, IN 47907 USA, 765-494-4600
An equal access/equal opportunity university
Accessibility issues? Contact the Web Editor (webeditor@math.purdue.edu).