Category Archives: technical

Interfaces vs. abstract classes

Sigh … some people just don’t get it…. Interfaces rock! Below is my comment from stackoverflow.com, a question about how to handle the “interfaces v. abstract classes” interview question in an interview. First, the “only one super class” answer is … Continue reading

Posted in code review, technical | Leave a comment

Code Review #7 – Comment the “why” not the “what”

[This post continues the response to Mike.] Clean “good” code is good but not enough. Code needs comments — but the right kind of comments. “What” comments are useless and the most quickly out-dated. An example of a what comment … Continue reading

Posted in code review, management, technical | 6 Comments

Not commenting code is dangerous to your career

There is this myth that code can be self-documenting and that comments are not necessary in good code. Michael recently comment on an earlier blog post advocating the idea of self-documenting code. “Self-documenting” code is a career-damaging concept, because: Your … Continue reading

Posted in code review, management | 3 Comments

MacOSX and hostname

h/t Larry Gordon (copied because I want to make sure I always have it available): When I log into the network at my job my Mac’s hostname always turns to: larryx.na.corp.ipgnetwork.com I have my local hostname set to: larryx.local So … Continue reading

Posted in help notes, technical | Leave a comment

Website performance tips

Yahoo website performance tips

Posted in help notes | Leave a comment

Code Review #6 – ‘Too smart’ aka scared of being dumb

One of the biggest failing junior developers have is that they are too ‘smart’. ‘Too smart’??? How can someone be ‘too smart’? Actually pretty easily. ‘Too smart’ is when the person spent hours looking at a problem. And the next … Continue reading

Posted in code review, management, technical | 1 Comment

where, oh where is the list of all those magic -XX java parameters?

The master list is here. But just in case it goes away here is the list (pruned for java 6): Option and Default Value Description -XX:-AllowUserSignalHandlers Do not complain if the application installs signal handlers. (Relevant to Solaris and Linux … Continue reading

Posted in help notes | Leave a comment

Code Review #5 – splurge on reporting configuration errors

Configuration problems when deploying a new build are high on the “high anxiety” list. The pressure is high to hurry up and get the build deployed. Often times, the deploy happens late at night when the deployer really just wants … Continue reading

Posted in code review, technical | Leave a comment

Code Review #4: Always read the documentation/code – a.k.a. java.net.URL is evil

The Setup Before I plunge into my rant, lets review a little-ole documentation. Under java.lang.Object, for equals() we have this: It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently … Continue reading

Posted in code review, technical | 5 Comments

Code Review #3: Use the debugger to check “working” code

There is a bug (or two) in this code: protected void compareStreams(InputStream is, InputStream isFromGet) throws IOException { byte[] newBuf = new byte[4096]; byte[] oldBuf = new byte[4096]; int len = 0; while ((len = is.read(newBuf)) != -1) { boolean … Continue reading

Posted in code review, technical | Leave a comment