Jaffer Haider

June 17, 2008

Daylight Savings, a concept lost on us

Filed under: Life, Pakistan — Jaffer Haider @ 5:14 pm

I was waiting outside Siddique Trade Center (Lahore) the other day, waiting for my mom to wrap up shopping and come out (I can’t go within 10 feet of a tailor shop and not feel nauseous) . As soon as the clock struck 8, the lights outside and neon signs on the building came on.

DSC00743

Notice that because of daylight savings the sun hasn’t gone down yet and there’s lots of sunlight. I waited there for another 30 minutes, and there was still enough light that you didn’t need to turn on those lamps.

What’s the point of having daylight savings if people (I’m guessing Siddique TC is not the only culprit) are still switching on lights at the old times. Can’t they SEE the sunlight?! And its not like we’ve got lots of electricity to spare. Even now as I’m writing this, the power is out and I’m going to have to wait for it to come back before publishing this post.

So what’s the basic problem here? Lack of eyesight? =p Lack of consideration? And how do we fix this nationwide problem?

June 16, 2008

Firefox 3 - Why so few pledges from Pakistan?!

Filed under: Browsers, Pakistan, Web — Jaffer Haider @ 5:25 pm

Firefox 3 is coming out tomorrow, and this time around Mozilla is going for a Guinness Record for the most software downloads in a day.

So far there have only been 1971 pledges from Pakistan. That puts us in the same category as countries like Ecuador, Belarus, Sri Lanka, Algeria and Egypt. Iran has a whopping 8684 pledges! And they’re right next door to us. (there’s no point in drawing comparisons with India)

Wasn’t Pakistan supposed to have one of the fastest growing tech industries? I thought our software industry and our ‘techies’ in general were a lot more enthusiastic about technology and generally well informed.

And Firefox is more than a web browser, for us web developers it’s a full fledge IDE. I simply can’t imagine web development without Firefox and Firebug. I shudder when I remember the days when we developed applications using Internet Explorer, and pretty much guessed what was going wrong with markup rendering.

So what’s wrong with us? Why are there so few pledges? What factors determine the level of participation in such events? Are we Pakistani’s inherently insular?

UPDATE: At least some Pakistani’s are doing the right thing. The awesome people at WCCFTech have put up a banner and I’m sure they’ve been the source of many pledges.

June 4, 2008

Linux – Never Again

Filed under: Life, Technology, Ubuntu — Jaffer Haider @ 2:00 pm

That’s it. I’m done. I’ve given up. No more leaps of faith for me.

When KDE 4 came out, I suddenly felt this urge to install the remixed version of Kubuntu 8.04 with KDE 4 on my Dell Vostro running Windows XP. I looked around the net for a couple of days, and generally saw a positive response, especially on machines similar to mine. There weren’t a lot of driver issues. So I went ahead and did a dual boot.

The installation went smooth enough, and I was impressed. When Kubuntu loaded, sound was working, screen resolution was fine, USB drives were working, and KDE 4 looked very nice. Wifi wasn’t working, but I thought what the heck, I’ll pop in the network cable and download the driver for the wifi. But turns out the NIC wasn’t working either.

So I look around some other options, try out some applications, and stumble upon the desktop effects settings. Although I doubt they’d run without the Nvidia drivers installed for my 8400GS, I still click the ‘enable’ button. Screen goes blank. I wait for a couple of minutes and nothing changes. I restart the X Server. Nothing happens. I reboot and startup Kubuntu and login. I still get a blank screen.

And since that day I haven’t touched Kubuntu. Now I’m forced to wait and select XP in the boot sequence whenever my machine boots. I can’t take the time out to partition and install XP again and remove Kubuntu completely.

There’s a lesson to be learnt here. Technology is just an enabler, just a means to an end. You should use whatever works for you. Be it XP, Vista, OSX or Linux. We shouldn’t always go after the latest (not necessarily the greatest) thing. Windows XP SP2 works beautifully for me, and now I’m going to stick with it. Even if my Kubuntu install hadn’t borked itself, I still would not have been able to use it as my primary OS because of compatibility issues. There would have been no gain in productivity whatsoever. So until Linux really becomes super awesome, gets mainstream recognition and gives me a long list of compelling reasons to switch, I’m sticking with good old Microsoft.

June 3, 2008

This thing made me a developer

Filed under: Life, Technology — Jaffer Haider @ 7:57 pm

While doing some spring cleaning some months back (see? I was really busy these past couple of months =p), I came across my old Vtech Pre Computer Power Pad. It brought back so many memories! My dad’s friend got me this from Dubai when I was about 10 or 11 years old. Back then, very few homes in Pakistan had computers, atleast we didn’t have a computer at our place, so I was ecstatic when I got my greedy little hands on it.

It had lots of mini games, mostly educational, like trivia, quizes and whatnot. But the most interesting thing by far to me was the ability to code in the BASIC programming language. I started by reading through the blue instruction manual for the language (I think I still have it stashed away somewhere), which was the only source of reference that I had, and then bit by bit, started to experiment with code. And then I just got sucked into it. I ended up writing so many different programs. The one big downside of it was that you could only store one program at a time in its persistent memory.

The last thing that I remember coding on it was a 2 player text based cricket game, in which players would select a type of bowling action and a batting shot, and based on those combinations, the result of the ball would be determined. I couldn’t make improvements in the game because the code reached the maximum limit of the storage memory, and memory expansion cards weren’t available in Pakistan. And soon after, the power unit of the computer game out or something, and it stopped working.

And now its probably lying at some second hand shop, or being taken apart for spare parts. But it did good in the sense that I found out early on that I had a passion for crafting code and really enjoyed creating stuff on computers. This thing awoke the inner CS techy in me =D

June 1, 2008

I’m awake, I’m awake!

Filed under: Life — Tags: — Jaffer Haider @ 3:51 pm

When you can’t recall what theme your blog’s using, then you’ve seriously been neglecting it. For numerous reasons (laziness being the top 3), I haven’t taken out the time to update this place as much as I wanted to in the past couple of months. :(

I’m stuck in a ton of stuff these days, but I’ll be back, and will keep this place alive. :D

March 2, 2008

Firefox 3 performance numbers - impressive

Filed under: Browsers, Javascript — Tags: — Jaffer Haider @ 3:15 pm

Stumbled upon these Firefox 3 Javascript performance numbers. Firefox 3 preBeta 4 is about 3.6x times faster than Firefox 2.0.0.12 and a huge 7.5x times faster than IE 7 at crunching Javascript.

I’ve always been pretty impressed by Safari’s js performance, but looks like FF 3 is going to take things to a whole new level.

February 28, 2008

LUMS Comics

Filed under: LUMS, Sites I visit often, Web — Tags: — Jaffer Haider @ 1:59 pm

Yaay! We finally get our very own comic strip!

LUMS Comics

Funny stuff from a very gifted artist. The drawing style is somewhat similar to phd comics, which are my all time favorite web comic.

Added to pakdoc as well. Keep up the good work Bilal!

January 26, 2008

GeniDo - Granting your first wish (Offline Basecamp)

Filed under: LUMS, Pakistan, Technology, Web — Tags: — Jaffer Haider @ 12:15 pm

It was rightly predicted that the next big thing on the Web would be offline support from the web applications that we know and love. More and more offline apps keep popping up everywhere. The latest one to roll out is GeniDo (click to see demo video), a product by GeniTeam (founded by LUMS alumni).

I think it’s a great product idea, given the huge user base of Basecamp (more details at G&W). It’ll be great to see similar products for other web applications like rememberthemilk, backpack etc.

Regarding offline support for web apps, Flex and Google Gears have helped a lot in providing the infrastructure. I personally am really excited about Firefox 3’s offline app support (demo). Will finally have a reason to consider building Firefox only apps …

January 22, 2008

Writing Semantically correct HTML

Filed under: Browsers, CSS, HTML, Web — Tags: — Jaffer Haider @ 10:54 pm

“I see dead HTML tags”

Seriously. Sometimes I’m amazed at how the Web is still able to function with the absolute junk with which web pages are built.

CSS is almost 10 years old, but it still doesn’t render uniformly across browsers (even latest ones). And the fact that it is severely crippled doesn’t help either (you can’t even vertically center text without applying half a dozen hacks!).

JavaScript, the poor thing got crippled during its inception due to the infamous browser wars. It’s precariously carrying the burden of Web 2.0 on its worthy yet twisted shoulders.

HTML … well that’s what this post is all about. HTML on the web has gone through many phases. First there was the plain text phase, with newly introduced presentational tags such as <font> and <color>. Then came the Era of the Table. We’d see tables within tables within tables within tables being used to keep the layout of a page in place. Tables were the easiest thing to use for column layouts back then.

But then came CSS with its call to developers to shun tables and use divs and CSS rules for layout. Most of that stuff fell on deaf ears. So now we see a web where a large number of sites are made by developers who are either infected with divitis, or they haven’t looked beyond tables and inline styles. Either everything is a <div> in these sites, or a table element. Headings, lists, blocks of text, you name it, it’s a div/table.

What I want to list in this post are some rules to remember while writing HTML, such that the resulting HTML:

  • Has semantic meaning. The next developer to work on your markup will get a good idea of what it represents if your HTML is semantically correct and has ‘meaning’ (rather than a huge table within table within table…)
  • Is short and concise
  • Is primarily the structure of your page (as opposed to having presentational and structural properties)

The first thing to keep in mind is to use the correct tag at the correct place.

<h1> – <h5>: These tags should be used for your page name and other section headings. You can set these tags to both inline and block displays to suit your needs. They are SEO friendly as well.

<div>: You should use the divider primarily for layout purposes. A basic rule of thumb should be that if a div itself has any content in it, then you should rethink your use of it, and maybe replace it with a list item (if you’re making tabs or a ‘collection’ of items), span (inline text formatting), paragraph (block error messages) or maybe you don’t even need an encompassing tag for your content (think unnecessary boxing of images into divs).

<ul>, <ol>, <li>: Very versatile tags, should be used for both vertical and horizontal (tabs) lists. Also consider using lists for structures of data such as galleries, menus and draggable items. They work really well when floated as well.

<span>: Tag of choice for formatting inline text. It is essential however that you know that you don’t have to use it every time. There are other tags, such as <i>, <pre>, <dfn>, <code>, <strong> etc that you can use in most cases. Remember that you should use these tags according to the context of your site, e.g. <strong> doesn’t necessarily have to be ‘bold’ text. You can give it any style that applies to emphasized text in your page’s layout. Note that these tags will give structure to your data, through CSS you will set their presentational properties, and actually define what, say a <strong> tag will look like.

<label>: I’ve seen many forms that don’t use this tag. I’ve seen JavaScript that is doing what this tag automatically does for you in your forms (click sets focus to related input field). This should not be so. Your forms should always make use of this tag to describe what the user should input in a field. Be sure to use the ‘for’ attribute to link a <label> to its <input> tag.

<p>: This tag should be considered when you’re writing welcome/instructional/advert text on your webpage. Note that usually this text is encompassed in a div or other structure. <p> works just fine in these cases.

<table>: Use for displaying tabular data only. Remember to use the <thead> and <tbody> children tags.

<a>: Use for links. Also work really well in block display, so consider using them where you might be using divs with onclick events and cursor set to pointer.

These are the most commonly used tags out there. Be warned that you will need to swallow the bitter pill of CSS to make full use of some of the above tags, especially divs and list items.

Hopefully this rant makes some sense to you and will help you in structuring your pages better. If you think I got something wrong, comment and be heard!

Working from Home

Filed under: Life, Pakistan, Technology — Tags: — Jaffer Haider @ 10:25 am

My Home Office

I’ve been working from home since I joined CDF Software about 2 months ago back in December. Here’s how it’s been:

The Good Stuff

  • Free food (free as in non-alcoholic beer)
  • No IT dept. saying I can’t use YouTube
  • Frequent fridge raids
  • My choice of furniture
  • Duel Masters with my kid brothers during lunch break (I’ve become a super awesome pro)
  • Did I mention free food?
  • Can switch from desk+chair+heater setup to a bed+quilt+heater setup in a jiffy if it gets too cold
  • No waiting in traffic to get home
  • Road trips of the office in Islamabad (haven’t had one yet, looking forward to one though)

The Not So Good Stuff

  • Increasing waistline (did I mention food up there?)
  • No waiting in traffic while going to work
  • Don’t get to see the sun that much
  • General indigestion (too much to eat I guess…)
  • No white boards and markers
  • Work hours can be hazy (really easy to get carried away and pull a nighter…)
  • No colleagues around to bug, poke and generally make miserable
  • No free air conditioning (it’s going to get interesting in the summers…)

Generally you don’t hear too often someone working from home in Pakistan. Although I miss being in the same room with my team, still working from home is great fun. I believe more companies should explore such options, since they turn out to be very cost effective for both the employer and employee. And if the resource you hire is capable enough, the overhead of communication isn’t that bad.

Older Posts »

Blog at WordPress.com.