Carnegie Mellon University

Programming for Scientists

Course Number: 02-601

Provides a practical introduction to programming for students with little or no prior 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, *and students will have the opportunity to design their own programming project on a scientific topic of their course*. 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 will be given in other programming languages such as Python and Java to highlight the commonalities and differences between languages. No prior programming experience is assumed, and no biology background is needed. Analytical skills and mathematical maturity are required. Course not open to CS majors.

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 sudoku puzzle — programming tests (and builds!) your powers of concentration and logical thinking. But programming is more rewarding than sudoku because it equips you with a transferable skill instead of the ability to fill in a square of numbers.

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

Finally, for students taking the graduate version of the course (02-601), we want you to gain independence to hack your own scientific problem by planning and executing a longer programming assignment of your own choice, so that you will be capable of programming independently in the future.

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 typically helpful, but no prior background in programming is required.

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 programming courses at CMU.  02-201 is designed for undergraduate students at CMU outside of the School of Computer Science who are interested in learning to program in an environment with scientific applications.

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)