When deciding between two or more choices for a style rule in your team's programming style guide, and all of these lead to code that is equally maintainable, prefer the rule you can explain in the fewest words.
"Readability" is also everyone's goal, but fails as a criterion because it is far too subjective.
Thursday, November 15, 2007
Friday, November 9, 2007
What Google Java engineers do while... waiting... for IntelliJ to unhose itself...
This discussion happened on our internal Java mailing list.
Dan: "What libraries do people use for generating PDFs from java?"
Tim: "I used iText. It works pretty well."
Fernando: "+1 for iText."
Steve: "Ditto"
Joseph: "we are using itext..."
Mike: "Calendar uses iText..."
Isaac: "+1 for iText on (Google Spreadsheets)"
Me: "Did six Googlers just AGREE on something in a company-wide mailing list thread?? Did that really just happen?? My God, there really is a first time for everything."
Mike: "I disagree. This assumes that time runs in a single direction. If it doesn't, then if an event occurs more than once then the first time could be called the last time and vice versa so neither can be reliably called a first time."
Me: "I've now gained a new appreciation for the complexity of the problems you folks on the Calendar team have to contend with. Clearly we're moving beyond i18n to i19n: interuniversalization!"
Mike: "Yep. We have an implemention of scheduling in multiple time dimensions ready to go and Jeff allocated a pocket universe for testing but production doesn't want to set up a datacenter there."
Kathrin: "Can't you test in a parallel universe where production has agreed to set up your datacenter?"
Well, I laughed my ass off.
Dan: "What libraries do people use for generating PDFs from java?"
Tim: "I used iText. It works pretty well."
Fernando: "+1 for iText."
Steve: "Ditto"
Joseph: "we are using itext..."
Mike: "Calendar uses iText..."
Isaac: "+1 for iText on (Google Spreadsheets)"
Me: "Did six Googlers just AGREE on something in a company-wide mailing list thread?? Did that really just happen?? My God, there really is a first time for everything."
Mike: "I disagree. This assumes that time runs in a single direction. If it doesn't, then if an event occurs more than once then the first time could be called the last time and vice versa so neither can be reliably called a first time."
Me: "I've now gained a new appreciation for the complexity of the problems you folks on the Calendar team have to contend with. Clearly we're moving beyond i18n to i19n: interuniversalization!"
Mike: "Yep. We have an implemention of scheduling in multiple time dimensions ready to go and Jeff allocated a pocket universe for testing but production doesn't want to set up a datacenter there."
Kathrin: "Can't you test in a parallel universe where production has agreed to set up your datacenter?"
Well, I laughed my ass off.
Tuesday, November 6, 2007
Minor API fixes for JDK 7
Josh, Doug and I are proposing a handful of minor API additions to the Java Class Libraries (lang, util, math and reflect) for JDK 7.
The very quick overview of our recommendations:
Please have a read over the document. What do you think about our proposals? What do you think we've missed?
The very quick overview of our recommendations:
- Static compare() methods for all non-void wrapper classes, not just Double and Float.
- Static hashCode() methods on all non-void wrapper classes.
- Integer.mod() and Long.mod()
- RoundingMode.round(double)
- Arrays.concat()
- EnumSet.complementOf(Collection)
- All JDK maps should implement putIfAbsent(), etc.
- Proxy.newProxyInstance(type, handler)
Please have a read over the document. What do you think about our proposals? What do you think we've missed?
Saturday, November 3, 2007
pseudohumor
if (isBloggingInPseudocode()
&& intendedEffect() == Effect.HUMOR) {
try {
beFunny();
// this line unreachable
} catch (NotFunnyException e) {
feign(Reaction.SURPRISE);
}
}
Subscribe to:
Posts (Atom)