Make more money building software

March 31, 2005 on 12:59 pm | In General | Add a comment

I fell on this “presentation”:http://www.javalobby.org/av/javapolis/21/poppendieck-moremoney totally by accident yesterday and have viewed it a couple of times already. Anyone aspiring to optimising their software development processes should make it an obligation to see it.

Technorati Tags: , ,

Related Posts:

What is this screencast they are talking about?

March 30, 2005 on 10:59 am | In General, Java | 2 comments

They say, a picture is worth a thousand words. I have 2000+ pictures shown at the rate of twenty every second. You do the math. Anyway, “here is my first stab at screencast”:http://coding.mu/wp-content/mvcdemo.htm — a demo of the MVC framework I am working on.

Technorati Tags: , ,

Related Posts:

MVC framework (again!)

March 24, 2005 on 1:53 pm | In Java | 2 comments

Sorry for being so quiet. After being frustrated with JSF — don’t get me wrong, it’s good, but it’s not there yet — I decided to write my own. It’s loosely based on JSF and the way Interface Builder works under Mac OS X.

At the moment, it only does dispatches (requests in, response out, etc). I may or may not add declarative validation, but I will definitely keep JSP. I believe JSP, coupled with JSTL, still has a lot of potential.

The framework is useable at the moment, but just not ready for opening to public eyes. I am not sure how long it will stay that way, but I would like to mention that it is already being used for my own projects. If I never put it out there, it will still be serving me. Look out for that particular extension at the end of the URLs. Will it be jspa, jspc, exec? Take a guess :-)

Now, some code candy.

public class LoginController extends ControllerImpl {

    public mu.coding.framework.mvc.Dispatch execute(
            javax.servlet.http.HttpServletRequest request,
            javax.servlet.http.HttpServletResponse response) throws Exception {

        ArrayList messages = new ArrayList();

        if (request.getMethod().equalsIgnoreCase("POST")) {

            if (request.getParameter("username") == null
                    || request.getParameter("username").trim().length() == 0)

                messages.add("UsernameNotSet");

            if (request.getParameter("password") == null
                    || request.getParameter("password").trim().length() == 0)

                messages.add("PasswordNotSet");

            if (messages.isEmpty()) {

                if (request.getParameter("username").
                        equalsIgnoreCase("username")
                            && request.getParameter("password").
                                    equals("password")) {

                    Dispatch dispatch = getDispatch("success", true);

                    dispatch.addParameter("q", request.getParameter("username")
                            + " " + request.getParameter("password"));

                    return dispatch;
                } else {
                    messages.add("LoginFailed");
                }
            }
        }

        request.setAttribute("username", request.getParameter("username"));
        request.setAttribute("password", request.getParameter("password"));

        request.setAttribute("messages", messages);

        return getDispatch("default");
    }
}

Technorati Tags: ,

Related Posts:

Referencing a superclass from a subclass in JPOX

March 14, 2005 on 12:22 pm | In General, Java | Add a comment

In JPOX, when referencing a superclass from a subclass, say, Message descends from Post and has a parent of type Post, do not use the no-table inheritance strategy for the superclass.

class Post {}

class Article extends Post {}

class Message extends Post {
  private Post parent;
}

Doing this will cause JPOX to fail since the parent post record will not be found because there is no table for the Post class. One can either leave it to JPOX to choose the correct strategy or specify the new-table one.

Technorati Tags: ,

Related Posts:

HOWTO: Improved JPOX integration with NetBeans 4.0

March 7, 2005 on 2:26 pm | In Java | 2 comments

This is an improved version of the integration of JPOX with NetBeans 4.0. This one makes use of the Library Manager feature that NetBeans 4.0 provides and allows project dependencies to be assembled in libraries. This eliminates the need for the developer to copy files for each and every project.

So…

# Create a JPOX library by clicking on Tools -> Library Manager -> New Library and adding the JPOX JAR files.
# Add the library to the project by right-clicking on the project, selecting Properties… and following the prompts.
# Select the JPOX library from the list.
# Add the following code extract to build.xml.

    
        

        
            
        



        

        

        
        

Note that the enhancement is done right after the compilation (-post-compile) instead of just before the project is packaged. This has the advantage of working with any type of project that performs a compilation.

Technorati Tags: ,

Related Posts:

How to Use JPOX in NetBeans 4.0

March 6, 2005 on 10:45 pm | In Java, NetBeans | Add a comment

JPOX is the most popular implementation of the JDO specifications. However, the downside of using JPOX for object-relational mapping is the need to enhance classes after they have been compiled. Thankfully, developers can take advantage of the Ant-based nature of NetBeans projects to automate this task. Here, I show you how to do this.
Read more…

Related Posts:

HOWTO: Filter spam efficiently

March 4, 2005 on 11:50 am | In General | Add a comment

What you see is what you get. This tip will not eliminate all your spam problems, but it will help you cope with it better.

Usually, people read their e-mail by selecting the ones they think are most urgent or most interesting. They do this by scanning the subject lines in their inboxes, picking one they want to read and moving on to the next. When they encounter a spam message or what they assume to be so, they delete it. This is a process that people have become accustomed to and manage to do in very little time. The problem lies with those messages that they are not too sure about. Is there spam behind this subject line or not? To make sure a message that looks and feels like spam is not actually the job offer one has been waiting for the whole week, reading is obligatory. Now, there can be several of these on a typical day, which makes the process longer. Although spam is harmful in many ways, it impacts people most by making them waste their time and experiencing that constant frustration. Call it 0-10 frustrations in 10 messages.

For too long, the emphasis has been on filtering out spam from legitimate messages. The downside is that, although spam ends up in a separate corner of the e-mail application or is flagged as such, it still has to be checked for false positives. The simple solution that I came up with and have been using for some time, despite the excellent spam filter in Mail.app, is to assume that all incoming messages are spam and that only a small subset is legitimate. Most of the time one knows the senders and/or the subjects of genuine e-mail. Very rarely does one get correspondence from unknown sources or about subjects they are not aware of. Therefore, the rest can be considered as spam, and the solution is to emphasize on those messages that one knows are genuine. This can be done as follows.

* Create folders for known correspondents and/or subjects
* Create filtering rules to move incoming messages to the appropriate folders and leave the rest in the inbox.
* If your e-mail client allows rules to check if a sender is in the address book, this can be used as another filtering mecanism.

It is very important that as many rules as possible are created so that the least number of messages remain in the inbox after they have been applied.

What this technique does is to reduce the time it takes for one to browse the inbox, picking up legitimate messages and deleting spam. It works by putting real people’s e-mail in separate folders where they can be quickly accessed and leaving out spam in the inbox. As I say, it works for me because I know who will send me messages (known correspondents, automated mail lists, etc.) and what the subjects will be about. Coupled with a smart spam filter tool, this technique can help save valuable time to concentrate on more important tasks.

Technorati Tags: ,

Related Posts:




Powered by blog.mu with Pool theme design by Borja Fernandez.