Hacker News new | past | comments | ask | show | jobs | submit login

Logging is still weird example to pick up for it. First, it make sense to have it configurable in production (and yes we ask clients to raise logging level in production we have no access to in case of troubleshooting).

Second, it is not like each java program would be inventing its own super complicated xml like logging configuration. It is pretty much always done the same standard way. Pretty much every java app uses one of two standard logging libraries and those libraries share the same API.

You can configure that standard API in xml, through properties file or in code and all three methods are basically the same thing in three different syntaxes. None of them is easier or harder then the other two and everyone is familiar with both xml and properties file one.

No one normally obsess about logging code too much. It is the least obtrusive easiest to do part of anything you can possibly work at.




Sorry the logging thing and the configuration thing wasn't my point. What I was trying to say was all the best practices and standard way of doing things are not set in stone and should be evaluated at every instance. Beginners write very inflexible code. When intermediate, they learn best practices and about making it flexible and keeping room for the future. But only after seeing enough projects in production, one will know which flexibilities make sense to the project at hand and which don't.

For example, some changes even though very easy to implement are very difficult to push in production because of requirement of senior management approvals.

Also, best practices depend on the actual environment that you work on. For e.g. In one of the projects, the DBA team had very cool people compared to the server admins who were a pain to deal with even when we had all the approvals. So we decided to keep the configurations in a table and not xml, as changes could be pushed easily!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: