"Simple Software"

OcpSoft

» Static Analysis tools > Experience

May 12th, 2009 by Derek

When developers choose to enforce Static Analysis tools (i.e. JTest or PMD) they might have the best intentions at heart, but are actually making the code worse in the long run.  The value of the programmer’s experience and expertise on the code is not considered.

Static analysis tools are automated programs that run a set of rules against source code to produce metrics, and give advice on best practices.

So why does using these tools lead to bad code?  Continue reading this article »

Posted in Best Practices | 4 Comments »

» Universal Context of Computer Programming

December 16th, 2008 by Lincoln

The only thing that stays the same, in our field of Computer Science, is change itself. Do not try to predict what will happen in the future; instead know that the future will bring change, and that you will need to adapt to it.

Design systems which are capable of change, and you will be much more ready for the future.

Continue reading this article »

Posted in Best Practices, Releases | No Comments »

» My father speaks on logging

December 9th, 2008 by Lincoln

After reading a recent article on logging, and when you should and shouldn’t do it, I asked my father for his views. He has about 25 years of experience in both small companies and large corporations, and got me thinking about some things that I hadn’t before.

Continue reading this article »

Posted in Best Practices | No Comments »

» Replacing Commented Code with Delegated Code

August 1st, 2008 by Lincoln

Today’s subject is a well commented square root approximation method. Imagine that this method is buried deep in a very messy Java class. How can we make sure that this code is reusable and that our comments don’t become out of date as our code changes?

/**
 * Approximate the square root of n, to within the specified tolerance,
 * using the Newton-Raphson method. This method takes two arguments:
 * @param Double n The number to be square-rooted
 * @param Double tolerance the error tolerance
 * @return Double result of square root operation
 */
public Double approximateSquareRoot(Double n, Double tolerance)
{
    Double root = n / 2;
    while (Math.abs(root - (n / root)) > tolerance)
    {
        root = 0.5 * (root + (n / root));
    }
    return root;
}

Continue reading this article »

Posted in Best Practices, Java | 4 Comments »

|

Search

Recent Posts

Recent Comments

OcpSoft Agile Management

Recent Tweets:

Posting tweet...

Sponsored By:

Resources

Meta