Comments by "nexovec" (@nexovec) on "Kantan Coding"
channel.
-
2
-
2
-
The unnesting is super helpful, but extracting things like this is a giant nuisance, because it's now a function call. What does it do? It does an unspecified thing that returns whether the user is validated. What does it mean for a user to be validated? We don't know the implementation, so we don't really know. Are guest users considered valid? Who knows... Also, obviously, when validating a user, you'd do a cache lookup and a database call, it surely wouldn't just be an OR, right? right(insert meme)? Extracting things like this is a perfect way to make things more complicated by making them completely opaque.
Also I don't extract nearly as much boilerplate as is suggested, I just don't mind it, especially in places where you're quite likely to modify the boilerplate, like error handling.
1
-
1