Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Blogs

photo

Jeff Tujetsch

16 Entries |  Jeff Tujetsch
Updated 
RatingsRatings 1     CommentsComments 5
photo

Yellow is the...

72 Entries |  Tim Tripcony
Updated 
RatingsRatings 2     CommentsComments 34
photo

Lotus Nut

111 Entries |  Chris Whisonant
Updated 
RatingsRatings 23     CommentsComments 157
photo

Erik Brooks

35 Entries |  Erik Brooks
Updated 
RatingsRatings 9     CommentsComments 92
photo

You need Note...

16 Entries |  George Paglia
Updated 
RatingsRatings 2     CommentsComments 9

Bookmarks

Better than Good Enough

Blog Authors:  Grant Lindsay  

All entries tagged with formula

You have 1 unread documents

Grant Lindsay  |    |  Tags:  better formula c++ lotus_script  |  Comments (0)

I believe that this article will demonstrate my thinking on the "better than good enough" approach to application development.


This is a pet peeve of mine: "1 documents". Say it out loud. To me, it's like listening to the screech of fingernails on a chalkboard to hear these words uttered. But that's okay, actually, since when does anyone actually say "one documents?" I'm pretty sure I have never heard these words spoken, not even by my three-year-old nephew. But, I read those words (and others like them) all too often in "good enough" software.


Of course, what we should expect to read are phrases like:


  • "You have 0 unread documents"
  • "You have 1 unread document"
  • "You have 2 unread documents"
  • ... etc.


And, by the way, dodging this issue by writing "You have 1 unread document(s)"... well, that just isn't good enough for me.


The code to accomplish this the "better than" way is trivial. All it requires is a certain attention to detail and a desire to do better than good enough.


Here are a few incomplete code segments to demonstrate what I mean:


C++

string strEnd( intCount == 1 ? "" : "s" );
cout << "You have " << intCount << " unread document" << strEnd << endl;


LotusScript

If intCount = 1 Then strEnd$ = "" Else strEnd$ = "s"
Print "You have " + Format$( intCount, "#,##0" ) + " unread document" + strEnd$


Formula

tEnd := @If( tCount = 1; ""; "s" );
tMsg := "You have " + @Text( tCount ) + " unread document" + tEnd;
@Prompt( [Ok]; "Information - " + @DbTitle; tMsg );

(In languages other than English, you would need to modify the code, of course, but the concepts should be adaptable.)


But, let's get real. Is this such a big issue? No, not really. Will this make or break your application? Probably not. So, why make such a big deal about "You have 1 unread documents?"


Mostly, because I'm a little anal that way. But, seriously, attention to details—details like doing better than "1 documents"—collectively do make or break our applications.


Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.