19 January 2007

CSS Oddity

Lesson: Thou shalt not use CSS to obscure unpredictable text for ye users.

Skin deep advantage of CSS is that it can be used to make web pages beautiful and possibly perform some tricks without other tools like Javascript. However, when one doesn't know what the content of the page will be, CSS might actually end up obscuring that part of the page. An example is the occurence of heading tags h1, h2, etc. in people's blog posts on Planet Debian. For the planet, date is a level 1 heading, each person's name is a level 2 heading and title for each post is a level 3 heading. When a post contains either of the h1 or h2 level headings, it looks like the image shown below. Notice that the circled heading (h1) is hardly readable while the post's matter is!


This happens because tje CSS for the planet makes the h1 and h2 to have a letter-spacing of -2 pixels due to h1 and div.channel h2 selector definitions. The problem starts when a person's post contains either a level 1 or level 2 heading. The div.content h* selector (where * = 1,2,...6) makes all of them to have a font-size of 100% and the reduced letter spacing in addition to the default bold font-weight of headings make them almost unreadable (Firefox, IE6, Konqueror). The reason behind this is that the letter-spacing: -2px definition is being applied to all h1 headings and all descendant h2 headings of div.channel selector. If we remove the letter-spacing in the level 2 heading in the post(shown above), it should look as shown below.


In such cases where the content is not predictable, CSS rules should take into account both the static and variables parts separately. A style sheet which took care of the static part using child selectors and separate selectors for content styling would have suited Planet Debian more. Using the suggested separation method, a child selector e.g. div.channel>h2 would not make the div.content h2 to be with reduced letter spacing and thus leaving headings in posts to be more easily legible as show by the second image above.

So although using CSS gives many advantages, using it without giving a real consideration to the actual content of the page, however unpredictable it may be, one can end up with difficult to read content due to misused CSS rules.

This post will help me with a visual example of the different between descendant and child selectors. I hope it serves useful purpose to others too. Have fun CSSifying your pages.

17 January 2007

16 January 2007

Snow Snow Snow.... finally

As promised yesterday, here are a couple of scenes from yesterday's wonderful nature show. To view larger versions of these images, click on image.

SnowSnowSnow

playingInSnow

Snow Snow Snow

Ahhhh.....finally. And that too several inches of it. I'm happy that winter is here.

time to go to sleep now. No this isn't a dream, the snow was for real. Few pictures tomorrow if it stays.

15 January 2007

Rules of Slashdot

As read on slashdot.org:

Post

  • We love Apple (especially when they do something just like Microsoft, and even more if their product is vaporware).
  • We hate Microsoft (especially when they do something just like Apple, and even more when their product is vaporware).
  • Steve Jobs can do no wrong (especially when he does the same as Bill Gates).
  • Bill Gates can do no right (especially when he does the same as Steve Jobs).
  • Any story that is positive about Bill Gates or Microsoft will get tagged "fud" or "troll".
  • Any story that is negative about Steve Jobs or Apple will get tagged "fud" or "troll".
  • "One Laptop Per Child" is the second coming of Christ.
  • Nicholas Negroponte is Christ.
  • We ignore Sun (especially when they dominate any specific industry).
  • We adore Java (even though it was developed by Sun).
  • It has been "The Year That Linux Takes Over the Desktop" for about 8 years.
  • It has been "The Year That Microsoft Dies" for about 15 years.
  • It has been "The Year That Apple Overtakes Microsoft" for about 10 years.
  • Ubuntu is God's chosen Linux distribution.
  • All other distributions of Linux are wannabes...especially the ones that have been around longer than Ubuntu.

That was hilarious :)

11 January 2007

PlanetPlanet & Blogger

I just noticed something and I can't find out where the fault is. Is planetplanet doing something wrong? Or does the new blogger have a bug?

This installation of planetplanet says that a feed(blogger) has a new post if there is comment. For example if there was a blog posted on 8th Jan, and someone commented on it today, planetplanet reads the feeds (every hour) and shows the post made on the 8th as today's post! Imagine someone comments on a 6month old post! That does mess up things a bit and the planetplanet readers do raise an eyebrow.

I have a feeling that it is blogger which is playing tricks. In the new blogger comment feeds are also available, but it shouldn't really send a new time for the main feed. I think I will ask around on the planetplanet mailing list as to who is the culprit.

Update: It has to do with planetplanet because I just noticed that the same thing happens with typepad.com feeds too. Looks like blogger only.

10 January 2007

Etch: Two digit level RC Bugs

I have been checking the number of RC bugs in Etch since Nov'06 and had expected them to fall below 100 around first week of December. But then they kept hovering around 115 and never went down till the first week of January.

Hmm... it seems it was not only me who was waiting to see the RC bugs for Etch go down to two digit level i.e. <100. Sam put up the perfect picture to celebrate this. Etch seems to be a lot closer with the number of bugs falling below 100.

Changing the Template

They said that the new blogger has new and better features, so I tried to play with the template as well. This is the template I chose to play with the new blogger template features. It is called Mr. Moto and was done by Monsieur Zeldman. I have seen and read quite a bit of his work and he is awesome.

I have just played with blogger's GUI system for setting up the template and page elements. The only change I made by hand was decreasing the size of date and increasing the size of post title. Before I start doing more digging in the template manually, I want to say that blogger's template system is pretty impressive. One can even move elements by a simple drag and drop. If you haven't tried it, do try and I'm sure you will be happy that you did.

One thing I missed is selective font size/family settings. The present font settings apply to the whole page. It would be wonderful to have per-element font settings.

PS: I wonder how it works on other browsers e.g. Safari and Opera.

8 January 2007

Fire Alarms

It was surprise to me when I learned yesterday that our fire alarm was not connected to the fire station system. I would have expected that so that the fire people know automatically when there is an alarm. It doesn't happen to be the case for this building though.

Details:

Yesterday around 5:00pm I was feeling drowsy because of a late full lunch, so I though of taking a half-hour nap. Just after 5 minutes of lying down, I heard an alarm which sounded like one of our alarm clocks but as if it was in the other room. I waited for about 5 seconds and then got up to turn it off. But the sound was coming from a different direction: the hallway! Then it hit me it was a fire alarm.

So I went out and tried to sniff in the hallway and then from the windows: no smoke. Relieved, I picked up my laptop and put it in its bag, disconnected my hard disk (which contains nightly backups) and put it in the same bag. I was going down the stairs after picking my SLR's bag.

On reaching down I saw the usual scene: everyone was in the entrance hall - blocking the entry!! When will they learn?

I went out and tried to scan for distant fire truck alarms. Nothing! I waited for about 5 minutes and still nothing. So I finally decided to go around the corner (fire station is in the same block) and ask the gentlemen in the fire station if it was a holiday ;). One of the fire men opened and asked what I wanted. I told him that there was a fire alarm and it was going on since the last 10 minutes. He calmly jotted down the address and told someone on this communication device about it too.

About 2 minutes after I gave them the information, I saw the first fire truck rushing towards us, and within another minute they had 3 more standing in front of our building.

In the end, it turned out that there was no fire but probably a prank! But one thing I will keep in mind is call 911 in case of a fire alarm even if the fire system is connected to theirs. Secondly, I was really surprised that none of the other residents though of calling 911 before going down the stairway.

6 January 2007

Testing 1...2....3

Testing the move to new blogger beta .

Update: I need to redo the template to make use of features from the new version of blogger.

4 January 2007

Saddam Hanging: (Immediate) Consequences

Unfortunate consequences of the publicizing of Saddam's hanging:

Blame: irresponsible authorities handling the execution, and irresponsible media people airing the video for short-time fame.

3 January 2007

k9copy

I was searching for a software to convert a DVD9 to a DVD5 just like DVDShrink does. It didn't take long before I saw k9copy which does exactly what I wanted.

The idea was to backup my original DVDs which are usually DVD9 to DVD+R discs which are replaceable. I tried one of the DVD9 and the process took around half an hour or so. However, the result wasn't as fabulous as one would get with DVDShrink. The picture was all pixelated even though the camera wasn't moving during a shot. Am I doing something wrong? Do I need to change some settings before I start using it?

I hope k9copy gets better at this so as to at least give as good a quality as DVDShrink does.

2 January 2007

Edgy Eft install for Friend

A friend's system crashed a few days ago. He had to reinstall Windows and also resized his partitions to suit his needs.

  • Installing Windows: 70minutes

  • Number of reboots for install and post-install drivers, etc : several times

  • Reconfiguring Windows install to previous one: 120minutes

  • Installing Ubuntu with single reboot: 40minutes

  • Ubuntu automatically telling you your mouse needs to be recharged: priceless

And a Happy New Year to all.