SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante a [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
 

Semelhante a [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
 

Mais 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
 

Mais 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)
 

Último

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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Último (20)

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 ...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

[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