It’s an online life – E-mail
Apr 14th
Online Life Tool: Gmail
Replaces: Outlook (and the associated old-school mail servers)
As you read through this series of articles you will find that I depend on Google for a lot of functionality. The primary reason I chose Google springs from the great approach to online e-mail that they pioneered, Gmail. With virtually unlimited storage and the recommendation that you archive instead of delete messages you have only yourself to blame if an important e-mail goes missing. If you are careful you will find that you can find anything you need very, very quickly using their approach to categorizing and filing messages. Of course, all of this and more has been said before about Gmail, so I’ll stop the fan-boy praise and get to the nitty gritty.
I use Google’s Apps for your Domain for all of my e-mail needs. The great thing is that all of my sites and e-mail addresses can play together nicely because of Google’s “share and share alike” approach to their services. So using Google Apps is equivalent to having a Google account (which anyone can get for free). For most of these services, their web based interface is way up the list of good web-based applications and while their e-mail interface is definitely no exception.
While it would be easy for me to assume that people reading this story, owning and iPhone and wanting to live an Online Life would be able to set up e-mail without assistance, we all know what happens when we assume. So here’s how I roll in regards to e-mail:
- Get a Gmail account
- Register your Gmail account on your iPhone
- Learn to deal with the envy of your peers
So just use the IMAP client on the iPhone to connect to your Gmail account. The two synchronize beautifully (much better than with my Windows Mobile phone) and working between them is really transparent.
If you want to label and archive something via your iPhone, just drag it to one of your “folders” and presto chango Gmail will handle the rest for you. When you set up your account your iPhone automatically added a special set of folders which have a [Gmail] folder as their parent. These folders allow you to do all of the special things Gmail’s web interface allows you to do. For example, if you want to “star” an item, simply place it in the [Gmail] > Starred folder. All of the special folders work the same and with them you have all the tools you need to keep your inbox in order quickly and easily. If you’re like me, with time you’ll find yourself using your iPhone for all of your e-mail related tasks even when you’re sitting right in front of a computer!
For an obligatory comparison, this approach replaces Outlook for me. While I don’t have many complaints about Outlook at all, it really is very nice to be able to have all of my messages stored on the web instead of in an archive file on my hard drive. Now that I’m using this approach I can’t count the number of times I have been out and wanted to pull up an e-mail. If I were still tethered to Outlook (without a mobile device) that wouldn’t be possible and even with a mobile device (Outlook works pretty well with any Windows Mobile device as well as the iPhone) if I hadn’t synced lately I would be out of luck.
Something else to remember that I will definitely be mentioning more later is that almost all web-based applications support some sort of interaction via e-mail. Because the SMTP (e-mail) standard is so widely accepted, having a good e-mail client is paramount to achieving any goal as an Online Lifer (woot, I just made up that term, I Googled it to be sure).
So on the e-mail front I would say that not only have I been happy with my new approach, it has been better than I realized it could be which in the end is what we should all hope for when we try something new.
It’s an online life – Introduction
Apr 12th
I am a web developer which means that I spend my days (and often nights) designing, implementing and supporting useful software which runs in a web browser (preferably all web browsers). A couple of months ago the thought struck me, “If I’m writing all of this great software for the web why am I using so many non-web based methods of keeping myself organized?”
Why, indeed? At the time I simply didn’t see how I could accomplish everything I wanted or needed to get done using only web based applications. After all, most web-based applications required you to be at a computer to use and if I was going to be at a computer anyway why wouldn’t I just use desktop software? And if I was at a computer using desktop software, why not depend on my trusty old notebook and pen which would inevitably be available.
Then I met the iPhone. It was a chance meeting, I had fully intended to just upgrade my Windows Mobile device (I had been using them for over three years) and continue on with the way I had been going. But after toying with an iPhone for a while I decided to buy one.
There’s really something to be said for what Apple has done with the iPhone. And I don’t mean sales success or over-hyped marketing and fan-boy addictions, I mean what they have actually done with the thing. When they released it there was no SDK and a requirement that you purchase a data plan. The obvious intention was that if you wanted to do something, do it using the web browser or one of the few built-in tools which supported internet protocols other than http (such as the e-mail client).
Because Apple did this and because I bought the iPhone I am now revisiting my previous idea of moving more and more of what I do every day into web applications.
Now with an initiative like this there are always risks. People I’ve talked to along the way have warned me of the impending attack of our information hording overlords and how keeping personal (but not necessarily private) information online would only seal my fate as one of their minions. As someone who has spent my adult life giving the government personal information and handing my credit card to the random shady figure waiting my table I figure it’s a risk I’m either willing to take or a risk I’ve already been taking all along.
I required that my new approach meet the following requirements:
- Convenient – Be easy and non-intrusive to my daily life
- Collaborative – If others are involved, let me involve others
- Available – I need my information when I need it, not later
- Portable – It needs to work equally as well whether I’m at a computer or not
- Complete – This is an all or nothing deal
- Cost Effective – I’m an Open Source fan, don’t make me pay too much
My progress has been surprisingly good and now I’m ready to begin sharing my experiences in this adventure with the world and that’s where this series of articles comes in. I will be writing these articles as I have time to outline how I have accomplished keeping myself organized using just my iPhone and the internet.
7-Zip – Archiving for the masses
Sep 19th
There was a day when the only way to create ZIP archives was to purchase a copy of WinZip. The software was definitely ahead of its time… on Windows. *nix users had been playing with compressing and archiving files for quite some time prior to that.
Then, Microsoft decided to begin including the ability to create and manage simple archives directly into the Windows Explorer. This decision really brought archiving to the masses. However, many of us still have a need to do more… more quickly… with our archiving utility.
Today I was attempting to unzip 1,000 or so very small files (a set of PNG icons) into a directory on my machine. When I began the process using the built in Windows tool it told me it would take 19 minutes. Using what I can only assume is Microsoft’s patented time tracking algorithm the timer then proceeded to continue calculating backwards until I stopped it at 36 minutes with only 300 of the files copied over. This was after a 5 minute period of waiting on it to finish, figuring that things would eventually just speed along.
After a moment of frustration I went and got 7-Zip, an open source archiving tool that I had used in the past a limited amount. I figured this would be a perfect opportunity to test the speed and abilities of 7-Zip against the convenience of the Windows tool.
Well… the 7-Zip archiver took less than 5 seconds to complete the same job.
I really shouldn’t have to say any more than that to sell you on how good this tool really is.
DOCTYPE affects iframe scrollbar styles
Sep 18th
An application I am currently working on has been specifically targeted towards Internet Explorer and a technical design requirement is that the browser window the application is being run in is a fixed size. So inevitably, there will be scrolling.
As part of the design we decided to use a document divided up into sections using DIV tags and absolutely positioning rather than using frames all around. This leaves the primary content area of the application as an iframe taking up the majority of the page.
A week or so ago I put some styles in my CSS which were intended to color the scrollbars on the iframe. Oddly… this didn’t work. I didn’t really attempt to follow up on it until today, at which point I found an interesting solution.
Before, I had the following document definition in my HTML:
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-
"http://www.w3.org/TR/html4/strict.dtd">
I changed the definition to:
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
And now things work great. I’m not sure why, maybe when I get some time to look it up I’ll modify this post to reflect whatever reasons I find.
However, if you are having problems with your iframe scrollbars not taking your styles, this could help.
Assigning a CSS class to a dynamically created DOM element
Aug 27th
I recently discovered that Internet Explorer and Firefox don’t agree on the possibilities of assigning a CSS class to a dynamically created DOM element (created via JavaScript) using the “setAttribute” method. It took me a little time to figure out what was going on and how to fix it, so in the hopes that I can save someone else some time I decided to provide this post.
First, I should outline what I was trying to accomplish. I have a need for a web page which has completely dynamic display properties. During the use of the page many of the DOM elements will behave according to the user’s input, so I need to have each of them accessible in JavaScript. The goal is to have a page which can adjust, update and move all of its elements without ever reloading the page or any data which has already been loaded. The page is being written using .NET, JavaScript, (D)HTML and CSS.
Now, for the approach I decided to take. Since JavaScript will need to have access to all the elements anyhow, I decided the better approach would be to have a JavaScript object for each “module” that will exist in the page. This object carries some details about the object as well as a reference to a DOM object that will be associated with each module. The goal here is to keep from duplicating code, so I either write the DOM object in the HTML (and use server side logic to manage it) or I write it in JavaScript (and use the client’s memory to manage it), but not both.
My page is made up of three files, I’ve simplified them for illustrative purposes below…
My JavaScript source file, script.js:
-
d = new Array();
-
d[0] = new Display("Header", "Header");
-
-
function initializeDisplays() {
-
for (var i = 0; i < d.length; i++) {
-
container = document.getElementById("FrameworkContainer");
-
d[i].dome = document.createElement("div");
-
d[i].dome.setAttribute("id", d[i].id);
-
d[i].dome.setAttribute("class", "moduleBody");
-
d[i].dome.innerHTML = d[i].name;
-
container.appendChild(d[i].dome);
-
}
-
}
-
-
function Display(name, id) {
-
this.name = name;
-
this.id = id;
-
}
My CSS stylesheet, style.css:
-
.moduleBody {
-
color: Green;
-
}
And finally, my HTML file, test.html:
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-
<html xmlns="http://www.w3.org/1999/xhmtl">
-
<head>
-
<title>Test Page</title>
-
<script type="text/javascript" src="script.js"></script>
-
<link href="style.css" rel="stylesheet" type="text/css" />
-
</head>
-
<body onload="initializeDisplays();">
-
<div id="FrameworkContainer"></div>
-
</body>
-
</html>
Now this code works fine in Firefox, the new div is loaded into the document as expected and the text is green, as expected. However, using the same code in IE provides slightly different results. The div is loaded as expected, but no styles are applied to it. The reason, is that IE doesn’t support the following line of code:
-
d[i].dome.setAttribute("class", "moduleBody");
Instead, IE demands you use the following syntax:
-
d[i].dome.className = "moduleBody";
Is it a big deal? No, not really. But it can still be very, very frustrating to find that IE has issues when applying styles to a dynamically created element which uses the consistent approach of setAttribute as a means to set a style class. You will probably find that the className property is the recommended approach in tutorials and will find that it works in most browsers, but being a stickler for consistency I tried a different approach and ended up with this article to show for it!
Spoofing your browser’s user agent
Aug 22nd
If you are a web developer (or anyone doing any programming which involves web browsers, which is just about everyone nowadays) you really are doing yourself a disservice if you don’t include Firefox in your toolbox for diagnosing issues and testing sites. The community provided Addons for Firefox are just invaluable in day to day tasks. A great example is the ability to spoof your browser’s user agent, pretending to be any browser you want, all from one browser.
My quest to do this started as a curiosity when I found a blog post titled “Search Engine Marketeers are the new script kiddies” discussing a Wordpress blog which was hacked in such a way that it invisibly provided more traffic to the hacker’s site whenever a search engine bot crawled the site. The hack was pretty impressive, actually but more impressive was the ability for the blogger to diagnose what had happened and track down the culprit.
Having a few Wordpress blogs of my own, I decided to look into checking mine for the same issues. It took me an hour or so of toying and poking around to get everything I needed, so I figured I would take a shot at documenting the steps that went into my adventure in the hopes that someone else would be able to get this done more quickly if they ever needed it. Plus… it will provide a reference for me when I inevitably do this on more computers in the future.
First, you’re going to need to get the User Agent Switcher Addon for Firefox (written by Chris Pederick). Installation should be fairly straight forward, so just click the button while in Firefox and let it do its thing.
Now for the part which took some searching…
The default installation of the Addon doesn’t provide a lot in the way of user agents to switch to. A couple of examples are all that are there, so in order to be really useful you’ll need to add agents of your own or find them somewhere. I found a very complete set of agents conveniently compiled into an XML file which can be imported into the Addon (Options > Options > User Agents > Import) over on Tech Patterns.
Once you have installed the Addon and loaded a complete set of user agents, you can test them out with the QuirksMode Browser Detect page.
There are a lot of uses for this ability, from security to verifying code which reacts to a specific browser. Whatever you use it for, hopefully this short guide made it easier to get your results.
Ajax Rain: A collection of JS / DHTML / AJAX code
Aug 20th
I remember a time… waaaaaay back in, oh… say… 1997 when the internet was really just starting to get “cool.” We would drink the latest caffeine laden beverage, take the latest “keep you wide-eyed” herbal supplement and write code until we were all convinced our hair was moving all over our skulls of its own volition. Back then, we would eagerly watch for the latest release notes for Netscape Navigator and relish any additions they made to JavaScript (bonus points for anyone who can remind me what the name of the scripting language was originally). As soon as a new change was in place we would attack it and put it somewhere… anywhere… on our sites. The code was raw, usually poorly formatted and documented and almost always protected by the author like it was going to be the next billion dollar idea.
That was then. In the ten years since that time we, as web developers, have evolved. Not quite far enough to exist only on a temporal plane but far enough to consider when writing code that other people may find it useful. No longer is the “cool” stuff of a proprietary variety. Now, developers more commonly take a little extra time to make their code understandable and customizable… then they do what was unthinkable ten years ago and (gasp) distribute it for free!
In steps Ajax Rain. A new resource style site that provides the coolest in JavaScript, DHTML and AJAX code for discerning veteran and budding rookie web developers alike. All of these snippets are downloadable for free and anyone can add their latest creation to the database.
So saddle up and ride some else’s code horse for a change. Quit reinventing the wheel (never mind that Good Year and Michelin continue to make millions doing exactly that) and get with the times. Go download and implement someone else’s code and take full credit for it yourself when praise is dished out at your next company picnic! After all… all the kids are doing it and they’re making you look lame in the process.
You too can thwart digital terrorism!
Aug 8th
Today, while researching some issues in our production environment… without having access to the production environment, data, error messages or logs… I stumbled across a really, really cool article over on the Wired blogs.
If you’re a fan of “24″ or any counter-terrorism / crime-fighting / detective fiction you’ve long been shown what the writers and set designers of the material consider “super top secret cool software” which in the end amounts to nothing more than rudimentary Flash animations on a Windows XP machine.
Now, however, according to this article we have all been given the source code to graphics processing software which will outline anything in the image or video which was added after the original filming or snapshot.
I won’t rehash the entire article here, you’d be much better off to head to the link above and check out the pictures and article credits… as things should be.
My first Wii experience
Dec 19th
I knew the day would come, it had to.
For a long, long time I have accused console games and the overlords who control them of ruining everything that was once sacred in video games. In a rush to make more money the big console companies would blitz right past all of the important things in games: fun, originality, playability, FUN; and instead focus on the quick fix items such as graphics and speed of play.
While graphics and speed of play are a necessary component to any great game, losing the fundamentals of what a game is, by definition, loses the purpose to have a game in the first place.
Then Nintendo decided to change everything. More after the flip…
Anti-war protests… Where are they?
Dec 14th
I stumbled across an article hosted on Slate today written by


