Friday, 22 January 2016

MyFitnessPal and gaming your weight

This year one of my resolutions was to take better care of myself by eating better and doing more exercise. I decided to use MyFitnessPal after a long and scientifically rigorous investigation (some people at work were using it and said it was good) and I’ve been fascinated to see how it has used some simple (mostly gamification) psychological tricks to focus and encourage me.

Your FitnessPal is watching you

The basic principle is simple. You keep a list of the food you eat and the exercise you do and it gives you a running total of your calories compared to your daily maximum (defined by level of activity, age, etc). At the end of the day, if you’re under your limit, you’re given a cheery prediction - “if every day is like today in five weeks you’ll weigh blah!” It’s surprising how addictive that affirmation can become. I want to achieve that, and apparently I can. I just have to keep going.

And there is an opposite reaction in me - I don’t want to disappoint the thing. I’m not sure exactly what happens if you go over but I suspect it gets mad and melts your phone. I haven’t dared find out since it got angry with me for not eating enough to live (this was a mistake not a conscious choice! Don’t do it kids!).

Food as a game

Not only does the app give you a report at the end of the day, it presents a running total so you can watch your calories slowly creep towards your daily goal. With the electronic Eye of Sauron always watching (and remember this thing is on your phone so is likely in your pocket all the time) there is a strong motivator to make you seriously consider that piece of cake.

However, if you DO eat that piece of cake then help is at hand. I know a lot of people who diet and are in a constant state of guilt over what they are eating. Clearly this isn’t good for their mental health; a calorie counter gives a definite indication of whether that snack mattered or not. It allows you to build in space for cake, or recover from eating it in a practical way without pangs of guilt. Drink water instead of wine with your evening meal and it evens out, no problem.

The application reduces the food you are eating to a series of numbers. As a mathematician and a gamer I like numbers - they imply a system and systems can be manipulated. Calorie intake can be substituted as above or changed via portion control. Everyone knows about portion control, but watching the numbers change on a screen makes it live for me and encourages me to actually do it. Doing some exercise raises your max calorie intake for the day so I find myself going swimming to give myself an increased ceiling. I like swimming so it’s hardly onerous, but I doubt I’d bother going as often as I do if I didn’t have this little numbers game running in my pocket.

Now obviously there are also unhelpful ways to game this system. You can, for example, eat at Subway but list your foods as homemade equivalents, thus saving yourself at least a hundred calories a sandwich. Or you can go for an extreme (ie plain stupid) diet - my calorie intake is fine if I eat nothing but 12 Cadbury’s Creme Eggs a day. However, in the manner of an 80s kids cartoon, there is a moral - if you cheat your Pal, you’re only cheating yourself.

The proof of the pudding

There are strong motivators to Do The Right Thing however all this falls apart rather quickly if there aren’t any results. So far I can report that it seems to be working. I’m obeying my electronic taskmaster and seeing the results, which encourages me to continue to do so - and so it continues until the machines are completely in control…

The app itself

A quick note on MyFitnessPal. I’m using the web based version and the Android app. It’s hardly the only calorie counter out there but it’s working well for me. I like the cost (it’s free) and now I’ve been using it for a couple of weeks I find it very easy to use. It did suffer from a pretty horrible start though. Before the app seeds its internal listings using your regularly-selected foods adding anything is incredibly laborious - which means the worst few days of the experience are the first few days.

On top of this, the home screen is initially utterly useless - full of news I don’t care about and pseudo-tweets which gave me a heart attack until I reassured myself they weren’t being added to my Twitter account. Eventually I discovered the option to turn this nonsense off and now the home screen gives a load of nutritional information which is actually quite interesting.

So I’m pleased with my experiment with a calorie counter, and MyFitnessPal in particular. I had serious doubts on starting - I thought the book keeping would drive me insane - but actually so far I’m finding it nothing but a benefit.

Saturday, 26 December 2015

The year that was, 2015

In what is becoming something of a tradition, it's time for me to take stock of the creative "things" I've done this year as a reminder to myself that I do more with my free time than just play games and eat chocolate.
Not to mention that I completely rewrote my CV - does that count as creative?

2016 is coming. Now I don't have to write a weekly RPG any more, it's time for some exciting new projects.

Friday, 2 October 2015

Simple Arduino

I've been meaning to learn something about microcontrollers and hardware prototyping forever but there just never seemed to be the time. Fortunately, time was created at a recent PLIBMTTBHGATY meetup when a friend offered to bring a load of unused Arduino "bits" for me to play with. Interestingly, everyone I know owns at least one Arduino but only two of them actually know how to use it properly.

Getting going turned out to be quite easy, which was a relief as starting from pretty much no knowledge (I learned some basic electronics at school a long time ago but that's about it) is usually a pain. A huge thanks to Neil for answering some of my very basic questions. I'm intending to write a few "getting started with hardware stuff" posts as I continue learning and I'll write up some of what he taught me in the hope it will help others get going.

Box moving in a rectangle

My first creation of interest was a box moving in a rectangle on an LCD screen.

This was mostly a programming exercise as wiring up the circuit was just a case of following a diagram exactly but it was useful to learn the basics of syntax and how to push a program to the Arduino.

Building blocks to make this:

Button switches between LEDs

Next up, a circuit which switched from a red light to a green one while a button was depressed.

This was the first circuit I designed myself, using the knowledge gleaned from a few other tutorials.

Building blocks to make this:

Bouncing box game

Finally, I was challenged to make a simple pong-style game. The box travels left to right. If the button is pressed as it reaches the end, it bounces back and the player gets a point. Repeat until the button is not pressed correctly and the game resets.

A more complicated circuit here, requiring a second breadboard and many of the Arduino's pins.

Quite a lot of work went into coding the logic of this game. The initial version allowed the player to keep the button pressed down and the box would bounce indefinitely so I changed it to have the game reset if the button is pressed too early as well as too late.

Building blocks to make this:

Saturday, 25 July 2015

iPhone to Android - apps impressions

The last major change is with the new apps and app store. As I said before, I really like being able to install apps from a desktop web browser but how are the apps themselves? Well, in no particular order...

The default Android calendar app is nice. Not amazing, but definitely more usable than the iOS calendar.

The notes app on the G4 seems ok, but saves its notes to a hidden folder in Google Drive. This fills me with fear for the time I want to migrate to a new notes application. I want to be able to see my backups in plain text somewhere so I can reuse them - migrating from Apple to Android has really shown me the benefit of thinking about that up front. iOS notes was sync'ing to GMail and I wanted something which would do the same. It took some searching, but I turned up GNotes which not only syncs in the same way, but when I gave it access to my Google account pulled all my old iOS notes through. Impressive. At some point I will have a look at Google Keep, but this has got me started.

Shazam seems slightly better designed on Android, although that could be my imagination. Annoyingly (but not surprisingly) I had to buy the ad-free upgrade again. I was hoping it would let me log in cross-platform to avoid that repeat charge, but alas not.

Having Chrome on my phone is lovely. Rather than messing around with bookmarks in Safari they are just sync'd from my desktop. I could have done this on the iPhone of course.

Mailbox isn't quite as nice as the iOS version. Functionality is the same, but I keep opening mail when I am trying to swipe - something I don't remember doing before. It's still by far the best mail app I've used though.

Textra is a great text message app. Not much more to say on this except that I've coupled it with SMS Backup+ which is sync'ing my text messages with GMail to avoid the horror experienced when trying to save them in a readable format from iOS.

The Flickr app. Hmm. Photo uploading was always going to be a big difference between the two operating systems because it demonstrates a major difference in the underlying ideology. In iOS to upload to Flickr you fire up the Flickr app, select your photo, edit it and upload - it starts from the application to upload. In Android you start from the picture, open it in the editing program of choice and push it to another app to handle the uploading. The change takes a little getting used to (change is change, even though the Android setup makes a lot more sense) and would be much better except for one important fact - the Android Flickr app is awful. Significantly worse than the iOS version. It seems to be missing several key features for editing (auto-correct, most of the effects) which makes it only useful for uploading and unless you want to post to Twitter at the same time, the Bot for Flickr is actually a better option for uploading as you can queue a load of pictures to automatically upload next time you connect to a wifi connection.

Photo uploading also highlights a security feature in Android which hasn't fully been adopted by the app developers yet. Resources on the SD card from one application cannot be modified by another application unless permission is given. When you take a photo, the image is a resource owned by the camera so you can't modify it with an editing application. Instead, the editor needs to save a copy but the apps I've used do not switch to this new version on save so I've had to edit, save, back out of the picture, and go into a different picture stream in order to find the saved file for uploading. There is some explanation of the underlying problem in this thread.

The upshot is that uploading photos involves an annoyingly convoluted workflow. It's not the end of the world, but could definitely be better and this is using the (otherwise excellent) Android / LG gallery app.

So far, I'd say none of the apps seem different enough to make a huge difference to anyone's life. I was surprised how easy it was to switch between operating systems and either keep the same apps or find easy substitutions.

Thursday, 23 July 2015

iPhone to Android - LG G4 first impressions

Enough of getting out of Appleville - what is it like in the world of Android?

Initial impressions were a little shaky. I hate unclipping molded plastic. No matter how well it is made, it always feels like it is going to break so getting the back off the phone was fraught. Of course, the fact I could get the back off at all is a point in its favour as this handset has a replaceable battery and expandable memory.

Putting in the micro SD card was a bit odd - it felt like it wasn't locked securely into place. It turned out that it wasn't so I needed to open it up again to fix it but it needed a bit more of a push than I was initially willing to give. Still, having it open let me switch the back for a Qi wireless charging enabled case which clipped into place and Just Worked. I don't need wireless charging in my life but it was one of the little things I was excited to try - it feels like I'm in the future. Yes, I'm a child.

Next, loading it up. Key noises. Argh. First task on any new device - silence the system noises. The Android ones seem particularly obnoxious to me. Also, the default Android (or possibly LG?) keyboard is pretty irritating. Why doesn't it auto-complete for me?

Powering through the horrible sounds and annoying keyboard, I put in my Google account details and ... that's it. The phone thinks for a few moments and EVERYTHING WORKS. Calendar, email, contacts, music, files in Drive, sync - the list goes on. I'm very, very impressed. It's not quite as good as a fully iCloud Apple device, but it's much cleaner than I'm used to using non-Apple services on an iPhone.

It gets better from there. Everything that is annoying can be changed. Keyboard? Swiftkey please. Sounds? Change them. Turn them off. Whatever. Text messaging not great? Install an entirely new text message application (Textra). And so on. If you can't be bothered to do it on your phone, just log into Google Play on your desktop and tell it to install stuff to your phone from there. I think you can do this on an iPhone but since it involves firing up iTunes I'd rather add the applications directly to the phone's hard disk using a magnetised needle.

Out of the box I'd say iOS has the edge. It's more refined, snappier and has much better defaults. But Android gives me options iOS users can only dream about. Arguably far too many configuration options, but it really didn't take too long to go through the ones I cared about and by the end I have something which works very well and is tailored to the way I use the phone. It's still doesn't feel quite as snappy as a new iPhone but it's much more than fine and the personalisation definitely makes up for it.

The LG G4 is a lovely device. Much bigger than the iPhone 4S, but it really didn't take very long to get used to the change. The screen is quite beautiful - quad HD with a great colour definition -  and the camera is fantastic too. The battery started out frightening - I struggled to get a full day out of the charge - but a friend told me they gain life after a day or so of use and he was right. Last time I looked, the indicator said I had 75 hours remaining. My usage has dropped off a bit as I've stopped fiddling with it but not that much.

Android tells me things about the battery. How much it's using and which applications are consuming the power. Why didn't my iPhone tell me this information?

So - first impressions weren't great. Almost every other impression since then has been brilliant. I've been using the system for a little over a week now and it still gives me actual pleasure - it has been a long while since I could say that about a phone.

Saturday, 18 July 2015

iPhone to Android - iMessage

My phone number is attached to iMessage so any incoming texts will disappear into the Apple servers and be delivered to my iOS devices. This was great when using an iPhone but now basically means texts are delivered to my iPad.

This was something that hadn't even occurred to me until a friend complained I wasn't reading his messages. A quick hunt online turned up Apple's Deregister iMessage tool which is very easy to use. I had already put my SIM in my new phone by this point and couldn't be bothered to dismantle everything so I used the SMS deregister and it worked immediately.

I think I'm free now?

Thursday, 16 July 2015

iPhone to Android - music

After the horror of extracting my SMS data from my iPhone, I moved on to music. Currently I have my music in iTunes with Match so I can stream to my device. A little reading showed me Google Play is:

  • bigger (stores at least twice the number of tracks)
  • not using iTunes
  • cheaper (free!)
  • not using iTunes
  • web accessible
  • not using iTunes
The setup was easy, led through by a well designed website. It pushed me to the Chrome app which seemed to have trouble reading my music but then I found the desktop version. I pointed it at my (iTunes) music folder. It scanned it and about 2 hours later I had an online library of around 2500 songs. I am struggling to find the words to express quite how easy it was.

Now, I have a very fast internet connection here but I was also watching stuff on YouTube and talking on Skype while it did its thing and didn't notice any problems. It even handled the multi-artist albums which iTunes sometimes struggles with (albums with "artist featuring another artist" on it). I've not dug through my online library in too much detail yet but I'm yet to find a mistake.

I'm impressed.