MAS.500 - Software Module - Rahul Bhargava 
Programming 2014.11.07
Course Outline 
Python 
How Software Works 
Programming Styles
My Guidelines 
❖ we will use python as a learning language (I will give you lots of 
example code) 
❖ I will survey existi...
What do You Know?
What do You Want to Learn?
Python
Beautiful is better than ugly. 
Explicit is better than implicit. 
Simple is better than complex. 
Complex is better than ...
Interactive Console
Modules & Packages 
❖ any file is a “module” 
❖ packages: “App Store” for re-usable code via pip or 
easy_install 
❖ loggi...
How Software Works
Instruction Machines
Parsing 
Source: http://goose.ycp.edu/~dhovemey/spring2008/cs496/lecture/lecture1.html
Compiling 
Source: http://goose.ycp.edu/~dhovemey/spring2008/cs496/lecture/lecture1.html
Running 
❖ Step through instructions 
❖ Access storage as needed 
❖ speed of access 
❖ Generate output
Programming Approaches 
https://github.com/rahulbot/Programming-Style-Examples
Programming Approaches 
❖ Imperative 
❖ Everything is global, doesn’t scale well 
❖ Procedural 
❖ Make procedures to separ...
Homework 
❖ setup python (v2.7) 
❖ setup git (github.com has great instructions) 
❖ clone this repo: https://github.com/ra...
[Mas 500] Intro to Programming
Upcoming SlideShare
Loading in...5
×

[Mas 500] Intro to Programming

241

Published on

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
241
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

[Mas 500] Intro to Programming

  1. 1. MAS.500 - Software Module - Rahul Bhargava Programming 2014.11.07
  2. 2. Course Outline Python How Software Works Programming Styles
  3. 3. My Guidelines ❖ we will use python as a learning language (I will give you lots of example code) ❖ I will survey existing tools for each topic (but I’ll introduce you to just one or two) ❖ I will bring in people to give examples (because you need to build something to get your degree) ❖ you will get out as much as you put in (I aim to help beginners, intermediates, and experts) ❖ you will learn how to learn (because you won’t become a programer overnight)
  4. 4. What do You Know?
  5. 5. What do You Want to Learn?
  6. 6. Python
  7. 7. Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Readability counts. –PEP 20 (The Zen of Python)
  8. 8. Interactive Console
  9. 9. Modules & Packages ❖ any file is a “module” ❖ packages: “App Store” for re-usable code via pip or easy_install ❖ logging, testing, etc. ❖ Make your own: folder-based hierarchy with the magic __init__.py file ❖ https://wiki.python.org/moin/UsefulModules ❖ https://pypi.python.org/pypi
  10. 10. How Software Works
  11. 11. Instruction Machines
  12. 12. Parsing Source: http://goose.ycp.edu/~dhovemey/spring2008/cs496/lecture/lecture1.html
  13. 13. Compiling Source: http://goose.ycp.edu/~dhovemey/spring2008/cs496/lecture/lecture1.html
  14. 14. Running ❖ Step through instructions ❖ Access storage as needed ❖ speed of access ❖ Generate output
  15. 15. Programming Approaches https://github.com/rahulbot/Programming-Style-Examples
  16. 16. Programming Approaches ❖ Imperative ❖ Everything is global, doesn’t scale well ❖ Procedural ❖ Make procedures to separate things ❖ Object-Oriented ❖ Encapsulate complexity via abstraction ❖ Event-Driven ❖ Limit scope to reduce complexity ❖ Functional ❖ Functions operate on data so you don’t manage state ❖ demos
  17. 17. Homework ❖ setup python (v2.7) ❖ setup git (github.com has great instructions) ❖ clone this repo: https://github.com/rahulbot/Programming-Style-Examples ❖ push homework to a git repository (github or elsewhere) ❖ beginner: ❖ modify an example to count total votes counts for each person ❖ intermediate: ❖ create an election results module to encapsulate all the loading, add methods for accessing total vote counts and other features ❖ advanced: ❖ build a module that scrapes (use BeautifulSoup) more detailed election data ❖ http://www.archives.gov/federal-register/electoral-college/2012/popular-vote.html ❖ add the ability to export it to CSV and JSON
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×