Cutting Down on Impulse Spending and Creating Outlook Appointments with JScript.NET

Originally published: 12/2006 by J Wynia

Every year around Christmas, Shelly and I observe a financial moratorium until the gift-giving is over. This is due in large part to the fact that we don't spend all that much on gifts for each other. We're usually giving a few books/DVD's, etc. and one fairly nice item per year. Because those smaller items are the kind of thing we tend to just buy throughout the year, we stop around the holidays. That prevents us from buying something as a gift only to watch the other buy it for themselves while it's sitting wrapped under the tree (who am I kidding? I wrapper gifts 2 hours before we opened them).

At any rate, we're in the middle of one of those because *my* side of the family won't be celebrating Christmas until February. We usually celebrate on New Year's Day (makes the scheduling with lots of families work better), but my sister is in Jamaica working at an orphanage through January.

Anyway, now that the exposition has gone on for days, I'm getting to my point. With my non-necessary spending on hold, except for buying of gifts for others, I've really noticed a jump in my personal account balances. My personal accounts are really only for my personal debt (college loans and anything Shelly wouldn't be willing to help pay for), food and stuff I want to buy. The first 2 items are relatively stable and the rest usually gets spent pretty much as I feel like it.

But, like I said, when there was a restriction placed on that spending, I was really surprised how fast the remaining cash piled up. Clearly, my impulse spending on stuff I could argue as non-necessary could use some reining in.

So, here's the lifehack I've come up with, complete with software assistance.

I see my problem as being able to buy stuff I don't need without any natural restriction. I make pretty decent money and if I feel like buying a $100 gadget, I just do it. When I was in college and early in my professional life, there was a natural restriction on that behavior: an empty bank account. When you stare at the ATM saying your balance is $18.00 and you can't get out a $20, you aren't just going to buy whatever you feel like.

This is similar to having a natural boundary on your eating because you work a physically active job. The hard work regulates most of your bad eating habits. However, remove the natural boundary and you will either have to replace the boundary with something else (like discipline) or you'll end up in weight trouble.

So, I need to institute boundaries for this kind of spending. The necessity spending isn't the problem, so the first step is to separate out those purchases. Any "bills" are out as are my lunches, etc. True, it's a very "American" view of "necessary", but I'm just after continuing the pragmatic change I've already seen this month and that definition will do for those purposes. Basically, anything that I'd be willing to defend to other people as actually needing it will be exempt from this process. Everything else now has a gatekeeper.

What I'm going to do is a combination of discipline and economic disincentives. When I'm hovering over the "Buy It Now" button for something on impulse, I need to delay the purchase. To enforce that, I'm instituting a 30% "impulse tax" on myself. If I buy, say a book that costs $10, without delaying the purchase, I have to also put $3 into my savings account. If I delay the purchase one week, the tax drops to 15% and down to 5% the following week.

This adds some pain to making an immediate purchase while actually benefiting my long-term purchase goals. I'm basing it on a downward-sliding scale because I'm theorizing that by 3 weeks out from the impulse, lots of the stuff I wanted isn't going to be nearly as desirable and I'm just going to skip the purchase.

To actually handle the delay, I wrote a little utility in JScript.NET. I'm going to add it to my Autohotkey startup and link it to the Win+P key combination. When it's run, it asks what I'm thinking about purchasing, how much it costs and where I intend to buy it. Then, it adds an appointment to my Outlook calendar (tested on Outlook 2007 Beta, but should work on older versions too) one week from "today" at 8:00AM with a reminder on it.

When the reminder goes off, I can either:

  • Buy the item and pay the impulse tax
  • Delete the reminder and move on because the item wasn't actually worth buying.
  • Move it out another week and make a note of it.

This also gave me an opportunity to mess with JScript.NET, which I'm really starting to enjoy. It's a nice blend of pragmatic compromises which makes it nice for these little hacks/tools. It compiles to regular .NET exe, but doesn't require all of the overhead of being forced to create a "main" class and method for a single-task console app like this. In short, you can write it like Javascript, but get the power of .NET.

At any rate, you can see the code in this PDF. It's a syntax-highlighted export from Scite. If you want the code itself or the compiled exe, you can download the zip file. To compile it, you need the .NET SDK, which includes the Javascript compiler. Once that's in place, you just run:

jsc delayedpurchase.js

and it will spit out the .exe.

The PDF and the source code are *heavily* commented and should explain the details you need to use this as an example for any Outlook appointment creation you may want to do.

Also, because of the dependency on Outlook, it should go without saying that, despite there being a JScript compiler for Mono on Linux, this won't work there. But, if I don't say it, someone will ask, so there it is.


Ana Monzon on 5/29/2007
Hi, I have a questions for you: Where can I find reference documentation for the activeXObject("outlook.Application"). The thing is, I need to delete an existing appointment before I add the new one. I have found many examples like yours but none that show retrieving existing appointments. thanks
blog comments powered by Disqus
Or, browse the archives.
© 2003- 2014 J Wynia. Very Few Rights Reserved. This article is licensed under the terms of the Creative Commons Attribution License. Quoted content or content included from others is not subject to that license and defaults to normal copyright.