SlideShare une entreprise Scribd logo
1  sur  18
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 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)
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 complicated. 
Readability counts. 
–PEP 20 (The Zen of Python)
Interactive Console
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
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 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
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

Contenu connexe

Tendances

Pengantar Ruby on Rails
Pengantar Ruby on RailsPengantar Ruby on Rails
Pengantar Ruby on RailsAshari Juang
 
Automating Your Daily Tasks with Scripting - RubyConf 2015 Taiwan
Automating Your Daily Tasks with Scripting - RubyConf 2015 TaiwanAutomating Your Daily Tasks with Scripting - RubyConf 2015 Taiwan
Automating Your Daily Tasks with Scripting - RubyConf 2015 TaiwanAdler Hsieh
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using SwiftDiego Freniche Brito
 
Code reviews
Code reviewsCode reviews
Code reviewsRoger Xia
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageAniruddha Chakrabarti
 
Typescript for the programmers who like javascript
Typescript for the programmers who like javascriptTypescript for the programmers who like javascript
Typescript for the programmers who like javascriptAndrei Sebastian Cîmpean
 
Ruby projects of interest for DevOps
Ruby projects of interest for DevOpsRuby projects of interest for DevOps
Ruby projects of interest for DevOpsRicardo Sanchez
 
Day 2 - Intro to Rails
Day 2 - Intro to RailsDay 2 - Intro to Rails
Day 2 - Intro to RailsBarry Jones
 
GPU Computing for Data Science
GPU Computing for Data Science GPU Computing for Data Science
GPU Computing for Data Science Domino Data Lab
 
Drupal, git and sanity
Drupal, git and sanityDrupal, git and sanity
Drupal, git and sanityCharlie Morris
 
Webbisauna - ClojureScript for Javascript Developers
Webbisauna - ClojureScript for Javascript DevelopersWebbisauna - ClojureScript for Javascript Developers
Webbisauna - ClojureScript for Javascript DevelopersJuho Teperi
 
Functional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented ProgrammersFunctional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented ProgrammersDiego Freniche Brito
 
Portable PHP
Portable PHPPortable PHP
Portable PHPweltling
 
PostgreSQL and Compressed Documents (pgconf.ru 2018)
PostgreSQL and Compressed Documents (pgconf.ru 2018)PostgreSQL and Compressed Documents (pgconf.ru 2018)
PostgreSQL and Compressed Documents (pgconf.ru 2018)Aleksander Alekseev
 
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016Sunny Sharma
 
Gajendra sharma Drupal Module development
Gajendra sharma Drupal Module developmentGajendra sharma Drupal Module development
Gajendra sharma Drupal Module developmentGajendra Sharma
 

Tendances (20)

Pengantar Ruby on Rails
Pengantar Ruby on RailsPengantar Ruby on Rails
Pengantar Ruby on Rails
 
Automating Your Daily Tasks with Scripting - RubyConf 2015 Taiwan
Automating Your Daily Tasks with Scripting - RubyConf 2015 TaiwanAutomating Your Daily Tasks with Scripting - RubyConf 2015 Taiwan
Automating Your Daily Tasks with Scripting - RubyConf 2015 Taiwan
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
Code reviews
Code reviewsCode reviews
Code reviews
 
Tech talk: PHP
Tech talk: PHPTech talk: PHP
Tech talk: PHP
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
 
Typescript for the programmers who like javascript
Typescript for the programmers who like javascriptTypescript for the programmers who like javascript
Typescript for the programmers who like javascript
 
Ruby projects of interest for DevOps
Ruby projects of interest for DevOpsRuby projects of interest for DevOps
Ruby projects of interest for DevOps
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
Day 2 - Intro to Rails
Day 2 - Intro to RailsDay 2 - Intro to Rails
Day 2 - Intro to Rails
 
GPU Computing for Data Science
GPU Computing for Data Science GPU Computing for Data Science
GPU Computing for Data Science
 
Drupal, git and sanity
Drupal, git and sanityDrupal, git and sanity
Drupal, git and sanity
 
Webbisauna - ClojureScript for Javascript Developers
Webbisauna - ClojureScript for Javascript DevelopersWebbisauna - ClojureScript for Javascript Developers
Webbisauna - ClojureScript for Javascript Developers
 
Functional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented ProgrammersFunctional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented Programmers
 
Miami2015
Miami2015Miami2015
Miami2015
 
Thinking Functionally
Thinking FunctionallyThinking Functionally
Thinking Functionally
 
Portable PHP
Portable PHPPortable PHP
Portable PHP
 
PostgreSQL and Compressed Documents (pgconf.ru 2018)
PostgreSQL and Compressed Documents (pgconf.ru 2018)PostgreSQL and Compressed Documents (pgconf.ru 2018)
PostgreSQL and Compressed Documents (pgconf.ru 2018)
 
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
 
Gajendra sharma Drupal Module development
Gajendra sharma Drupal Module developmentGajendra sharma Drupal Module development
Gajendra sharma Drupal Module development
 

Similaire à [Mas 500] Intro to Programming

MenloHacks Workshop 2019
MenloHacks Workshop 2019MenloHacks Workshop 2019
MenloHacks Workshop 2019Bruce Lin
 
[Mas 500] Software Development Strategies
[Mas 500] Software Development Strategies[Mas 500] Software Development Strategies
[Mas 500] Software Development Strategiesrahulbot
 
Django Python(2)
Django Python(2)Django Python(2)
Django Python(2)tomcoh
 
Puppetizing Your Organization
Puppetizing Your OrganizationPuppetizing Your Organization
Puppetizing Your OrganizationRobert Nelson
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Michael Lihs
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python courseEran Shlomo
 
Python Programming for ArcGIS: Part I
Python Programming for ArcGIS: Part IPython Programming for ArcGIS: Part I
Python Programming for ArcGIS: Part IDUSPviz
 
Pentester++
Pentester++Pentester++
Pentester++CTruncer
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & HowAlfonso Cabrera
 
Lighning Talk: PHP build process
Lighning Talk: PHP build processLighning Talk: PHP build process
Lighning Talk: PHP build processBryan Agee
 
Suneel Marthi - Deep Learning with Apache Flink and DL4J
Suneel Marthi - Deep Learning with Apache Flink and DL4JSuneel Marthi - Deep Learning with Apache Flink and DL4J
Suneel Marthi - Deep Learning with Apache Flink and DL4JFlink Forward
 
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdfDr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdfRahulSingh190790
 
Python Programming1.ppt
Python Programming1.pptPython Programming1.ppt
Python Programming1.pptRehnawilson1
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to PythonSpotle.ai
 
What Is The BEST WAY TO LEARN PYTHON In 2023.pptx
What Is The BEST WAY TO LEARN PYTHON In 2023.pptxWhat Is The BEST WAY TO LEARN PYTHON In 2023.pptx
What Is The BEST WAY TO LEARN PYTHON In 2023.pptxcalltutors
 
Reproducibility in artificial intelligence
Reproducibility in artificial intelligenceReproducibility in artificial intelligence
Reproducibility in artificial intelligenceCarlos Toxtli
 
A Kanterakis - PyPedia: a python crowdsourcing development environment for bi...
A Kanterakis - PyPedia: a python crowdsourcing development environment for bi...A Kanterakis - PyPedia: a python crowdsourcing development environment for bi...
A Kanterakis - PyPedia: a python crowdsourcing development environment for bi...Jan Aerts
 

Similaire à [Mas 500] Intro to Programming (20)

MenloHacks Workshop 2019
MenloHacks Workshop 2019MenloHacks Workshop 2019
MenloHacks Workshop 2019
 
[Mas 500] Software Development Strategies
[Mas 500] Software Development Strategies[Mas 500] Software Development Strategies
[Mas 500] Software Development Strategies
 
Django Python(2)
Django Python(2)Django Python(2)
Django Python(2)
 
Puppetizing Your Organization
Puppetizing Your OrganizationPuppetizing Your Organization
Puppetizing Your Organization
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
 
Python Programming for ArcGIS: Part I
Python Programming for ArcGIS: Part IPython Programming for ArcGIS: Part I
Python Programming for ArcGIS: Part I
 
Pentester++
Pentester++Pentester++
Pentester++
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & How
 
Lighning Talk: PHP build process
Lighning Talk: PHP build processLighning Talk: PHP build process
Lighning Talk: PHP build process
 
Suneel Marthi - Deep Learning with Apache Flink and DL4J
Suneel Marthi - Deep Learning with Apache Flink and DL4JSuneel Marthi - Deep Learning with Apache Flink and DL4J
Suneel Marthi - Deep Learning with Apache Flink and DL4J
 
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdfDr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
Dr. Tanvi FOCP Unit-2 Session-1 PPT (Revised).pdf
 
Learning Python
Learning PythonLearning Python
Learning Python
 
Python Programming1.ppt
Python Programming1.pptPython Programming1.ppt
Python Programming1.ppt
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
What Is The BEST WAY TO LEARN PYTHON In 2023.pptx
What Is The BEST WAY TO LEARN PYTHON In 2023.pptxWhat Is The BEST WAY TO LEARN PYTHON In 2023.pptx
What Is The BEST WAY TO LEARN PYTHON In 2023.pptx
 
Reproducibility in artificial intelligence
Reproducibility in artificial intelligenceReproducibility in artificial intelligence
Reproducibility in artificial intelligence
 
LVPHP.org
LVPHP.orgLVPHP.org
LVPHP.org
 
A Kanterakis - PyPedia: a python crowdsourcing development environment for bi...
A Kanterakis - PyPedia: a python crowdsourcing development environment for bi...A Kanterakis - PyPedia: a python crowdsourcing development environment for bi...
A Kanterakis - PyPedia: a python crowdsourcing development environment for bi...
 
Php test fest
Php test festPhp test fest
Php test fest
 

Plus de rahulbot

Data Storytelling for Social Change
Data Storytelling for Social ChangeData Storytelling for Social Change
Data Storytelling for Social Changerahulbot
 
Empowering those that don't "speak" data
Empowering those that don't "speak" dataEmpowering those that don't "speak" data
Empowering those that don't "speak" datarahulbot
 
Hands on Approaches to Data Storytelling
Hands on Approaches to Data StorytellingHands on Approaches to Data Storytelling
Hands on Approaches to Data Storytellingrahulbot
 
Hands on Approaches to Data Storytelling
Hands on Approaches to Data StorytellingHands on Approaches to Data Storytelling
Hands on Approaches to Data Storytellingrahulbot
 
From Data to Argument
From Data to ArgumentFrom Data to Argument
From Data to Argumentrahulbot
 
Data Therapy: Telling Your Story Well
Data Therapy: Telling Your Story WellData Therapy: Telling Your Story Well
Data Therapy: Telling Your Story Wellrahulbot
 
Empowering People with Data
Empowering People with DataEmpowering People with Data
Empowering People with Datarahulbot
 
Practicing Data Science Responsibly
Practicing Data Science ResponsiblyPracticing Data Science Responsibly
Practicing Data Science Responsiblyrahulbot
 
[Mas 500] Visualization
[Mas 500] Visualization[Mas 500] Visualization
[Mas 500] Visualizationrahulbot
 
[Mas 500] Various Topics
[Mas 500] Various Topics[Mas 500] Various Topics
[Mas 500] Various Topicsrahulbot
 
[Mas 500] Mobile Basics
[Mas 500] Mobile Basics[Mas 500] Mobile Basics
[Mas 500] Mobile Basicsrahulbot
 
[Mas 500] Data Basics
[Mas 500] Data Basics[Mas 500] Data Basics
[Mas 500] Data Basicsrahulbot
 
[Mas 500] Web Basics
[Mas 500] Web Basics[Mas 500] Web Basics
[Mas 500] Web Basicsrahulbot
 
Putt Putt 101
Putt Putt 101Putt Putt 101
Putt Putt 101rahulbot
 
DataTherapy (Boston: Hub of Innovation)
DataTherapy (Boston: Hub of Innovation)DataTherapy (Boston: Hub of Innovation)
DataTherapy (Boston: Hub of Innovation)rahulbot
 

Plus de rahulbot (15)

Data Storytelling for Social Change
Data Storytelling for Social ChangeData Storytelling for Social Change
Data Storytelling for Social Change
 
Empowering those that don't "speak" data
Empowering those that don't "speak" dataEmpowering those that don't "speak" data
Empowering those that don't "speak" data
 
Hands on Approaches to Data Storytelling
Hands on Approaches to Data StorytellingHands on Approaches to Data Storytelling
Hands on Approaches to Data Storytelling
 
Hands on Approaches to Data Storytelling
Hands on Approaches to Data StorytellingHands on Approaches to Data Storytelling
Hands on Approaches to Data Storytelling
 
From Data to Argument
From Data to ArgumentFrom Data to Argument
From Data to Argument
 
Data Therapy: Telling Your Story Well
Data Therapy: Telling Your Story WellData Therapy: Telling Your Story Well
Data Therapy: Telling Your Story Well
 
Empowering People with Data
Empowering People with DataEmpowering People with Data
Empowering People with Data
 
Practicing Data Science Responsibly
Practicing Data Science ResponsiblyPracticing Data Science Responsibly
Practicing Data Science Responsibly
 
[Mas 500] Visualization
[Mas 500] Visualization[Mas 500] Visualization
[Mas 500] Visualization
 
[Mas 500] Various Topics
[Mas 500] Various Topics[Mas 500] Various Topics
[Mas 500] Various Topics
 
[Mas 500] Mobile Basics
[Mas 500] Mobile Basics[Mas 500] Mobile Basics
[Mas 500] Mobile Basics
 
[Mas 500] Data Basics
[Mas 500] Data Basics[Mas 500] Data Basics
[Mas 500] Data Basics
 
[Mas 500] Web Basics
[Mas 500] Web Basics[Mas 500] Web Basics
[Mas 500] Web Basics
 
Putt Putt 101
Putt Putt 101Putt Putt 101
Putt Putt 101
 
DataTherapy (Boston: Hub of Innovation)
DataTherapy (Boston: Hub of Innovation)DataTherapy (Boston: Hub of Innovation)
DataTherapy (Boston: Hub of Innovation)
 

Dernier

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 

Dernier (20)

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 

[Mas 500] Intro to Programming

  • 1. MAS.500 - Software Module - Rahul Bhargava Programming 2014.11.07
  • 2. Course Outline Python How Software Works Programming Styles
  • 3.
  • 4. 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)
  • 5. What do You Know?
  • 6. What do You Want to Learn?
  • 8. 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)
  • 10. 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
  • 15. Running ❖ Step through instructions ❖ Access storage as needed ❖ speed of access ❖ Generate output
  • 17. 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
  • 18. 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