JOpt Simple 4.4 released

JOpt Simple is my Java library for parsing command line options. You can find the changes in this latest release here.

This release incorporates a number of smaller features and bug fixes, many of which were originated by...

Read More

JOpt Simple 4.3 released

JOpt Simple is my Java library for parsing command line options. You can find the changes in this latest release here.

This release incorporates a small API change to produce a list of OptionSpecs that correspond to the...

Read More

JOpt Simple 4.2 released

JOpt Simple is my Java library for parsing command line options. You can find the changes in this latest release here.

This release incorporates a small API change to allow compile-time arrays as the supplier of default values...

Read More

JOpt Simple 4.1 released

JOpt Simple is my Java library for parsing command line options. You can find the changes in this latest release here.

I'm pleased to have received community contributions since moving the project to GitHub. This release incorporates...

Read More

JOpt Simple 4.0 released

JOpt Simple is my Java library for parsing command line options. You can find the changes in this latest release here.

I'm pleased to have received community contributions since moving the project to GitHub. This release incorporates...

Read More

Property Binder has company

One of the things about JOpt Simple about which I feel most proud is the fact that I advertise alternatives to it on the project's website. I realize that choices abound for command line option parsing in Java; before...

Read More

Richer Java runtime type info with javaRuntype

By now you surely know that Java's generics info is erased from objects during compilation. For example, given an object whose runtime class is java.util.List, I cannot tell at runtime whether the object was originally a List<Integer>, or a List<String>,...

Read More

AgileDotNet 2011

Save the date: Feb 25 2011, in Houston, the AgileDotNet conference. Lots of great speakers and topics -- this is a high value-for-dollar event. Sign up before Dec 1 2010 with the discount code EARLYBIRD and get a good...

Read More

Property Binder 2.0-rc1 released

Property Binder is my Java library for providing typed access to entries in properties files. It offers such access by allowing a programmer to provide it a Java interface whose methods represent the keys of the properties file. The...

Read More

Property Binder 1.0 released

Property Binder is a Java library that provides typed access to entries in properties files. It offers such access by allowing a programmer to provide it a Java interface whose methods represent the keys of the properties file. The...

Read More

Sniglet candidate

Trying to think of a sniglet for the phenomenon of looking at a microwave oven for the time of day, only to find that it reads however many seconds were left on the previous cook cycle.
Read More

JOpt Simple 3.2-rc1 released

JOpt Simple is my Java library for parsing command-line options. For 3.2, I've added the ability to specify a set of default values for arguments of a given option. Hopefully this will alleviate the burden of checking...

Read More

JOpt Simple 3.1-beta1 released

JOpt Simple is my Java library for parsing command-line options. Version 3.1 adds the ability to convert arguments of options to Java types via converter objects. These are useful for types that do not meet the requirements of Read More

JOpt Simple 3.0.1 released

JOpt Simple is my Java library for parsing command-line options. Release 3.0.1 has no new features, but fixes a dependency problem for Maven users, so that by declaring a Maven dependency on jopt-simple, you don't end up pulling...

Read More

JOpt Simple 3.0-rc2 released

JOpt Simple is my Java library for parsing command-line options. For 3.0-rc2, I've overhauled the example page quite a bit, so that hopefully the capabilities of the library and the option syntax it supports are clearer. I welcome all...

Read More

JOpt Simple 3.0-rc1 released

JOpt Simple is my Java library for parsing command-line options.  Release 3.0 will abandon support for pre-Java-5 JDKs, in favor of the new more typesafe ways of retrieving arguments of command line options. I will continue to support the...

Read More

JOpt Simple 3.0-beta1 released

JOpt Simple is my Java library for parsing command-line options.  Release 3.0 will abandon support for pre-Java-5 JDKs, in favor of the new more typesafe ways of retrieving arguments of command line options. I will continue to support the...

Read More

JOpt Simple 2.4.1 released

JOptSimple is my Java library for parsing command line options. Release 2.4.1 fixes a bug with the new help screen generation changes. Thanks to Hans Dockter for reporting it. As usual, download instructions are available at the project's website.

...
Read More

JOpt Simple 2.4 released

JOpt Simple is my Java library for parsing command-line options.  Release 2.4 sports some bug fixes, internal reorganization, some new features such as option synonymy and a cleaned-up help printing facility.  JOpt Simple seems to be generating more interest...

Read More

Let jQuery rock your world

Recently at work we found ourselves needing to act on groups of table cells in an HTML page which shared a common class attribute value. After a couple of minutes of hemming and hawing about what a whipping the by-hand...
Read More

JavaOne 2008, Day 4

"The Layperson's Guide to Building a Better User Experience" -- in short, you are a user experience designer; take interaction design, user experience, and user personae seriously; and read up.

"Semantic Web for the Working Ontologist" -- Interesting discussion from...

Read More

JavaOne 2008, Day 3

"Using FindBugs in Anger", with the great Bill Pugh -- nice summary of a great tool.  I liked the slide listing some common (but incorrect) wisdom about bugs and static analysis: programmers are smart, and smart programmers don't make dumb...

Read More

Some random thoughts from Day 1 of JavaOne 2008 (belated):

Wi-Fi connections spotty at best.  Kind of disappointing they couldn't handle the traffic they could have reasonably expected.

"JRuby: What, Why, How...Do It Now!" -- Nice JRuby overview.  An admonishment...

Read More

JavaOne 2008, Day 2

On Day One, I picked Josh Bloch's brain for a bit about whether the BGGA closures proposal was redeemable if the gnarlier bits might be removed, leaving it basically with function types.  It was cool to mingle with the Java...

Read More

JavaOne 2008 -- Day 1 preview

I'm at JavaOne this year, my first trip to the big dance.  Based on the rock-concert lines forming for the first General Session, I'd say the conference is doing pretty damn well.

Flight into SFO from DFW last night...

Read More

My colleague Rod presented me with the following (paraphrased):

     public interface Executable<T> {         T execute();     } 

The question arose: What if an implementor doesn't have a meaningful value to return?

...
Read More

JOpt Simple 2.4-beta1 released

JOpt Simple is a Java library for parsing command line options, supporting GNU getopt_long() and POSIX getopt().  See the changes here.

Releases of JOpt Simple are synced with the central Maven repository as of version 2.3.6.  See how...

Read More

No roadblocks.

Don't let your Scrum go stale.

At work, "No roadblocks" had become not just the answer to the third Scrum question, but almost a sort of punctuation to let the team know that the current pig is done speaking...

Read More

CITCON North America 2008 in Denver

I attended CITCON North America in Denver this weekend.  I went to last year's North American offering in Dallas/Fort Worth (my turf) and had a great time, learned a lot, and met some really smart, passionate software professionals.  Second...

Read More

Pronouncing wildcarded Java generics expressions

I've taken to pronouncing the Java generics wildcard character as "huh?".  So that:

List<? extends Comparable<?>>

is pronounced "List of huh? extends Comparable of huh?".

I've also been doing the equivalent of finger-quoting when pronouncing these expressions, doing angle brackets...

Read More

What with all the hubbub about Erlang, I've started diving into functional programming languages. Back in school, I learned a bit of Scheme as part of a mostly-Pascal-based second-semester CS course -- just before Scheme became the language...

Read More

...static methods?

It's common practice in Java projects to use an interface as a dumping ground for related constants. Back in the pre-1.5 days, developers did this in order that client classes could implement the interface and gain unqualified access...

Read More

Having this bug fixed would make certain Jaggregate factory methods a lot handier, allowing type inference to work its magic.

Read More

If you've ever written Java code that uses reflection, you've surely been confronted with what to do in case a reflected Method or Constructor raises an IllegalAccessException when invoke()d. How do you test your code's reaction to IllegalAccessException? Do you...

Read More

Played-out online geek bits

Herewith, some patterns of online communication that, in my opinion, have jumped the shark. I'm excluding the obvious targets that are emoticons, ubiquitous abbreviations (LOL, etc.)...these are a bit more geek-oriented.

  • "[insert-technology-here] and [insert-another-technology-here] and [insert-still-another-technology-here]...Oh my!" Wasn't even...
Read More

JOpt Simple 2.1 released

JOpt Simple is a Java library for parsing command line options, supporting GNU getopt_long() and POSIX getopt(). See the changes here.

I will soon follow up this release with a 2.2 that basically just removes all the deprecated...

Read More

Foolish consistency?

"A foolish consistency is the hobgoblin of little minds."
-- Ralph Waldo Emerson, "Self-Reliance"

I haven't read the essay, so I'm not sure whether in it Emerson tries to explain the difference between foolish and wise consistency. So, at the...

Read More

Jaggregate and Java 7 closures

The recent draft proposal to add special syntax for local and anonymous functions in Java 7 has gotten me really excited. If this stuff becomes part of the core language, my Jaggregate library will leap to support these typed functions...

Read More

What's coming in Jaggregate 3.0

1. Concrete classes, where appropriate, will have static factory methods that leverage generic type inference. These will be named such that they read well when statically imported. So, for example, instead of:

Dictionary<String, Integer> lengths = new Dictionary<String, Integer>();

you...

Read More

We'll stick with the chopsticks, thanks...

I recently started a C++ project at work. I hadn't done any serious C++ programming since 1998, so this was a great chance to shake off the rust.

The project had been underway for some weeks when I joined. I...

Read More

At work recently I found myself trying to improve the execution time of a JavaScript routine that processed bits of text in chunks of a few characters each.  The text was stored as a JavaScript Array.  To process the text...

Read More

Back in the blogging saddle...

My profuse, sincere apologies to the three people that read this thing; I've been pretty busy these past few months.  8^)

I intend to commit to cyberspace some thoughts that have been accumulating during that time; among the topics are:

...
Read More

I cooked up a toy Java 5 class that generates warnings of the "unchecked" family when compiled:

 package pholser.util; import java.util.Arrays; public class Stack<T> { private final Object[] storage; private int top; public Stack() { this.storage = new Object[...
      
Read More

Part of the contract of java.io.InputStream.read(byte[] b, int off, int len) reads:

Reads up to len bytes of data from the input stream into an array of bytes. An attempt is made to read as many as len bytes, but a...

Read More

JOpt Simple 1.0 released

JOpt Simple is my simple, test-driven command line options parser library for Java.  It aims to support the rules of POSIX getopt() and GNU getopt_long(). There are plenty of libraries that perform this task, but I think you'll find...

Read More

Funny highway circumstances

Seen this morning in the slow crawl down the freeway to get to work this morning: a shiny white BMW 5-series number, creeping along like the rest of us, with a vanity plate that read "ZIP N BY".

Read More

JOpt Simple 1.0 beta 1 released

JOpt Simple is my simple, test-driven command line options parser library for Java.  It aims to support the rules of POSIX getopt() and GNU getopt_long().  There are plenty of libraries that perform this task, but I think you'll find...

Read More

Agile with a capital "A"

I worry about the "commoditization of agile methods."  In previous consulting gigs, I heard lots of buzz about "Agile" as though "Agile" were a software development process itself.  Heck, we fell prey to such thinking within our own organization: "Let's...

Read More

Jaggregate 1.0 released

Jaggregate is a Java 5 collections library that is inspired by the ANSI Smalltalk collection protocols.  There are probably some generics relaxations that can happen in subsequent releases, plus predicate algebra, read/write streams....Please have a look, I'd love to...

Read More

A colleague introduced me to a terrific game called Set.  Like most great games, it contains simple elements that combine to create a compelling play experience.

The game consists of eighty-one (3^4) cards.  Each unique card has one, two or...

Read More

Go ahead, SpellThingsOut, instead of abbrvtngLkCrzy.

Read More

It is a ternary conditional operator, as in "composed of three or arranged in threes", as in having three operands; not tertiary, as in "third in place, order, degree, or rank."  (Thank you, Dictionary.com.)

Read More

Nice idiom for uninstantiable Java classes

Sometimes we create Java classes that consist of static methods and constants only, usually to group related stateless utility routines, a la java.lang.Math.  We typically prevent the client of the class from instantiating the class by making the class's zero-argument...

Read More

Fallon on the field at Busch?

Anyone else catch a glimpse on the Fox World Series broadcast of Jimmy Fallon, formerly of "Saturday Night Live", celebrating on the field with the Red Sox after they clinched? Possibly mugging down with some woman? Was it for Read More

Beautiful baseball poetry

Kinda nice how the last Cardinal retired in the 2004 World Series, Edgar Renteria, wore the uniform number -- 3 -- of the Bambino himself, perpetrator of the alleged 86-year-long "Curse", broken at long last.

Good show, Red Sox.

Read More

Does sport get any more delicious?...

...than a Yankees/Red Sox American League Championship Series? The greatness unfolds beginning tonight. The underdog rooter in me (I stuck with my beloved Buffalo Bills through four straight Super Bowl losses; exulted at Luis Gonzalez' series-winning base hit in 2001)...

Read More

Attention all software development "resources"!

Every software developer who's tired of being called a "resource," raise your hand.

I can scarcely think of a more dehumanizing way to label someone that you'd like to think was hired because of their intelligence, creativity, and motivation in...

Read More

I got sucked into an installment of Donald Trump's show "The Apprentice" on CNBC last night. In that installment, Bradford, a star member of the losing team who had been granted an exemption from getting fired, was so convinced that...

Read More

Tweaking JUnit test running behavior

Binkley writes about extending JUnit in order to preserve the original cause of test failure in the presence of tearDown() throwing exceptions. If you want to preserve the cause of the tearDown() failure, use this slight modification of...

Read More

An NUnit equivalent for JUnit's TestCase?

using NUnit.Framework; namespace Pholser { [TestFixture] public abstract class AbstractTestFixture { [TestFixtureSetUp] protected virtual void FixtureTearDown() { } [SetUp] protected virtual void SetUp() { } [TearDown] protected virtual void TearDown() { } [TestFixtureTearDown] protected virtual void FixtureTearDown() { } }...
      
Read More

...as opposed to what? "Junior Software Architect"? "Software-Architect-in-training"? "Software Architect Apprentice"? "Wanna-be-a-Software-Architect-When-I-Grow-Up"? All this is to say nothing of the very blurry notion of the purpose, duties, and capabilities of a software architect.

At minimum, I would think most would...

Read More

Oh, for nicer Java exception handling...

The conventional wisdom on handling exceptions says never to catch big-E Exception. However, often there are legitimate reasons for treating uniformly any exception that might be thrown from within a try block: you may really want to handle any such...

Read More

More C# 'enum' Wackiness

Chris Stevenson rants about C# enums here. I thought I'd share some of my own observations about C# enums, from earlier in 2003, previously shared only amongst co-workers.

Ostensibly enums are a way to define a type such that...

Read More

What's So Bad About Smalltalk?

The past twenty years have brought us all manner of new programming languages, many of which feature lots of reserved words and cartoon-curse-word punctuation, all in the name of making our programming tasks easier, or putting more power into the...

Read More

You Choose To Mock Me...

Amongst the gaggle of mock object frameworks for Java, I had come to prefer EasyMock over Mock Objects, as it's rather minimal (no pre-generated mocks for J2EE interfaces), and has the extra "cool factor" of generating mocks at...

Read More

Piecing Together My Web Site

Rough draft up and running here. I finally realized that, with the writings I wanted to share and a bit of spare time on vacation, I might as well publish this stuff on server space I'm already paying for....

Read More