Error Correction in Lotus Notes Maths

As a follow-up to a post I wrote recently about JavaScript maths errors here's another. This time it's about the same issue in Lotus Notes @Formula-based maths.

See Exhibit A below:


As mentioned previously it's nothing to do with the language used. It's all down to the hardware.

Always remember to @Round the result of any mathematics, like so:


Comment Icon There are 9 comments in 4 threads Read - Add

Redundant Internet Connection

Yesterday morning I woke to find I had no internet connection! I'll spare you the details of what happened next, but, in short it took 28 hours for it to come back; 24 waiting for an engineer to visit and then 4 for him to fix it. Those 28 hours gave me time to think about how I could prevent it happening again.

I don't want to come across like I'm caught up in my own self-importance, but it's important I have a reliable and "constant" connection. Outages of >24 hours just aren't acceptable -- either for me or my customers, who pay me to support their systems. Without a connection to the internet I'd struggle to offer support. Not to mention I'd be unable to work and earn money (to a degree).

As a temporary measure I got by using 3G. Both on my phone and with the data SIM in my newly-acquired Tablet. This was good enough for emailing and general browsing but not for use in my day-to-day work.


On Twitter I did my usual moaning and in reply @mattwhite mentioned he'd got both a BT ADSL line as well as Virgin's cable broadband service, because he too just has to have a connection.

The cost of having a redundant broadband connection is insignificant when compared to the cost of having no connection at all. Not just in terms of lost earnings but also the cost of a damaged reputation ("That Rockall Design company can't even stay connected to the internet!").

While I was waiting for the BT engineer to "fix the fibre" I went ahead and ordered a new connection to Virgin Media's cable-based internet service.

Over the last few months I've been block-paving all around the house. We've had 3 or 4 lorries back down the road and offload tonnes of hardcore using a crane which came within inches of the overhead copper BT phoneline, while I stood looking on nervously.

As Virgin's cable is buried underground, right up to the house, it can't be brought down by acts of God/stupidity like the BT line could.

It always scares me to think how fragile my connection to the net is. The other week I walked past our nearest "exchange" box (those green boxes you see around on street corners) and the door to it was flapping open exposing all the cables within. All it would take is a mindless act of vandalism to take the whole neighbourhood down.

My router allows for two WAN connections and offers automatic failover (I think). In theory it will failover to this new backup connection without me needing to do anything.


Is there still a single point of failure? Is there anything that could bring both connections down at once? As I understand it each line will leave the house and go to separate boxes (owned and managed in turn by the two separate companies).

Comment Icon There are 20 comments in 9 threads Read - Add

Error Correction in JavaScript Maths

Here are two reasons why you need to be careful when doing browser-based mathematical comparison operations in JavaScript:


You can try it for yourself. Open Chrome, press F12 (opens Developer Tools) and navigate to the Console tab. Type in the above equations and see the results for yourself.

It looks broken. But apparently, it's working as expected.

If you happen to be doing some JavaScript validation and working with numbers, this small discrepancy can be a real PITA.

Image you have a bit of code like this:

if ( (x + y) > 0.3 ){
  alert("You've exceeded the limit of 0.3");

Now, imagine x and y come from user input and they inputted 0.2 and 0.1. They'll be wondering a big WTF.

Instead you need to introduce the concept of Epsilon. Like so:

if ( (x + y) - 0.3 > Epsilon ){
  alert("You've reached the limit");

Where Epsilon is a very, very small number. How small? Typically something like 0.00000000001.

You've been warned.

Comment Icon There are 7 comments in 6 threads Read - Add

Lotus Notes Support On The Road

Quite a lot of what I do in my day-to-day work is support. Not only my own work but that of others. Most - if not all - of this support work is Notes-based and some of it requires quick turnaround. So much so that I find myself needing to do support work while on the move.

Although my Yoga 13 is quite small and fairly portable it can be a pain to take it everywhere and I'd been looking for something even more portable for a while.

Last week I bought a Lenovo ThinkPad Tablet 2 (I'm very brand-loyal to Lenovo at the moment) which is smaller, lighter and less expensive to lose.

Hey, who am I kidding, really I'm just making up excuses to buy things. I get an itch to buy some new piece of kit once or twice a year and it's been a while since I got my un-boxing fix!

I've been playing with the Tablet 2 a little now and I'm quite impressed. Not blown away, mind. Just impressed. The Yoga is still my preferred support tool when I'm going away for any length of time, but I can see the Tablet 2 getting used too when I'm just out and about and when I anticipate there being no WiFi (I went for the 3G version and have a pre-paid SIM in it so I can support from almost anywhere).

The stand-out feature of the Tablet 2 is that it's no bigger than an iPad (in fact it's smaller) but still it runs full Windows. I can run full-blown Lotus Notes and Domino Designer on it, as you can see below. Also below you can see it's running ScanEz which is an absolute must for my support duties.


And here it is running Notes in "tablet mode" -- without the (optional) Bluetooth keyboard:


And here they both are stowed away in their sleeve (with a mouse on top to give you an idea just how small this portable Notes solution is).


The tablet only has 2GB RAM but is ok for occasional use and runs Domino Designer no problems. Battery life is pretty good and almost "all day". It charges from a micro-USB charger, so can share my phone's charger, which is nice.

What I've not shown above is the digitizer pen which is quite nifty. Also nice that the pen stows away in the tablet (see the red dot in the photo above).

The only annoyance so far is that you need to turn the keyboard off (hold power button for 3 seconds) before placing it in the pouch. If you don't then the optical track-point mouse keeps the tablet awake as the sleeve is constantly in contact with it and wakes Windows.

All in all though it's a nice little product and I've no regrets buying. Recommended.

Only trouble now is that I'm running of things I "need" to buy ready for my next fix.

Comment Icon There are 10 comments in 3 threads Read - Add

Why The Silence?

Wow. More than 2 months since I last blogged. Which is the longest period of silence this site has ever seen. What gives? Is codestore dead? Does anyone care? Well a couple of you do. Enough to email me and ask if I'm ok. One even to say it's like he's "missing a friend", which was nice. One asked if I was still alive and I had to resist temptation of replying in the guise of my widow.

The simple reason is I'm just way too busy to find the time to write on here. I'm working weekends and setting the alarm for 6am each day.

The bigger reason is probably a waning interest. It saddens me to admit it but, after nearly 11 years (or is it 12?) the driving passion I once had is now in question. Kind of. I still have the passion for technology and for sharing. I just don't know where I am right now. I'm in that strange place between knowing which technology my future lies in. Is it Domino? I doubt it, long term. Is it SharePoint? Perhaps. More likely, for at least the foreseeable future it will be Microsoft Dynamics CRM.

Dynamics is quite a nice product and feels like a much more natural technology to migrate to than SharePoint ever has done to me. In fact, as a Domino developer, it feels like quite a familiar way of developing.

I have a few more Domino-based things I will definitely make a point of sharing, but I also plan to talk more about what I'm learning in other technologies. I can't see myself ever not running a blog. It's just going to have to wait until things quieten down for me.

Don't give up on codestore completely. Not just yet anyway.

Comment Icon There are 22 comments in 22 threads Read - Add

‹ Previous | « Firsticon Page 3 of 344Last » | Next ›