Friday, November 23, 2007

Javascript Beautify

We often talk about the latest scheme for compressing and minimizing our JavaScript. The JavaScript Beautify script aims to do the opposite.

Often, you find a site that is doing something interesting and you want to learn how it works. You check out the source and it is cryptic gibberish. This is where the beautifier comes in to make it a touch more readable.

For example, it can take:

JAVASCRIPT:
  1. /* paste in your own code and press Beautify button */var latest_changes=new Object({'2007-10-17':'Many, many fixes and improvements. Processing speed is also back.','... who cares ...','2007-02-08':'Initial release'});var a=b?(c%d):e[f];

and gives you:

JAVASCRIPT:
  1. /* paste in your own code and press Beautify button */
  2. var latest_changes = new Object({
  3. '2007-10-17': 'Many, many fixes and improvements. Processing speed is also back.',
  4. '... who cares ...',
  5. '2007-02-08': 'Initial release'
  6. });
  7. var a = b ? (c % d) : e[f];
Source: Ajaxian.

Sunday, November 11, 2007

How to calculate tax

Those who pay income tax every year the following example might be useful. (Note: This is for the year 2007).

Example 1:
Let us take a case where the assessee's income is Rs. 2,10,000.
  • According to the Income Tax Slab, the first 1,00,000 is not taxable.
  • The next Rs. 50,000 is taxable @10%.
  • 10% of Rs. 50,000 is Rs. 5,000.
  • The remaining Rs. 60,000 i.e. 2,10,000 - (1,00,000+50,000) is taxable @20%.
  • 20% of Rs. 60,000 is Rs. 12,000.
  • Therefore, the net Income Tax Payable is Rs. 5,000 + Rs. 12,000 i.e. Rs. 17,000.
Example 2: Let us take a case where the assessee is women and whose taxable income is Rs. 2,40,000.

  • According to the Income Tax Slab, the first 1,35,000 is not taxable.
  • The next Rs. 15,000 is taxable @10%.
  • 10% of Rs. 15,000 is Rs. 1,500.
  • The remaining Rs. 90,000 i.e. 2,40,000 - (1,35,000+15,000) is taxable @20%.
  • 20% of Rs. 90,000 is Rs. 18,000.
  • Therefore, the net Income Tax Payable is Rs. 1,500 + Rs. 18,000 i.e. Rs. 19,500.
Example 3: Let us take a case where the assessee is senior citizen and whose taxable income is Rs. 2,90,000.
  • According to the Income Tax Slab, the first 1,85,000 is not taxable.
  • The next Rs. 65,000 is taxable @20%.
  • 20% of Rs. 65,000 is Rs. 13,000.
  • The next Rs. 40,000 i.e. 2,90,000 - (1,85,000+65,000) is taxable @30%.
  • 30% of Rs. 40,000 is Rs. 12,000.
  • Therefore, the net Income Tax Payable is Rs. 13,000 + Rs. 12,000 i.e. Rs. 25,000.
(If the assesse claims any rebate/ exemption, the claimed amount will be deducted from his income with reference to the law of Income Tax Act before calculating the tax.)

Note:
  • Surcharge @ 10% applicable if total income exceeds Rs. 8.5 lakh for A.Y. 2005-06 and Rs. 10 lakh for A.Y. 2006-07.
  • There is a new section 80C according to which a person can get rebate upto Rs. 1,00,000 against insurance premium, PF contributions and other such schemes.
  • In case of higher education there is a deduction in tax for a maximum period of 8 years.
  • Marginal relief would be provided to ensure that the additional income tax payable including surcharge, on the excess of income over Rs. 10,00,000 (Rs. 8.5 lakh for A.Y. 2005-06) is limited to the amount by which the income is more than Rs. 10 lakh (Rs. 8.5 lakh for A.Y. 2005-06).
  • Education cess @ 2% on tax plus surcharge.