A Tale of map and parseInt in Three Acts, or WAT You Will
Why can't you map parseInt in TypeScript? Because fuck you, that's why!
3 posts
Why can't you map parseInt in TypeScript? Because fuck you, that's why!
Rules can cause confusion, because we try too hard to follow them. The Rule of Three, a classic "rule" of refactoring, carries this risk. How do we reap the benefits while avoiding the drawbacks?
When we limit ourselves to one outcome per test, we exert helpful pressure on our design that sometimes results in simpler code that is easier to test. We have more confidence in it. I use someone else's article and example to illustrate what can happen. And no, you don't need to be a Wizard to do this.