Programming
Databases
Joern Ploennigs
Program Flow
Process¶
Program flow - Example¶
x = 3 # Assignment
y = 4 # Assignment
def pythagoras(a, b): # Storing the function
return math.sqrt((a*2)+(b*2)) # Calculation
z = pythagoras(x, y) # Function call, assign to z
print(z) # Variable output
Defining the Problem¶
The most important skill in programming is to translate a real-world problem into individual program instructions (i.e., operations on symbols).
First step: What are the inputs, what are the outputs of the current problem?
Not unlike how a function is defined!
- Input parameters
- Return value
Lecture Hall Question¶
What inputs and outputs are involved in calculating the volume of a rectangular prism (house)?

Example: Volume calculation of a rectangular prism (house)¶
Simplification: The house is rectangular and has a flat roof.
Inputs: Side lengths
a
andb
, heighth
(in m)Outputs: Volume in m³
First considerations:
- What data types do these inputs and outputs have?
- What different scenarios exist?
Breaking the Problem into Steps¶
- The core question:
"How do we get from the given input to the desired output?"
Not Easy: To answer this question for arbitrary problems, one must adopt a way of thinking, break the problem into steps, and work through them.
Our Advantage: The ability to decompose and solve problems is a fundamental skill for engineers.
A Tool for Designing Algorithms¶
- Also called 'flowcharts'
- Describe sequences of operations
- Can have the following elements, which are connected by arrows:
Program Flowcharts — Fundamentals¶
- The most important blocks:
- Statements do not need to be written in the syntax of a programming language – they can be pseudocode.
- Arrows originate from a branching point, indicating whether the condition evaluated to True or False (if/else).
Example: Christmas Shopping¶
What is this used for in everyday life?¶
Process modeling
- Geothermal process flows
- IP management process optimization
- Business processes
- Quality assurance
Patents
Algorithmic descriptions
Process patents
Technical documentation
Lessons Learned - Flashcards¶
- The question goes on the front of the flashcard, the answer on the back
- The cards for Subject 1 are reviewed daily
- The Subject 2 cards are reviewed every other day
- The Subject 3 cards are reviewed once a week
- and the Subject 4 cards are reviewed every 30 days
Questions?
und datenbanken