Practical Introduction to Programming for Scientists

Spring 2015

Mondays & Fridays, 9am - 10:30 N315

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

Please note that we will use Python 2.7.X for this class. While Python 3.X is available, it remains much less widely used than Python 2, and most important features for purposes of this class have been back-ported to Python 2.7.


Lecture

Notes

Video

Homework

Other

1 - Introduction

lecture_1.pdf
terminal_1.txt

Lecture Video

1. Take this survey: http://goo.gl/forms/fHCmTavj1c
2. Email passport style photo to sludtke@bcm.edu
3. Get Python 2.7.X working on your computer

2 - Program Flow

lecture_2.pdf
terminal_2.txt

Lecture Video

homework_1.pdf

practice_soln_1.pdf

3 - Lab 1

lecture_3.pdf
terminal_3.txt

Lecture Video

Lab1.pdf
translate_orig.py

4 - More Basics

lecture_4.pdf
terminal_4.txt

Lecture Video

homework_2.pdf

extra_practice_2.pdf

5 - Loops and Modules

lecture_5.pdf
terminal_5.txt

Lecture Video

homework_3.pdf

http://anandology.com/python-practice-book/index.html

6 - Lab 2 (BioPython)

lecture_6.pdf

Lecture Video

lab_2.pdf

pubmed.py

7 - Numerical Computing

lecture_7.pdf
terminal_7.txt

Lecture Video

homework_4.pdf

8 - Lab 3 (NumPy & Matplotlib)

lecture_8.pdf

Lecture Video

lab3_hw4.pdf

plot.py
sample1.txt
sample2.txt

9 - Image Processing and Networking

lecture_9.pdf
terminal_9.txt

Lecture Video

homework_5.pdf

10 - Lab 4 (Network Programming)

lecture_10.pdf

Lecture Video

tcp_send_file.py

udp_chat.py
tcp_send.py
tcp_receive.py

11 - PIL and GUI Programming

lecture_11.pdf

Lecture Video

extra_practice_11.pdf

12 - OOP, Debugging and the Real World

lecture_12.pdf

Lecture Video

Before lab next monday, install:
Follow instructions under "The fast way":
https://learn.adafruit.com/introducing-pro-trinket/setting-up-arduino-ide
https://github.com/adafruit/Adafruit_NeoPixel

13 - Lab 5 (Arduino)

No Lecture

Arduino Lab

14 - Compression and Databases

lecture_14.pdf

Lecture Video


Important Instructions for Class Projects

If you believe you will need an exception to something below, please ask by Feb 27 (the final lecture !)

For your class presentation, your first slide should have:

Please follow these instructions exactly:

Note: If your project requires data files too large to email (even for a basic demonstration), you can share the extra files with me via BigFile, DropBox or Google Drive. If you need to do this, prepare the files in advance, and include the download instructions in the PDF in the .zip file.

Class Project Overview

The class project will count for 1/2 of your grade in the class, and will be scored on both your presentation and the program itself. You will likely have only ~5 minutes to present your projects when the time comes, but that shouldn't limit their complexity or your ambitions. It is a good idea to select a project which is somewhat ambitious but has some fallback positions in case you don't succeed in everything you had planned to do. Your initial project plan will not be a factor in your final grade. If the program meets the criteria below, even if it's very different than your original aim, you will still receive full credit.

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 requirements for the program are:

  1. It must do something useful not easily completed with existing freely available tools
  2. Not be completely trivial. The complexity of your project is expected to correspond somewhat to your level of past programming experience.

Examples of past class projects


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 make a reasonable attempt at virtually every assignment may not achieve a B. Turning in something incomplete is better than turning in nothing.

Homework will be assigned each Friday, due before class the following Friday, at least for the first 2/3 of the term, and is handed in via email to the class TA, Amanda Koire <koire@bcm.edu> with a cc to sludtke@bcm.edu. We will go over solutions to homework assignments in-class. Since the class is offered for credit, homework will be graded, but on a lenient scale:

  1. Homework turned in, something attempted, but not functional
  2. A good effort, but with major flaws
  3. Largely correct solution, but with some flaws
  4. Program does what it should, with minimal flaws

Auditors are welcome, but if possible (all students, and some others) please formally audit the class, rather than just showing up. 1) this means you have at least a small commitment to actually attend and 2) 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.

Introduction to programming book draft - Ludtke_book_draft_2015_01.pdf I started writing a programming book a couple of years ago, but like many such projects, it is far from complete. Since this website is publicly accessible, and I do hope to eventually finish the book, it is password protected. I provided the password in-class, and I ask that you not circulate it outside the class. Thanks. Note that the book is not required reading. It is there as an additional resource.


LectureVideo/IntroProgramming15 (last edited 2015-02-27 16:41:50 by SteveLudtke)