Sunday, April 17, 2011

IRS Penalty for underpayment

So, one day before paying my taxes, I realized I had to pay a bit more than expected and afraid of penalties, I checked the rules. Quite frigging cryptic the first time you read them, but here is an example for future reference. Say that your tax withholding (what you had paid so far in taxes) was $8000 but that what you should have paid was $10000. The IRS wants you to pay penalty if you make a mistake by "too much".
  1. The first cut is an absolute number. Basically, something that says "don't worry if you just underpaid by this much...". And that limit is set at $1000. So, with an underpayment of $2000, we are way past that.
  2. The 2nd is if you should have imagined that you had to pay more than you paid. I.e., with what you had made, should you have realized that your error was too big... For that there are 2 cuts:
    1. The first is very similar to the "first cut" but instead of absolute quantity, it's a relative. Here they are saying: "if you paid in a range of 90% of what you were supposed to pay, you are fine". 8k is less than than 90% of 10k (9k), so, we can't say that we are fine... The error is considered "too big" by the IRS
    2. The second is saying "you even paid less than what you paid in 2009 moron!". So, say that you paid in 2009 $9500 of taxes (check line 60 of the 1040). This year you paid only $8k. I think you got no excuse. But if last year you had paid only $7k of taxes, then you would be fine. In other words, if you pay in withholdings along the year more than the total tax you paid the previous year, you are fine. You got an "excuse" :)
More examples/explanation here: http://www.taxationlawfirms.com/resources/tax/tax-penalties/2010-tax-underpayment-penalty.htm

Disclaimer: I have no clue about tax reporting. Follow the above at your own risk. Just trying to help :)

    About Khan Academy

    Watching the presentation from Khan in TED, I couldn't avoid to have some kind of healthy "envy".

    It was obvious that he wasn't the first on thinking or putting lectures on the Internet. He didn't invent that. But still, he became famous. I wish it was me. First because he got famous for something that I would have also enjoyed doing. Second, because he knows all that stuff that he talked about. He is or seems truly a renaissance man  and knows all that stuff that I don't know. And 3rd because maybe even now, if I thought of a similar idea, I wouldn't have the balls to go try. For instance, I think now that I would like to do the Spanish videos but I will not do anything about it. Or one in medical imaging...

    The other thing to learn is how implementing and showing something can turn the things around much more than simply trying to convince somebody about it. If he would have tried to explain that this was a much better way da da da a lot of people would have criticize him as fool, "don't know what you are talking about", "careful with your kids going this path and wasting their time, could affect them forever"... but instead, he just did it and prove it right, and he wasn't even planning for it.

    Finally, it is amazing to see how humanity keeps doing something over and over and think it's correct. How many education experts, teachers, educative reforms have gone through, few of them in the last 10 years when Internet was created, and nothing even close to this had been created. It is like if only a few are really "thinking" and the others are just doing/copying...

    I have a lot of thoughts of how Internet will change things. I'll write a post on that soon and it is actually the base for the name of this blog (cell0907), but on the mean time, I'll just post this to show my healthy envy and congratulate Mr Khan for his work and dedication.

    Thursday, April 14, 2011

    Getting the translator add-on running on Firefox 4.0

    So, in a previous post I showed how to go about 3.6 with the SDK installed on the computer. Then when I moved to 4.0 my add-on stopped working @@

    So, I decided to fix it. First thing I tried (didn't work) was to, instead of installing the new SDK, use the on-line add-on builder utility with the old code (to see if source code was the same but compilation was the issue). For that I went to https://builder.mozillalabs.com/ and paste the old code... But as I said, that didn't work, so, basically I figured they changed the code.

    So, I looked for the 4.0 compatible code and found:
    https://jetpack.mozillalabs.com/sdk/1.0b4/docs/dev-guide/addon-development/implementing-reusable-module.html

    I pasted that on the on-line builder, modify it to fit the Spanish version, and done!

    No major headaches...

    Experience with Jetpack - Create an add-on for Mozilla

    - This is for my record/experience but you can find a lot of info out there on this same example -
    - The reason I am revisiting this is that after installing Firefox 4.0 my add-on on 3.6 stop working :(  -
    - Will post solution on the next post - 

    There are 2 ways to work. One is locally, what is explained below, and the other is with the web based system (Add-on Builder):
    https://builder.mozillalabs.com/

    The youtube video http://www.youtube.com/watch?v=lKN4_fOKEWQ describes this second one but the text below describes the first one. Both examples actually do the same application.

    -------------
    There are other links of interest:
    https://developer.mozilla.org/en/extensions
    https://jetpack.mozillalabs.com/
    https://developer.mozilla.org/en/Extensions/Firefox
    https://developer.mozilla.org/En/Firefox_addons_developer_guide >> This is a nice guide to follow no matter what with a good introduction to web technologies.
    -------------

    On the locally based system, start by getting the environment:
    https://jetpack.mozillalabs.com/

    So, for the command line local operation basically start by getting Python and install it.
    Then download SDK

    After installation, you will have a directory like:
    C:\Program Files\python\jetpack-sdk-0.9
    On Windows command, you should run from the root directory of the SDK (the above address) bin\activate. (On lynux you would use "source"...) Nevertheless, on my case, if you open the .bat there are some commands that are not really well executed and get some errors. I clean it up and created new_activate.bat.

    If it works, the last line after setting up the environment eventually calls python and displays a message back saying that you can execute "cfx docs". This is actually the cfx.bat. (There is another cfx txt file inside the same directory but the stuff inside is Unix or Python (?), not DOS batch file). Within that file (cfx.bat), python is executed again, but the path variable without commas makes python miss the path, so, actually I modified cfx and add the "" on the path:
    python "%VIRTUAL_ENV%\bin\cfx" %1 %2 %3 %4 %5 %6 %7 %8 %9


    I think what is happening is that every time we execute cfx.bat, this calls the python + parameters instruction inside the bat file, python interprets what we want to do based on those parameters and executes it before going back to the DOS console.

    ============= Trying to understand this ===========

    I.e, at the end of cfx.bat, Python will launch the browser and within it, it will open the docs. On the Mozilla website, it says "This is the cfx command-line program. It's your primary interface to the Jetpack SDK. You use it to launch Firefox and test your add-on, package your add-on for distribution, view documentation, and run unit tests.". But actually I can't really make sense of it:
     
    Nevertheless when we type "cfx docs" in the Python command line it doesn't work. So, what is that really doing? The stuff inside cfx file (without .bat) seems to be a unix command:
    #! /usr/bin/env python import cuddlefish if __name__ == '__main__':
        cuddlefish.run()

    http://stackoverflow.com/questions/2429511/why-do-people-write-usr-bin-env-python-on-the-first-line-of-a-python-script
    ========================================

    Anyhow, after typing cfx docs in the DOS command line, Firefox now opens a self-hosted web page at http://127.0.0.1:8888/

    Follow then the tutorials... In few words, you have to create then a directory for the project you want to build, inside packages directory. Once you create the right files inside, jetpack SDK will automatically detect them. One file is a JSON (http://en.wikipedia.org/wiki/JSON. It is basically a way to create simple descriptive files, with property and value for that property.) which describes the package. The others are modules (.js) and the main.js which is the center of the project.

    The one in the text is also explained here:
    http://www.youtube.com/watch?v=lKN4_fOKEWQ

    It should be relatively easy to run the translator example in Google without any problems. It is impressively powerful!

    By the way, if we want to use the Mozrunner we better put also the "" in the bat file or otherwise Python won't interpret it right.

    To add the add-on, I can't seem to find a menu on the add-on manager on Mozilla, so, I just dragged the xpi in the add-on manager. Still, I seem to need to re-start and in some instructions says that you don't.
    I found this: https://wiki.mozilla.org/Extension_Manager:Bootstrapped_Extensions
    http://www.accessfirefox.org/Install_Addon_Manually.php