Losing Weight with Fitbit & HealthVault

In early March, I visited the doctor after days of headaches. While nothing was found, he was unhappy with my blood pressure and weight. Should nothing change soon, blood pressure medication would be in my future.

This is how I discovered that my weighing scale was broken and I was 13kg heavier than I had previously believed. It was time to purchase a replacement scale and some kind of exercise tracking device.

So after several days of comparing fitness monitoring products from companies like Garmin, Jawbone, & Withings, I settled on a Fitbit Flex wristband & Fitbit Aria wifi-aware weighing scales which were both compatible with my Microsoft ecosystem (Lumia phone & Surface) and my wife’s iOS equivalents. If one has a modern smartphone with MobileTrack compatibility (such as the Lumia 640 or iPhone 5S) then the Fitbit software does not require a Fitbit device. However, the metrics are better when combined with one.

Losing weight is simple logic – eat less & exercise more. The Fitbit Flex automatically tracks my walking, hiking, or running exercise (& climbing in other models if, unlike me, you live or work in multi-storey buildings or in the mountains). On the other side of the equation, it also provides the facility to log your food intake. Finally, the Aria automatically updates my weight & body fat each time I step on it (and it does recognise different family members).

The Fitbit app allows you to set a goal & select how aggressively you wish to pursue it,  providing four plans  with their daily calorie impact – Easy – 250 , Medium – 500 , Hard – 750 , or Harder – 1,000. You can also create a custom setting. In my case, my doctor’s goal was to lose 18kg in just under 3 months & I needed to pursue the Hardest plan to meet this.

Over the last couple of months, my regime has settled toward eating 2,000 calories and burning 3,500 each day. The burn is achieved by walking more than 11km daily through a combination of 3km walks and Fitbit recommended hourly “250 step” breaks from desk-work. This gave me a 1,500 calorie deficit and an average 0.2kg daily weight loss. And it still allowed me to sneak some chocolate into the program. I learned that doing nothing, I consumed 1.5 calories per minute but walking increased this to 10 calories or more per minute.

So how did it work out over the last 4 months? I have dropped 22.4kg (49 lbs or 3.5 stone) so far. Blood pressure is down from 140/100 to a more reasonable 119/85 yesterday — dropping from regular Stage 1 Hypertension to alternating Normal & High-Normal.

As one gets lighter, it does get harder; all the quick wins come early. I lost 4kg (9lbs) in the first week alone but I was unable to lose 4kg in the 4th month. As one loses weight, one burns less calories just being alive.  In the beginning, I would walk around 8km (5 miles) per day but now I need to walk at least 11km to achieve the same burn rate. This takes 2 hours per day so I may have to switch to more intense activities such as running, cycling, or a return to Aikido to burn more calories in less time. Alternatively, I can simply choose to eat less.

I do feel fitter and my pace is much faster; before, my wife had to slow down on hill climbs to let me catch up whereas now she has to concentrate on keeping up. Father’s day was spent replacing 42″ (107cm) jeans with 38″ (96.5cm) and many belts have been retired. The headaches are gone.

My dog needed and benefited from this regime too; she lost 2kg in the same period despite having the appetite of a small horse. Be warned, the dog slows you down. We learned to retrace a route as she was less distracted on the second lap.

Fitbit does not track Blood Pressure but the Fitbit app does interact with many third party products. I used Microsoft HealthVault for tracking medication and other measurements such as Blood Pressure. Fitbit can be configured to push activity, diet, and weight measurements across to HealthVault.

Finally, I am no cook and diet does play an important role and I definitely benefited from marriage to an expert diet chef who found subtle ways of replacing many foods with more healthy equivalents. Some important changes for me were no added sugar or salt, more fruit, & much more fibre. But, sometimes, the most important decision of the day was choosing to spend the last 70 calories on a Whiskey shot or a digestive biscuit!

So this next section is the view from the the perspective of Alison, my personal Diet Chef ….

So Niall loves food period. He is a wonderful husband for a chef to have. He doesn’t mind if he gets beans on toast or I’m trying out some weird recipes with loads of herbs and spices and he never complains that I don’t like peppers and things he loves.

Niall had a mission. I don’t believe in ‘low fat’ this and am really anti sugar free artificial sweeteners. I believe in real food. The kind that grows and isn’t artificially created. It does not have to be organic it’s great but not necessary, and it can be frozen and it can be fast. Life is fast paced and usually food has to be too. In short what I did was use lean meats, lots of veg in the forms of veg with dinner and soups and in salads. White bread was not totally excluded but more often replaced with whole meal Irish soda bread. Breakfast was muesli or other wholegrain cereal and Niall ate a lot of fruits. Orange juice was often squeezed fresh at home.

Herbs are the most underrated things to liven up boring foods- fresh herbs that is. Processed foods went out the window. There simply were no pizza nights. We discovered the if we broke out and went for a mixed grill of sausages and rashers, we paid for it – we had to walk off calories for days, they just seem to stick around unwanted. Fish is fantastic – it is really low in calories but expensive to buy. Eating out usually had consequences because you can’t control what goes into your food quite as well as making it yourself.

No one ever went hungry. No one felt they were denied anything, but by knowing how many calories you had eaten and how many you had burned during the day you could decide what and how much extra you could have and knowing the data helped control if you would have a glass of wine or some ice cream or both.

Note 1kg = 2.2 lbs , 1st = 14 lbs , 10km = 6.25 miles
1 lb = 3500 calories , 1 kg = 7716 calories
Phones with MobileTrack compatibility – https://www.fitbit.com/eu/devices

Experiences with Microsoft Surface Pro 4

A few months back, GSM Connections had incredible offers on the Surface Pro 4 (& still do – the m3 @ €799 & i5 @ €899) with a black or blue Type keyboard included free – https://www.gsmconnection.eu/collections/smart-phones/products/microsoft-surface-pro-4-128gb-intel-core-i5 . I was looking for offers on this latest Surface Pro model for both my eldest son and myself.

The first difficulty was choosing between the fan-less m3 and the more powerful i5. Eventually, both of us chose the m3 over the i5 to have something more like an iPad rather than a PC. Both of us have other workhorse machines for heavy-duty work and we wanted something could be taken everywhere and use anytime.

However, there were a number of important lessons along the way.

Patching

Before doing anything else, CHANGE THE DATE to today.

The Surface is almost useless until you do this. Microsoft has released lots of important patches for the Surface but Windows Update does not work while the date is set to the default. It manifested itself in many ways – the normal welcome setup process did not work & I was unable to download my Microsoft profile.

The date issue was not obvious, so I did jump through many hoops. One of the laptops appeared dead for hours on end and I thought that I would have to return it but a forced reboot and that date change and all was well.

More help can be found here

Battery Life

Battery life was found to be lower on the m3 compared to the other models. This was surprising on the “mobility” chipset. The consensus appeared to be that the SkyLake chipset has settings for low power and for overdrive but some internal logic caused the Surface to use overdrive too often reducing battery life too frequently.

There were some articles around this here that I found incredibly useful and help counter the problem

For a finish, it is great to have a laptop that still has an hour left when the battery life dips below 10%

Wake-up

With the keyboard attached, closing the keyboard over the screen can be configured to sleep, hibernate, or shutdown. However, with sleep or hibernate, sometimes, nothing happens when you “open” the keyboard. If it happens, try the following in order until it works.

  • just close and open again – a few times if necessary; this is the most likely solution.
  • press the power button
  • hold the power button for 20-30 seconds
  • hold the power and volume-up button for 20-30 seconds

Bluetooth & WiFi

WiFi performance is far, far better when the Bluetooth is disabled. However, the very cool Surface pen uses Bluetooth so it is a trade-off. Disable Bluetooth if you need to do some serious downloading.

The Surface Pen

… is totally awesome. My son was studying old mathematics exam papers in PDF format. Double-clicking the top of the pen would copy the PDF into OneNote where you could annotate the document, scribbling on equations and graphs.

Handwriting recognition is very nice and, sometimes, I would use the pen over the keyboard because writing just feels so right! The auto-correct works beautifully but words that are run together in web links like “TheJournal” or “NewYorkTimes” are difficult to write correctly; the software does not appear to recognise or allow missing spaces.

Others

The face/eye recognition has improved a lot over the past few months. For a while, I had to remove my glasses to be recognised which was inconvenient since I am almost blind without them. In enhanced security, it does check that I am not 2D, requesting me to shake my head slowly.

The power brick connection is much easier to use than the original Surface. The brick also comes with a USB port for charging another device. It does get very hot and the cable from wall-plug to brick is very short which is impractical for the dog living behind my sofa.

The new type keyboard is an improvement over previous models and is easy to use. It feels far more rigid than earlier versions while still remaining light.

The multi-position kick stand is far better than older versions that had only 1 or 2 positions. I was surprised how easy it was to use both the surface comfortably on my lap while typing on the keyboard.

Summary

Overall, I really do enjoy using the Surface and have stopped “borrowing” my better half’s iPad for quick surfing. My son uses his Surface for everything except serious gaming and brings it everywhere.

It would have been nice to have Office included. It was included in some previous iterations and the Surface is not cheap.

But I have no regrets on this purchase.

Waiting for MSSQL Database Restores to complete?

In my current role, we can have a lot of restores in progress during a maintenance window. This handy script allows us to calculate how long the restores will take and when our coffee break will end!

— Check Restores in Progress
SELECT
         r.session_id
        ,r.command
        ,CONVERT(NUMERIC(38,2),r.percent_complete) AS [Percent Complete]
        ,CONVERT(VARCHAR(20),DATEADD(ms,r.estimated_completion_time,GetDate()),20) AS [ETA Completion Time]
        ,CONVERT(NUMERIC(38,2),r.total_elapsed_time/1000.0/60.0) AS [Elapsed Min]
        ,CONVERT(NUMERIC(38,2),r.estimated_completion_time/1000.0/60.0) AS [ETA Min]
        ,CONVERT(NUMERIC(38,2),r.estimated_completion_time/1000.0/60.0/60.0) AS [ETA Hours]
        ,CONVERT(VARCHAR(1000),(SELECT SUBSTRING(text,r.statement_start_offset/2,
                                                                CASE WHEN r.statement_end_offset = -1 THEN 1000
                                                                ELSE (r.statement_end_offset-r.statement_start_offset)/2 END)
                                                        FROM
                                                                sys.dm_exec_sql_text(sql_handle)))
FROM
        sys.dm_exec_requests r
WHERE
        command LIKE ‘%restore%’;
GO

Did you miss SQLSaturday #501 in Dublin?

As a previous organiser of SQL Saturday events in Dublin, I was bitterly disappointed to miss being an ordinary attendee at this year’s SQL Saturday  ( http://www.sqlsaturday.com/501/eventhome.aspx ). I had registered many months ago. Unfortunately, there was an unavoidable planned monthly maintenance window which lasted the whole day. I had hoped to get away and join the event in the afternoon but it was not to be.

But the great news is that some of the events were recorded and broadcast live on Microsoft’s Channel 9 and they are still available on the website – https://channel9.msdn.com/Events/SQL-Saturday/Learn-more-about-SQL-2016-Live-at-SQL-Saturday-Dublin-Ireland

Thank you to Microsoft and SQLSaturday Dublin for making this possible.

Removing an MSSQL file that was accidently or incorrectly added to a database

Recently, I have had a number of occasions where a new file was accidently added to the SQL Server database; for example, to the wrong file group.

The problem is slightly compounded if there is Transaction Logging in place.

There are number of steps to follow to correct the error

1 – Force the file to be emptied of any data

USE [InsertDatabaseNameHere]
GO
DBCC SHRINKFILE(‘InsertLogicalFileNameHere’, EMPTYFILE);

2 – Remove the file from the database

USE [master]
GO
ALTER DATABASE InsertDatabaseNameHere REMOVE FILE InsertLogicalFileNameHere;

3- If there is Transaction Logging or Log Shipping for this database, run an extra log backup. One cannot remove a file and then create it again within the same transaction log.

4- Add the file again with the correct settings. Change the values below to suit your configuration,

USE [master]
GO

ALTER DATABASE [InsertDatabaseNameHere]
ADD FILE
(
    NAME = N’InsertLogicalFileNameHere’,
    FILENAME = N’Z:\InsertDirectoryPathHere\InsertPhysicalFileNameHere.ndf’,
    SIZE = 1024MB , 
    MAXSIZE = 10240MB ,
    FILEGROWTH = 1024MB
) TO FILEGROUP InsertFileGroupNameHere;
GO

Teach kids to code in under an hour with Microsoft & Minecraft

It is great to see that Microsoft has teamed up with Code.org to bring Minecraft to the Hour of Code!

The Minecraft Hour of Code tutorial aims to encourage millions of young people to try an hour of coding as part of Computer Science Education Week (December 7-13). The new tutorial – now available at code.org/mc – introduces players to basic coding within the fun and popular Minecraft environment. Created by Minecraft game designers together with Code.org, the tutorial features Steve and Alex from Minecraft, and Minecraft-inspired challenges that will be familiar to its more than 100 million players around the world. 

Why support it? One of the ways Microsoft brings forth its education mission of empowering every student on the planet to achieve more is by helping them develop essential skills, including computational thinking – so students and all young people can succeed today, and tomorrow. As technology has become an integral part of people’s daily lives around the world, we’re seeing a growing demand — from students, parents, teachers, governments, and nonprofits — to teach youth not only how to use technology, but also how to create technology to help them become the innovators and drivers of growth and opportunity in their communities. Learning computer science builds critical skills like computational thinking and problem solving that strengthen abilities in any industry and any sector. 

About Code.org: Launched in 2013, Code.org is a nonprofit dedicated to expanding access to computer science, and increasing participation by women and underrepresented students of color. Its vision is that every student in every school should have the opportunity to learn computer science. Microsoft continues to be Code.org’s most generous donor and one of the largest supporters of the worldwide movement to give every student the opportunity to learn computer science. 

Take action!  You can sign up to volunteer and support the Hour of Code, and be matched with a local school to host a session. Or connect with your Microsoft contact to pre-record an Hour of Code to share online on Channel 9 . In order to provide you with everything you need to lead your own Hour of Code with the Minecraft Tutorial, Microsoft has prepared an Hour of Code Microsoft Event Toolkit and Readiness Center. In it you will be able to download a facilitator guide, quick tip sheet, PowerPoint slides, and brief orientation video. You can also join a Preparation Webinar with live chat for questions and answers. Register and download your Toolkit today, and get ready to lead your own Hour of Code. 

Looking for more coding opportunities? Find more coding tools and resources for students, parents, and educators at microsoft.com/hourofcode.

My view? As someone who is involved in the CoderDojo in my local school where the kids work with Arduinos and Raspberry PIs, it is great to see Microsoft’s commitment to preparing & empowering the next generation through its Corporate Citizenship programme. I am also proud that the Corporate Citizenship program at my own employer, IBM, actively supports the Irish & international CoderDojo phenomenon, as do Allied Irish Bank and Bank of Ireland.

CHKDSK cancels on virtual Windows 7 startup

It has been a while since I blogged last but I came across this issue today and decide to write about it. I wanted to install two instances of SQL Server to to test different mirroring and log shipping scenarios but my disk was too small.

So, I needed to resize the Windows 7 virtual client on a Linux desktop. However, the resize was failing due to inconsistencies on the Windows virtual drive. To resolve this & correct the errors, I had to run CHKDSK /F.

CHKDSK /F will only run during the Windows start up process. But almost immediately, each & every time, the CHKDSK process would get cancelled.

I did find a hotfix for this known issue on the Microsoft support pages at – https://support.microsoft.com/en-us/kb/975778

However, the patch stopped with the message – “The update is not applicable to your computer.”

Further bingle searches with “linux” &  are “virtual” added as search terms produced a second article that was more specific to my issue – http://mikebeach.org/2011/09/25/windows-chkdsk-at-boot-cancelled-by-phantom-keypress/

Basically linux is sending a keystroke to windows that interrupts the CHKDSK process.

Run CHKNTFS /t:0 before running the CHKDSK /F. This disables the option to interrupt the CHKDSK before it starts. You can always reset it afterwards.

All is good in my virtual windows world now!

Wayne McCrum talks about Microsoft Premier Support’s Risk Assessment Program

The next SQL Server Ireland User Group meeting is on Microsoft Premier Support’s “Risk Assessment Program” on Tuesday, September 10th, 2013 in the Microsoft Atrium building, in Sandyford.

Wayne will discuss the program and discuss some of the common misconfigurations seen in the field.

When: September 10th, 2013 at 18.30

Where: Microsoft Atrium, Carmanhall Road, Sandyford, Dublin 18. A limited amount of underground parking is available via the rear of the building.

Cost: FREE Community Event

Registration: http://ssiug130903.eventbrite.ie/

Wayne McCrum has been working with SQL Server since 2004 in a variety of SQL orientated roles. He currently works as a SQL Server Field Engineer for Microsoft assisting customers within Western Europe on both proactive and reactive engagements around the SQL Server product.

SQL Saturday Dublin 2013 – One Month To Go

The SQL Saturday is now only a month away tomorrow and the committee has been very busy.

The biggest news is that the session builder is now available to all those registered for SQL Saturday 229 (http://www.sqlsaturday.com/229/). Whether you have already booked or have yet to book, please help us to plan room sizes by letting us know what sessions you will be attending.

SQL Saturday was oversubscribed last year so book quickly to ensure your place.

In other good news, we have extended the early bird on the pre-conferences until the end of May. There are still places left for each of the pre-conferences.

If you wish to attend any of the pre-conferences, the details for these can be found at:

Kevin Kline’s “From Good to Great: Productivity and Influence Skills for the IT Professional” http://www.prodata.ie/Events/SqlSat229/Precon1.aspx

Chris Webb’s “Self-Service BI and Office 2013” http://www.prodata.ie/Events/SqlSat229/Precon2.aspx

Matt Masson’s “A Day of Enterprise Information Management – SSIS, MDS and DQS” http://www.prodata.ie/Events/SqlSat229/Precon3.aspx

Neil Hambly on Effective Index Partitioning, Compression Strategy

The next SQL Server Ireland User Group meeting is “Effective Index Partitioning, Compression Strategy” on Tuesday, May 28th, 2013 at the usual location in Auditorium, on the Ground Floor of the Microsoft Atrium building, in Sandyford.

We all know that ‘Indexing’ is KING when it comes to achieving high levels of performance in SQL Server.

When Indexing also combines 2 of the Enterprise features: Partitioning & Compression, we can often see substantial gains.

Learn how to identify those objects that benefit greatly from being Partitioned or Compressed, OR combining both of these features to even greater effect.

Using Demos to illustrate the performance gains with real-world examples,

Take away advanced scripts for use in your own environments.

When:             May 28th,  2013 at 18.30

Where:            Microsoft Atrium, Carmanhall Road, Sandyford, Dublin 18. A limited amount of underground parking is available via the rear of the building.

Cost:               FREE Community Event

Registration:    Not required. Contact ssiug at live.ie for more details or visit the Microsoft Technology User Groups site (www.mtug.ie )

Neil Hambly is a Senior DBA @ Confio Software, having held various SQL Server roles during the last 14 years @ market leading companies (Accenture, ABN AMRO, BBC, iProfile, MDSL) He has considerable Experience in SQL Server starting with version 6.5 through to the latest 2012 release. A regular International speaker @ SQL conference & User Group, he also leads the SQL London PASS Chapter (UK). Frequently found studying the inner workings of SQL Server, as well as an avid Tweeter @Neil_Hambly.

%d bloggers like this: