Gabi und Sascha
Tags - Kategorien : Alle | Berlin | Bücher | Java | Linkhalde | Weichware | Verfassung

Im just on the trip to simplify some aspects of software development thru bytecode extendsion. In «Loggen vereinfachen» (german) I've written down some thought about simplify logging.

Today I read a blog entry from Kirk Pepperdine on the subject. The tipp is trivial. Kirk suggests that before a logcall a condition checks whether the call is at all meaningful. The approach makes sense, but has a nasty side effect: it bloats the code in such a way that the actual business logic between the log blocks will eventually go away.

One solution may be to examine the generated bytecode. If there is a log call in the code, it can be automatically surrounded with such a if statement.

Advantage: The developer can continue to write simple log calls without bloat the code.
Disadvantage: It does not look right, a tool that manipulates its code. An he needs the tool.

What prevails? Advantage or disadvantage? In my opinion, the advantage of cleaner code.

As well as some Java developers read along I would be interested what you think.