Order of Execution
Lab: Building Blocks of Programming
Video Runtime: 10:55
Software has an order of execution. This is the program sequence, meaning the order in which your lines of code will be executed.
Your key takeaways are:
- Software executes synchronously unless asynchronous features are used
- Execution is in order until it encounters a control statement
- Order of Precedence follows rules from math
Study Notes
There is an order or sequence to program execution.
Lines of Code Execution
- Types of code execution:
- Synchronous – current line of code is executed before moving on to the next line
- Asynchronous – parallel processing
- Languages execute code in sequential order
- Branching and iterators can change the order
Code Execution
Language | Synchronous | Asynchronous Features |
---|---|---|
PHP | ✓ | ✓ |
JavaScript | ✓ | ✓ |
Ruby | ✓ | ✓ |
Python | ✓ | ✓ |
C | ✓ | ✓ |
C# | ✓ | ✓ |
Visual Basic | ✓ | ✓ |
Order of Execution in Practice
function _qa() { | |
$('.qa-question').on('click', function() { | |
var $ans = $(this).next('.qa-answer'); | |
if ( $(this).hasClass('opened') ) { | |
_closeQA( $answer, $(this) ); | |
} else { | |
_openQA( $answer, $(this) ); | |
} | |
$ans = null; | |
}); | |
} |
Order of precedence
x = ( 520 + 71 )2 x 10
You will grow in this profession when you incrementally and systematically stretch yourself....bit-by-bit.
Episodes
Total Lab Runtime: 02:17:55
- 1 Lab Introductionfree 06:21
- 2 User-Friendly Expression of Informationfree 22:42
- 3 Fundamentals of Syntaxfree 08:57
- 4 Decision Branching - if/then/elsefree 10:39
- 5 Decision Branching – switch/casefree 07:47
- 6 Basics of Iterationfree 14:14
- 7 Iteration in Practicefree 12:51
- 8 Order of Executionfree 10:55
- 9 Abstractionfree 11:45
- 10 Scoping – Who Can Communicate With Whomfree 31:44