Using UML - The usefulness of UML diagrams

Following a speech two days ago, I'm struck by how very little we use the Unified Modeling Language (UML) on our software projects. Occasionally I'll create some activity diagrams to model how users get their tasks done, but that's about it. Typically when we create a software requirements specification this is what we deliver:

JOptionPane showMessageDialog - a Java class to show long messages

Some times when exceptions occur when users are running a Java JFC/Swing application, it's nice to be able to show them a long message about what happened, i.e., something more than a one-line message. To that end I created a really simple Error Message Panel (ErrorMessagePanel.java) that you can use with the JOptionPane to display long messages.

Code Kata - practice programming

Here's a link to a Code Kata site. It discusses the importance of practice in the software industry. It seems like the basic theory is "If musicians and athletes believe that practice is extremely important, why don't developers (and organizations that develop software)?"

At the moment I'm not aware of any software organization that takes time out for skills practice, unless training on new products or languages counts ... and I don't think it does. Kudos.

Java image example - simple ImageIcon and JLabel technique

Here is some sample Java source code that shows a simple technique to display a GIF, JPG, or PNG image using a Java ImageIcon and JLabel.

Java array syntax examples

Java array FAQ: Can you share some examples of how to create arrays in Java (Java object arrays)?

While I generally work with lists and maps in Java, I occasionally need to create object arrays in Java. Since I don't use arrays that often, I thought I'd share some examples here so I can have a handy Java array syntax reference.

A simple Java String array

I work with the String class a lot, and here's how to create a String array in Java:

Steve McConnell's "Classic Mistakes Enumerated"

Here is a link to Steve McConnell's Classic Mistakes Enumerated, from his book titled "Rapid Development". It is a great listing of 36 common problems that plague software development projects.

grep multiple patterns - find files containing multiple patterns

grep multiple patterns FAQ: How can I use the Linux grep command to grep multiple patterns (or grep multiple strings) with one command?

A little while ago I needed to search for all files in a CVS repository that contain multiple character patterns. That is, I wanted to be able to grep multiple patterns in multiple files. In my case the patterns I was looking for were the strings "prevayl" and "jtable".

Enable the "Open with jEdit" option in the Windows Explorer

One thing to note about jEdit if you're going to use it on Microsoft Windows: If you like to open files from the Windows Explorer by right-clicking on a file, and then selecting an option like "Open with jEdit", you need to use the Windows installer.

Generate Java code from your database design

I don't write much in the way of business application code any more, but if I did, I would generate Java code like crazy.

Think about it, whenever you write database-driven applications, one common denominator is that every database driven project has the database design completed before you start coding. And then, once you start coding, I'll bet 80% of the code is related to what I call CRUD ("create, read, update, delete") functionality.

And you know what -- you can generate this Java database code, either statically, or more powerfully, dynamically.

A list of states for an HTML select/option tag (drop-down list)

I can never find a list of states for an HTML select/option list (aka, combobox, drop-down list) when I need one, so I'm putting two versions here. The first select/option list shows a list of states, but only shows the abbreviations of the states:

Syndicate content