Software Development: When Change is Bad

April 10th, 2009 2 Comments »
Filed in: Development

As software moves into maturity, it becomes a delicate art to add features and fix bugs without screwing up stuff that already works.

I’ve worked on three 10+ year-old, massively-sized projects (CorelDRAW, Microsoft Access, and ERDAS Imagine) and let me tell you — the older the code base, the tougher it gets.

In very mature projects, maintainability starts to become more important than optimization, and the prevention of introducing new bugs can trump fixing old ones.  You’ll even see libraries where they decide to keep old bugs in place, since consumers up the chain rely on the buggy behavior.

If you’re a programmer, it’s important that before you change any function that is used elsewhere in the system (a “core” function), you check each and every place it is called and understand the implications of your change.  If there’s any doubt, you need to either step through, or ask someone else who is more familiar with that code.

A safer alternative is to write a new function that caters to your specific needs.  This may seem wasteful at first, but it actually pays off in the long run.  This is because it usually makes for less complicated logic in the function, and simpler dependency chains.

Adding additional parameters and conditional branches in an existing function can introduce subtle changes that cascade to other parts, causing subtle bugs that are difficult to track down, and even harder to fix.

That said, there is a time and place for refactoring, but it needs to be done carefully.  It should be done independent of other changes, and be extremely well tested.

Automated testing and regression tests help fight this war, but coverage is never 100%.

I’ve found it’s often better to err on the cautious side and try not to break things in the first place :)

The real USA healthcare experience

March 28th, 2009 1 Comment »
Filed in: Health, Economics, Politics

I’m tired of hearing Canadians complain about our healthcare system.  You know what?  We do have to wait longer for some types of treatment — but not usually anything life-threatening.  And you know what else?  That’s life.  Resources are expensive, limited, and in Canada, they’re allocated based on urgency of need.

I had to go to a clinic here in the States for a minor issue that I’ve visited several Canadian clinics for in the past.  The experience was nearly identical!  They had the same advice, and the same treatment.  The setup was similar.  I swear even the posters on the wall were the same.

However, there are a few major differences.  See if you can spot them.

The Canadian Experience:

  1. Realize you have a problem
  2. Go to walk-in clinic
  3. Present your health card
  4. Wait (1-2 hours)
  5. Get treated
  6. Go home

 The American Experience:

  1. Realize you have a problem
  2. Call insurance company
  3. Explain problem
  4. Get pre-approved and record claim number
  5. Go to walk-in clinic
  6. Attempt to have them bill the insurance company directly
  7. Often have them refuse to bill insurance company directly
  8. Wait (15-30 minutes)
  9. Get treated
  10. Go to cashier
  11. Pay bill out of pocket (cash, visa, mastercard)
  12. Get full detailed receipt for insurance
  13. Go home
  14. Fill out claim form
  15. Fax or mail claim form and detailed receipt to insurance company
  16. Wait for payment in the mail (1-4 weeks)
  17. Optionally argue with insurance company about non-payment or co-pay amounts
  18. Deposit reimbursment cheque (assuming they pay)

Can you see the difference?

I only had about 1/4 the wait time in the US clinic.  The visit (which only lasted about 15 minutes) cost about $100, which I put on my credit card.

Meanwhile, I had to spend at least the amount of time saved in the clinic fussing around with stupid insurance paperwork.

But here’s the big difference.  While I “jumped the queue” and enjoyed quick treatment for my minor, non-life-threatening problem, millions of middle-class Americans suffered through their illnesses, got sicker, and some of them probably even died.  Why?  Because they had little or no insurance and simply couldn’t afford it.

How to get people to respond to email

March 14th, 2009 Comments Off
Filed in: Project Management, Business, Internet

People are getting busier and busier, and it is becoming somewhat of an art to actually get people to read and respond to emails.

Here are some quick tips to make the experience better for both the sender and receiver:

  1. Make emails as short and concise as possible.
  2. Important: Write a concise, relevant subject line!
  3. Separate your short sentences into paragraphs with a space between them.
  4. If you are making multiple points, or asking multiple questions, put them in a numbered list.  Better yet — write separate emails with different subject lines.
  5. Make sure it will fit on one screen of a typical email program. (a lot of people don’t like scrolling)
  6. Use bold and highlighting to draw attention to the really important parts.
  7. Edit your emails multiple times, and cut out unnecessary words and sentences.
  8. If your email requires a response, try summing up by asking one simple question at the very end of the email.

People are great at writing long, rambling emails, but seldom seem willing to read, understand, take action on, and reply to messages they receive.

If everyone started following a few of the above tips, we all might just understand each other a bit better :)

Healthcare: Canada vs. USA

February 28th, 2009 Comments Off
Filed in: Health, Economics, Politics

What are the facts?

Total health care spending per person / year:
USA: $6,717 USD (46% government = $3,089)
Canada: $3,678 USD (70% government = $2,574)

Fact: Americans pay almost twice as much per capita for health care even though 1/6 of their population lacks coverage.

Fact: The US government already subsidizes health care, and already spends more per person than Canada.

Fact: Of the 27 richest nations on the planet, the US is the only country without universal health coverage.

Fact: 16% of the US population (45 million people and growing) have no health insurance at all and are basically screwed if they incur a critical injury or sickness they can’t sue for.

What’s up for debate?

The overall quality of health care in the two countries has been widely debated, but the overall consensus — of all scientific studies based on measurable data and facts — is that the quality is roughly comparable.

I’ve written an article over at Google Knol exploring some of the debatable points.  Have a look at:
   http://knol.google.com/k/jason-hanley/healthcare-canada-vs-usa

Change or Die: Newspapers and Media

February 9th, 2009 2 Comments »
Filed in: Business, Internet, Economics

I’ve recently been looking for an apartment to rent this summer, and have been amazed to find how useless the local newspapers have become!

In the days of old, classified ads were the only place you’d ever look if you were renting an apartment. This also used to be a major revenue source for papers.

I remember back when the Internet was all shiny and new. Smart people said that newspapers would either have to embrace it or be made obsolete.

Well, it took over a decade, but it looks like the matter has been decided.

Some papers have been able to transition to the online world, but a lot haven’t. Their classifieds business has been taken over by sites like Craigslist and Kijiji. There are probably blogs out there getting better advertising revenue than the average local newspaper. (I have no stats to back that up, but I’d still bet on it)

Newspapers will probably be around for as long as the Baby Boomers are, but I can’t see Gen-X and younger having much need for them.

This is only the first of the major media industries to be wiped out. Music and movie distribution companies know that they’re next. They’ve seen the writing on the wall for a long time, and have continued to refuse to change their business model.

Big media company execs are doing their best to use lobbying, law-making and litigation to squeeze out the last bit of money. That way they’ll be able to retire on big pensions and go play golf as their companies self-destruct.

Like the websites that have displaced local newspapers, smart competitors that know how to leverage technology will eventually prevail.

It just might take a while.