Tuesday, June 30, 2009

New Blogger template released

I'm finally satisfied with the quality of my blog's new style, so I'm releasing it as a Blogger template under the Apache 2.0 license. You can use it on your blog, modify it, or even sell it as long as I get credit.

Features

Here are some of the features of the new Blogger template "Whitespace is good":

  • Two sidebars This fantastic template comes with not one, but two versatile sidebars. You can fill them with as many widgets as you'd like!
  • Blog color manager I've plugged Blogger's color management code into the template, allowing you to modify the colors without changing the underlying CSS. If you want your headings to be purple, you can change them yourself!
  • High readability This template was designed to give your blog a clean, content-focused style. That's why I made the body text a colossal 16 pixels Arial and gave it a generous 30 pixel line height. Even an 80-year-old man looking using an old Eee PC could read from this Blogger template!
  • Easy accessibility What if the 80-year-old is reading from a PDA, you ask? He can scale up the text and the whole page will scale with it! I used all relative measurements in my site's fluid grid, permitting even IE6 users to enlarge the text. I've also added some hidden links at the top to let visitors with screen readers skip to the real content. This template's prepared for any eventuality!

Advanced Features

In addition to enabling the GUI-addicted users to remain in blissful ignorance, I'm giving enlightened users lots of control and convenience when modifying the template.

  • Scripts section For your coding convenience, I've created a special hidden div at the top of the page for you to easily add and remove scripts through the Blogger visual widget manager. I'm using it to hold my Google Analytics tracking code.
  • Strict baseline grid I tried to lay this website out right by following every classical design concept I could. This style tries to stick to a strict 30 pixel grid in its vertical and horizontal positioning. The baseline grid only fails when pictures' heights aren't multiples of 30 pixels and when two different sizes or types of text share a line (eg. monospaced font + standard font).
  • CSS variables I use two Blogger CSS variables that aren't accessible to standard users to give developers the option to change all the heading fonts and all the text fonts together. You can substitute your fonts for the defaults by modifying only two lines.
  • Apache 2.0 license I'm giving you full rights to modify and redistribute this template. You can port it to Wordpress, reuse parts for your personal website, or even sell a website template based off it. I'm not going to stop you.

Download and installation

You can download the "Whitespace is good" Blogger template as a compressed .zip file here. To use it, just copy the contents of the file template.xml into the "Edit HTML" box under "Layout" on the Blogger menu. If you don't have the "Layout" tab, click on the "Template" tab, then click "Customize Design" and pick a new template at random. Now you should be able to follow the instructions above. Note: If you paste the new template into the "Edit HTML" box under the "Template" tab, you won't be able to add widgets and change your the colors of your blog.

If you have any opinion on the new Blogger template or you have any problems with it, simply post a comment below. I'll try to fix any problems that don't have to do with Internet Explorer.

Update: I just fixed a bug in the template. All zero of you to download the template already should upgrade to the new version.

Update: I've added a massive two-column-spanning sidebar above the other two. The template looks just the same as it used to, unless you place a widget in the new section. Notify me of any problems.

Thursday, June 25, 2009

Under construction. Watch for falling debris.

I have been dissatisfied with my blog's layout for a long time, but I've never taken the time to work on it, until now. I present the new grid-based three-column blogger layout "Whitespace is good"! This is an alpha version, so there are plenty of problems to be solved and features to be implemented. I intend on allowing people to modify the text color and formatting through Blogger's layout feature, but I'm not quite there yet.

I'm going to release this template under the Apache 2.0 open source license, but I'm not satisfied with it yet. I still have to test all the major widgets on it, fix a couple of minor layout glitches, and actually allow users to modify the colors and font formatting.

If you don't use IE and you find layout problems with this style, tell me and I might be able to fix them. If you do use IE, this isn't the blog for you.

Monday, June 22, 2009

Wanna feel smart?

Few things give me the boost of solving a difficult puzzle. Whether I've rooted out a logical flaw in one of my scripts or finally grasped an unintuitive programming concept, I always feel best when I've conquered a challenging problem. From now on, anytime I figure out satisfying puzzle, I'll pass it along to you along with my rationale for solving it. If you have a better way, feel free to tell me.

Today, I found a real stumper on my favorite blog, Coding Horror. Jeff Atwood examined a probability conundrum related to the game show "Let's Make a Deal". Here's the setup, according to Jeff's post:

Suppose the contestants on a game show are given the choice of three doors: behind one door is a car; behind the others, goats. After a contestant picks a door, the host, who knows what's behind all the doors, opens one of the unchosen doors, which reveals a goat. He then asks the contestant, "Do you want to switch doors?"

Should the contestant switch doors?

Even though you know that the answer can't be the obvious "It doesn't matter", you probably can't think of any reason that it's not. One of Jeff's links supplied this totally unsatisfying explanation:

When you first selected a door, you had a 1/3 chance of being correct. You knew the host was going to open some other door which did not contain the car, so that doesn't change this probability. Hence, when all is said and done, there is a 1/3 chance that your original selection was correct, and hence a 1/3 chance that you will win by sticking. The remaining probability, 2/3, is the chance you will win by switching.

That explanation didn't assuage my doubts, so I started thinking of the problem in different terms. I finally convinced myself that 2/3 was the right answer by breaking the problem into cases.

In the first case, the car is behind door number one and you decided not to switch. If you chose door number one, you would win, but if you chose door number two or three, you would walk away with a goat.

In the second case, the car is still behind door number one, but you decided to switch no matter what. If you pick door number one and switch, you lose the game. However, if you pick door number two or door number three, you get to drive off in a brand new car.

I don't have the expertise or patience to posit why people tend to make the wrong decision, but I'm satisfied to have figured it out for myself. If I find any more head-scratching logic puzzles, I'll make sure to pass them on. I want you to feel smart, too!