Carnegie Mellon University

Programming for Scientists

Course Number: 02-601

Provides a practical introduction to programming for students with little previous programming experience who are interested in science. Fundamental scientific algorithms will be introduced, and extensive programming assignments will be based on analytical tasks that might be faced by scientists, such as parsing, simulation, and optimization. Principles of good software engineering will also be stressed. The course will introduce students to the Go programming language, an industry-supported, modern programming language, the syntax of which will be covered in depth. Other assignments may be given in other programming languages to highlight the commonalities and differences between languages. No biology background is needed. Analytical skills, an understanding of programming basics, and mathematical maturity are required.

Semester(s): Fall
Units: 12
Prerequisite(s): none
Location(s): Pittsburgh

Format

Lecture

Textbook(s):

none

Learning Objectives

Our first goal for this course is to make you comfortable writing your own programs and have a better understanding of how computing works, at multiple levels.

Our second goal is to convince you how much fun programming is! Writing a program is like solving a puzzle — programming tests (and builds!) your powers of concentration and logical thinking. But programming is more rewarding than solving puzzles because it equips you with a transferable skill of solving problems across a variety of contexts.

 Our third goal is to help you understand some fundamental scientific (in particular, biological) algorithms on a high-level.

Key Topics

Scientific topics covered include the following:

  1. The Ancient Greeks and fundamental mathematical algorithms
  2. Monte Carlo simulation applied to a variety of topics, including random walks and simulating a presidential election
  3. Cellular automata and Conway’s Game of Life
  4. Evolutionary dynamics and game theory, with social science applications
  5. Finding replication origins in bacterial genomes
  6. Building evolutionary trees for viruses from genetic data
  7. Using object-oriented programming to build a galaxy simulator
  8. Introductory cryptography
  9. Data visualization
  10. Protein folding

Programming topics include:

  1. Imperative programming constructs: functions, if-statements, loops (for, while), switch- statements, expressions
  2. Basic data structuring constructs: variables, arrays, strings, structs, types, and pointers 2
  3. Reading and writing files
  4. How to build large programs using top-down design
  5. Basic execution and memory model (Von Neumann architecture)
  6. Linear data structures: arrays, lists, stacks, queues; binary search 
  7. Dictionary data structures: binary search trees including tree traversals (DFS, BFS, pre-, in-, post-order); hash tables. 
  8. Divide and conquer, recursion 
  9. Assertions, preconditions, postconditions
  10. Code documentation
  11. Unit tests — testing small sections of code
  12. Debugging — strategies, common errors
  13. Profiling — figuring out what’s taking so long 
  14. Bigger units of code: Modules, namespaces, packages
  15. Type interfaces and user-defined types
  16. Object-oriented programming
  17. Design patterns
  18. Parallelism
  19. Concurrency 
  20. Turing machines
  21. Halting problem and uncomputable functions
  22. NP and NP-complete problems

Prerequisite Knowledge

A strong ability in high school algebra and precalculus is helpful. Students should be strong problem solvers and be comfortable in the basics of introductory programming, including variables, functions, and control flow.

Course Relevance

02-601 is designed for first-year graduate students at Carnegie Mellon looking for an intensive but reasonably paced introduction to programming, as a foundation for further computational courses at CMU.

Assessment Structure

Programming assignments (30% of grade)

Exams (40% of grade)

Project (15% of grade – 02-601 only)

Pre-class exercises (7.5% of grade)

Attendance and participation (7.5% of grade)