Commit 1de5990c authored by Alexander Hirsch's avatar Alexander Hirsch
Browse files

Integrate feedback (thanks Markus)

parent 442f491a
......@@ -384,7 +384,7 @@ struct expression *expression_binary_op(enumbinary_op op,
- Commonly used to check pre-conditions
- Typically disabled in *release* builds
- No substitution for regular error checking!
- Assertions are meant to catch programmer errors
- Assertions are meant to catch programming errors
## `goto`
......@@ -504,7 +504,7 @@ pthread_mutex_unlock(&mutex);
## Lifetime
- Critical think about when resources are acquired and released
- Think critically about when resources are acquired and released
- Clearly defined lifetime lessens the likelihood of bugs
- Core principle of software architecture
......@@ -534,7 +534,7 @@ More about this later in C++…
## Defines
```c
#define CLAMP(x,low,heigh) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
#define CLAMP(x,low,high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
```
```c
......@@ -545,7 +545,7 @@ More about this later in C++…
} while (0)
```
## Header Guards
## Include Guards
```c
#ifndef SOME_HEADER_H
......
......@@ -9,7 +9,7 @@
- Distributed
- High performance (Linux Kernel)
- Very flexible
- Complicated command-line interface
- Complicated (but powerful) command-line interface
- Scriptable
## Distributed
......
......@@ -3,7 +3,7 @@
# Scripting Language
## I already know Java!
## Don't need that, I already know Java!
- Using the right tool for the right job
- Productivity
......@@ -45,7 +45,7 @@ Who is right?
## Limitations
- Dynamic typing
- Easily to develop / prototype
- Easy to develop / prototype
- Hard to maintain / refactor
- Typically requires lots of tests (see average Ruby library)
- Performance
......@@ -84,7 +84,7 @@ Okay, which one?
## Meet Ruby
- Smaller footprint than Python
- More features on the language side (e.g. RegEx)
- More language-level features (e.g. RegEx)
- Third-party packages typically feature good test coverage
## Meet JavaScript
......@@ -320,7 +320,7 @@ Compare this to your average Windows / Mac install experience:
- Learn the basics of Bash scripting
- Critically think about its limitations
- Criteria to deciding when to use Shell / scripting language
- Think about the criteria for deciding when to use Shell / scripting language
## Using a Package Manager
......
......@@ -29,7 +29,7 @@
## Problem Description
- Document fully describing the problem
- Document, fully describing the problem
- Mentions every detail discovered
- Result of your analysis process
......@@ -47,14 +47,14 @@
---
- Go through each module
- Critically think about its tasks
- Think critically about its tasks
- How can it be realised?
- What problems could emerge?
- How does data flow through this module?
## Solution Specification
- Document fully describing the solution
- Document, fully describing the solution
- May contain lots of details
- Needs to communicate the big picture
- Consider it a guide for implementing
......@@ -62,7 +62,7 @@
## Managing Time
- Split the implementation work into small, manageable tasks
- Critically think about relation ships between tasks
- Think critically about relationships between tasks
- Does feature A depend on feature B?
- Consider which resources are needed for each task
- Do we need special equipment?
......@@ -89,7 +89,7 @@ Stay away from *scrum* and alike, it's probably a big scam.
- Update problem description
- Make changes to your solution specification
- Update your management plane accordingly
- Update your management plan accordingly
- Flexibility is paramount
This commonly decides between success and failure.
......@@ -174,7 +174,7 @@ double xfb(int a, int b, double pre); // 🤔
- Which global state does the function touch?
- Observe the call-graph
- Which parts of the program calls this function?
- Which parts of the program call this function?
- Which functions are called by this function?
- Which layer of abstraction are we on?
......@@ -307,8 +307,8 @@ Good
## Comments
- Comments should tell **why** something is happening
- Code should tell **what** is happening
- Comments should explain **why** something is happening
- Code should specify **what** is happening
- Do not introduce comments where none are necessary
- Consider overview comments at the beginning of files
- Keep them free of implementation details
......@@ -358,11 +358,11 @@ Good
- Put together what belongs together (data and functions)
- Adhere to separation of concerns
- Cleary communicate invariants
- Clearly communicate invariants
- Interfaces much bigger than your regular functions
- Make sure this trade-off is worth it!
- Limit the number of public methods (and variables)
- Critically think about the lifetime (and ownership) of instances
- Think critically about the lifetime (and ownership) of instances
- Try to minimize mutability of held data
- Auto-generate getters / equality / hash / … **at compile-time**
......@@ -458,7 +458,7 @@ scripts/run_integration_tests
- Always measure!
- What to measure, what to optimise?
- Are the values you measure meaningful?!
- Related multiple measurements over time
- Relate multiple measurements over time
- Can be applied to multiple layers
- Micro-benchmarks (similar to unit tests)
- Overall benchmark
......
......@@ -14,7 +14,7 @@
## What's Important
- Being productive
- Autocompletion
- Auto-completion
- Go to definition
- Debugger integration
- Ergonomics
......@@ -70,7 +70,7 @@
- Suppress them in special cases
- Debug vs. release build:
- Optimisations disabled / enabled
- Assertions enabled / disable
- Assertions enabled / disabled
- Debug symbols enabled / disabled
## Phases
......@@ -89,7 +89,7 @@
## Make
- Often used as back-end by build systems generators
- Often used as back-end by build system generators
- Can be used for various different tasks / languages
- Suitable for small projects consisting of a few source files
- Checks timestamps for outdated targets
......@@ -251,7 +251,7 @@ buf[256] = 42;
- Can be used from the command-line
- Feature rich
- Scriptable (Python API)
- Go to tool for reverse engineering and binary exploitation
- Go-to tool for reverse engineering and binary exploitation
## Basic Commands
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment