Archive for the 'General' Category

The ultimate email smackdown -or- “that Janus-faced verbal monstrosity”

Follwing are two emails I received one day about a month ago.    Names, etc. have been sanitized to protect the guilty.   Enjoy.

The opening shot

All,
I have found that it is time for me to once again remind everyone to remove the grammatically incorrect and unnecessary “and/or” construction from use throughout ….  Sorry, but I’ll blame being a stickler on my Jesuit education!  I’ve recently seen “and/or” slip into … publications again after an absence of several years.  It seems as though it’s like a virus that never really goes away.  While this might seem like a quite minor issue, it’s something that we can easily correct and our members and our customers will appreciate the fact that we care even about the small details of our work.
“And/or” basically shows that writers don’t really know what they mean and they’re trying to cover up that fact.  They’re being sloppy.
Acceptable:
1.  “and.”  Example. Charlotte and I will speak at the meeting.  This means that both of us will speak.
2.  “or.”  Example:  Charlotte or I will speak at the meeting.  This means that both may speak. It also means that only one of us might speak.  It intentionally leaves the situation ambiguous.
3.  “either….or.”  Example:  Either Charlotte or I will speak at the meeting.  This means that one of us will speak but it rules out both of us speaking.
So, please correctly use our language and avoid trendy (and sloppy) constructions.
Thanks, …

The Finishing Salvo

Hi all,

<name removed>’s quite proper note was prompted by my unfortunate use in an e-mail of the term that one commentator has called “that befuddling, nameless thing, that Janus-faced verbal monstrosity.”

To salve my professional conscience, please allow me to note the following in his jeremiad:

  1. excessively tentative phrasing (e.g., “It seems as though it’s like”);
  2. three compound sentences punctuated insufficiently; and
  3. a draconian sense of what constitutes trendiness. “And/or” arose in the legal discourse of the nineteenth century. I realize that this is practically yesterday on the Jesuitical timescale, but the term’s vintage is scarcely comparable to that of, say, “impact” (as a verb) or “a’ight.”

To be more positive, I do admire an author who knows the difference between “may” and “might” and who appreciates that good use of grammar is next to godliness.

Precisely and / or sincerely,

Share/Save/Bookmark

Phone menu navigation

You hear the whispers coming out of co-workers, hushed tones with odd inflections repeating words like ‘yes’, ‘no’, ‘customer service’. Is this some weird conversation with a loved one? Then it dawns on you that your co-worker is busy navigating the world of a voice-recognition-based phone system.

Almost everyone has used one of these systems by now. Many companies are using them these days and the trend seems to be moving away from number-based (”please hit 1 if you require immediate medical attention”) to voice-recognition-based (”please say yes if you require immediate medical attention”) phone menu navigation systems. The question is why?

There is nothing inherently better about these systems and I’d argue that in fact they are worse. In most cases hitting a number on the keypad would be quicker. In all cases it is certainly not as disruptive as navigating a voice-based menu system. I suppose there is one situation in which a voice-based system could be better and that would be a menu that gets very deep with options.

With a voice-based system it would probably be easier to skip levels of the menu depending on what the person is saying. Something like “pay my bill” could certainly save time if the keypad-based option required inputting more than 2 numbers to navigate down in to the menu system. In my experience with these systems though I am not seeing this savings.

Most of the systems have voice input that is closely tied to menus that would be equivalent to the keypad-based systems. I just don’t see the savings in time and see a lot more aggravation. I have had, on more than one occassion, had to repeat myself multiple times to be understood. Higher levels of background noise really mess with the voice recognition. In some instances I have even been transferred to a human because the voice recognition can’t understand what I’m saying.

Keep the keypad-based systems guys. They are the less annoying option.

Share/Save/Bookmark

Summer festivals, big crowds, and why the Taste of Chicago sucks

I still can not understand why people flock to the Taste of Chicago on July 3rd every year.   And every year the crowds seem to get larger.  Oh sure I understand that there is a fantastic fireworks display there every year.  In fact I used to enjoy it myself for quite a few years when I lived in the city.  But maybe it’s as I get older I call in to question people’s sanity when I see the crowds of people heading to the lakefront every July 3rd.

I’ll relate a little story of my own.  About 10 years ago a friend and I went to the Taste of Chicago both for  the food and for the fireworks.   We were hanging out in the area around Buckingham Fountain in Grant Park waiting for the fireworks to start.   It seemed like a good area to watch the display.  Unlike most of the areas right down by the lakefront there was actually some room to move around.   On the 3rd people are generally packed in like sardines in a can, there is absolutely no room to move.

A little while into the fireworks we heard a big roar behind us.   I turned around and got a quick glimpse of a mass of people rushing toward us.  I didn’t get much more than a quick look because at that point the crowd had reached us and I was jammed into a moving wall of people.   I was actually physically picked up off my feet and moved about 30 feet as the people kept stampeding forward trying to get away from whatever it was that had caused the stampede in the first place.  I had heard about situations like this.  I had just never been in one and never want to be in one again.

After it was all over people’s belongs were scattered all over the place and I saw several very small children who were separated from their families screaming and crying.  I can’t say that I felt any better than those kids did.  My nerves were jangled (in fact for a few days) and my friend and I got out of there as quickly as we could.   Unfortunately for me I was so nervous and walking so quickly that on the way out I stepped on a flattened aluminum can that was sitting in a pool of slick goo that is always on the streets and sidewalks during the Taste.  I fell flat on my back to the chorus of laughs coming from some group of drunk fools that witnessed my fall.  I didn’t care too much though…I just wanted to get the hell out of there.

Turns out that members of two rival gangs decided to mix it up close to the area where my friend and I were standing.  Guns and knives were brought out and people started panicking.   Apparently the years haven’t changed much.  I heard a woman call in to the John Williams Show on WGN radio this morning talking about a similar situation.

According to the story she and her boyfriend chose this past July 3rd to make their first visit to the Taste of Chicago and brought some friends that were in town from Sacramento, CA.  She pointed out the crowds, the being packed in so tight you could barely move, the claustrophobia from being in that situation, all of these things being familiar to anyone who has been to this festival on that particular day.   She then talked about how some gang-bangers decided to start mixing it up and caused another stampede.  She and her companions were caught in a bad situation and she said she never wanted to go there again.

I’m not sure what they can do about it.  It isn’t as if you can count people coming in to that area and then just block it off.  I certainly will never go there again on July 3rd.  It took years for me to go back even on another day but I will refuse to ever go again on a day when it is that packed full of people.  It isn’t fun.  It most certainly is dangerous.  The caller to the radio show suggested that they just cancel it.  Fat chance since it’s such a huge money maker.

The best bet is just to avoid it and go during lunch during the week.  It certainly is more accessible then.  But it still sucks.

Share/Save/Bookmark

Song(s) of the day - 06/14/2008

Songs because the video is multiple songs sung by Frank Sinatra and Antonio Carlos Jobim but the song I want to bring attention to is the “Girl From Ipanema”.  This is a clip from Sinatra’s 1967 television special A Man and His Music + Ella + Jobim when the Bossa nova craze in the United States was going full-tilt.

Sublime is too simple of a word to describe this music.   Sinatra’s crooning combined with Jobim’s guitar work and Portugese vocals on “Girl from Ipanema”  just ooze style and class. The tuxedos certainly add to the atmosphere. Just amazing stuff.

I have to say though that it’s still shocking to see Sintra dragging on a cigarette right on stage ;)

“Girl from Ipanema” kicks in at about 4:40 (total length of about 6:30).

Share/Save/Bookmark

Do I really have to…

…feel like complete shit when I get home from work every day?

Just asking…

Share/Save/Bookmark

Create one thing a day

All I gotta do.  Move the personal projects along one step at a time.

A creation a day keeps the doldrums away.

Want to be an artiste you gotta do the art.

Share/Save/Bookmark

Eclipse UI Elements: the Vertical Ruler and Overview Ruler

Maybe I’m blind but I’ve looked all over the Eclipse help files and there are references to both the “vertical ruler” and the “overview ruler” yet there isn’t an explanation as to what those terms mean.  Similar searches on Google don’t turn up anything other than Eclipse API references and the Platform programming documentation.  Those do explain what these items are but I think its kind of crazy that there isn’t an explanation right in the Workbench (or Java Editor) docs.  Here is what they mean:

  • Vertical Ruler - the vertical space on the far left of an editor window (next to the gutter that shows line numbers if you have them enabled) that area scrolls along with the content of the editor.  Markers placed here aren’t in view if the line they’re on isn’t in view.    For example: debugger breakpoint indicators are set here and scroll in and out of view as you scroll the editor.
  • Overview Ruler - the vertical space on the far right side of an editor window (to the right of the editor scrollbar). This area shows markers for the whole file being edited and it does not scroll along with the editor window.   This area is used to place markers for such things as errors and occurrences of methods, etc.  For example: this allows you to see approximately where all errors occur in a file.  If you click on one of the indicators it will move the editor to that specific line.

Not earth-shattering information but useful nonetheless ;)

Share/Save/Bookmark

Song of the Day

Enjoy!

Share/Save/Bookmark

Storing JasperReports in a database using iBATIS and Oracle 10g

I’ve used JasperReports in two different jobs now to provide reporting services for clients of the various web applications I’ve worked on. My first experience definitely turned out to be a great learning opportunity.

It was a great opportunity because I learned what not to do when designing a web-based reporting system the main lesson of which was:

  • Don’t store report defintions on the file system.

We experienced a lot of deployment headaches in the clustered application server environment that was provided to us because we were not provided any sort of shared file system for application assets such as reports. Each application server in the cluster only had access to it’s own file system.

This article shows how I solved the file system issue by storing JasperReports report definitions in a database. I’ll assume familiarity with the iBATIS “ORM” database framework since I am not showing a full iBATIS setup here.

Part 1: Oracle Setup

The first thing that I did was get my database tables in place. Our needs were pretty simple and I created two tables: one, REPORT, to hold the various pieces of information about the report such as the name, description, and ID and another, REPORT_XML, to hold the actual report definition. These are tied together via a foreign key on the ID column of the REPORT and a REPORT_ID column on the REPORT_XML table. The most important piece of information here is the choice of the datatype to hold the report definition.

To allow easy creation of reports we are using the iReport visual report designer and saving the reports in the JRXML format. I didn’t see any benefit to compiling the definition and putting that in the database. With XML it makes the report definition fairly easy to read and very easy to parse should that be necessary. With that in mind I chose to use the CLOB type in Oracle.

CLOBs are good for storing large pieces of character data and they are handled effortlessly by iBATIS since the only thing being passed in to the library are String objects. As of release 10g of the Oracle JDBC driver there is no longer a need to use the extensions that Oracle provided for dealing with CLOBs (oracle.sql.CLOB) in previous releases. The only requirement is setting a new Connection property, SetBigStringTryClob, to true. When this is done the String being passed in to a PreparedStatement (or to a ResultSet for data coming out of the CLOB column) is inspected to find it’s size and if its over 32k a different call is made, to an OraclePreparedStatement object, to set the CLOB value properly. This is handled transparently by the driver.

The iBATIS and Java Code

Let’s take a look at how this works. Here is an iBATIS XML snippet to handle inserting a report definition into the REPORT_XML table:

<insert id="addReportXML" parameterClass="map">
  insert into report_xml
  (id,last_modified_date,last_modified_by,description,report_id,xml_def)
  values (#id#,sysdate,user,#reportId#,#reportId#,#xmlData#)
</insert>

There is no special CLOB handling here. We are just dealing with standard types.

Here is the code in my DAO object that is calling the insert statement above:

private int addReportXML(String reportId, String xmlData)
{
 
  IdManager idMgr = IdManager.getIdManager();
  Connection connection = null;
  int result = 0;
 
  Map paramMap = new HashMap();
  paramMap.put("id", idMgr.getUniqueId());
  paramMap.put("reportId", reportId);
  paramMap.put("xmlData", xmlData);
 
try
{
  result = this.getSqlMapClientTemplate().update("ReportConfig.addReportXML", paramMap);
 
} catch (SQLException e) {
 
}
 
return result;
}

In my actual code I do have exception handling code in the catch block above ;) I am just trying to only include the important stuff here and for this posting database error handling isn’t important. I also left out the connection handling.

IdManager is just a class that will generate a unique ID string based on various bits of system information. We could use a sequence generator in the database as well the the ID generator works better for how we deploy our applications.

This code is obviously pretty straightforward. The only thing we are doing here is passing in a String that contains the full XML as well as the report ID this report definition corresponds to. Java Strings can be very large (char array indexed by an integer) so you’d have to have an awfully large report definition to reach that limit.

Just note again that we are only dealing with standard types here. There is no special handling being done by either the Java code or iBATIS. All of the heavy lifting is being done internally by the Oracle JDBC driver.

That is pretty much it. There is nothing special that needs to be done to store the JasperReports report definitions in the database. Had I known on the first project that it was this easy I certainly would have done it this way ;) It is better by far to centralize the storage of the reports when deploying in a clustered environment. It allows easy deployment and updating, easy backup and recovery, and easy access. How can those be bad things? :)

Share/Save/Bookmark

Perhaps the ultimate GTD tool?

The Livescribe Pulse Smartpen.

Share/Save/Bookmark

« Previous PageNext Page »