06 January 2012

Guava Release 11's IntMath | Javalobby

Guava Release 11's IntMath | Javalobby
Guava Release 11's IntMath class provides three more "checked" methods that throw an ArithmeticException when the given mathematical operation results in an overflow condition. These methods are for addition, substraction, and multiplication and are respectively called IntMath.checkedAdd(int,int), IntMath.checkedSubtract(int,int), and IntMath.checkedMultiply(int,int). As discussed in conjunction with IntMath.checkedPow(int,int), the advantage of this occurs in situations where it is better to have an exception and know overflow occurred than to blindly operate on an erroneous value due to an overflow condition.

04 January 2012

Process Related Classic Mistakes | Javalobby

Process Related Classic Mistakes | Javalobby
Today’s blog takes a quick look at the second of Steve’s categories of mistakes: Process Related Mistakes, which include:

* Overly Optimistic Schedules
* Insufficient Risk Management
* Contractor Failure
* Insufficient Planning
* Abandonment of Planning Under Pressure
* Wasted Time During Fuzzy Front End
* Short-changed Upstream Activities
* Inadequate Design
* Shortchanged QA
* Insufficient Management Controls
* Premature or Overly Frequent Convergence
* Omitting Necessary Tasks from Estimates
* Planning to Catch Up Later
* Code Like Hell Programming

03 January 2012

Interpolation Search

Dibert on the conversation that never happened

Phaser (Java Platform SE 7 )

If I had more time I would have written less code | Javalobby

If I had more time I would have written less code | Javalobby
When you cut corners, you pay for it later. Time not spent discussing the requirements in detail leads to misunderstandings; if you don’t spot it later on, you might have to wait until the show and tell for the customer to spot it – now you’ve wasted loads of time. Time not spent thinking about the design can lead to you going down an architectural blind alley that causes loads of rework. Finally time not spent refactoring leaves you with a pile of crap that will be harder to change when you start work on the next story, or even have to make changes for this one. Of course, you couldn’t have seen these problems coming – you did your best, these things crop up in software don’t they?

But what if you hadn’t rushed? What if rather than diving in, you’d spent another 15 minutes discussing the requirements in detail with the customer? You might have realised earlier that you had it all wrong and completely misunderstood what she wanted. What if you spent 30 minutes round a whiteboard with a colleague discussing the design? Maybe he would have pointed out the flaws in your ideas before you started coding. Finally, what if you’d spent a bit more time refactoring? That spaghetti mess you’re going to swear about next week and spend days trying to unravel will still be fresh in your mind and easier to untangle. For the sake of an hour’s work you could save yourself days.