Posts

Check constraint that is a field has a particular value ensure that another field must be filled in.

Image
DB time! So this post regards "normalisation", or lack of, permitting me to be more lazy, and have simpler databases - what's not to like? I had a DB table "users", and two distinct classes of user:  Adult and Child.  Now the business logic demands that the Adult users have an email address entered, whereas the child user doesn't necessarily need one. The Boyce-Cod or whatever blah blah method would be to have 2 tables, but that means loads of JOINs, the inability to view the entire user list in one place, and more logic everywhere. I'd prefer to have 1 table "Users", but how to enforce the business logic above? So I've discovered a way - using CHECK CONSTRAINTS in MS SQL 2012+ The "redmouse" is a child user, it is optional whether he has a email address or not. ([role]='Adult' AND [emailaddress] IS NOT NULL OR ([role]='Child' AND [emailaddress] IS NOT NULL OR [role]='Child' AND [ema...

Another one live. Cloudlingo

 I've done a " Cummings " here and back-dated this post :) My reasoning is less nefarious however.  I just don't want anyone but Google to read it just now. Background So back in approximately November 2019 I'd never heard of Corona Virus and life was grand with Bed and Breakfasts.co.uk doing OK. I was having weekly meetings with my Andorran mate Toni.  He's a cool guy and works for the local telco.  We'd been getting together for several years once a week for Spanish-English intercambio. I'd taken to bringing some lyrics from a Spanish song that I'd heard and liked, and we'd translate it. My plan was to do a site that involved learning Spanish via the music. I'd originally had the germ of this thought probably more than 10 years prior.  When we first got to Spain and were living in Valls I remember loving some songs that were around then and making a mix CD to play in the car. Marta Sanchez y Carlos Baute - Colgando en tus manos (hanging i...

Land Rover Discovery 3/LR3 upper rear grab handle removal

Image
I'm not very good with DIY.  Has to be said.  So I bought a Upper Cargo Shelf. Very nice it is too ..  So I need to fit it....  How hard can this be?? Comes with a A4 page of written instructions.  Very 70s I must say... Anyway so apparently I need to "pry back the plastic covers".  I'm trying to "pop" the bloody things out from the bodywork.  Lucky a neighbour walks by and clears things up for me. There is a plastic "flap" that covers the screws. So I know there aren't any photos online of that..  I've checked,  so if you in the same boat as me....  Now you know.

Natureo De-alcoholised Wine from Torres

Image
I just finished this bottle off... I'd opened it for a family friend who visited as he was not boozing. It "looks" very good... looks a lot like wine Tastes pleasant.. (however doesn't taste like wine) so worthwhile keeping a bottle or 2 in I think... psychologically useful if you fancy a glass, but shouldn't really. If you are thirsty and have a fair bit in the glass, you can glug it down (it's grape juice more or less) and that is something that doesn't happen with wine.  People looking at you will think you are a maniac...

I've had a idea for Boris.

This is what he should do. He should go to Brussels and demand: 1) End of EU commissioner/president appointments.  These should be directly elected by the Members States populations.. think "US President"-style elections. 2) Move the European Court of Justice or the European Central Bank to somewhere in the UK (not London) 3) End the monthly move of the European Parliament to Strasbourg. 4) Probably a few other things he can come up with... THEN Come back to the UK and offer this new deal (and Remain) or full out (with all the implications like loss of NI and subsequently Scotland) to the people in a new referendum.

Waste rubbish dump in La Massana Andorra

Image
There is a community waste disposal location in La Massana.  Shared with the Ordino comĂș it is situated on the main road between the two towns, opposite the Elf petrol station. It is open between 8 am and 4pm Monday through Saturday.

Calculating the benefit of going for a second hand laptop vs a new one living in a low VAT country.

Image
So it is time for a new laptop!  My amazing Sony VPCCB has done so well over the years - I bought it in 2012 and it's still my daily workhorse. Upgraded it to an SSD and had to service the fan a couple of times it was going good until something happened to the video card and I had to band-aid by loading Ubuntu and running Visual Studio in a VM to access Windows.  Not ideal, but kept me going for a few more months. Now with VS2017 it takes just too long to get everything running. The power supply also died last week.  It is a sign. Now.. I've never really used tablets but I do fancy seeing if having one will encourage me to read the paper again - and these are all e-versions now (except Private Eye - still only available on the street of shame ). So this fancy Microsoft Surface 2 looks nice.  Insanely expensive, but ooh so nice. I'm going to go for the big screen 15" and either the half or full terabtye model.  256gb will be filled up in no time. L...