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