in the interests of creating employment opportunities in the java programming field, i am passing on these tips from the masters on how to write code that is so difficult to maintain that the people who come after you will take years to make even the simplest changes. further, if you follow all these rules religiously, you will guarantee yourself a lifetime of employment, since no one but you can hope to maintain the code.
1. lie in the comments. you dont have to actively lie, just fail to keep comments up to date with the code.
3. make sure that every method does a little bit more (or less) than its name suggests. as a simple example, a method named isvalid(x) should, as a side effect, convert x to binary and store the result in a database. 【程序编程相关:Hibernate的性能】 2. pepper the code with comments like /* add 1 to i */; however, never document woolly stuff like the overall purpose of the package or method. 【推荐阅读:Hibernate入门之One 】 5. in the interests of efficiency, avoid encapsulation. callers of a method need all of the external clues they can get to remind them of how the method works inside. 【扩展信息:利用Hibernate往SqlServe】 4. use acronyms to keep the code terse. real men never define acronyms; they understand them genetically. 6. if, for example, you were writing an airline reservation system, make sure that there are at least 25 places in the code that need to be modified if you add another airline. never document where they are. people who come after you have no business modifying your code without thorou... 下一页