tag:blogger.com,1999:blog-4155770613355202151.post5046212009795603180..comments2024-03-27T19:02:41.430+05:30Comments on Kamal Shah's Blog: Coding conventions versus readabilityKamal D Shahhttp://www.blogger.com/profile/10671037449347982821noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-4155770613355202151.post-41755325958464830902011-03-28T14:12:15.267+05:302011-03-28T14:12:15.267+05:30I think many people do that - do what others have ...I think many people do that - do what others have said and done without putting any thought into it. This can be really bad.Kamal D Shahhttps://www.blogger.com/profile/10671037449347982821noreply@blogger.comtag:blogger.com,1999:blog-4155770613355202151.post-86706334937309221842011-03-28T14:09:37.507+05:302011-03-28T14:09:37.507+05:30You are right Kamal and I agree with it completely...You are right Kamal and I agree with it completely! I have been bite by it couple of times.<br /><br />Recently in our project we replaced using constants holding keys to messages in the messages file, with using direct keys. The reason being our client was comfortable not to have constants in this scenario and it was an unnecessary overhead. "The methodology followed was inherited from past projects without putting much thought to it!" <br /><br />Another important observation I would like to share here about constants is, they should be declared and used in a/ per context and not in a generic file all the time. Also, try using "Java 5.0 Enums" where applicable, this is a good substitute for a group of related constants which provide abstraction and namespace apart from other benefits.Shravan Kumar. Mhttp://shravanmahankali.wordpress.comnoreply@blogger.com