sorry to be offtopic but does anyone know of a way to log back into an instagram account?? I somehow forgot the password. I love any tricks you can give me.
@Nico Tristan i really appreciate your reply. I got to the site on google and Im trying it out atm. Seems to take quite some time so I will reply here later with my results.
Excellent talk. I use dependency injection a lot, and I do mean a lot. I know the feeling of working with a bag of parts. My experience is that if you get that feeling, you should treat it as a yellow warning light. Usually it is caused by bad naming, violation of the Liskov substitution principle or violation of the open closed principle.
A lot of these problems are solved by using functional programming. It's telling when Michael says "object orientation done right tends to look a bit like functional programming". In OO you're constantly fighting the paradigm to write testable code by self-imposing a functional style of coding (avoiding the use of state, managing side-effects, avoiding encapsulation, using composition over inheritance). Functional programming makes your code much easier to read, write, refactor and test (concurrency and parallelism is also much helped by FP).
His example is very trivial. It's a class that has clear components. I'm working with high performance mathematical algorithms. No way my methods are only 20 lines. And chopping them up would create overhead that would greatly impact performance.
You are using the wrong tools or methodology then. C++ allows CRTP (and other techniques ) to allow you to break apart complex interactions and code them in incredibly optimal ways all the way down to custom assembly code per Architecture if you so desire.
Flexibility vs Explicit code: I hate to see magic methods that obfuscate the logic or sometimes even disrupt the call stack. Very annoying while debugging. Currently the closures in PHP are not supported in editors while debugging. So when entering a closure during a step you lose the complete context of the flow/state of the code. Like entering a tunnel without lights.
00:00 Intro
02:47 Example: Testing private methods
12:34 --- Testing Pains ---
12:46 State Hidden in methods
14:22 Difficult setup
17:04 Incomplete Shutdown
19:43 State-Leaks Across Tests
21:57 Framework Frustration
24:32 Difficult Mocking
26:52 Difficult Mocking - 2
28:05 Hidden Effects
29:24 Hidden Inputs
30:24 Unwieldy Parameter Lists
32:00 Insufficient Access
33:04 Test Thrash
---
35:13 Relationship between testability and good design
38:59 The Golden Hammer - Dependency Injection (its pains)
42:20 Grouping Test Tools
45:12 Conclusion
45:26 Questions
Great video indeed. I specially liked the emphasis on "feeling the pain" of bad design through unit testing your classes.
sorry to be offtopic but does anyone know of a way to log back into an instagram account??
I somehow forgot the password. I love any tricks you can give me.
@Cristiano Troy instablaster =)
@Nico Tristan i really appreciate your reply. I got to the site on google and Im trying it out atm.
Seems to take quite some time so I will reply here later with my results.
@Nico Tristan It did the trick and I actually got access to my account again. Im so happy:D
Thanks so much you saved my account :D
@Cristiano Troy No problem xD
Excellent talk. I use dependency injection a lot, and I do mean a lot. I know the feeling of working with a bag of parts. My experience is that if you get that feeling, you should treat it as a yellow warning light. Usually it is caused by bad naming, violation of the Liskov substitution principle or violation of the open closed principle.
A lot of these problems are solved by using functional programming. It's telling when Michael says "object orientation done right tends to look a bit like functional programming". In OO you're constantly fighting the paradigm to write testable code by self-imposing a functional style of coding (avoiding the use of state, managing side-effects, avoiding encapsulation, using composition over inheritance). Functional programming makes your code much easier to read, write, refactor and test (concurrency and parallelism is also much helped by FP).
Can you help give me some example where FP is more effective than OOP? I'm really interested about this
Thanks for sharing this presentation!
Great video.
In many cases (not all... but many... maybe even most) the need to use a mock in a test AT ALL, is another sign of bad design.
His example is very trivial. It's a class that has clear components. I'm working with high performance mathematical algorithms. No way my methods are only 20 lines. And chopping them up would create overhead that would greatly impact performance.
You are using the wrong tools or methodology then. C++ allows CRTP (and other techniques ) to allow you to break apart complex interactions and code them in incredibly optimal ways all the way down to custom assembly code per Architecture if you so desire.
Flexibility vs Explicit code:
I hate to see magic methods that obfuscate the logic or sometimes even disrupt the call stack. Very annoying while debugging.
Currently the closures in PHP are not supported in editors while debugging. So when entering a closure during a step you lose the complete context of the flow/state of the code. Like entering a tunnel without lights.
Category: Comedy?
why?