Jeroen Heijmans
INFI-CON 2019, May 27th
The framework
Center: You!
Satellites: Methods.
Ring: Empathy...
Conscientiousness is the personality trait of being careful, or diligent...
...they also are less likely to engage in antisocial and criminal behavior.
Test your assumptions!
[Fact] // "Test"
public void Can_serialize_regular_object() {
var result = JsonConvert.SerializeObject(new Bar { Name = "Moe's" });
Assert.Equal("{\"Name\":\"Moe's\"}", result);
}
[Fact] // "Test"
public void Can_serialize_dynamic_object() {
var result = JsonConvert.SerializeObject(new { Answer = 42 });
Assert.Equal("{\"Answer\":42}", result);
}
[Fact] // "Test"
public void Can_serialize_circular_reference() {
var input = new Dictionary<string, object>();
input["Nemesis"] = input;
var result = JsonConvert.SerializeObject(input);
Assert.NotNull(result); // Fails! TODO: Invert assertion.
}
unveils biases that are hurting your assumptions
helps you write the right tests, in the right way
You learn from the journey, not the destination!
helps closing the gap between your context and that of others
prevents wasting other people's time
You learn from the journey, not the destination!
helps you learn about workarounds and solutions
prevents wasting other people's time
Finding your own resolution
Getting quicker resolution from others
For future reference
helps you identify the key bits of a problem
has a net postive result for you too
Examples should be exemplary!
helps you create more diverse and complete examples
If you want to get good at something, start teaching it!
makes you a better teacher
but also makes you a better student
// Proposal TC39: Public/private class fields in Javascript
class Tc39Test {
#foo = "ryan"; // Private field!
bar = "announcement"; // Public field.
get old() { return "school"; }
get backdoor() { return this.#foo; }
}
let thing = new Tc39Test();
console.log(thing.old); // "school"
console.log(thing.bar); // "bar"
console.log(thing.foo); // undefined
console.log(thing.backdoor); // "ryan"
Don't explore only your own comfort zone!
If there's time...
github.com/tc39/proposal-class-fields
cooking.stackexchange.com/questions/50468/why-place-potatoes-on-salt
cooking.stackexchange.com/questions/22405/make-a-palindrome-cocktail
cooking.stackexchange.com/questions/46531/classic-sauce-bolognese-ragù-bolognese
github.com/infi-nl/coding-dojo-netcore
github.com/jeroenheijmans/sample-angular-oauth2-oidc-with-auth-guards