kentcb/WorkoutWotch

Not an issue: Comments

FrancoisM opened this issue · 2 comments

Sorry it's not an issue but I don't know where else to put comment and questions. Github should add that feature :-)

Watching your video was just great example of architecturing and TDD and a good source of examples for ReactiveUI! Thanks a lot for that.

However while watching I couldn't help thinking:

  • why don't you use auto-properties?
  • why don't you use Fody for ReactiveUI?
  • why don't you use Code Contracts for pre conditions checks (instead of AssertNull)?
  • why did you create a Mockup library rather than using say NSubstitute?

I'll certainly have more questions and comments after digging into the code itself.
Tks again.

Just find an answer about Code Contracts :-)
https://github.com/kentcb/Genesis.Ensure

I know what you mean about issues versus questions. I've felt the same way, but it's all good!

why don't you use auto-properties?

Personal preference. I like to get a sense of the memory footprint an object has by glancing at its fields. Auto-properties hide this from me. Yes, I know it's not an entirely accurate metric, but I find it useful nonetheless. It also means that it becomes more obvious when your objects have too much state.

why don't you use Fody for ReactiveUI?

Haven't pursued it further after some initial bad experiences (I think it was poor Xamarin Studio support at the time, and also think I had an issue with mismatched PDBs).

why don't you use Code Contracts for pre conditions checks (instead of AssertNull)?

I see you found the answer to this already at Genesis.Ensure 👍

why did you create a Mockup library rather than using say NSubstitute?

NSubstitute et al are not portable. I want to write tests once and run them on every platform I target (hence, the iOS and Android test runners in the solution). Yes, there are probably other techniques like shared projects. But, ew....