09.15.07
tail recursive
“A recursive call is tail recursive when it is the last statement that will be executed within the body of a function and its return value is not a part of an expression.”
“there could have been other statements after the recursive call, provided they were executed only when the recursive call was not.”
09.07.07
web service – XML
“… every client I spoke with was absolutely certain he needed a Web services solution for his business. Of course, not many of my clients actually understood what that meant or the reasons why they might need that kind of architecture, but since they kept hearing about Web services on the Internet, in magazines, and at trade shows, they figured they’d better get on bus before it was too late.”
“I’ve always enjoyed seeing the many ways people have tried to create XML documents programmatically. What I always tell people is that XML documents are just big text strings. Therefore, it’s usually easier to just write one out using a StringBuffer rather than trying to build a DOM or using a special XML generator library.”
- Andrew Patzer in Beautiful Code
09.02.07
emporer’s new clothes
I didn’t dare to say what I thought that must be wrong. Now some one said about Java package:
“Do not use package merely to organize a class structure. Each package should be essentially independent of the internals of all other packages. If two classes in your program or library have to access each other more than they have to access other, nonrelated classes, they should be placed together in one package.” – Elliotte Rusty Harold in “Beautiful Code” .
The sad and maybe stupid thing is that sometimes the very questionable practice became “the way things are done”, or even code standard or policy in an institution. I thought I learned something new with a little reluctant feeling. Then I became used to it and do it without further questioning