If you have any trouble understanding how income tax works or is calculated, play around on this webpage and see if it helps you. (It probably won’t, but you might have fun not learning anything!) It lets you dynamically compare different income taxes within Canada using a pretty graph and it lets you calculate your own (simplified) tax results, whether your income is salary or hourly based.
Why Did I do this?
I didn’t do my taxes; an accountant did. But when I was reading about them, I stumbled upon a couple webpages and became interested in the differences among the provinces and territories within Canada and
different income ranges. That’s what started this mini Javascript project.
This is not a work of art
I wrote it mostly on the bus using my recently acquired Dell Mini 12 netbook (on Windows XP… ew). And from that experience, I can firmly say that writing even very simple things, it’s good to have a fair amount of time set aside in a relaxed environment. I would write a couple things here and there for 20 minutes or so… then not look at it again for a few days… it took me 5 minutes to figure out what I wanted to do the next time I opened it. The only times I made significant progress was when I sat down for more than an hour. The code wasn’t really designed, it was just… written. It’s messy, there’s lots of hard-coding, poorly named fields and variables (didn’t help with figuring out what I was doing last time), and if it were anything serious, I’d rewrite large chunks of it. And make it prettier. But as it stands, it’s just kinda fun. 🙂
In addition to being curious about the taxes in Canada, I was also interested in trying a javascript graphing library. I had been impressed with different javascript-generated graphs on the web and wondered how difficult they were to create. I used FLOT (with lots of copying and pasting from examples), and it seemed to work alright, but it depends on JQuery, which I wasn’t familiar with. Actually, I’m still not very familiar with it… and wrote almost everything in regular javascript. I know it’s worth learning, but I guess I’ll save
that for another time. 🙂
Let me know of any errors in tax calculation.. or code design, for that matter. There’s lots of those, but I’m sure I’m not aware of all of them! hah.
(I’ve been sitting on this post for about 2 months now. hah! Figured I might as well publish it.)