

Problems with nil and how to avoid them - alisc
http://blog.ragnarson.com/2015/05/06/problems-with-nil.html

======
cenazoic
Sandi Metz just did a great presentation covering much the same material
(arguably better) at RailsConf:

[http://confreaks.tv/videos/railsconf2015-nothing-is-
somethin...](http://confreaks.tv/videos/railsconf2015-nothing-is-something)

------
karmakaze
NullLogger completely makes sense. NullUser allows code to proceed
indefinitely as if we have a User instance and have to proactively check.
Doesn't Ruby have optionals?

~~~
Azdaroth
No, it doesn't but there are some cool gems that provide optionals, like
[https://github.com/tomstuart/monads#optional](https://github.com/tomstuart/monads#optional).
The pattern works pretty efficient, but it often treats just symptoms and the
real problems are in the design, like structural coupling or lack of domain
concepts.

