Sunday, February 22, 2009

What is the slowest day of the week for your blog?

bored_product_guy

Generally it's the entire weekend1 for the internet; however, depending on your site it could even be a Wednesday that produces the least traffic.

In my case the weekends are always dry, and especially so if there's something like the Oscars on air (drat...). My stats are too poor to put up for display here, but yes, events of note do woo away your readers, you can take my word for it. I think I'll cut down on my weekend blogging...

1The figures provided in this link are from 2004, but unfortunately there doesn't seem to be any recent statistics on this.

Saturday, February 21, 2009

Attack of the bx- errors

bored_product_guy

In case you’re among the uninitiated, bx- error codes are randomly assigned to template issues in Blogger blogs that are currently irresolvable. I had thought I had seen the last of my share of bx- errors last year, but apparently the gods of Blogger certainly don’t think so. I tried to perform the simple task of moving the lines of CSS mentioned in this post higher in the header section of my blog, and got a bx- again. Worse, when I tried to edit anything in that post at all, the code got garbled, and at times the page would even refuse to load. The solution? As I had figured out myself. It’s going to be a rough summer…

Friday, February 20, 2009

How to write things like <head> in webpages

bored_product_guy

Whenever you try to write code including tags like <head> in webpages, the browser steps in and refuses to process angle brackets. There's actually a simple solution, but being moronic I keep forgetting this: just type "&" next to "lt;" or "gt;" (without quotes), for left and right angle brackets respectively. There.

The opposite? To write the actual code to get <head>, type "&" next to "amp;" and followed by "lt;" or "gt;" (without quotes again) to get the left and right angle brackets, in that order. Hence: &+amp;+lt;+head+&+amp;+gt;, sans the +'s. Voila.

Standards compliance, huh?

bored_product_guy

I decided to run quick CSS and HTML/XHTML markup validation tests on major sites using the tools on the W3C website (here: markup and CSS). Here’s what I found:

site markup errors CSS errors
Google 62; 9 warnings 1
Slashdot 145 none
Wordpress.com none 52
Technorati 13; 6 warnings 19
Yahoo! 48; 44 warnings none
NYTimes.com 318; 69 warnings 52
Microsoft 176; 36 warnings 33
Lifehacker 314; 70 warnings 2

Despite such errors, since browsers will almost always load pages the way they were intended to, it makes sense to reduce code, especially when your site receives millions of hits. Google’s homepage, for instance, doesn’t even have a DOCTYPE declaration. But as web designers and students of the trade who are persistently insisted across textbooks, websites and workplaces to follow standards, where does that leave us?

Thursday, February 19, 2009

Closing down AV Scan

bored_product_guy

This made me sad, but it was the right thing to do.

Wednesday, February 18, 2009

It’s incredible

bored_product_guy

It’s incredible. It took my close to two hours just to publish my last two posts on Blogger. Every time Blogger was scrambling up code I was trying to display; I finally realized that I had to change a setting (read here). On top of that, I’ve tried out so many bits and pieces of code (call them widgets, modules, plugins or whatever) that my Blogger template right now, having accumulated years of dilapidated apps, is pretty close to a digital scrapyard. Looks like there’s no way other than hand-coding a brand new template from the ground up…

Tuesday, February 17, 2009

How to get rid of the Blogger navbar

bored_product_guy

There's hardly a Blogger user to be found who hasn't been irked by the navbar. True, it’s not entirely useless – it lets you quickly log on to Blogger and provides a quick customization link. But by just being there the navbar brings a generic look to your blog, which is enough to make readers not take it seriously. On top of that, the navbar allows any Blogger user to flag your blog! (Which, assuming you’re one of the good guys, puts you at the mercy of the goodwill of your diverse readership.)

Therefore it’s imperative that you hide your Blogger navbar, or at least know how to. In case you’re wondering, the Blogger Terms of Service doesn’t say anything about the navbar, so you’re good to go.

Hiding the Blogger navbar

1. Sign in to your Blogger account. This will take you to your Dashboard. Click on the Layout link of your blog.

2. Click on the Edit HTML link on the Layout page. Don’t worry, you don’t have to know anything about HTML! I’ll take care of the code.

Scroll down the Edit Template field and paste the following immediately before the Profile section as in the following picture:

#navbar-iframe {display:none; visibility:hidden; height:0px;}

You ought to add a comment (/* for example, this part would be a comment */), just in case you wonder someday why you inserted this particular line of code. Anyway, what this line of code does is hide the navbar – but this will leave some empty space above your header, or as in my case, leave less space and make your template look like it’s been trimmed on the top.

3. If there’s an empty space above your header, scroll up the Edit Template section and paste the following immediately within the curly braces of the body section and as shown in this screenshot:

margin:0;
top: -20px;
position: relative;

Once again, don’t forget to add comments. What we’re doing here is negatively positioning the body of your template to hide the area left vacant by the absence of the navbar. (Some bloggers have proposed solutions using the !important tag, but this might cause problems with screen readers and is therefore not advisable.) Please note that the margin section might already be defined in your template. In that case, just skip pasting the first line. Also, -20px might be too much or too less; tryout a few values to see what works best for you.

4. If your template looks like it needs a tad more space on the top (whether step 3 applies to you or not), just increase the margin a few pixels. For instance the following did the job for me:

margin:2px;

5. Save your changes by clicking on the big orange Save Template button beneath the Edit Template field. Click on View Blog -it should now be navbar-free! If you want to bring back your navbar, simply remove the lines of code you’ve added and save your template.

Happy blogging!