John Wargo

Home
JohnWargo.com
My Problem with Foobar PDF Print E-mail
Monday, 28 December 2009 08:00
AddThis Social Bookmark Button

I read a lot of computer books and application development books – you’d have to expect that considering what I do for a living. Recently I’ve been catching up on some of my Joomla! books and of course reading the BlackBerry development books that followed mine and there’s something that always bothers me in these types of books and I thought I’d rant about it a little bit…

In most development books, the authors always use ‘foo’, ‘bar’ and/or ‘foobar’ as sample function names in their sample code. What I can never tell is whether the person using those terms understands what they’re doing or whether someone did it once and everyone else just followed.

Let me give you some background:

A very long time ago (who knows how far back – Wikipedia says it was in 1944) some army grunt used the term ‘FUBAR’ to describe something that was ‘mucked up beyond all recognition’ or ‘mucked up beyond all repair’ (depending on which version of the story you hear) substituting an ‘F’ for the ‘M’ in mucked of course. The term was apparently very widely used in the US army (or so my father told me from his experiences in the Korean War).

What I can’t figure out is how the term got mangled into something that’s used so often in computer books. The term is clearly not something that you’d expect to people to use in a book, so I guess that’s how it became foobar instead of FUBAR. Probably mostly because it would be too easy to mispronounce ‘fu’ as perhaps fuh instead of foo – so that’s why ‘they’ made it ‘foo’? Anyway, why is this being used? I’m not offended by the term, but it is a crude and impolite word to use in a regular, every day book.

If you read the Wikipedia reference for FUBAR http://en.wikipedia.org/wiki/Fubar and foobar http://en.wikipedia.org/wiki/Foobar, the writers there have clearly tried to pretend that the words are not related (confusingly the FUBAR page says they’re not related: ‘Not to be confused with foobar’ but the foobar page mentions that foobar may actually be related to FUBAR). How could they not be referring to the same word? Some developer geek heard about the expression and started using it in his sample code and before we know it, it’s being used everywhere. Why can’t the sample function names be something like ‘function1’ & ‘function2’ or ‘somefunction’ & ‘anotherfunction’ instead of ‘foo’ and ‘bar’? It just doesn’t make sense to me.

The reason this all came to mind I guess was that many people use words like this without really knowing what they’re saying. I purchased much of the furniture in my house from a family run furniture company in Amish country (although they were not an Amish family – just craftsmen living in Amish country). I was speaking to the owner’s wife about a misconnection on a delivery to my house when she said “I’m so sorry about the SNAFU.” I was completely taken by surprise by her comment – she was after all a quiet, polite lady in her late 50’s or early 60’s. I laughed for a minute then asked her if she knew what SNAFU meant. When she said that she didn’t, I told her that that expression was another Army term standing for ‘Situation Normal, All Mucked Up’ (or course again substituting an ‘F’ for the ‘M’ in mucked). She was shocked and stunned and quickly promised “I’ll never use that term again!”

Anyway, feel free to disagree with me, but I’m certain the initial use of foobar in computer sample code was a sort of trick played by some geek a long time ago and we’re stuck with it in every new computer book that comes out. I wish people would drop it – again, it’s not that I’m offended by it, I just think it’s stupid to have that expression (although a slightly modified one) used in professionally produced books. I wish the editors would all get together and ban that term from all code examples in computer books going forward. I promise that you won’t find the expression in BlackBerry Development Fundamentals and in any other book I write!

 
Internet Scam 20091216 PDF Print E-mail
User Rating: / 1
PoorBest 
Saturday, 19 December 2009 07:22
AddThis Social Bookmark Button

I got an email the other day that announced that McNelly SoftWorks had won an award: “The Small Business Commerce Association (SBCA) is pleased to announce that McNelly Softworks LLC has been selected for the 2009 Best of Business Award.” I thought that was interesting considering that McNelly SoftWorks really doesn’t do much anymore. I started the company many (many, many) years ago and it offers two software products but really only sells one (and sells that one poorly at that).

I knew it was a scam as soon as I read further: “Best of Business Award in the Computer software tape and disks: blank, rigid, and floppy category.” Um, McNelly isn’t in the software tape and disks market – so I knew whoever awarded this award really didn’t know ANYTHING about my company.

Here’s the text of the message:

I started looking around to try to see if this message had anything in it that would help me understand the nature of the scam, but it didn’t look funky at all. I went to their web site and noticed that it was just a front for what looked like a fake organization. As soon as I saw the announcement that the company was funded by the Federal Government (in very poor English) I knew I had a confirmed scam. I searched around the Internet and found the following link: http://www.scam.com/showthread.php?p=806477 explaining the source of the scam.

Apparently they give out these ‘awards’ and charge you an exorbitant fee for a plaque you can display in your place of business. I wonder how many unsuspecting people get duped by these guys or how many pay the fee for the plaque and don’t know any better.

Anyway, too funny – I’m so tired of people calling me or sending me unsolicited email messages (in direct violation of US Federal Law mind you) without actually knowing anything about me or my business. I’m sure they assume I’m some small to medium sized business rather than one guy working out of his basement, but it’s ridiculous that people fall for these kind of things. I guess if you’re a growing business that things like this would look good on your wall, but you have to know it’s a shady deal if you’ve never heard of the organization and their web site is so lame. The good news is that you can go to their site and register for the 2010 awards – maybe you’ll win one too.

 
Lotusphere Schedule PDF Print E-mail
Friday, 18 December 2009 14:25
AddThis Social Bookmark Button

I received the Lotusphere schedule last week. I was very excited to see that our BP212 session was selected to be a repeat session - that's never happened to me before. Way cool.

Here's the schedule:

BP212: Tuesday from 3:30 PM to 4:30 PM

AD114: Wednesday from 10:00 AM to 11:00 AM

BP212 (repeat): Wednesday from 1:30 PM to 2:30 PM

Be sure to track me down and say hello!

 
Internet Scam 20091207 PDF Print E-mail
User Rating: / 1
PoorBest 
Thursday, 17 December 2009 12:53
AddThis Social Bookmark Button

I received another really interesting email the other day and I thought I’d write about it in my continuing series on Internet Scams. I got an email supposedly from American Express as shown in the following figure:

The thing about it though was I knew that American Express didn’t have this email address. My ISP flagged it as Spam, always a useful aid and there were a lot of other things about the message that confirmed that it was just another scam.

In my Outlook inbox I used Qurb (now called ‘CA Anti-Spam Plus’) which makes sure that no messages make it into my inbox unless I have them in my contact list, I’ve written to that address or manually approved the address previously. That makes it easy to spot Spam since all suspect messages are siphoned off into a special folder that I can peruse later to free up messages from new, approved senders. Thunderbird on the other hand doesn’t have (that I know of) a whitelisting Spam filter, so I have to drill through my Spam manually. Fortunately it does support the identification of Junk senders and uses Bayesian Probability to identify Spam based upon the messages I’ve marked as Spam previously. Here's an article from Wired Magazine where I first heard of this technology.

Anyway, as I read through the email I saw a lot of things that assured me that this was spam. For the screen shot I turned on message headers - which provide me with a whole bunch of additional information about the source of the message. I blurred some if the information in the screen shot to help protect my ISP’s servers.

Let’s go through the list:

  1. Message Subject: Not likely that American Express is going to send me a message about an ‘American Express Online Form.’ There couldn’t possibly be anything like that I’d need to address.
  1. American Express would always address me by name, not using ‘Dear American Express Customer.’
  2. Message Body: It just doesn’t make sense.
  3. Logo: There’s no American Express logo in the email anywhere. The scammer sent an HTML format email message rather than plain text, so you’d think since it’s already HTML that a logo file would be displayed (further luring me into believing that the message actually came from American Express).
  4. To Address: The message was sent to ‘info@mdecorporation.com’ which isn’t where it was delivered (it was delivered to info@mcnellysoftworks.com). That’s a sure sign that it’s Spam!
  5. Received Address: From looking at the message headers, it’s clear that the message thinks it was received from an account at The University of Texas at El Paso (utep.edu). Ya, I’m pretty sure American Express is not going to send me a message from a University computer system/account.
  6. Return-Path: The headers show that the return address is set to an email account in Russia. I’m pretty sure American Express isn’t going to be sending me email messages from Russia.
  7. X-Mailer: The headers show that the message was sent by Microsoft Outlook Express 6.00.2900.2180. I’m pretty sure American Express is not going to be sending me email messages from Outlook Express.
That’s all I have for this one. I’ll keep posting these things as they come up – it’s just fascinating (for me anyway) to see these messages dissected.
 
What Were They Thinking #4 PDF Print E-mail
Wednesday, 16 December 2009 20:08
AddThis Social Bookmark Button

My company recently asked us to install and use an application on our BlackBerry devices and as soon as I saw the application icon, I knew I had another topic for my 'What were they thinking' series.  Please take a look at the following BlackBerry screen shot:

Misfit Application Icon

If you take a look at the last icon in the first row, you should be able to easily tell that it just doesn't match the look of all of the other icons on the device's home screen. When working with the Apple iPhone or Windows Mobile devices, there isn't really any adherence to any theme when it comes to application icons. On the BlackBerry platform on the other hand, the icons on the home screen are designed specifically to look similar to all of the other icons in the theme - mostly because it's a theme and that's how themes work.

When building application icons for BlackBerry devices, it's a good idea to make sure your application icon matches the 'theme' of the default theme for the particular device. I know this means more work for the developer, but if you don't do this, you end up with screens like the one shown above.

The reason this is a problem for me is that, because of the way the developer designed the application icon, every time I looked at the device, it looked to me like the bright orange icon shown in the figure was the currently highlighted icon. Every time I looked at it, I immediately assumed that was the one highlighted and tried to move it off of that icon to the application I'd intended to open. Every time (and I promise you it happened many, many times), the 'Profiles' application or my 'Messages' application was actually the selected icon and I felt like an idiot. You shouldn't use icons that contrast so starkly with the other icons on the device - the selected icon should be unique, but at the same time should blend in with the rest of the theme.

In this case, I'm sure it wasn't that the developer wasn't thinking. What really happened I bet was that the icon was the last thing added to the application right before it was released and the developer just threw something together so he or she could finish the project and move on to the next one. Considering the orange color and globe icon are synonymous with my employer, it's easy to see how that was what was selected in this case. Also, this application was created using one of the MEAP tools (I won't say which one) and therefore had to run across multiple platforms, so it's likely that's why a theme appropriate icon was not selected for this application. If it were me, I'd have made sure that the icon was less...standoutish (like a sore thumb).

 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Page 10 of 24

My Book

InformIT (Pearson Education)