Smoking calculator to show cost of smoking to your health and wealth

A friend of mine recently asked me for my help on adding a spreadsheet to his webpage. I thought it might be a matter of extracting some formatted data into a HTML table but it turned out to be something far more interesting and worthwhile.

He had done research into the costs of smoking and created formula to show the costs of smoking without asking too many questions.

Here’s a preview of the smoking calculator app that allow you to set sliders to show how much smoking can damage both health and bank balance. The figures are compelling.

And the reason to develop this? Well he’s a hypnotherapist and helps people overcome difficulties they are facing purely by getting them to understand their issues and getting them to realise ways they can resolve while the mind is in a receptive meditative state.

It is not brainwashing. As the patient is helping themselves they will only act on actions that make sense. Any suggestion too drastic is unlikely to take effect.

One particular area he is finding effective is in helping people who want to quit smoking. Many people find it difficult to stop so hypnotherapy is an effective way to help people quit. However my friend wanted to present people wanting to quit with some hard facts to help them motivate themselves. From this research he developed a simple spreadsheet that accepted basic facts about the patient and presented them with the cost of smoking in the form of both financial cost and cost to health. This was handy to present to clients in sessions to encourage the urge to quit but he wanted in available online so his clients could use the app at any time.

I first put together a bit of basic JavaScript to process form input as you type to produce the figures. It worked quite nicely but lacked that kind of polish we are used to these days on the web.

He originally asked about the possibility of using sliders that are found on price comparison sites. Now the maths side was sorted I thought I should swap them in. I looked at Html5 native sliders but decided browser comparably would be too much of a headache. Plus I always aim for everything I do these days to look good on mobile so I decided to look for a library option. A few google searches later I found myself looking at jQuery mobile demos which ticked all the boxes.
The sliders worked and look good both on desktop and mobile. The formula was plugged in to respond immediately on any change.

It’s a nice little mini app but I doubt it will help on it’s own. If you want support quitting smoking in the Sheffield area with hypnotherapy give Dave a call. He’s done much research and as you will see on his site is something he is very passionate about.

Visualize or visualise?

visualizeI tried to do the right thing on some recent posts about Audiospex, which represents an audio signal on an iPhone/iPad screen.

The word I used was “visualise”, which according to a quick search was the correct (UK) english spelling. I’m not American, so wanted to keep real to my roots.

This assumption is, as it turns out, a bit wrong.

As mentioned on wikipedia the ‘ise’ suffix is French in origin. Here it states that the Oxford English Dictionary recommends ‘ize’.

The actual fact is the word visualise and visualize are both correct, but visualise is not widely recognised in the US.

Definitions in wiki’s and blogs is one thing, hard facts is another.

So what does google think? Here’s a google trends chart of the 2 words:

Fairly conclusive!

From this I’ve just updated my text descriptions for the app to use visualize. It’s fine. It’s popular, correct and valid worldwide!