Monthly Archives: October 2009

Javascript: Power tools of Firebug for developers and designers

Every developer now adays use Firebug to tackle the Javascript, which is obviously one of the most powerful innovation in the domain of Web. However, most people don’t know the correct use of this amazing addon of Firefox.

Let’s quickly get to the business, I will let  you know the most useful power tools of Firebug.

console.debug(obj)
Ever you get caught using too many alert messages, eventually I was using this to see the outputs, inserting an

alert("yes")

on nearly everyline while debugging to see if my variables are passing fine. In that case, if I have a loop of 100 times and some values is going wrong in it, I would have to hit my enter button for 100 times to get rid of that alert box while trying to debug the code. Don’t do it, if you have Firebug installed, use

console.debug("yes")

and it will nicely print the debug output in Firebug console. No more buggy alert boxes.

console.count()
Ever wondered how many times your javascript function is getting called, feeling the need to go and declare a global scope variable and then increment it and then print its value to see? Don’t do this if you have Firebug, instead use

console.count("name")

at the line of code you want to see the execution count and your Firebug console will let you know how many times this line of code was executed. Handy, eh?

Command Line functions
Those of you who are not familiar with command line of Firebug would say, what? well same was my reaction, however, I found it and it is really very useful. You can inspect a visual object on your page through the use of that little inspect arrow on the top left corner of your Firebug console, however, for example you cant see that element visually and still you want to see it, check bottom right side of your Firebug console, you will see a red square over there, open that and that is your Firebug command line console, type

$('id')

replace id with the id of the element you want to inspect and it will show you that element in your console. In my case, I wrote this command

$('bew')

and output in the console was

>>>$('bew')
<input id="bew" type="hidden" value="BEEPJScript>
Happy debugging!

SeaMicro innovates low energy microprocessor for servers

Intel's Atom microprocessor uses less energy

Intel's Atom microprocessor uses less energy

As the technology is advancing, everyone is looking to conserve energy, some are doing that to tackle the everyday rising costs of energy products, while other are green planet advocates. Whatever the reason is, everyone likes to conserve energy. Computer server market is no different.

About 10 years ago, a company called RLX tried to market very thin blade servers running on laptop chips of Transmeta but timing was not good as you may remember that was 1999, when the famous dot com bubble burst out. Nobody then liked to invest on any Internet companies and servers were mostly used for that very purpose.

Today, with the likes of Facebook and Google around, we know that Intel’s Xeon is most famous processor in the server market. This processor is very good when it comes to render so-called heavy applications but when it comes to serve millions of small requests like feeding a facebook page or handling a google query, it starts eating energy.

A Santa Clara based company SeaMicro, comes up with the solution to meet the market needs using the recent technological advances. They have built a very small processor chip by combining 80 chips of Intel’s Atom processor. SeaMicro on the other hand is tight-lipped about their innovation at the moment and not many details are available for general access. The company is however mentored and funded by Vinod Khosla who was the co-founder of Sun Microsystems and is a strong advocate of green energy.

The CEO of SeaMicro said “Making a generalist machine is no longer good enough, the right system will require real engineering work. That is something the server market hasn’t seen in a long time.”

Fingers crossed about the success of SeaMicro’s innovation, however, SeaMicro is not alone in this race, there are many companies working on ARM processors as well and intend to use them for home computers and servers. Remember, Intel’s Atom processor gained some popularity through the Netbooks while ARM is around from years and if you have iPhone or any of Nokia series mobile phone, it is running an ARM microprocessor. These microprocessors are also famous for their very less use of energy while providing high efficiency.

Top 6 must-have Firefox addons for Web developers and designers

There are lots of blog posts about the must have addons for Firefox if you are a web developer. In fact mozilla’s addon library has lots of lots of them but only some are very useful and now a days when speed of the application along with its cross browser compatibility is a critical issue, some addons are far most critical and every web developer or designer should have them in his/her arsenal.

Firefox addons for Web Developers and Designers

Firefox addons for Web Developers and Designers

6-Measure it

Measure it has a simple philosophy, it lets you measure any thing on your browser screen, amazing when you are working with graphics of the site, you can measure area, it will let you know the width and height in pixels and then you put that information in your Adobe photoshop and make images of exact size.

5- Color Zilla

Color Zilla is your color adviser, very often I feel the need of picking a color on the webpage to export that in my Adobe photoshop, this addon has a fantastic eye dropper tool which let you pick exact color of any image on your web page and then you use that. It comes with some other goodies like page zoomer as well.

4- IE Tab

If you are a web developer, the chances are you already hate Internet Explorer but this web browser is still the most widely used web browser around the world and the reason behind is Microsoft Windows. Anyway if you are developing in Firefox you always need to see your web pages in IE that if they rendering alright in that browser, this addon saves you opening an IE. It adds a tab to your web browser and if you click that tab, it opens the same page with IE render engine. Bingo! You have got IE in your Firefox.

3- YSlow

A friend of mine introduced me to this addon very recently and after I discovered it, I went on thinking how I made my websites without this tool. Yes, it is “why slow”, install it, it will require Fire bug to be installed and then see your website loading, how much is the size of your web page, what is the rating of your website in terms of speed of loading and not just that, it actually advise you what you lack in your web page like you need to include CSS at the top, refer Javascript as include files etc. and it has got wonderful tools of itself, one of my favourite is Smush it, it actually takes all the images on your web page, turn them into PNGs and let you download them, once you have them, you can just go back to your images directory and replace your images, in my case, the difference was in kbs which is obviously huge when we speak of web pages.

2- Web Developer Toolbar

Is that ever happened that you are working in Ajax and your primary tool is IE or Firefox and then you want to see the source code which Ajax has generated? A real bugger eh? Well there are lots of lots of features in web developer toolbar like you can actually see the DIV  (borderless creatures, you can never see them without any external tool) formation on the page, look at the table information etc. but my favorite is View Generated Source option, which let you see whatever is current HTML of your web page.

1 – Firebug

This is the most important piece of code primary developed to serve web developer’s community. Javascript is a real pain to debug in IE (until IE8, it has got its fire bug too now, bundled with IE8 as Developer Tools) but in Firefox you have got fire bug to fire Javascript bugs. It not only let you debug your Javascript or HTML, it becomes very handy when you work on Ajax, it’s XHR panel in Net panel is designed to let you know, how many calls you have made to the server through XHTTPRequest object. Many other important modules like yslow require Firebug to run in. A true life saver!

If I have missed any addon which you think is crucial to be on every web developer/designer Firefox, please comment with its name, chances are that I don’t know about that addon as yet. Thanks!

A review of BBC Urdu news mobile application

BBC Urdu service has launched mobile application for its users

BBC Urdu service has launched mobile application for its users

Get Pakistan Breaking News app for Android now!

BBC Urdu service has came leaps and bounds since its inception on 3rd April, 1949. It has seen the times of war and peace, enjoyed vast popularity in the rural areas of Pakistan in the times of martial law and taken criticism from the patriotic people of Pakistan as a propaganda machine of west and India during 1965 and 1971 wars. Of Course BBC Urdu is not the only Urdu radio service which goes on SW and MW, Voice of America, China Radio International and IRIB Urdu Service (Iranian) are some popular services as well, which all come with their own agenda to spread in Pakistan but BBC Urdu is far most popular in all of the above.

I remember when I was young, my grand father who was living in a country side, was so keen to tune-in to BBC Urdu service at 8p.m and then at around 10:30p.m for sair-been and news. I was also used to listen whenever I would be visiting my grand parents home. I loved the accents of all of the Urdu service team especially of Shafi Naqi Jamai. After the death of grand father, I took his radio with me and I still remember those summer nights, waiting for the sair-been to start. Then came the Internet in my home and everything was changed.

BBC Urdu is famous among rural areas only for one reason. It is still the case that although PTV’s (Pakistan’s state owned television) dominance has been broken by the tens of private news channels, each airing news from their own angle and viewer has got much choice, when it comes to the rural areas, most of the people don’t have TV, even if some have one, their culture and their limitations of time don’t allow them to stick with the TV. They still rely on radio and although most of the big cities in Pakistan now have private FM radio stations, when it go to the rural areas, Pakistan radio is the only option, one would listen or otherwise the MW channels of BBC Urdu or other urdu services. Now given the case, Pakistan radio is state owned radio and it is always speaking the language of the government, Pakistani people don’t want to listen to them, primary reason is of course if Pakistan radio is praising Nawaz Sharif at one time, after couple of years it will cursing and accusing him for corruption because the government office has been taken by his rival party. The only choice is left to these Urdu services and BBC is the oldest, they have the nice fine tuned accents, not the Chinese accent of China radio or Persian accents of Iranian radio.

Launching a website in Urdu language was a bold step by BBC but same was the case with all other languages in which they broadcast in their World service. Although the website hardly meet with the websites of Express newspaper or Jang newspaper, I still visit this site only when I am not in mood of reading any depressing news, in BBC’s website, if you skip the main headline, the other news are mostly light weight and easy to sink in.

Now the BBC Urdu website has launched a mobile application for their readers on the move. I tried to download this application on my iPhone and it refused to download, because it doesn’t have the version for the iPhone. Looks like they have given a bit of research to the mobile handsets famous in Pakistan and made an application only for those. Below are the models on which this application work (I got this list because I later-on tried from my Nokia N73):

These all are Nokia models

  • 3250
  • E50
  • E60
  • E70
  • N71
  • N73
  • N75
  • N80
  • N91
  • N93

Here is a word of advise for the team at BBC Urdu that there are hundreds and thousands of Pakistani and Indian people who are abroad and would like to use this service. Skipping the popular phones like iPhone and Palm pre and black berry may not be a good idea. Phones which are listed above are very slow and I seldom use my N73 to go online while I am online most of the time from my iPhone.  Secondly, Nokia is not only popular brand in Pakistan, there are popular handsets as well for example of Sony Ericsson. Thirdly, if they don’t want to go in trouble of making an application for all handsets (maybe Urdu font is not supported in all of them), you may want to give a WAP site as well, which will be accessible from most of the handsets and most of the latest browsers like Safari and Opera Mini can also handle Urdu fonts.

If you are looking to download BBC Urdu service’s mobile news application and new your handset is listed above and you are browsing this article from your mobile phone as well (too many ands eh?) go to BBC Urdu website by clicking here.

Get Pakistan Breaking News app for Android now!

Get Adobe Flash player