SE4Sci

Intro to the course

The importance of SE in scientific computing

  • It's easier to write code than read code
  • A goal of good software engineering is to reuse code
  • This is the opposite of how we learn to code!

This course aims to fix that by providing a structured introduction to best practices and useful tools.

Some important overarching concepts

  • Version control
  • Testing and debugging
  • Continuous integration
  • Packaging and distribution
  • Design principles
  • Compiled code
  • Performance

Notes on language and tooling

We will use Python and Python specific tools (first 2/3 of course).

But concepts are general! You can find similar tools for any language once you know the concepts.

Problem-solution ordering

Other courses have this too, but it hits us hard!

Classic example: Game design

  • Make a tutorial teaching about locked doors
    • Give player a key
    • Have them open a locked door
  • Make a level with a locked door
    • Player is supposed to go look for key!

But they didn't know that the tutorial key opened the tutorial door!

Problem-solution ordering (2)

  • Need to collaborate -> git
  • Find a failure introduced in code -> git
  • Spend 1+ day hunting bug -> debugger / unit testing
  • See compiler catch bug early -> static typing
  • Memory leaks / segfaults -> memory safety

These are worth the tradeoff, but you might not see that yet!

New features are restrictions

Each new concept in programming restricts rather than enables.

May seem counter-intuitive at first!

We could write any program with a very small set of constructs; even very simple languages are Turing Complete.

However, the most important feature of programming is organization (also called design).

Example: goto (hypothetical)

i = 0
label start
compute(i)
i = i + 1
if i < 10: goto start

vs.

for i in range(10):
    compute(i)

Course structure

The challenges of this course:

  • Often introducing solutions before problems
  • Large variance in the audience in terms of skill and background
  • Good coding basics rarely taught elsewhere

Introductions

I'd like to know who you are and what you are interested in! Let's do a round of introductions. Suggested topics:

  • Name
  • School
  • Preferred programming Language(s)
  • A project you are working on or want to work on