Back to waiting for Citrix to bring up Outlook for me, so I have an excuse to post an entry.
So I’ve been learning some good stuff here. Given the ecclectic nature of the conference, I’ve been able to go to sessions on a wide range of topics and not get bored by a single topic. For example, this morning I was in a session about use cases, then followed it up with a different session on the internals of the Java Virtual Machine. It all definitely makes me miss my days doing real development; even the use case session was more development than I do in my daily job if that says anything.
Learned some cool stuff about JVMs. ‘bytes’ and ‘shorts’ get compiled into ‘int’ bytecode when you do arithmatic on them, so you’re not really saving yourself any memory by using them. Garbage collectors have gotten a whole lot smarter than they used to be, to the point where it’s perfectly fine to have lots of small, short-lived objects (if you’ve got a Generational GC).
I was in a session yesterday with Joshua Kerievsky about Code Smells, which was great. One smell I completely disagree with is the “Comments” smell (actually from Fowler): if there are comments in your code, then you need to refactor it so it’s so understandable you don’t need comments. I find this attitude as frustrating as it is (currently) fashionable. Take this example:
Country countryOfIssue = null;
if (asset.getTradingCountry()==null){
countryOfIssue = asset.getTradingCountry();
} else {
countryOfIssue = asset.getExchange().getCountry();
}
I understand this code fine. If the asset doesn’t have a trading country, then assume the country of issue is the country of the exchange it trades on. But what I need to know, 5 years later after the original coder has left, *why* would the trading country ever be null? Who said this was an ok situation? Is it safe to take this out and just assume every asset has a trading country? We have a situation just like this in my system and I don’t know the answer and it’s causing me pain.
Last observation: the lunch they’re serving here has been surprisingly good. Just sandwiches and some fruit and a side, but they’re tasty.