Bad Marketing, Part 1

I find myself regularly surprised at some of the downright confounding marketing decisions I see made out there. Now, I'm a detail-oriented person so I sometimes catch things that most people wouldn't, but some of these things are glaring. Everyone makes mistakes, but when it's something like a TV commercial, I would think that there would be multiple content reviewers to prevent those mistakes from making it out into the wild. Yet today, I heard this in a commercial :

Don't shop around, call [offending company] first.

So much for content reviewers! Maybe it's just me, but the first thing I thought was "why are they telling me not to shop around?" Well, actually the first thing I thought was how arrogant it is that they would presume to tell me what to do, but once I moved past that I was left with the aforementioned question, to which I could only conclude that they have something to hide. Now, maybe they do have something to hide and maybe they don't--it doesn't really matter because at this point they have put the seed of doubt in my mind and I don't trust them. And that's what I call Bad Marketing.

Make Sure USB Connection Not Interrupted When Updating iPhone

I just plugged my iPhone into my MacBook Pro via USB and was immediately informed that there was a new version of the iPhone software available and I was asked if I wanted to install that software. I clicked yes and the process started. While it was doing its thing, I moved over into my Windows XP instance running in VMWare Fusion. Well, part of the process of updating the iPhone involved the iPhone restarting and when it restarted, because I was using VMWare Fusion, VMWare Fusion grabbed the USB connection and this completely hosed the iPhone. Let me be clear: it didn't just mess up the update, it hosed the iPhone--meaning it wouldn't work at all. It isn't that the iPhone connecting to the Windows XP instance in VMWare Fusion hoses the iPhone inherently; in fact, in a normal circumstance, connecting the iPhone to the Windows XP instance in VMWare Fusion would be no problem at all. What is a problem, however, is the iPhone losing the connection to iTunes in the middle of the update process.

So my only choice was to restore the iPhone to factory settings and from there to restore the phone's settings from a backup. I'm not sure that before beginning the update iTunes bothers to do a backup of your iPhone (if it doesn't, it sure should and I recommend that you do your own backup before letting iTunes do a software update), but in any case it seems I was able to restore from a recent enough backup that I didn't lose much, if anything. Because I'm using over-the-air Exchange synchronization, my most imporant data (Contacts, Calendar, Email) are not synced via iTunes so fortunately there was no risk of losing any of that data.

But even though in the end I lost little to nothing, the whole process of restoring is long and a rather big pain in the butt. So for that reason alone, I highly recommend avoiding it at all costs--and that means making sure the USB connection between your machine and your iPhone is not interrupted when you're updating the iPhone's software!

Incidentally, even after restoring from a backup, I had to completely re-do my settings for my Adobe Exchange account (I'm guessing that the certificate for the phone can't be backed up). Also, although my setting for syncing an image directory on the MacBook Pro to the iPhone was still present, the image in the directory (I only have 1 image in that directory) was not on the iPhone until I did another sync and, because I use that image as my Wallpaper, I had to reset my Wallpaper after I synced the image back to the iPhone.

Creating an RSS Feed Using <cffeed> with a Structure

The Adobe ColdFusion 8 documentation has a ton of great information on the <cffeed> tag, including a nice example of how to create an RSS feed using <cffeed> with a structure. There's no need to rehash that information, but I do want to expound on it to explain how you specify categories for an item in a feed because I think specifying categories for an item in a feed is a little tricky. So what I'm going to do is take the above example as a starting point, adding in the code that demonstrates how to specify categories and removing some non-essential code so as not to overly complicate things:

<cfsetting showdebugoutput="no">

<cfscript>
   /* Create the feed data structure and add the metadata. */
   myStruct = StructNew();
   myStruct.link = "http://" & CGI.HTTP_HOST & CGI.SCRIPT_NAME;
   myStruct.title = "My RSS Feed";
   myStruct.description = "A demonstration of <cffeed>";
   myStruct.pubDate = Now();
   myStruct.version = "rss_2.0";
   
   /* Add the feed items. A more sophisticated application would use dynamic variables
      and support varying numbers of items. */

   myStruct.item = ArrayNew(1);
   myStruct.item[1] = StructNew();
   myStruct.item[1].category = ArrayNew(1);
   myStruct.item[1].category[1] = StructNew();
   myStruct.item[1].category[1].value = "Cat1";
   myStruct.item[1].description = StructNew();
   myStruct.item[1].description.value = "The first item in the feed";
   myStruct.item[1].title = "Item 1";
   myStruct.item[2] = StructNew();
   myStruct.item[2].category = ArrayNew(1);
   myStruct.item[2].category[1] = StructNew();
   myStruct.item[2].category[1].value = "Cat1";
   myStruct.item[2].category[2] = StructNew();
   myStruct.item[2].category[2].value = "Cat2";
   myStruct.item[2].description = StructNew();
   myStruct.item[2].description.value = "The second item in the feed";
   myStruct.item[2].title = "Item 2";
</cfscript>

<cffeed action = "create"
   name = "#myStruct#"
   xmlVar = "myXML">


<cfcontent type="text/xml" reset="true"><cfoutput>#myXML#</cfoutput>

Please note the following:

  • The code was specifically written without external dependencies so that it will work on any ColdFusion 8 installation.
  • <cfsetting showdebugoutput="no"> can be a lifesaver when working with <cffeed>--I was tearing my hair out for a bit until I had that head-slapping moment when it dawned on me why I kept being told by the browser that the feed was invalid.
  • I consider it good coding practice to always scope variables, even those in the Variables scope. The only reason the above code doesn't use scoped variables is to keep it as similar as possible to the example code referenced at the top of this post.

Emulating Task Lists on iPhone with Calendars

Without any implication that it's at all okay that Apple hasn't bothered to implement a Task List application on the iPhone, here's a method I thought up to emulate task lists using the Calendar application:

  1. In your computer's Exchange client (you can't do it on the iPhone; you have to use Outlook or Entourage or whatever on your computer), create a new sub-directory of your current Calendar (and make sure you set it to be of the Calendar type). Call it Tasks.
  2. Repeat the above step with the exception that this time call the sub-directory Completed Tasks.

Pretty simple, huh? So how do you use it? Well, when you enter the Calendar application on the iPhone, you'll be able to view the calendars for your Exchange account (when you're in the Calendar app looking at the main view, you should see in the upper left-hand corner a button labeled "Calendars" that will take you to view the calendars). You'll see that you can view just one calendar or all of your calendars; as you may also know, your main view choices include List--so you can choose to view the "Tasks" calendar and view it as a List, very much as you would expect to view tasks in a Task List application. And of course you add a new task by creating a new calendar item in the Tasks calendar.

Unfortunately, there's no way to designate a calendar item as complete; that's why I use the second calendar called Completed Tasks. But there's one more unfortunate thing (referenced in my iPhone 2.0 Insights blog post) that comes into play here: you can't move calendar items from one calendar to another on the iPhone. Totally inexplicable pain in the butt, but it isn't the end of the world to just move the items over on your computer (if you don't care about completed tasks, you can always just delete them on either the iPhone or your computer and not worry about the Completed Tasks calendar).

Using 2 directories and calling them "Tasks" and "Completed Tasks" is just my choice: obviously, you can change the names of the calendar sub-directories as you see fit and you can create more than just 2 if you'd like.

Note: this definitely works with iPhone synched up over the air with Exchange; it may or may not work in other configurations (all I can say is that prior to synching over the air with Exchange, I was not aware of any way to synch with multiple calendars nor to view multiple calendars on the iPhone).

Note: I am aware that there are 3rd party Task List applications available for iPhone, however, given that none of those are able to synch with Exchange, they do not suit my purposes. I also don't know if any of those can alert me like calendars items can.

Fixing Inverted Caps Lock on VMWare Fusion

I use a MacBook Pro and on it I run VMWare Fusion on top of which I run Windows XP. Normally, when Caps Lock is on in the Mac, it's on in the Windows XP instance and when Caps Lock is off in the Mac, it's off in the Windows XP instance. However, from time to time, on the Windows XP instance Caps Lock becomes "inverted"--that is, Caps Lock on the Windows XP instance is reversed from what it is on the Mac. So on the Mac, Caps Lock will be off and on the Windows XP instance, Caps Lock will be on. Or, the Mac Caps Lock will be on--and so will be the light on the Caps Lock key--yet the Windows XP instance Caps Lock will be off.

Okay, now that I've established the problem, I'll go ahead and explain the solution, then for those interested, I'll backtrack into the details. So here is the solution: in the Windows XP instance, open an application that can toggle Caps Lock (didn't know Windows apps could do such a thing? Surprise!) such as Microsoft Word and go into whatever context is required for the app to toggle Caps Lock (in Word, that means typing in a document). Make sure Caps Lock on the Mac is off; this will mean that Caps Lock in the Windows XP instance is on. Start typing normally (that is, as if Caps Lock in the Windows XP instance is off); if you try to type "Hello" what you'll get instead is "hELLO" but as soon as you hit the space bar, the app will "correct" what you typed to "Hello" and toggle the Windows XP instance Caps Lock off--and as a result, Caps Lock will be back in synch between the Mac and the Windows XP instance. :)

Why does this problem happen in the first place? You've probably figured at least part of that out already: when you use an app that can toggle the Windows XP Caps Lock and you have Caps Lock on but type in a way that the app thinks indicates Caps Lock is on unintentionally, it "helps" you by "correcting" what you typed and turning off Caps Lock on the Windows XP instance for you. This isn't necessarily a bad thing--in a standalone Windows XP instance. However, with consideration to the fact that in this case it causes the Windows XP instance to toggle its Caps Lock but doesn't do the same for the Mac such that the Windows XP Caps Lock and the Mac Caps Lock become out of synch, it's not good. And why doesn't the toggling of Caps Lock in the Mac instance cascade up to the Mac anyway? As well as I can tell, Mac applications do not have the ability to toggle Caps Lock on and off (side note: this makes complete sense when you note the difference between what Windows & Mac do when you press the shift key while Caps Lock is on: on Windows, it's sort of a "double negative" type of thing such that the result is a lowercase letter whereas on Mac, the result is still an uppercase letter--so then it wouldn't make sense for the app to toggle Caps Lock) which means that VMWare Fusion can't toggle Caps Lock on the Mac when it is toggled in the Windows instance (now, I'm not even sure that VMWare Fusion can detect Caps Lock being toggled in the Windows instance but if VWWare Fusion can't toggle it on the Mac then really it's a moot point whether or not it can detect it being toggled in the Windows instance).

One note of interest: the behavior here makes it clear that the Mac-VMWare Fusion-Windows XP instance communication isn't along the lines of "Caps Lock on" or "Caps Lock off" but rather "toggle Caps Lock." See, you'll note that I didn't indicate that to fix the problem you just have to hit the Caps Lock key on the Mac and it will get things back in synch--that would work if the communication were "Caps Lock on" or "Caps Lock off" but since it's just "toggle Caps Lock" all that happens is that the Caps Lock gets reversed the other way around!

iPhone 2.0 Insights

I thought some of you might be considering iPhone 2.0 and so I thought I'd post these insights (to add, I'm sure, to all those insights others have posted of late). For those who like executive summaries, here you go: I recommend iPhone 2.0.

I am using earlier generation hardware with the new 2.0 firmware so I can't review 3G for you or any other new features of the iPhone 2.0 hardware.

Major Pros of 2.0 Firmware:

  1. Data push. This works really well for calendar, contacts, and email. I've never had a phone with data push before so I can't make comparisons (my main point of comparison is to Palm and synching locally to Outlook). My favorite features are multi-contacts groups and multi-calendars--I have always wanted this in order to keep my business contacts separate from my personal contacts and to keep my business calendar items separate from my personal calendar items. In iPhone Contacts and Calendar you can choose to view all or just one particular contacts group or calendar, respectively.
  2. Directory lookup. This is the other part of Exchange integration: you can look up any contact in the Adobe directory.
  3. Extensibility via add-on apps obtainable with the App Store application. There are numerous useful apps available, many of which are free.

There are also existing pros like the browser, the Google Maps app, the solid camera, the in-phone voice mail control, and the chat-style text message conversation threads.

Major Cons of 2.0 Firmware:

  1. If you set the view of Contacts or Calendar to a particular contacts group or calendar, respectively, then exit the application, the view sometimes changes to all when you re-launch the application.
  2. While there is a way to set the default calendar for new calendar items and there is a way to set the calendar for a new calendar item when it is created, there is no way to move a contact or calendar from one group to another and there is no way to set the default contact group for new contacts and there is no way to set the contact group for a contact when it is created (instead it automatically goes into the contact group you're viewing or, if you're viewing all, it goes into the top-level Contacts group).
  3. There is no support for Tasks. There are some 3rd party apps available, some even free, but these do not synch with Exchange Tasks.
  4. There is no copy and paste. Word has it that Apple just doesn't see this as a priority. Unfathomable.
  5. There is no "quick text" for SMS...and since there's no copy and paste, there's absolutely no way to send a text message without typing the whole thing in.
  6. No trial period for add-on apps that cost money (ditto for add-on apps that are free, but of course that's a moot point).

Determining if a USB Flash Drive is USB 2.0

Well, I published this post for about 5 minutes, then realized it wasn't entirely accurate so I pulled it down so I could have some time to revise it. I was hoping (and frankly, thinking) no one had actually seen it--then I looked in my own blog reader and found out it had consumed my feed. Doh! Sorry to anyone else who got the feed with the original post and then couldn't even link out to the post because it was no longer live.

Yes, indeed it is true: I am posting to my blog. :)

If you're like me, you are given USB flash drives from time to time. Now, when you buy a USB flash drive, at least at retail here in the US, it comes in packaging that tells you if it supports USB 2.0. But when someone gives you a USB flash drive, it very often doesn't come with any packaging at all--and that leaves you wondering a) how big it is and b) whether or not it supports USB 2.0. Unfortunately, many of the USB flash drives that are giveaways do not supports USB 2.0 (I presume this is because USB 2.0 flash drives are more expensive to buy, and probably produce, than USB 1.1 flash drives and so giving away USB 1.1 flash drives therefore saves the givers money). But...some USB flash drives given away do support USB 2.0, so you can't just assume when you receive a flash drive that it doesn't support USB 2.0. What's it really matter, you may ask? Well, USB 2.0 is considerably faster than any previous USB edition. And to be brutally honest, the deal is that when someone gives you a slower USB flash drive and you're in the situation I'm in where you already have a couple of USB 2.0 flash drives, you want to know whether or not the flash drive you've been given is worth keeping or not.

So...how do you tell if a USB flash drive supports USB 2.0? I wish I knew! I've poked around on both Mac and Windows XP and I've searched extensively online and I can't find any method that will definitively provide that information. At this point, the best I have is that sometimes you can get at least an idea on Windows XP as follows:

  1. Connect your flash drive to one of your PC's USB 2.0 ports. If your PC doesn't have 2.0 ports there is good news: if you connect a USB 2.0 device to a USB 1.1 port, Windows XP will often (possibly always) present you with a message that says the device can perform faster if you connect it to a USB 2.0 port. Perhaps this is in fact the best way to ascertain on Windows XP whether or not a device supports USB 2.0.
  2. Open Device Manager. This can be accomplished by right-clicking My Computer on the desktop and selecting Properties to open System Properties, clicking on the Hardware tab, then clicking the Device Manager button.
  3. Expand the Disk Drives item.
  4. Take note of the name listed for your device: as you can see in the image below, the name may tell the tale: in the image, you'll see that one of my devices is called "USB 2.0 Flash Disk USB Device." Now, that name could be misleading; just having "USB 2.0" in the name may not guarantee that the device supports USB 2.0--but I'm thinking it's probably a pretty good guess that if "USB 2.0" is in the name then the device does indeed support USB 2.0. The problem, though, is that even if the inclusion of "USB 2.0" in a device name does definitively mean that a device supports USB 2.0, it appears that the lack of the inclusion of "USB 2.0" in a device name does not definitively mean that a device is not USB 2.0: I connected another of my USB flash drives that has USB 2.0 actually stamped on it and the description displayed was "Memorex TD Classic 003B USB Device"--nothing there about "USB 2.0." That said, I think sometimes the lack of "USB 2.0" in the name can be enlightening: in the image, you can see that there is a device called "USB Flash Disk Device;" in light of the fact that this description is so similar to the description of the other device, excepting the conspicuous absence of "2.0," I think it's safe to assume that device isn't USB 2.0--but ultimately, that's still an assumption. I later connected another of my USB flash drives and it was called "Generic Flash Disk USB Device"--I'm guessing that one too isn't USB 2.0, but again, that's only a guess.

In the end, this post isn't as helpful as I hoped it would be because I have not been able to provide a definitive methodology for determining whether or not a device supports USB 2.0. If you have insights on this subject, please take the time to post a comment.

Redirecting RSS feeds

After my last post (about my blog's move) generated a whopping 3 views (possibly all by me!), I began to believe that my suspicions that RSS readers may not like HTTP 302 redirects might be well-founded. So I checked out Full As a Goog and sure enough, it wasn't showing my new post some many hours after I posted it.

So I did a little digging into the matter of redirecting RSS feeds and I found that an HTTP 302 redirect (which is what I was using) should temporarily redirect the feed. I'm not sure why that wasn't working.

But it doesn't really matter because I don't truly want a temporary redirect, I want a permanent redirect. For that it appears there are two choices: use an HTTP 301 redirect or use an XML level redirect (further info on both is given at the above link). It is possible to generate either using ColdFusion (for the former, you would use <cfheader> and for the latter you just put the appropriate XML into your RSS XML output). The latter struck me as a more interesting approach so that is the one I am now using.

Does it work? I'm not sure--you tell me! If you were consuming the feed from its old location at http://www.joshuaadams.com/blog and your reader is now consuming the feed from its new location at http://blog.joshuaadams.com then yep, it worked for you. But if you're still showing the old feed, then no, it isn't working for you (although that then begs the question of how you ended up here). Comments letting me know if it worked for you are appreciated; comments letting me know it didn't work for you are even more appreciated.

My blog has moved!

I have made a slight change in the location of my blog: previously it was at http://www.joshuaadams.com/blog and now it can be found at http://blog.joshuaadams.com.

So is that old location given above now a broken link? Nope--if you hit a page in its old location, you will be redirected to its new location. Note that this is true not just for the main page of the blog but for any page. How does it work? Just a few lines of code for ColdFusion 8. Stay tuned for more details....

What I'm not sure about is how consumers of RSS feeds will react to this change--the RSS feed isn't present in its old location but requests for it in its old location will be redirected to its new location. However, I'm not sure how well readers will handle this. Please leave me a comment and let me know how yours does.

ColdFusion 8: more great features than you realize

Lest I become one of those people who has a blog but never posts:

ColdFusion has more great features than you realize. Well, okay, I can't legimately claim to know what you realize. But as I am coming up to speed in my job as ColdFusion Specialist, it strikes me just how many great features there are in ColdFusion 8. And my guess is I'm not the only one who would have that reaction.

Rather than expound on all these great features myself, let me instead point you to adobe.com for this list of new features in ColdFusion 8. In time I expect to post additional information and code samples for some of these features. Are you interested in learning more about any features in particular? If so, post a comment and let me know!

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9.002. Contact Blog Owner