Clean Code:: Method Arguments must be crisp and Encapsulated.

Top Post on IndiBlogger
4

 While writing methods, please pay close attention to the method arguments, This is the one area where the method assimilates the foreign body into its core body. Foreign material is always dangerous, you do not have any control over it, but as an owner of a method, you can put a defensive mechanism aka Validation. Or the Anti-corruption layer of your method.So, the first tip.Always put validation on the input argument, you can use java annotations to do the validation.Now, let

Read this post on javaonfly.blogspot.com


Shamik Mitra

blogs from Kolkata