Archive for November, 2007

Economics in a nutshell #1 – How interest rates really work

Thursday, November 8th, 2007

Economics is funLearn how to talk the talk on interest rates in just a few easy steps.

In Australia, interest rates have just been increased for the 6th time since the last election, this time during an election campaign. It seems that many people, including politicians, really have no idea what interest rates are all about. This nutshell guide simplifies the basic economic concepts.

What are interest rates?

An interest rate is a price for money. If you want to borrow some money, you pay a price for that privilege, and that’s called interest. If you deposit some money, the bank will pay you for the privilege of having your money, in the form of interest.

How are interest rates set?

In Australia, the Reserve Bank sets a base rate in the money market, which is a market where banks and other financial institutions borrow and lend money. This base rate determines what the banks and other institutions will need to charge their customers so that they can still make a profit. Hence the money market rate flows through to all the other interest rates, such as those for home loans and term deposits.

Why do interest rates change?

The reserve bank has a charter to keep inflation in the range of 2-3%. It uses interest rates to achieve this.

What is inflation?

Inflation is a measure of how quickly prices are rising.

Why should inflation be kept between 2-3%?

The theory goes that if inflation is too low, the economy can stagnate and result in high unemployment. If it is too high, investors lose confidence in the currency. A currency that is unstable means that people become reluctant to do trade, which damages the economy.

How do interest rates influence inflation?

As interest rates rise, it becomes more attractive to deposit your money rather than spend it. Also, borrowing money becomes less attractive. This pulls money out of the economy because more people start saving their money, and less money is borrowed for spending.

This means there is a reduced demand for goods and services, and less buyers, which makes it more difficult for sellers to put prices up.

Interest rates are a “blunt instrument”, so called because they affect everyone. If a specific sector is causing all the inflation, for instance house prices, it is impossible for the reserve bank to target only the housing sector. It has to hurt everyone.

Interest rates can only do so much. If people are awash with money thanks to tax cuts and pensioner bonuses, they are going to go spend it, a sure thing to push up inflation and inevitably interest rates.

This is where the government comes in.

Is the government to blame for rising interest rates?

Absolutely. There are many ways to keep inflation under control, interest rates being the most painful.

This government’s main strategy for inflation control has been wage growth control, via WorkChoices. Clearly, this hasn’t done the trick. This is because capacity constraints are the main thing pushing inflation in Australia.

For years, economists have been warning that we’ve not been spending enough on infrastructure and education, the stuff we need to increase the country’s capacity and keep up with demand. But the government insists on fuelling the fire by handing out tax cuts and other cash bonuses that we are sure to spend.

Really this government should be made to pay for ignoring what all the experts have been saying and continuing down the “media spin” path of making everything appear rosy. They’ve been presented with unbelievably benign conditions and the fact that Australia is not particularly well placed is a travesty.

Just keeping the budget in surplus doesn’t cut it. A deficit would be better if it was being spent on stuff that improves Australia’s productivity. In fact this whole focus on keeping a surplus is ridiculous. Try living your own life that way. Save up for that house. Or running a business that way. It will almost never work, and is rarely the optimal path.

Well. That’s it. Interest rates. I’ll bet you’re wanting to know even more about interest rates, possibly dedicating your life to learning everything there is to know.

Or you might be wondering if The Simpsons are on yet.

Hack It #2 – Convert any Windows application to a service

Monday, November 5th, 2007

I recently had to convert a C++ application to run as a service, so that it could always run in the background. This application was supposed to already be capable of doing this, but instead would crash instantly.

Rather than going into the code and figuring out why that would be, I decided that someone would have written a wrapper to convert any application into a service. It turns out there is such a wrapper, and it’s called srvany.exe.

Here is how to convert any Windows application to run as a service.

By the way, if your application is Java based, there is a specific Java Service Wrapper so you probably should go there instead of reading these instructions. This is for generic executable or batch files.

Download and install the NT Resource Kit

The files you are going to need from this:

  • srvany.exe
  • instsrv.exe

Install the srvany service

  • Run the command: instsrv service_name [path]\srvany.exe, where service_name is the name of your service

Configure the new service

  • Run regedit
  • Browse to HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ service_name
  • Add key “Parameters”
  • Right click on “Parameters”
  • New string value, “Application”, with the value as the executable you want to run, including any parameters.
  • If your application is not an executable, bat a batch file, set the value to “C:\Windows\system32\cmd.exe /k full_path_to_batch_file.bat”
  • Of course the batch file or executable can’t exit, as this will end the service.

And some more configuration

  • Control Panel, Administration, Services, find your service.
  • The default is “Automatic”, which means as long as nothing goes wrong, your service will always be running. You might want to change this.
  • You might want to set the service to run as something other than “Local Service”, e.g. have it run under your name.

Test It

  • Start the service
  • Your application should appear in task manager


Now you can have something run all the time, behind the scenes, as a service. Hurrah!