Mike Bannan's blog

Unicode, ASCII, and the Curse of the Byte Order Mark 

For months, we’ve had ongoing challenges with odd characters () at the very beginning of certain e-mails. At the same time, we’ve had (seemingly unrelated) challenges with characters like apostrophes (‘) appearing as other odd characters in e-mails. Open the source documents in plain-text editors (TextEdit, Notepad, Coda), and they look fine—no problem. Send them through our e-mail generation system, and crazy characters appear. Must be the e-mail generation system, right?

Wrong.

It came down to the encoding our plain-text editors use. All of these text editors automatically encode the plain text based on whether non-ASCII characters are used. Include a curly apostrophe, and TextEdit encodes in Unicode. Unless you’ve got superhero vision, you won’t notice that the document includes a curly apostrophe. Now send that Unicode document to a system that’s expecting straight ASCII, and you get crazy characters in place of the curly apostrophe, since ASCII doesn’t include the curly apostrophe.

But wait, there’s more.

A Unicode-encoded file also has a Byte Order Mark (BOM) at the beginning to describe what encoding is used. Since the BOM is part of the description of the file, but not the body of the file, Unicode-enabled text editors ignore it. (It’s actually more complicated than that, but this description helps me keep it straight in my head. Check out the Wikipedia entry for the real explanation.) The point is, our poor HTML coder can’t see that there’s a problem.

So inadvertently include a non-ASCII character in a supposedly plain-text file, the file will likely get saved as Unicode, and have crazy characters when opened in an ASCII-only application—like most e-mail systems.

UnicodeChecker to the Rescue

Now that we know what the problem is, it’s easy to adjust our process to keep us clean. The main change: UnicodeChecker, a great little app from Steffen Kamp and Sven-S. Porst at earthlingsoft. It installs as a service on the Mac. Highlight your code in your text editor, click Services-UnicodeChecker, and it will convert any Unicode symbols to their HMTL/ASCII equivalent.

unicodechecker.jpg

Our Team Just Got Bigger

menandmacs.jpg
Another big release day at IDEA. Today included an updated Reports Module (composite multi-directional printing! Avery label printing! Doug and Jared have been jamming over the last week so our new 2008 members can get the new and improved member cards and certificates.

We selected Aviatech to help with design elements like color, typography, and imagery.

We also made the decision to bring Achieve Internet onboard to help with our Drupal conversion. They’ll add a lot to our already-strong team. These are the guys who did Fast Company and IncBizNet.com. Brainy mugs!

One of their first tidbits: don’t try to convert the existing multi-column pdfs en mass—pdfs really need to done individually by hand. (Ouch! I was hoping they had some special magic we just hadn’t found yet.)

Caffeine's Making Life Easier

Picture 1.png

A quick note about a great little utility for OS X called Caffeine from Lighthead. It turns off all of the power-saving features in the OS, like dimming the screen, starting screen savers, and sleeping when a notebook lid is closed. This is a must-have application for people who give presentations. Nothing fouls up a beautiful PowerPoint, Keynote, iPhoto, or Fotomagico slideshow like a sudden blank screen.

It’s also a great utility to combine with Kismac: I can walk around with my MacBook Pro in my bag and listen for open wireless access points. Much better than stumbling around with the lid half-open.

And it’s completely free!

Two Days at Inbox Zero!

efficiency_focus_control_sm.jpg

I met with Mike Salomon, CEO of Sherpa Performance Guides, last week. Mike takes a bunch of the Getting Things Done practices and combines them with kaizen and the Himalayan Sherpa tradition of guiding to create an incredibly valuable workflow process. He’s worked with top executives of dozens of high profile companies to help them get a handle on their productivity (and mindfulness).

My conversation with Mike reinvigorated my first run at GTD from a year ago. I had stayed with it for a couple months, but slowly let things pile up, finally dropping it altogether. New projects, new role, new office space—a great time for a new start!

One of the key elements of Mike’s system (and GTD) is to completely process your inboxes—email and physical—daily. (Merlin Mann gave an awesome talk to Google engineers about getting to “Inbox Zero.”) By the end of Monday my inboxes were empty, with everything processed. I actually feel relieved to have those empty boxes. Tuesday: empty again.

More Drupal Speed Tips

Our site slowdown was a real wake-up call on Friday. Jared Ashlock, one of our web developers, spent four years optimizing web server performance at the HTTP level when he worked at Port80 Software. He pointed out over the weekend that we should be using the mod_expires Apache module to set some caching policies for our .css, .js and image files.  We are needlessly getting hit with requests for those types of files when they can be cached on the client side.

He pointed out that we should also use mod_gzip to compress our outbound HTML content. These are server modifications, and so something we can implement now and see immediate performance benefits.

It’s nice having a brainy team!

Happy 65th Birthday, Mom!

Mom turned 65 this week, and a bunch of us Bannans (including Dad and granddaughter Christina) celebrated with her Friday at Dave’s BBQ in Vista, CA. (She and Dad celebrated her actual birthday at Chili’s. She’s an easygoing girl!) 

momchristinadadsmall.jpg

65. Think of what she remembers: Sputnik putting the world on notice. The day JKF was killed. The days her four children were born. The day her husband went to Vietnam. The day he came back. And went back. And came back again.

She remembers growing up in Indianola, Mississippi and hopping the fence at BB King’s place. Not being allowed to play cards because her Uncle Nathan said they were the Devil’s tools. She worked a telephone switchboard (the kind with plugs and wires) when she met my Dad. Now she’s using a cell phone, but not while she’s driving.

She remembers being a Marine Corps Officer’s Wife, moving around the country growing a family along the way: Hawaii (Mike), California (Heather), South Carolina (Sean, Shannon), Washington, Virginia, Mississippi, North Carolina, California. She remembers the days each of her granddaughters were born. 

She doesn’t have to remember how to be a loving mother and a spoiling grandmother—those things are deep in her heart. And we love her for it.

Speed Up a Crawling Drupal Site

We had one of our busiest days on record at the IDEA sites today. With the site slowing to a crawl, our team jumped on the logs and on the phone with Rackspace: Were we being attacked? Was the system failing? We eventually determined that most activity was coming from responses to two emails we sent: a promotion for our IDEA Fitness Fusion Conference and the monthly Body Mind Spirit Review newsletter. The slow site was a product of our success!

So here’s a tip if you’ve got a Drupal site: make sure to turn on site caching. (We had turned it off to make debugging easier.) Also, remember that a Drupal session’s activities (involving PHP, MySQL, and Apache) take a lot of memory. Set the Apache MaxClients directive to a number that keeps the server from moving sessions into virtual memory. (We reset ours from 256 to 32.) Nadeau Software Consulting has some other tips for speed up a Drupal site.

A family afternoon in Idyllwild

Linda and MacKensie (pictured), Bitzer, and I spent the day in Idyllwild, just below Humber Park. We found a great spot with plenty of snow to shoot some wintery family pictures.

IMG_1353.jpg



Syndicate content