Computational Business Modeling Flashcards
Why modeling?
1 Understand the system
2 Communicate desired structure and behavior of the system
3 visualize and control system architecture
4 manage risk in development process
Types of Business Modeling Languages
1 Business Process Management Notation (BPMN)
2 Event-Driven-Process-Chains (EPC)
3 Activity Diagrams (part of UML)
Why care about Python?
- free
- easy to learn
- versatile
- well connected
- fashionable
Syntax
Structure of language
no room for error
handled by compiler
Variables
- address area on main-memory
- has data type
Integer Division
//
Potentiation
**
Table Test
-> understand flow of algorithm on paper
1 record table with one column per variable
2 note any change to variable
Relational Operators
==
>
<
!=
Logical Operators
and
or
Dictionaries are kind of lists with…
…keys as index
Functions that do not return anything are “—” functions
“void”
Flow of Execution
- top to bottom
- functions must be defined or imported
- called function runs outside of script top to bottom
writing or reading a program without exactly following the flow of execution through every function is termed a
Leap of Faith
Leap of Faith
we fill in needed function later.
Incremental Development
1 listing steps as comments
2 write first lines and check
3 add and change incrementally, hold intermediary values in variables
4 test after each incremental step
+likely to find errors
+complexity reduction
afterwards increase efficiency!
Programming Paradigms
1 imperative (step-by-step) 2 procedural (user-defined functions) 3 functional (like R) 4 object-oriented
classes have
Attributes
Methods
Why use objects?
relational data-storage
relevant functionality
Prototype and Patch
1 Write code without error but not quite the result
2 patch by adding code
3 clean up
Aliasing does not apply to..
integers, floats, and strings but ALL ELSE
3 Perspectives on Code
1 Executable
2 Script
3 Notebook
Code Documentation
1 Comments and Handbooks (classic)
2 Docstrings
3 Automated