Table of Contents

Practical Introduction to Programming for Scientists

Spring 2013

Mondays & Fridays, 9am - 10:30 N315

Since some of you don't have Blackboard access, this Wiki page will host all class material, including:

A Note about the Book chapters The book chapters are excerpted from a book I've started writing. The book is incomplete at present, and the chapters are in rough-draft form. Additionally, the book is designed for eBook readers, and has multimedia content which doesn't come through in the PDF versions I'm passing to you. The book is not required reading, I'm providing it only to give those of you just starting with programming a little extra help.


Lecture Notes Video Homework Extra Practice
1 - Introduction http://blake.bcm.edu/dl/EMAN2/lecture_1.pdf«BR»http://blake.bcm.edu/dl/EMAN2/terminal_1.txt Lecture Video: Failed Audio, sorry, no video :(«BR»Book Chapter 1 (Installation Instructions) 1. Fill out and email this form: Click Me «BR»2. Get Python working on your computer (nothing to turn in)
2 - Conditions, loops, and variables http://blake.bcm.edu/dl/EMAN2/lecture_2.pdf«BR»http://blake.bcm.edu/dl/EMAN2/terminal_2.txt Lecture Video http://blake.bcm.edu/dl/EMAN2/homework2.pdf Book Chapter 2 (may be helpful for beginners, fun for others. Not required.)
3 - How to Write a Program http://blake.bcm.edu/dl/EMAN2/lecture_3.pdf«BR»http://blake.bcm.edu/dl/EMAN2/terminal_3.txt Lecture Video http://blake.bcm.edu/dl/EMAN2/homework3.pdf«BR»http://blake.bcm.edu/dl/EMAN2/translate.py
4 - Standard Libraries & Biopythonhttp://blake.bcm.edu/dl/EMAN2/lecture_4.pdf«BR»http://blake.bcm.edu/dl/EMAN2/terminal_4.txt Lecture Video http://blake.bcm.edu/dl/EMAN2/homework4.pdf«BR»On the Mac, you must have XCode installed http://blake.bcm.edu/dl/EMAN2/extra4.pdf«BR»Book download see below
5 - Numpy,Scipyhttp://blake.bcm.edu/dl/EMAN2/lecture_5.pdf«BR»http://blake.bcm.edu/dl/EMAN2/terminal_5.txt Lecture Video http://blake.bcm.edu/dl/EMAN2/homework5.pdf«BR»Example CSV: http://blake.bcm.edu/dl/EMAN2/example5.csv http://blake.bcm.edu/dl/EMAN2/extra5.pdf
6 - HTML, XML & the Webhttp://blake.bcm.edu/dl/EMAN2/lecture_6.pdf«BR»http://blake.bcm.edu/dl/EMAN2/terminal_6.txt Lecture Video http://blake.bcm.edu/dl/EMAN2/homework6.pdf
7 - Debugging and GUI Programminghttp://blake.bcm.edu/dl/EMAN2/lecture_7.pdf Lecture Video http://blake.bcm.edu/dl/EMAN2/homework7.pdf http://blake.bcm.edu/dl/EMAN2/class_tutorial_1.py«BR»http://blake.bcm.edu/dl/EMAN2/class_tutorial_2.py
8 - PIL & Scopehttp://blake.bcm.edu/dl/EMAN2/lecture_8.pdf Lecture Video http://blake.bcm.edu/dl/EMAN2/homework8.pdf
9 - Scientific Image Processing (EMAN2)http://blake.bcm.edu/dl/EMAN2/lecture_9.pdf «BR»http://blake.bcm.edu/dl/EMAN2/terminal_9.txtLecture Video no more homework
10 - Program structure, networking, regular expressions, …http://blake.bcm.edu/dl/EMAN2/lecture_10.pdf «BR»http://blake.bcm.edu/dl/EMAN2/terminal_10.txt Lecture Video
11 - Networking, Regular Expressions and Parsinghttp://blake.bcm.edu/dl/EMAN2/lecture_11.pdf Lecture Video
12 - Databases Guest Lecture. Not recorded.
13 - The last lecture, bring your laptopshttp://blake.bcm.edu/dl/EMAN2/lecture_13.pdf «BR»http://blake.bcm.edu/dl/EMAN2/chat.py Lecture Video

Instructions for Class Projects

(If you believe you will need an exception to something below, please ask BEFORE the class on Monday !)

Please follow these instructions exactly:

On Monday, Feb 25, we will meet at the usual location (check back here on Sunday to make sure there were no last minute changes):


Introduction to programming book draft - http://blake.bcm.edu/dl/EMAN2/Ludtke_book_draft_2013_01.pdf I'm making the entire current text of my book draft available to those in the class. It is very far from complete, and really only contains another 1 1/2 chapters beyond what I already made available. Since this website is publicly accessible, and I do intend to eventually finish the book, it is password protected. I will give you all the password to access it in class Friday, and I ask that you not circulate it outside the class. Thanks.

Auditors are welcome, but if possible (all students, and some others) please FORMALLY audit the class, rather than just showing up. A) this means you have at least a small commitment to actually attend and B) if you don't formally audit, the GS has no record of your interest and they may give me a very small room to teach in next time. It does not take much effort to audit formally.

Homework will be assigned each class, at least for the first 2/3 of the term, and is due via email to sludtke@bcm.edu , before the beginning of the following lecture. We will go over solutions to each homework assignment in-class. Homework is the reason for the strange schedule (M & Th). With this schedule you will always have at least two days for each homework assignment, and at least one day on which you can talk to me if you need help. Since the class is offered for credit, homework will be graded, but on a very lenient scale:

1. Homework turned in, but no reasonable attempt was made to complete the assignment 2. A good effort, but with very major flaws 3. Largely correct solution, but with some flaws 4. Program does what it should, with minimal flaws

This class attracts people with widely varying backgrounds and skill levels. Since the course is supposed to be accessible to people with little to no programming experience, the bar for achieving an acceptable grade (B) in the class is set fairly low. If you make a reasonable attempt at all of the homework assignments, even if not completely successful, and complete a class project of some sort, you can expect to get at least a B in the class. This does not mean you can slip through without making an effort at all. Particularly if you have no programming experience at all, the class WILL take a significant effort on your part. Those who don't even make an attempt at virtually every assignment will likely not achieve a B.

There will also be a class project in lieu of a final exam. Each person will, over the course of the term, write a program, and briefly present it at a special class at the end of the term. The sole requirement for the program is that it do something useful. We will discuss more about the class projects later in the term.

Examples of past class projects