Canadian Income Tax 2009

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.

canitax

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.)

Monthly Expenses?

I try to make all my purchases on credit card. This lets me easily review all my expenses each month, or at any time using online banking. (wooh, technology). So for my last statement, I downloaded it as a spreadsheet, did some grouping, and made a chart. I had to pull in some data from my debit card statement, as well, which wasn’t so accommodating (no CSV download), but I managed.

Monthly expenses: mid-April - mid-May 2009

Monthly expenses: mid-April - mid-May 2009

The three categories at the top with a bold line around them are pretty static and not going to change much in the immediate future: rent, bus, and phone. The three categories at the bottom with grey outlines were exceptional and help make this month a more expensive one: a trip to whistler (all expenses, including eating out, hotel, etc), some clothes (which I don’t buy often), and a new computer. These make up more than half of my month’s expenses. The rest of it is the interesting stuff. Eating out and liquor account for the greatest remaining expenses…. and eating out includes drinking out, whereas liquor is basically for drinking in – so already I could drastically reduce my expenses by drinking in more and drinking out less, right? :D (I don’t see drinking out decreasing drastically, any time soon, however….)

Food is miscellaneous groceries I’ve bought, and is very small because I live at home and don’t generally buy groceries. For that same reason, my rent should actually be half of what it is, but I plan on paying at least double, for the time being. I find it funny that coffee (when I buy a coffee and or any muffin or baked good) has its own slice of the pie – but not unexpected. Because I don’t have a car, gas is ridiculously small, but I like to replace what I use when I borrow my mom’s car.

For me, it will be interesting to see what changes next month. :) And who knows, at this rate, that might be the next time I blog! haha. ^_^;;

Oh, and I’ll be going to EAT!Vancouver, this weekend. I might even attend multiple days. I went last year and enjoyed it. It’s a barrage of samples and people trying to sell you stuff… and it’s where I tried and bought my RADA cutlery, which I like quite a bit. Thinking I might get a tomato knife or something. It’s only $12. If you’re looking for something to do this weekend, give me a shout. ;)

Tuna Teasers

We have a potluck lunch in the office, tomorrow, so I did something I never do: bake. :o I know, I know. Anyway, I decided on these things called Tuna Teasers – I remember enjoying when my mom had made them. Then I looked at the recipe. My god, was it simple! And quick! It’s from a recipe book called Fast and Fantastic, so I guess it holds true, in this case. :) Here’s the recipe:

Tuna Teasers

Ingredients

  • 1 c flour (I used whole wheat flour)
  • 1 1/2 tsp baking powder
  • 1 tsp onion salt (I substituted with onion flakes)
  • 1/2 tsp curry powder
  • dash of cayenne pepper
  • 1/4 c butter
  • 1/2 c milk
  • 1 can flaked tuna fish, drained
  • 1 c shredded cheddar cheese
  • 1 tbsp finely minced green pepper (I substituted with green onion)

Instructions

Preheat oven to 450F (230C). Combine first 5 ingredients. Cut in butter until mixture resembles fine crumbs. Add milk and stir until blended. Add last 3 ingredients. Mix well. Drop by tablespoonfuls onto lightly greased baking sheet. Bake for 10-15 minutes or until golden brown.

Makes 36 small puffs. About 15 medium sized.

File List Applet – now with more autotools!

I decided that before I did any more work on the applet, I would improve its installation process to make it easier for people to try it out. So, the process to get and build the source now looks like this:

Download

  • Browse source here.
  • Download the source: bzr branch http://stevenbrown.ca/src/FileListApplet

Install

  1. Install dependencies (Ubuntu package names given): sudo apt-get install python-xdg python-gnome2-desktop python-gtk2 python-pyinotify
  2. Branch the source using the bzr command, above.
  3. cd into the directory.
  4. ./configure --prefix=/usr (the prefix is important!)
  5. make
  6. sudo make install
  7. If the applet does not show up in your Add to Panel menu, try restarting the bonobo-activation-server: killall bonobo-activation-server.

Autotools

Autotools is pretty much the standard in source package management on linux. Except for the name, there is nothing automatic about autotools. Every encounter I’ve had with autotools has usually defeated me and left me frustrated and leaving whatever I was working on to do something else. For me, because I had labeled it the next step, it basically stalled the entire project for a while. Most people tend to copy and paste other projects’ autotools setup, but I figured that was overkill for my purposes and I didn’t find anything that quite suited me. I looked at gnome-blog, but it seemed like some stuff wasn’t quite working properly and some was completely unnecessary… in fact, this seemed to be a trend when looking at the autotools stuff in projects. Why is this? Autotools is not simple and due to this simple fact, I think it fails completely on many levels. Developers massage it enough to get it working, but few actually understand it all – I know I sure don’t! So please forgive the sloppiness and feel free to send patches. :) I gave up doing a couple things, like getting the revision number (bzr revno) and including it in the version string (see configure.ac). I know it’s probably something super simple, but I couldn’t seem to pass a variable containing a string as the version….

I feel that GNOME, as a platform for development, could seriously benefit from some kind of frontend to autotools that handled GNOME development nicely and hid as much as possible from the developer (including all those nasty config files that pollute the package tree). Anyway, I did not have an enjoyable time grappling with autotools, but I’ll end this mini-rant here.

Laptop’s New Life

My laptop has had its fair share of problems, mostly because it’s aging; I bought it nearly 6 years ago!! I’m actually impressed it’s aged so well! A few days ago, the display started to flicker with increasing frequency and become distorted shortly after turning it on. Here’s a video showing the problem: (Warning: contains a little bad language – woops…)

(Link to video here if embedded object doesn’t show up.)

Last night, I took it apart and tried wiggling every LCD-related wire I could find, hoping to affect the display’s output and conclude it was a fixable loose connection.

Laptop in Pieces

Nope. Fine. Who needs a screen anyway?

Screenless Laptop

I now have a very compact desktop – it even includes wireless, keyboard, mouse and speakers! It just needs a monitor. I haven’t decided whether I will make it a pseudo media PC to stream things from my desktop to the TV (a little work), or just to have it replace the family computer (almost no work!). The family usually gets my computer hand-me-downs. :)

Anyway, looks like I’ll need a new laptop sometime soon. I vowed to go smaller with my next laptop, but I’m not sure if a netbook would suffice. Of course, I would like it to run Linux (Ubuntu?), have long battery life, reasonable storage, support WPA2, have a built-in 1.3MP camera, and all that good stuff. Bluetooth would be nice, too. Let me know if you have any suggestions.

Reading – XP and Design Patterns

I got a few books out from the library, recently, which I’ve been reading on the bus. I’m currently alternating between Extreme Programming Explained: Embrace Change and The Joy of Patterns: Using Patterns for Enterprise Development. I wish I had read the XP book before being project manager for my Software Engineering project at University, a couple years ago. But perhaps having gone through that experience allows me to relate to the material more directly. It’s easy to read and the author, Kent Beck (one of the fathers of XP), identifies the reasons behind the development methodology, and the problems they help solve. I’ve always had this feeling of agreement with XP practices, many of which seem like common sense, but haven’t always been able to articulate the reasons. Thankfully, the author does not have this problem. :) I’m about 50 pages in, and it’s quite good, so far.

I picked up the Design Patterns book because the one I wanted, Design Patterns: Elements of Reusable Object-Oriented Software, wasn’t there. (The library has 3 copies of it, but it’s always out with a wait-list of people requesting it. This list now includes me. :) ) Anyway, the one I picked up is extremely terse. There are UML diagrams provided, sample code, and a problem description… but not much in way of explanation. It’s format is kind of like this: there’s this problem, how do we address it? Boom, here’s a pattern. Boom, here’s a diagram. Done. Next. Or… but we could improve on this pattern with this other pattern. Boom, another diagram. Why? Figure it out.

This book is fine if you’ve been exposed to the patterns previously, and need a refresher, but it is not a good source to learn from. I’m familiar with some of the patterns, but even then, they may be called something different, or implemented slightly different, and it’s been a while, so it takes me longer to understand than if there was more explanation. Looking forward to picking up the other patterns book. If you have not been exposed to design patterns before, or are a relative beginner programmer, and definitely if you are not familiar with UML diagrams, avoid this book. It’s a book on design patterns (not a simple topic) that’s less than 200 pages, so you can’t really expect a thorough resource. I’m about half way through it. On one hand, I’m curious what such a small book has to offer, but on the other, I’m not sure I’ll finish it. I’ll probably concentrate on the XP book, for now.