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.
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.
Scientific topics covered include the following:
- The Ancient Greeks and fundamental mathematical algorithms
- Monte Carlo simulation applied to a variety of topics, including random walks and simulating a presidential election
- Cellular automata and Conway’s Game of Life
- Evolutionary dynamics and game theory, with social science applications
- Finding replication origins in bacterial genomes
- Building evolutionary trees for viruses from genetic data
- Using object-oriented programming to build a galaxy simulator
- Introductory cryptography
- Data visualization
- Protein folding
Programming topics include:
- Imperative programming constructs: functions, if-statements, loops (for, while), switch- statements, expressions
- Basic data structuring constructs: variables, arrays, strings, structs, types, and pointers 2
- Reading and writing files
- How to build large programs using top-down design
- Basic execution and memory model (Von Neumann architecture)
- Linear data structures: arrays, lists, stacks, queues; binary search
- Dictionary data structures: binary search trees including tree traversals (DFS, BFS, pre-, in-, post-order); hash tables.
- Divide and conquer, recursion
- Assertions, preconditions, postconditions
- Code documentation
- Unit tests — testing small sections of code
- Debugging — strategies, common errors
- Profiling — figuring out what’s taking so long
- Bigger units of code: Modules, namespaces, packages
- Type interfaces and user-defined types
- Object-oriented programming
- Design patterns
- Turing machines
- Halting problem and uncomputable functions
- NP and NP-complete problems
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.
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.
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)