logo

My Birthday Present to Me

I'm 38 today. As a present to myself I've bought a Concept 2 rowing machine. Well, actually I've hired it, with a view to buying it. They're not cheap and I want to make sure I get on with it first.

It's in my garage, which, as you may know, makes up the other half of the out-house my office is in, so it's literally next door to where I sit all day every day, making it an easily accessible means of exercise.

2013-01-08 11.57.52

Having a birthday so early in January means I can double it up with my new year resolution. This year I want to get in better shape, with a view to being able to take my top off in public without feeling a sense of shame. Although, it's more about my general health, longevity and well-being. Not just vanity. Honest.

Rowing seems the ideal all over aerobic workout and being able to squeeze it in without leaving the "building" or joining a gym is a bonus.

Another reason to turn to rowing is that it has a low impact on the body. Until now my only means of keeping fit has been running. While I enjoy running and don't plan on stopping, I'm aware that it's having an impact on my (ageing!) body. I also find it hard to get out and run as much as I need to in order to counter-act the amount of crisps I eat and wine I drink. I'm a fair-weather runner and only feel inclined to run on blue sky days, which, in England are few and far between. Typically I run about once or twice a week, which isn't enough. Whenever I do step up the running and go more often my body complains. Hence turning to the rower.

The Concept2 arrived earlier this week and so far I'm loving it. In fact I'm finding it hard to stay off it. My best 2k time so far is a rather embarrassing 8m 20s, which gives me plenty to improve on. My goal is to join the "Sub 7" club.

Are any of you guys indoor rowers?

Comment Icon There are 14 comments in 11 threads Read - Add

Laplets are the Way Forward

2012-12-17 12.43.57This week I got myself a new toy — a Lenovo Yoga 13 "laplet" (a laptop and tablet in one). If you've not seen the advert for it yet, then it's the one where the lid folds all the way back to make it in to a tablet.

So far I've been wowed by it and can't put it down. Not only is the device itself amazing, but I've been won over by Windows 8.

Initially I'd dismissed Windows 8 as an elaborate hoax but that's because I was trying to use it on a desktop (inside a VM) without a touch screen. To truly get Windows 8 you have to use it on a touch screen device. Then it makes sense and is actually really quite nice.

The Yoga 13" has the full version of Windows 8 on it, whereas the Yoga 11" is WinRT (app store apps only!).

 

Why a new laptop?

I wasn't in the market for a new laptop as such. My trusty T400 is still going strong after more than 2 years. But the T400 weighs a tonne and carrying it anywhere isn't nice.

It was by chance that I happened to pick up and play with a Yoga 11" in a shop. They're so nice that I just knew then and there that I had to get one.

Initially my argument for the expense was that I needed an IE10 test machine. But then I realised I could also use it as my "house PC" and leave the T400 as an "office machine". The Yoga could also be my on-the-road customer support PC (I bought a nice bag for it too). There are times I go away for long weekends and take the T400 with me, but it unnerves me if ever it's left in the car. Losing my main laptop would be bad.

What I didn't expect is that after a week with the Yoga and Windows 8 I'd want to switch to using it full time. But I don't think I can, realistically. It's a lovely device that I have no regrets buying, but it just won't cut it as my main work machine.

The Not So Good

There are a couple of reasons it can't take over as my only laptop:

  1. No Ethernet port. The wifi signal in my office is ok, but I prefer to be wired in!
  2. Not enough memory. The Yoga 13 ships with 4GB RAM and 128GB SSD of memory. I've upgraded the RAM to 8GB and plan to add a 2nd SSD (there's a second slot for one!) to bring the capacity up to 384GB. But that's still not enough to store all my photos and videos.
  3. No obvious way to connect a (large) 2nd display. It only has an HDMI output, which, AFAIK, only supports low-res output.

Despite these shortcomings I have no regrets buying it and now quite like having two laptops.

If you're looking to treat yourself to something this Christmas I can whole-heartedly recommend the Yoga.

The future is touch screen!

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

Be Careful With Custom HTML Attributes (Dojo)

If you've used Dojo and the Dijit library to add field validation to HTML forms then you may have ended up with something like this:

<input required="false" name="Email" 
	invalidMessage="Enter your email address" 
	dojoType="dijit.form.ValidationTextBox" />

All very well. Things work. Until, that is, browsers start to implement the new HTML5 "required" attribute added to the input element.

I found this out this week while supporting a site I've inherited from another developer who created it many moons ago. Long before even HTML4 was being ratified. The site still works but not in IE10.

In the case of the above field IE10 insists, correctly, that a value be entered. As far as the HTML5-supporting IE10 is concerned, it is a required field. Even if the value of the attribute says false.

This is because the required attribute is a "boolean attribute". Meaning that, if the attribute is there at all, it's considered "on" or "true". Specifying a value of "false" has no effect. To turn if off you have to remove the attribute.

So, the fix is simple. For non-required input elements just miss the required attribute off, like so:

<input name="Email" invalidMessage="Enter your email address"
dojoType="dijit.form.ValidationTextBox" />

This way, both IE10 and Dojo's validation routines are happy to co-exist.

Bear in mind though that, from now on, the correct way to add custom attributes to any HTML element is to do so with the "data-" prefix. So the above field could be:

<input data-required="false" name="Email" 
    data-invalidMessage="Enter your email address" 
    data-dojoType="dijit.form.ValidationTextBox" />

Although, obviously, that won't work with existing versions of Dojo unless you alter the source code. But, if you're adding your own attributes to your own HTML then use "data-". If not, and you insist on making your own attributes without the data- prefix, just make sure you don't use a word that won't, one day, become a bona-fide attribute.

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

Tip: Confirm All Destructive or Irreversible Actions

One of the (many) beauties of Lotus Notes is being able to quickly add an Agent to do almost any task. They get used (and abused!) all over the place.

Most of the databases I see are almost always littered with Agents written to perform one-off data-cleansing tasks, but are left hanging around waiting to do damage.

The other thing I always see is badly-named Agents whose purpose is not entirely clear from the name alone and a review of the code itself is needed in order to work out what it does.

The danger with badly-named Agents is that an unsuspecting user can click on them, merely "to see what it does". Or they may click it accidentally. If the actions performed by the agent are irreversible then this is a bad thing.

What I always try to do when writing these kind of Agents is having the following code right up at the top:

If MessageBox("This will delete ALL documents!!!! Are you sure?", _
        52, "Confirm") = 7 Then
                Exit sub
End If

Which gives us:

image

It doesn't take long and could save so, so much hassle in the long run.

The Java equivalent is:

int option = JOptionPane.showConfirmDialog(null, 
  "This will delete ALL documents!!!! Are you sure?", 
  "Confirm", 
  JOptionPane.YES_NO_OPTION,
  JOptionPane.WARNING_MESSAGE);

if (option == JOptionPane.NO_OPTION ) {
  return;
}

Which looks like this:

image

Always, always warn the user what they're about to do. They might well ignore the dialog message completely, but at least you can say you warned them...

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

Retirement: Buying to Let

In my last post here I mentioned that Rockall had had a bumper year. Rather than squander all this unexpected cash on fancy holidays (that's "awesome vacations" in American) I wanted to do something sensible with it before the good times ended.

What better than buying an "investment property"? This week we had an offer accepted on a Buy-to-Let property and it's now in the hands of the conveyancors to make it ours.

The aim of doing this is long-term. Being self employed and 37, my retirement isn't something I can take lightly. I have a private pension plan that I've paid in to for years (~15) but it's worth depressingly little at this time. I can't rely on it alone.

I remember my pension advisor telling me that, realistically, for a comfortable retirement you need to have a lump sum of about GBP 500,000 by the time you retire. I was in my early twenties at the time and this seemed an astronomical figure. It's only now that I'm (slightly) more mature that I realise it's not as crazy as it first sounded and it's now my aim, somehow, to have that much "cash" by the time I'm in my early sixties. There seems no better way to achieve this than buying houses.

My retirement will happen (all being well) in about 25 years, which happens to be how long a mortgage lasts. So, any houses I buy now will be paid for by the time I retire. Paid for by my tenants! I then get the choice whether to sell them in 25 years or keep them and live off the rental income.

It seems a no-brainer to me. Effectively, somebody else is paying in to my pension pot for me. What could go wrong? (that's semi-rhetorical).

I'm interested to see if any of you guys are landlords with similar plans? I bought a couple of "Landlord's handbook" books but never got round to reading them, deciding instead to take the plunge and learn as I go (same approach I take to programming).

Any advice gratefully received. Easy on the tenant horror stories though please!

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

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