I’ve been quite annoyed for my term using CFEclipse, having to hit the escape key every time I paused during typing for any length of time.  The content assist, or as they call it, “variable parsing” would pop up a window suggesting variables that if found in the file and there’s no way to get rid of it other than to hit escape, you can’t even continue typing.  Well, here’s the solution:

CFEclipse- unnannoyed


If you’ve got a GMail account, or multiple GMail accounts, chances are you’d like to use a native application like Apple’s Mail.app to manage your emails.  First, let’s get Mail.app set up so you’ll actually like it, then after that let me explain the differences in the way GMail handles mail and the way that IMAP handles mail, and you should start to see the differences fairly quickly, and how to do things correctly in Mail.app so that things look and behave well when you access GMail via the web:

gmail-mailbox-behaviorFirst, enable IMAP in your GMail account, then follow the instructions on the gmail help page for setting up Apple Mail 3 (please don’t follow the instructions set forth in the “Recommended Client Settings” link).  “But what about POP mail”, you’re asking?  You’re going to want to use IMAP, not POP, trust me: the you of the future will be thanking the you of the past when you access GMail via the web.  After you set up your account, go into the Mailbox Behaviors tab, and set up your behaviors as in the image to the right.  I know that GMail recommends some different settings, but let’s do these for now, as they work well for me.  Close up the Preferences pane, and check out what Mail.app is doing.  You should see new mailboxes popping up and lots of new messages.

[Edit] Make sure all checkboxes are checked.  Prior to this, I followed GMail’s instructions, which include unchecking the “store sent messages on the server” box.  Check it.  Better.

You may be wondering what all of the folders that you see are, and how they operate, let’s look at this next.

What you see in Mail.app and how to use it GMail-like.
gmail_directory_structureLet’s check out at how GMail looks when you first get your account set up in Mail.app.  As you can see, there are lots of “folders”: a folder called “[Gmail]” with some subfolders underneath it, and then siblings of the “[Gmail]” folder that correspond to your GMail labels.

Now you can see folders like “Drafts”, and “Sent Mail”, and it’s obvious to us what those folders are, but it is not obvious to Mail.app.  You have to explicitly tell Mail.app to use these folders how they’re intended to be used.  If you don’t, Mail.app will make its own folders on the GMail server, and you’ll end up having all of your Drafts, Sent Mail, etc. in two places, not neatly filed where they should be.  The folders in question are: Drafts, Sent Mail, Spam, and Trash.  See explanation of “All Mail”, and “Starred” below.

To tell Mail.app to use the appropriate folders for their intended purpose, do the following.  We’ll start with “Drafts”:

  1. Click on the “Drafts” folder so that it’s highlighted.
  2. In the mailbox menu, select Use this mailbox for -> Drafts
  3. Repeat for each of the other folders, “Sent Mail, “Spam”, and “Trash”

The “All Mail” folder is simply all of the messages that have any label applied to them.  The “Starred” folder are all of the messages that you have starred in GMail.  Mail.app will show this as “flagged” instead of starred.  So to star a message in GMail, simply flag it in Mail.app– simple.

Here is a table of GMail operations that you probably normally do, and you’d like Mail.app to do them, too:

GMail function Mail.app equivalent
Apply a label to a message Copy (hold command (⌘) while dragging) the message into the folder that corresponds to your GMail label.  (just like in GMail, messages do not need to be in your inbox to apply labels to them, this process may be used for messages anywhere)
Archive a Message Move it into the “All Mail” folder (a subfolder of “[Gmail]”)
Unarchive a message Move or Copy the message out of the “All Mail” folder (or any other folder you may find it in), and into the “inbox” folder.  Think of this as applying the “inbox” label to a message.
Delete a Message If you’ve followed the instructions above, you should just be able to push the “delete” key on the keyboard, otherwise, move it into the “Trash” folder (a subfolder of “[Gmail]”)
Create a new Label new-label-example-1In the mailbox menu, select New Mailbox…, then set the “Location” drop-down to the root of the IMAP connection, which will be a Globe Icon.  Type in the name of the label (avoid using slashes / or \), click the “OK” button, and you’re done.

Another thing to keep in mind is that items that are in the “inbox”, i.e. unarchived messages, actually are just messages with the “inbox” label. So, to make something appear in the inbox, you have to copy it into the inbox folder in Mail.app, which actually just puts applies the label “inbox”.

Now, let’s look a little more in depth to what is going on behind the scenes:

GMail’s labels: IMAP folders
GMail’s labels are IMAP folders.  If you’ve noticed, you can have multiple GMail labels on any given message.  Let’s suppose you have a label called “receipt” and a label called “eBay”, and you get an email that is a receipt for a purchase that you just made for a new toaster on eBay.  You’d like it to have both of the labels “receipt” and “eBay”.  With GMail, this is easy.  You simply apply both labels to the email (or thread).  But how can a message be in more than one folder, didn’t I just say that GMail’s labels like IMAP folders?  Yes, I did… and they are… kindof…

This is the beauty of Google Mail.  They took technology that was pre-existing and repackaged some if it, rewrote some of it, did a little magic, and made everyone think it was something totally new (which it was…mostly).  GMail’s mail servers are not a typical mail servers, as GMail’s messages can have more than one label at the same time, whereas any particular message on a normal (IMAP) mail server can only exist in one folder, you can make copies of said message, but then you’d have multiples of the same message, each still residing in only one folder.  But for simpliciy’s sake thing of applying a label in GMail as the IMAP equivalent of copying a message into a folder.  Removing a label in GMail is the IMAP equivalent of deleting a message out of a folder.  However, if you copy a message to a different folder via Mail.app, the message isn’t actually copied.

All this is evidenced by a couple of things.  Let’s do an experiment:

  1. First, open up your newly configured Mail.app (or whatever client).
  2. Open up a web browser and log into GMail.
  3. Send yourself a test message, the subject can be anything, but in order for the test to work, attach a file to the message that’s around 10 MB, something of known size, but big enough to make a dent in your “used space”
  4. Apply two labels to the test message.

Now, here’s the test.  In your Mail.app program, navigate to your inbox, you’ll see the message there.  Now find the folders corresponding to each label that you applied in GMail, you’ll see the message in both of those.  You can also see the message in the “All Mail” folder.  You may be thinking, “well all that means is that GMail just copies the message into different IMAP folders, that’s not special!”.  Actually it is special.  Go back to your GMail web interface.  If you look at your used space (it’s down below the messages area), you’ll notice that every time that you apply a label to that message with the large attachment, your used space does not increase.  If you just think that the used space isn’t updating dynamically, try refreshing the page or logging out and logging back in, you’ll see that your used space remains the same.

Here’s another test that you can try that will further prove this, and bring up another point:  in Mail.app, find the message in question, and copy it (don’t move it) to one of your labels/folders.  To copy, simply drag the message, and before you drop it hold down the command (⌘) button, you’ll see the green plus sign appear indicating a copy, then drop it into the folder.  Notice how long it takes to complete the request.  On my internet connection (which isn’t the fastest in the world), it took mere seconds– surely not long enough to upload email with a 10MB attachment.  As promised, this brings up another point.

How IMAP actually does things
IMAP stands for Internet Message Access Protocol (see imap.org).  I love IMAP.  It makes my life so much simpler.  I know that everything that I do on my computer actually happens real time on the server.  When I delete a message, it’s also gone when I log into my webmail.  When I move it, it’s also moved on the server.  But the best part for me is this– if I have to reformat my computer, or my mail application crashes, or something else tragic happens, when I set up my eMail again, it’s EXACTLY how I left it.  Nothing to back up, no worrying about if I got all of my eMail client’s files on my external hard drive, etc.

With IMAP, it’s not that you do some operation on your locally stored email and it also lets the server know; it’s that the only thing that’s actually happening is your mail client (Mail.app in our case) is using a set of known commands to tell the server what to do with any given message or set of messages.  Everything IMAP does is server-side.  Emails aren’t even really stored on your computer if you don’t want them to be (although most of the time they are cached so they don’t need to be re-downloaded every time you want to access them (and to make searches quicker)).

So, when you “copied” that message with the large attachment into a different folder, what actually happened was that Mail.app told the GMail server to copy the message from one place to another, it didn’t actually do the copying, it just issued the command of what to copy and where to copy if from and to.  What the GMail server did with that command is its own business– and in this case, GMail simply applied the label name of the folder that you copied into, also leaving the label “inbox” on it.  Genius!

When you move a message from say, your inbox into an IMAP folder, however, GMail does two operations to compensate.  For example: in Mail.app, if you move a message from your inbox into the eBay folder, GMail applies the label “eBay”, and removes the label “inbox” from the message.

So, the beauty of the whole thing is simply what GMail reports back when Mail.app requests something. For example, if you click on the “All Mail” folder, GMail will send back ALL of you email from any label, minus Spam.  If you click on the “eBay” folder, GMail will send to Mail.app all of the messages that you have applied the “eBay” label to, regardless if they have other labels applied to them or if they are in the inbox.

So there you have it.  Hopefully you got something out of this post.  Leave a comment if you did!

pandoraI must say I’m impressed with Pandora’s new iPhone app (iTunes link).  I’ve always been a fan of Pandora, and finding new music based on genre, artist, color, hairstyle, etc.  I had issues with Pandora’s first iPhone app, it sometimes would only play the first minute or so of a song, and sometimes it would just quit altogether.  The new app adds a track progress bar, and the ability to email the song to a friend, or make a station based on the song.  Needless to say, this takes it up another notch, as listening to internet radio works even over the EDGE network just fine.  Eat your heart out, mix CD’s.

Came across this post on lifehacker, explaining how to change your Firefox search bar to google’s new favicon (), the only problem is that it’s for windows.  FEAR NOT!  Here’s the howto for all of us Firefox OS X users:

  1. First, secondary-click on this link, (primary-clicking on it will show you a bunch of XML)
  2. select “Save Link As…”
  3. navigate to the folder where Firefox keeps the search provider’s XML files: press “⌘⇧g” (command+shift+g), and in the “Go to the folder” bar, paste :
    and click the “Go” button
  4. You’ll see a few search providers’ xml files in there, including google’s.  Click the “Save” button, overwriting the old one
  5. Restart Firefox (remember to do a full quit (⌘q))
  6. You’ll see the new icon there!

I know it seems like a lot, but it actually only about 45 seconds worth of work.  Good luck!  Please post to the comments with any questions.

Would you like to move aside the existing file and use the standard X11 environment?
[No] [Yes]

Got this error when loading up Gimp on Leopard, wouldn’t do anything, not even let me select No or Yes. How I fixed it was to delete the file /Users/[username]/.ixinitrc

Open a terminal and type:
rm ~/.xinitrc

Then quit out of X11, and restart whatever application you were trying to use when this happened

and I mean bricked.  It wouldn’t even turn on, and I know the battery was fully charged.  First, I’ll tell you how I did it, and then I’ll tell you how I fixed it.

It’s worth noting that I’m running OS X 10.5.6, which from what I read is not very accomodating with what I was trying to do with my iPhone when said phone decided to die.  I’ve jailbroken my iPhone before using various tools, even way back with 1.x firmware before the App Store even existed.  Today, I decided to try ripdev’s pusher because it promised to be safer than a full jailbreak or pwnage, because it doesn’t open up the iPhone’s system directories for writing, only the application area so you can install third-party apps through installer.app and cydia.  Well it was a mistake…

I stared the pusher program, and went through the normal cycle of:

  1. iPhone off
  2. power + home for 5 secs
  3. home for 10secs

After I did that, OS X tried connecting to my iPhone, which it thought was an iPod, and gave me an error, telling me that I needed to disconnect and reconnect my iPod, which I did.  Bad idea.  Pusher was still sitting there “installing applications”, even though I has pulled my iPhone out of it’s dock.  I waited for about 20 minutes with no change, and my iPhone was off and unresponsive.  It wouldn’t turn on, iTunes wouldn’t recognize it.  I was pretty scared and started trying to develop my excuse to the genuis at the Apple store as to why he should give me a new iPhone.  Broken.

Here’s how I fixed it:

The iPhone was in some sort of service or recovery mode, and it gets there by holding down the buttons as previously mentioned.  I ran across a forum post which told me to leave the iPhone in it’s dock, connected to my computer, and hold down the power + home buttons until iTunes recognized it.  This worked… almost.  iTunes told me that my phone was in recovery mode and needed to be erased and restored.  That was great news!  Except for the fact that it didn’t work.  It acted like it was going to, and then it told me that my iPhone couldn’t be restored, without a good reason.

Google again was my friend, as I ran across an article in Apple’s support documents.  I followed the instructions, uninstalling iTunes completely and reinstalling it (I would certainly have missed some things if I didn’t follow the instructions), and what do you know, it worked!  I plugged in my iPhone, it restored it and synced all of my old apps, contacts, chat history, etc. back on to it, and I now have my iPhone back!  It will be a little while before I muster up the bravery to try again.

Please comment if this post helped you at all, I’d love to hear your story!

Well I ran into a problem a couple of days ago: for some reason, my MacBook stopped being able to renew its IP address in DHCP.  No IP address means no internet.  When I went to “Open Network Preferences…”, I got the classic “self-assigned IP address” thing, which really indicates a failure of your computer to receive a new IP address from the DHCP server. The only way that I could get an IP address via DHCP was:

  • “System Preferences -> Security -> Firewall”
  • selecting “Allow all incoming connections” (turn the firewall off)
  • either renewing DHCP lease or just turning Airport off and then back on

This worked, but things just bother me when they don’t do what they’re supposed to, plus it was a little annoying because it took so long.  Finally, I came across a post at the Apple forums.  I tried a bunch of things that didn’t work, until I finally found one that worked consistently, even after rebooting.  Turns out that the three files configd, mDNSresponder, and nmdb somehow got corrupted.  People say this is from disconnecting the computer from all power without shutting down safely, or by doing a hard shut down (power button held down for 5 seconds)*.  Here’s how you replace the corrupted files:

  1. First find a Mac running your version of OSX that DOESN’T have this same problem.
  2. Find the files configd, mDNSresponder, and nmdb and copy them to a flash drive.
    [The files are located in /usr/sbin.  To get there, open finder and press “cmd+shift+g” simultaneously.  Type in /usr/sbin and click “Go”]
  3. Put the flash drive in your computer, and copy them into /usr/sbin there.
  4. Reboot
  5. You’ll be asked to allow a few things by the firewall, allow them all.
  6. You should be all set!

If this post helped you at all, please comment!  If you have any suggestions on how I can improve my post, please also let me know.

* I don’t buy this explanation of the files getting corrupted, if the programs are running in RAM, which they are, or they wouldn’t be running at all, then how would a hard power off corrupt the files that are on the disk?