Skip to content

Tag Archives: refactor

In which magic method naming is considered to be harmful

AKA EJB <= 2.x Entities are a stupid idea stupidly implemented. A blast from the past. What idiot decided this was a good idea? public interface SomeEntity { String getType(); String getName(); }   public interface SomeEntityHome extends EntityHome { SomeEntity findBySomeData(String name, String type); }   public class SomeEntityEjb implements SomeEntity, EntityBean { public SomeEntity [...]

Unit testing as a discipline

In Emergent Design Scott L. Bain dedicates a chapter to Paying attention to Disciplines: Unit testing. To an experienced agilist this may seem a little basic: of course the discipline of unit testing pays dividends! But I think that we agilists forget sometimes that there are still many programmers – or their management – who don’t value the investment [...]

log.debug()

So everybody knows printing debugging statements to the log file can take considerable amounts of time, right? And in order to decrease useless time logging debug statements that won’t appear in the log, you can use isDebugEnabled() to find out if you’re wasting your time, right? So you end up with; if (log.isDebugEnabled()) {    [...]