|
|
||
Editor's Daily BlogLeftoversPosted by daniel on November 24, 2004 at 08:05 AM | Comments (0)Estimating with an eye on reuse In the US, tomorrow is one of my favorite holidays: Thanksgiving. It is traditionally a celebration of the harvest and a time to gather with family and friends. The spirit of this holiday in many homes has migrated from a time to give thanks to a time to eat too much turkey and side dishes during half-time of a football game. Many homes buy turkeys that are much too large for the assembled family to eat so that they can use the leftovers for soup, hash, sandwiches, and other creations. So many of us have come to see our favorite leftover concoction as part of the tradition that we would be disappointed if the entire turkey was eaten during Thanksgiving dinner itself. In other words, we estimate our dinner with leftovers in mind. With coding - how do we think of reuse? Are we at a point where we start planning for our code leftovers? XP teaches us not to code for situations we don't yet need, but a customer could have a reusability story. The other thing about leftovers, is that eventually you either use them up or they go bad and you have to throw them out. In food, you can see the cost of throwing out unsold food. Except for the well worn "stone soup" metaphor, we don't tend to use food analogies for software. In the restaurant business you double sell your food. If you have left over bacon from breakfast you use them in club sandwiches at lunch. I saw one kitchen rinse off left over chicken breasts prepared as chicken Marsala, chop them up, and use them in a chicken stirfry. There the plan wasn't for reuse - but rather, before starting to cook, looking around to see what was in the refrigerator. Really, the thoughts on leftovers began with the lead from today's Weblogs, in which Allen Chan blogs about AOP and code maintainability . He argues that "an effective way to manage aspects will need to be derived before AOP can become a mainstream programming paradigm." Jayson Falkner answers another reader question in I'm confused about keeping proper web application state. He explains "You need to keep in mind what is shared and what is not shared when thinking about state. For each doGet() method invocation a new HttpServletRequest object is made, and you can access this object without fearing that any other thread is concurrently accessing it. However, this changes for the HttpSession object. Two requests from the same user might try to change the same session object. There is only one session object per a user accessing the web app." In Also in Java Today , there is a developerWorks article on Using JCE in a J2ME environment. You may want to consider the caution at the end before reading the article: "Though this solution for using JCE in J2ME development works in the sample environment, you should consider it carefully before using it. First, using JCE to provide cipher functions is one way to offer security solutions, which can save you time writing customized cipher libraries. But note that JCE is a relatively large library and has a big footprint relative to the J2ME environment. For mission-critical applications, light-weight customized cipher libraries are more suitable." Lu Jian wants to take Java's Proxy class a step further. Introduced in Java 1.3, Proxy lets you use an InvocationHandler to provide method implementations at runtime, but it only works with interfaces. In Dynamic Delegation and Its Applications, he takes this a step further by providing a Delegation class, which allows you to delegate abstract classes and even concrete classes. He's also started a java.net project, Dunamis, which provides a bytecode-manipulation implementation for dynamic delegation. In Projects and Communities,in an item of interest to Java Games Community members, Fortune Magazine columnist David Kirkpatrick discusses the rapid growth of cellphone gaming in the form of Jamdat Mobile, a publicly-traded maker of J2ME (and BREW) games for mobile phones. Members of the NetBeans Community might appreciate this how-to tip on Declarative MIME Type Resolvers which, as Todd Fast's Weblog describes it, allows NetBeans "to recognize an XML file without opening every candidate file in your DataLoader and parsing it". It's important to look good. In today's Forums, xhq requests the addition of good third-party layout mangers saying "It seems many people don't like the current standard layout managers(especially GridBagLayout), and tend to use third-party open source alternatives, like TableLayout, FormLayout and ExplicitLayout. [..] Any chance for one of these excellent layouts to go into Mustanq?" Iwadasn has a list of suggestions for under the hood. The items are prefaced "The language should be a simple as possible, certainly no more complicated than it is already. API changes are somewhat better, want an API for everythign under the sun, fine. Now lets talk about under the hood. Here are a few things I'd like to see." In today's java.net News Headlines :
Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to thejava.net News RSS feed. Current and upcoming Java Events :
Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site. Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive. Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment | ||
|
|