Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alexander Hirsch
crap
Commits
1de5990c
Commit
1de5990c
authored
Sep 23, 2019
by
Alexander Hirsch
Browse files
Integrate feedback (thanks Markus)
parent
442f491a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
24 deletions
+24
-24
slides/c_slides.md
slides/c_slides.md
+4
-4
slides/git_slides.md
slides/git_slides.md
+1
-1
slides/scripting_slides.md
slides/scripting_slides.md
+4
-4
slides/techniques_slides.md
slides/techniques_slides.md
+11
-11
slides/tools_slides.md
slides/tools_slides.md
+4
-4
No files found.
slides/c_slides.md
View file @
1de5990c
...
...
@@ -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 programm
er
errors
-
Assertions are meant to catch programm
ing
errors
## `goto`
...
...
@@ -504,7 +504,7 @@ pthread_mutex_unlock(&mutex);
## Lifetime
-
C
ritical
think
about when resources are acquired and released
-
Think c
ritical
ly
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,h
e
igh) (((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)
```
##
Hea
de
r
Guards
##
Inclu
de Guards
```
c
#ifndef SOME_HEADER_H
...
...
slides/git_slides.md
View file @
1de5990c
...
...
@@ -9,7 +9,7 @@
-
Distributed
-
High performance (Linux Kernel)
-
Very flexible
-
Complicated command-line interface
-
Complicated
(but powerful)
command-line interface
-
Scriptable
## Distributed
...
...
slides/scripting_slides.md
View file @
1de5990c
...
...
@@ -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
-
Eas
il
y 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
-
C
riteria
to
deciding when to use Shell / scripting language
-
Think about the c
riteria
for
deciding when to use Shell / scripting language
## Using a Package Manager
...
...
slides/techniques_slides.md
View file @
1de5990c
...
...
@@ -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
-
C
ritically
think
about its tasks
-
Think c
ritically 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
-
C
ritically
think
about relation
ships between tasks
-
Think c
ritically 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 plan
e
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 call
s
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
-
Clear
l
y 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)
-
C
ritically
think
about the lifetime (and ownership) of instances
-
Think c
ritically 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?!
-
Relate
d
multiple measurements over time
-
Relate multiple measurements over time
-
Can be applied to multiple layers
-
Micro-benchmarks (similar to unit tests)
-
Overall benchmark
...
...
slides/tools_slides.md
View file @
1de5990c
...
...
@@ -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 / disable
d
-
Debug symbols enabled / disabled
## Phases
...
...
@@ -89,7 +89,7 @@
## Make
-
Often used as back-end by build system
s
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment