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 91
photo

You need Note...

16 Entries |  George Paglia
Updated 
RatingsRatings 2     CommentsComments 9

Bookmarks

Better than Good Enough

Blog Authors:  Grant Lindsay  

Main  | Next

How do you abbreviate your bytes?

Grant Lindsay  |    |  Tags:  gibibyte gigabyte memory standards abbreviate  |  Comments (0)

How do you abbreviate memory (or storage) sizes? For example, which of these would you say best describes 2,512,555,869 bytes?


  1. 2.51 GB
  2. 2.34 GB
  3. 2.34 GiB

Before I tell you the correct answer, let's look at what is different about these abbreviations:


  1. 2.51 GB—This value, you might have guessed, is obtained by dividing the value in bytes by 10^9, which is 1,000,000,000 (one billion or one thousand million, if you prefer) and appending the "gigabyte" units, GB.
  2. 2.34 GB—We arrive at this value by dividing the number of bytes by 1,024^3 (or 2^30 or 1,073,741,824) and using the same units as a.
  3. 2.34 GiB—The value is determined exactly like b., but the units, GiB, are different.

So which one is correct? Here is what Wikipedia has to say on the subject:


  • 1,000,000,000 bytes or [ 10^9 ] bytes is the official definition, based on the metric system (SI) of prefixes for multiples. It is used in telecommunications for network speeds and traffic volume and by most computer storage manufacturers for capacities of hard disks and flash drives... The Linux kernel also uses this definition.
  • 1,073,741,824 bytes, equal to [ 1024^3 ], or [ 2 ^ 30 ] bytes is the interpretation commonly used for computer memory and often file sizes. Microsoft uses this definition to display hard drive sizes. Since 1999, the [ International Electrotechnical Commission ("IEC" )] has defined this quantity as gibibyte (abbreviated GiB) and most standards bodies now recommend this usage.

Somehow, I am not surprised that the storage manufacturers would favor the first definition. This gives the illusion of larger drive capacities, if the reader assumes the 2^30 method of calculation. But maybe, that's just my suspicious nature, since the difference is less than 2.3%.


I wondered why, though, I hadn't seen more wide-spread use of gibibyte (GiB), if this has been the "standard" for the past ten years. The article goes on to explain.


The IEC's recommendations are frequently ignored amongst computer professionals, and "gigabyte" is used colloquially to mean [ 1024^3 ] bytes.

If we assume that the IEC has any authority to make these determinations, then we are left in an interesting pickle: Choosing between "right" and "popular." If we take our stand on principle and use the standard, we may confuse our customers. If we go with the flow, then why have a standard at all?


How do you abbreviate your bytes?


Incidentally, the Notes 8.0 Mail template goes for the popular:


image

P.S.: I hate fighting editors. This: 1,024<sup>3</sup> is perfectly valid HTML. Leave it alone!

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.

Better than Good Enough

Grant Lindsay  |    |  Tags:  intro ethic  |  Comments (1)
This will be my professional blog. I have a personal one and I have guest-posted to our company blog. With this blog, I'm joining the rest of my team who have also jumped into this "web logging" thing.

So, "better than good enough." What does that mean?

For me, this blog's title describes a facet of my work ethic. That is not to say that I feel that I am better than anything or anyone. No, not in the least. What it does mean is that I don't tolerate a "that's good enough" approach to my own work. I drive myself to get it right. I strive to do the best I can.

That's why I admire the gurus in my profession. Because of their generosity, I learn from them and can improve what I do. With this blog, I plan to imitate them and share what I've picked up over the years (as non-guru-ish as those things might be) and you can do the same in your comments, if you like. We can be "better than good enough" together.

Of course, the products or projects we're working on need to be released or delivered at some point. As I look at mine, even if they are not perfect, as long as they are better than good enough, I can live with that.

Main  | Next
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.