Adventures in the land of Volkswagen software

Or, how Volkswagen software feels like a fresh breath of air from the 80s.

I recently bought a used 2016 Passat GTE plug-in hybrid. The car is extremely pleasant to drive and I absolutely love driving using the electric mode. Looks like we get around 45km on electricity, which has actually covered most of our drives so far, making the trips cheap and ecological. On the longer 100km drive to the countryside home, the fuel consumption was 3.2l/100 km, which is a massive improvement over the previous car. I got the car with a half full tank and I haven’t filled it yet, and it looks like I won’t be visiting the gas station any time soon. This part of the experience is making me have little doubts my next car will be a full electric one – I’m just waiting for the family size ones to become a bit more affordable. On to the point of this writeup…

The modern Volkswagens come with a bunch of online services and the on board entertainment system is full of features accessed using a touchscreen, including a navigation system. I wanted to see what these are like and update the software, and that’s when the user experience went downhill.

Looking at the software in the car and how it behaves, it’s very quickly obvious that the GTE is still made in the era of component contract suppliers. What Volkswagen has done is looking at what components and systems are available on the market that can be added to a bullet list of features in the car and then used very fancy superglue to attach these things together, resulting in a whole where the individual components don’t work in concert in a manner that creates a cohesive user experience. What’s probably making this worse is, Volkswagen, as many other car manufacturers, has decided to add incremental monetisation on their cars in form of multiple subscription service layers required to use the features in the car. Or… some features of the car, where systems that’d benefit the most from being controllable by an app, such as the winter heating system, are not supporting remote controls at all. And some services such as getting a hardware health report that tells you whether you should go to a repair shop that absolutely should be free, are behind a subscription.

Car Net and We Connect

The online services of VW are split to two parts: Car Net and We Connect. As a comsumer, I have absolutely no idea why they use the double branding. Apparently Car Net is the low level connection layer underneath used by the consumer facing We Connect system. You need to create an account to the We Connect portal and then activate Car Net on your car to link your account and the car. To actually use the system, you then need to subscribe to additional service packages. I picked the basic package and thought I was done, but for some reason the car did not get online despite me activating the car multiple times and the car telling me the service activation was successful.

Calling the support number, I found the eSim in the car was disabled due to the service contract having lapsed and the car would no work until the sim is reactivated, which would take 2-3 business days. This makes sense, but… absolutely none of the VW services, on the phone, car or the web portal indicate this is the case, even when I was purchasing a time-based subscription to the car. The least I’d expect is the WV portal informing me I need to contact support to reactivate the data connection before subscribing to services that cannot be used without the data connection. And this is not the only thing that’s confusing about this:

  • The car seems to sometimes have trouble connecting online, causing the We Connect app and portal to show wrong information. A the same time, the app does not tell when the last update from the car was received, so it’s impossible to tell if information is up to date.
  • Conversely, there is no clear indicator on whether the data edited in the app has been synchronised successfully into the car. Or possibly the user interface is again confusing. The app allows me to edit something called Destinations and add places of interest into the app and then indicates the data is being sent to the car. But sure as hell, these destinations do not appear anywhere in the car user interface.
  • The car had a bunch of configuration left from the previous owner, including their home address in the POI data and charging locations. Interestingly this data wasn’t editable before the service activation and eSim was working, so people with a used VW might be stuck with previous’ owner’s data visible on their navigation systems with no clear way how to get rid of it.
  • The We Connect mobile app lists services that are available to me, but that list does not actually correspond to the services from my subscription.
  • The car is randomly telling me Car Net could not be activated and that I need to manage my subscription using the service registration UI in the car. For example, when I connect the car to wifi and try to update the car software using the online update feature, I get told Car Net is not active and a service needs enabling. On accessing the services menu on the car, none of the services indicates it’s related to software updates, in addition to the in-car menu not actually including a feature to activate the listed services – everything is just listed as deactivated.
  • The car has a factory-installed Webasto winter heating system, the state of which is not visible or controllable in the App. This is the likely the most interesting single feature for remote controlling the car.
  • The charging system has a bunch of controls for locations and timers, but I’ve yet to find any documentation from VW on what the purpose of these is and what’s the best way to manage the car’s battery. Marketing material about these features being present is obviously easily available.
  • No directly related to Car Net, but annoying: the in-car software doesn’t allow users to set the virtual keyboard layout and user interface language separately. In order to be able to enter Finnish road names, you have to run the entire interface in Finnish or Swedish. Guess the market for people who moved in from aboard who want to use English (or some other language) in Finland is pretty small.

Navigation updates

The car navigation system came with the original maps from 2016 and it was immediately obvious those needed updating. Googling if this is possible I was pleasantly surprised the GTE seems to include free map updates for life, which is great. What wasn’t so great was needing to know what entertainment system I had in the car. Here’s the user interface for picking the system I have:

Yes. It’s really that small. And yes, those look pretty damn similar. No, there is no guide online how to identify your system. I found the PDF documents for both systems on how to update the maps and the Pro document helpfully pointed out the car’s system menu has information on what maps are installed on the device so you know what map package to search on their site. Here’s that screen:

Guess once if any of those number sequences are on the Volkswagen website or if googling them tells anything useful. I did learn though the device part number refers to the navigation head unit and it’s available as a used part for €3k, but not if this is Media or Pro.

Interlude: that Update software button is maybe possibly for updating the car firmware. I don’t really know, as the in-car UI doesn’t tell me what it’s for and Volkswagen hasn’t made software downloads available for end users. The Online download button is the one mentioned above, which first requires I connect the car to a wifi network, which subsequently tells me either that Car Net activation has failed or that I don’t have a service activated that’s used for online updates, but I still don’t know what data / software this actually updates.

The update process uses an SD card to install the software. The Media version of the navigation says you must use an SD card from Volkswagen, while Pro says any class 10 SD card is fine. More googling ensued to find what people are saying on support forums, but looks like everyone is equally confused about this and I couldn’t find conclusive information on whether Media requires the manufacturer’s card or not. What users were saying though is, the official Volkswagen repair shops will absolutely not update the maps for you.

I decided to try downloading both update packages, with the assumption that the car would tell me if it’s finding the software on the card or not. At this point I had to give up the process for a few days to get back to home with fast Internet, as downloading the 20GB+ packages over 4G was taking too long.

To make things easy for consumers, someone in the Volkswagen team has decided to use the 7zip format for the package compression. Decompressor for this format is not installed by default on any operating system, so it beats me why someone decided this is a good idea. Is someone in the services team a 7zip fan? Did a manager in the services team or Volkswagen get a kickback from a 7zip software maker? Downloading the decompressor is not hard, but why would you want to add this step to the update process?

The update instructions did mention something curious though. Both recommended using an app called Discover Care to copy the map data onto the card and instructed me to go to to download it. is a site run by Here Maps, presumably from whom Volkswagen has licensed the maps from. On the site, the flow seems to have an intuitive start where you first pick your car manufacturer:

Oops, no car brands from VAG, the corporation that owns Volkswagen in sight. No other sections on the site that mention DiscoverCare. Site FAQs make no mention of the software or Volkswagen. Did the their licensing deal run out or did they change the deal? Has Here stopped supporting Discover Care? Why is Volkswagen guiding users to the site when the software is clearly not available for download?

I did eventually get hold of Here support and they confirmed the deal to give support to VW customers has run out years ago. Maybe VW could update their documentation accordingly and ping Here to add a FAQ on their site to point users to the right place for updates going forward?

I found the software on an external site, downloaded and run it, but it says an update is available and sends me to a Volkswagen software update site… which doesn’t list DiscoverCare as a downloadable. Looks like I’m stuck trying the update without the software.

The Discover Media PDF wasn’t clear on how long the update takes to read the files. The Pro document warns the update might take up to 4 hours to run. And here’s a kicker – the car must be on during the update (obviously), but this also means the car must be unlocked and plugged onto the charger for up to 4 hours to ensure it won’t run out of battery during the update process. Don’t have a charging port in a locked garage? Good luck! Wanna update during a drive? Doesn’t look like that works too well, as the system locks up while updating.

Thus I can’t really do the update in the city, but do have such facilities in the countryside. Next weekend I decided to try the Media update file set first. This seemed to work, as the entertainment system did indeed tell me it’s loading the update. Guess what? There is no progress bar, just a little spinner telling something is being worked on. After six hours of randomly dropping in to check the progress was still going on I decided to cancel the process and read some more. It didn’t take me too long to figure out I have the Pro navigation and one of it’s features seems to be that if you start the update with the wrong dataset, instead of telling you the data is wrong, it’ll just show you the progress indicator infinitely.

So, I quickly formatted the SD card, put the Pro update on it, and started the update. Around 4 hours of spinner later that still didn’t tell me if the update is actually progressing, the car showed an error message that some data is not available and the update failed. Good news is, I know what the system is now and re-reading the instructions, the update maybe failed due to me having had a single empty folder on the SD card in addition to the actual data. The next step is to try to update again, with a super duper carefully formatted SD card.

I don’t know if anyone from Volkswagen will read this, but I have a couple suggestions.

  • Please have someone read through your customer documentation and check if software you’re telling people to download is actually available.
  • Change the in-car system menus to tell users that the systems are in that specific car, using the same system names as you’re using toward customers, instead of cryptic part numbers. Having the part numbers in addition to the human readable data is obviously fine!
  • For software update processes, 1) Have the operating system check the file suitability first and inform user if the file set is correct without taking hours in copying data first and for God’s sake don’t go into an infinite loop on progress indicators, 2) implement an actual progress indicator with a timer showing the expected duration of the update.
  • For online services, tell users if the car is online before you allow subscribing to services that require connectivity and in the in-car menus, clearly list out what each of the updating features actually attempt to update.
  • if you want to have people download compressed packages, consider using a compressor that actually comes by default on common operating systems.
  • Figure out some way to give support for all of your software and services. Right now it looks like the online services has excellent support, but for example the navigation services don’t have any documented means for support. Local dealers don’t really care about aftermarket support and refer customers to the licensed repair shops, who in turn don’t care support navigation. Did I find a black hole in the support process? I bet I’m not the only one in this pit.
  • Please review the service packages you’re offering to your customers and as an experiment, check what they’d look like if you re-structured them for best customer value. As is, the services look like Volkswagen is just trying to extract added value from me with no consideration for customer retention; VW made the money when the car was sold, so why care about what happens after? What you really want to do is what Tesla is doing, which is building retention by giving excellent aftermarket service. Requiring me to pay to 79€ a year to get access to a report on the car hardware health is the polar opposite of Tesla sending an over the air update to their fleet that improves the range and acceleration of their cars and exposes VW as a greedy corporation incapable of user-centered thinking. With the car supporting Android Auto and CarPlay, the biggest thing you’re really teaching me is, it doesn’t really matter what my next car brand is in terms of software, as the software I really want to use is in my pocket and not running in the car’s computer.

Update: I went to double-check the PDFs that from VW that I’ve read. Looks like part of what’s happening is, VW is currently hosting both documents that are up to date regarding DiscoverCar (but have all the other issues discussed above) and the old documents that refer to nonexistent software. The old documents haven’t been excluded from search engines, so if you use Google to find instructions for the software updates, Google points the user to the old documents. And given the PDF lives on the Volkswagen website, it’s impossible for an end-user to tell the document is not up to date. Perhaps VW should consider its operations in the context of the entire Web?

Update 2: I found the issue that blocked the update. 1) The user interface in the VW dashboard is pretty damn badly designed – if you insert an SD card and the expected files are not found on it… the dash will give you the “Searching for updates” spinner message forever. You never ever get a message telling you the updater isn’t finding the files. 2) If you follow the VW instructions exactly, unzipping files to the SD card creates a folder on the SD that’s named according to the ZIP file, instead of unzipping the contents of the files to the disk root. The updater in the car doesn’t look into this subfolder, vs expects files to be in the disk root. After again waiting for the spinner to disappear for around 4 hours, I moved the files from the folder to the disk root, re-ran the updater and 5 minutes later the UI changed and told me it found data on the disk.

Last Kingdom

I just finished binging the first season of The Last Kingdom in Netflix.

There’s plenty of good in this show, mainly history, and lots of it! The actual main events happening around the main character is more or less all real (that I know of). You can read up on Wessex and Alfred The Great and Guthrum and other details and find how close the show actually depicts what went down in the 870s in England. Costuming is well made. There’s chain with actual holes and I don’t remember spotting any royalty in artificially elaborate clothing as usual for big money shows. Combat was well made – in most fights people are as vulnerable as you’d expect and even the main character wants to run rather than fight in most cases. And last but not least, not everyone carries a sword; weapons are depicted as rare valuables, as they should.

SPOILERS AHEAD: Having said that, there’s things I didn’t like in particular. As per traditional fantasy writing, every main woman character ended up killed or imprisoned or with some other fate of no power, which is probably historically accurate to some degree, but the writers chose to not use any plots they could have to even leave some of the women free. Bah for that. The main character Uthred is a selfish murderer who would not have survived. The writing is in some places downright sloppy, with Uthred being excused from any behavior and forgiven everything he’d done without that much justification. He’s also written as selfish to the point where his survival instincts should have overridden his personality many times in the show given the era being depicted, which again felt sloppy and put me off the show multiple times.

So the verdict – the first season was worth a watch, but I’m pretty sure I’ll leave it at that and not view the second unless someone convinces me otherwise.

Fixing a blocked Rancilio Silvia expresso machine

Micro blog not: our well loved Rancilio Silvia espresso machine decided to stop working after I descaled it. I didn’t have the energy to fix it for the longest time but dug it out now and used the linked instructions below to fix it. Turns out when you descale the machine, some of the calcium deposits don’t break into small enough pieces to go through all the valves and exit the machine, which is exactly what had happened, which in turn had blocked the solenoid valve. Removing the tiny deposit of calcium silt from the valve fixed the valve and the machine is working again. <3

Soft touches on Clash of Clans monetisation


I’ve met a lot of fellow free-to-play-game developers recently and talking about games always eventually turns to monetisation. Talking about monetisation inevitably turns to the big successes in the market, including Clash of Clans. I love Clash’s monetisation design, as it’s very simple to understand from the player’s perspective. It doesn’t enforce payment at any point and it’s extremely clever in some of the subtle details that I think are driving the urge to spend money. Here are a few of the details I can’t remember reading about and which people sometimes don’t think are as obvious as I thought they were:

First purchase value proposition

Every single player I’ve talked to, purchases an additional builder as the first purchase. Builders are a massively constrained resource in the game and vital for the game pacing once you’ve built the first couple of buildings. Given builders are persistent goods and speed up the gameplay (thus easing much of a player’s frustration), the value proposition of the builder is amazingly good.

This is in big contrast to how most games currently implement persistent goods. For example, has chosen to price the lollipop hammer in Candy Crush as an expensive item aimed at people who are deeply engaged.

The end result of the design choice for Clash is that new players feel they get real value for the gems spent and the subsequent purchases feel much safer, as the persistent value is projected into subsequent purchases. Of course, early in the game the subsequent purchases are also made to build buildings faster, which persist, so the game very effectively teaches you at every turn that you’re making a good long-term investment with your spending.

Keeping the PvP field level in terms of purchases

While you can spend a lot of money buying buildings that allow the construction of better troops, there’s no way to spend money during a fight to your advantage. This, coupled with the player level matching system, which ensures you’re mostly attacking players with similar capabilities, makes purchasing acceptable, regardless of your cultural background. The conventional wisdom for PvP games is that players in the West dislike free-to-play PvP due to perceived unfairness, while players in the East expect spending to affect gameplay in a significant manner.

With Clash, you can spend a considerable amount of money to level up faster, to get cooler troops and to regenerate your troops faster, but because this doesn’t make you win games, there’s both a feeling of becoming more powerful through spending, but also there is no unfairness in any aspect of the game. Effectively, players spend for a higher position in the ranks.

An alternate PvP monetisation system that’s used in multiple games focuses on just vanity items, which increase your social status but have no actual effect on gameplay. Clash does this as well, but given the restricted amount of land area available in the villages, this doesn’t scale as well as spending on the expendable currency.

Multi-layer monetisation

The core of the game consists of two loops: a building loop for producing and warehousing elixir and gold resources and upgrading production buildings, as well as spending the resources on defences for your village, and a second loop where resources are spent on building troops to attack the other player’s villages to capture resources from them.

During the core gameplay, you are given the option of spending the paid currency to speed up the construction of buildings and you can double the resource production speed temporarily with the paid gems, but the core loop of producing and spending the resources is all done without any need to spend money.

Here lies a very important detail – the game teaches the players to spend significant amounts of the resources produced as part of the core loop, but only the resources you can produce yourself. This feels safe to the player from the monetisation perspective, as you’re burning through money you’ve printed yourself. At no point early on in the game does the player feel the core loop is trying to monetise them, in stark contrast to the mechanics at the end of a failed Match 3 game that allows a player to purchase more moves.

The effect of this is that instead of a player feeling they can’t continue to play due to having run out of gems (since they’re not required by the core loop), the player will eventually feel the desire for more elixir and gold and the fact that those are purchasable using the paid gems becomes a payment detail, rather than the player paining over desiring the paid currency. This layer of diversion does wonders to the acceptability of monetisation and my assumption is that this greatly increases both the retention and monetisation conversion in Clash.

The seesaw, or monetising the near miss

The resource requirements and building time for improvements increase as you progress through the game. Clash does an excellent job at scaling the cost of using gems for speedups, as covered in this Gamasutra article. So, as you play, you need to wait for longer and longer to get what you want, making spending some cash a little more compelling all the time.

But wait, there’s more! Once the PvP game really starts to hit you, a new pattern emerges. Before you can fill your coffers and start building your improvements, someone comes in and steals your resources! So you build more resources and go steal some from another player, but again, once you’ve almost reached your goal, someone breaks in and gets your goods. So it’s a seesaw – you push yourself up but just before reaching the top, the dude on the other end of the plank pushes you down again. Before long, the player realises that it’s a Really Good Idea to purchase the last 20% of the resource needed before you get attacked.

coc graph

Psychologically, there is a massive difference between the game preventing you from reaching your goal vs the Clash model of your resources being stolen by another player. As a player, I’m being incentivised to spend due to the other player’s actions, not because the game has a mechanic that enforces payments. And instead of being forced to pay, I’m evaluating the risk and deciding based on the risk evaluation if a purchase makes sense.

Mechanically, this is the same as the near-miss technique used to monetise Match 3 games. In well-tuned Match 3 designs, the levels are typically balanced to maximise the amount of plays where the player gets very close to ending the level, to the point where you feel you are missing the end by just one move. Near misses are addictive (for example, read The Psychology of Near Miss) but also an excellent opportunity to monetise the player by selling more moves. Imagine if casinos sold the ability to move the ball one notch after a spin – not viable for gambling, but perfectly usable in other games.

candy graph

I would additionally argue that the actual PvP attacks and the related feedback systems in Clash of Clans are balanced in a manner that nearly always leave the attacker thinking that if they’d adjusted the troop deployment just a tiny bit, they’d have done better. Which again plays to the near-miss psychology and probably adds massively to the game’s retention.


  • Persistent goods are excellent tools for improving that first purchase conversion.
  • PvP does allow for a design where money gives you power while retaining a level playing field.
  • Allowing players the theoretical possibility of playing through the entire game where purchases just provide convenience makes your monetisation structure feel great.
  • Structures that incentivise spending through player actions are very acceptable from a player perspective, compared to hard spending barriers.

Agree or disagree? Have other points about the design? Please leave a note!

(And before I forget – I’ve recently restarted doing games consulting. Poke me if you need help with your games!)

Ginger Pig Cabbage Rolls, Sulka style

I have a bunch of dishes I like cooking and which people seem to really enjoy. They all have a few things in common – I like food that combines a few simple tastes, is relatively simple to cook, and which uses cheap ingredients. As an added bonus this dish should be paleo diet compatible. So here’s something I did today..


  • Pork Belly. Get about 200 grams per person. Go for slices with a lot of succulent fat. I’m currently getting mine from Ginger Pig.
  • Fresh ginger. Lots of it.
  • Garlic. To your taste; 1 large clove per person works for me.
  • Japanese style soy sauce. Japanese soy is super fragrant and lighter compared to Chinese soy sauces. In my experience (from UK and Finland), Japanese soy sauces are now significantly easier to get than even 5 years ago, so getting the right thing shouldn’t be very hard anymore.
  • A whole cabbage. I recommend pointed cabbage because it’s easy to get leaves separated intact. Fresh spring cabbage is another option.
  • Spring Onion.
  • Fresh pomegranate for garnish. Optional.
  • Cooking oil. I use rapeseed oils for frying, they’re fairly neutral tasting and research claims they produce less carcinogens when fried than most other oils.

How to cook

  • Slice the ginger to 1x1mm sticks. A mandolin does wonders here.

  • Slice the pork belly into small bite sizes. Slices that are around 3mm thick and 15mm wide are perfect. But no worries if everything is not perfectly sized. I recommend removing the skin – if you leave it on, remember to add considerably more time for the skin to cook until it’s tender.

  • Put a generous dash of oil onto a pan and put the ginger slices on medium-low heat. Let the ginger cook softly until it’s all cooked through and very soft. This guarantees you’ll get the best of the tastes from the ginger, as well as nice mouth-feel. Do not allow the ginger to brown, if you see any browning you have too much heat on; take off the pan and let it cool before putting back on reduced heat.
  • When the ginger is all done, put crushed and sliced garlic on. Let it cook for a very short while. Again if the garlic browns, you’ve just blown the taste.
  • When the garlic is slightly cooked, put the pork on. Cook on medium heat until it’s fully cooked and then double that time. The goal is to have the pork be soft and absolutely chock full of the ginger aroma.
  • While the pork is cooking, slice the spring onions into thin rings. Separate the pomegranate seeds. Separate the cabbage leaves; try to keep them intact.
  • When the pork is super thoroughly cooked, add a dash of soy sauce (to taste – lots if you like salty, less if not) and spring onions on the pan and let it cook for 30 seconds or so, then move the dish to a serving bowl. Decorate with pomegranate seeds.
  • Serve the cabbage leaves on a large plate. The idea is, you get a leaf that serves as a plate, put ginger pig into your leaf, roll the leaf into a package and chew through.

Apologies for lack of images on the last parts of the process and the finished product. Got too hungry to shoot photos! :D

Diabetes and Vitamin D

See below for two studies on vitamin D and diabetes. The short of this is, giving children and pregnant women 50 to 100 ug of Vitamin D supplements / day is probably a very good idea.

The current recommended dose of vitamin D supplements in most of the west (10 µg/day) is based on the smallest dose found in studies to prevent rickets. Two of the studies below look at dosages that are sufficient to increase the vitamin D levels to that of people living near the equator, where the incidence of diabetes approaches zero!

So, while 50 to 100 µg/day is 5 to 10 times higher than the official recommended dose in most the western countries, this a safe amount as the vitamin starts to be poisonous at around a thousand times larger does than this (the recorded poisonings are from people who confused micrograms and milligrams and consumed thousand times larger doses than recommended for extended periods) and given the vitamin D level required to give protection against diabetes seems to be that occurring naturally near the equator, it doesn’t make any sense to consume less.

As for whether the current 10 µg / day is working, see the below chart of what happened when Finland reduced the recommended dose from 25 µg / day to the current 10 µg / day.

Screen Shot 2013-07-29 at 10.07.25

Now, I’m not saying vitamin D is the holy grail and that deficiency (as compared to the levels found on the equator) is the only contributing factor on diabetes, but it does look like the current recommendations are actively contributing to Finland having the highest occurrence of type 1 diabetes in the world.

The papers:

Preclinical serum 25-hydroxyvitamin D levels and risk of type 1 diabetes in a cohort of US military personnel

To determine whether serum levels of 25-hydroxyvitamin D (25(OH)D) in young adults are associated with risk of type 1 diabetes mellitus (T1D), we conducted a prospective, nested case-control study among US active-duty military personnel with serum in the US Department of Defense Serum Repository, identifying 310 T1D cases diagnosed between 1997 and 2009 with at least 2 serum samples collected before disease onset and 613 controls matched to cases on age, sex, race/ethnicity, branch of military service, and dates of serum collection. Conditional logistic regression was used to estimate rate ratios and 95% confidence intervals. Among non-Hispanic whites, those with average 25(OH)D levels of ≥ 100 nmol/L had a 44% lower risk of developing T1D than those with average 25(OH)D levels < 75 nmol/L (rate ratio = 0.56, 95% confidence interval: 0.35, 0.90, P for trend = 0.03) over an average follow-up of 5.4 years. In quintile analyses, T1D risk was highest among individuals whose 25(OH)D levels were in the lowest 20% of those measured. There was no association between 25(OH)D levels and risk of T1D among non-Hispanic blacks or Hispanics. Low 25(OH)D levels may predispose healthy, young, non-Hispanic white adults to the development of T1D.

In other words, the study looked at both health individuals, as well as military personnel who’d developed diabetes, went back to get blood samples that had been collected in previous years and retroactively checked the vitamin D levels to determine if vitamin deficiency correlated with the likelihood of getting type 1 diabetes. The study concluded there is a correlation for non-hispanic whites. Based on this research, the vitamin D level should be at least 100nmol/L.

Intake of vitamin D and risk of type 1 diabetes: a birth-cohort study

Findings: Dietary vitamin D supplementation is associated with reduced risk of type 1 diabetes. Ensuring adequate vitamin D supplementation for infants could help to reverse the increasing trend in the incidence of type 1 diabetes.

Very long term (1966 to 1997) Finnish study that found adequate level of vitamin D protects against type 1 diabetes. Note that in this study, the children were supplemented with 2000 IU of vitamin D daily, while the recommended dose for children in Finland has since been reduced to 400 IU, which seems to have resulted in sharp increase in the occurrence of diabetes.

Vitamin D and pancreatic islet function. I. Time course for changes in insulin secretion and content during vitamin D deprivation and repletion.

These findings confirm that vitamin D deficiency causes alterations of pancreatic B-cell function.

The association between ultraviolet B irradiance, vitamin D status and incidence rates of type 1 diabetes in 51 regions worldwide

Conclusions: An association was found between low UVB irradiance and high incidence rates of type 1 childhood diabetes after controlling for per capita health expenditure. Incidence rates of type 1 diabetes approached zero in regions worldwide with high UVB irradiance, adding new support to the concept of a role of vitamin D in reducing the risk of the disease.

Nicely colour data in Google Spreadsheets

Update: Google Sheets now has conditional formatting built in, so this script is not needed anymore; leaving it here for reference.

I love a feature in Excel (never thought I’d say that!) where I can choose a range of data and have Excel colour the backgrounds of the cells from red to green or green to red based on the cell’s value in the selected range. Excel calls this “Conditional formatting” and while Google Spreadsheets has a feature that has the same name, it’s really a completely different thing and it’s driving me nuts. But it has scripting, so I had to fix this lack of functionality.

Screen Shot 2013-07-04 at 16.54.59

To install this script, open your spreadsheet, open Script editor… in the Tools menu. Paste the source in and save. Then reload the actual spreadsheet. You should now have a new menu in your toolbar called ColourTool, with two options to colour cells. Choose the range you want to colour, choose an option and tada, your cells change background colour.

Note: This has not been tested extensively. There’s no code here to change the actual data, but, use at your own risk.

(Apologies for WordPress doing things to code formatting!)

function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("ColourTool", [ {name: "High is Green, Low is Red", functionName: "hiToLow"},{name: "High is Red, Low is Green", functionName: "lowToHi"}]);

function hiToLow() { colourCells(1); }
function lowToHi() { colourCells(2); }

function colourCells(mode) {
var s = SpreadsheetApp.getActiveSheet();
var r = s.getActiveRange();
var rows = r.getNumRows();
var cols = r.getNumColumns();

var minV = 9007199254740992;
var maxV = -9007199254740992;

for(var i = 1; i < = cols; i++) {
for (var j = 1; j <= rows; j++)
var value = r.getCell(j,i).getValue();

  if(value !== "")
    minV = Math.min(value, minV);
    maxV = Math.max(value, maxV);


for(var i = 1; i <= cols; i++) {
for (var j = 1; j <= rows; j++)

var val = r.getCell(j,i).getValue();

var percent = (val - minV)/(maxV-minV);

  if (mode == 2) { percent = 1-percent; }

  var colour = getColor(percent);



function getColor(power)
var H = power * 0.4;
var S = 0.9;
var L = 0.6;

return hslToRgb(H,S,L);  


function hslToRgb(h, s, l){
var r, g, b;

if(s == 0){
    r = g = b = l; // achromatic
    function hue2rgb(p, q, t){
        if(t < 0) t += 1;
        if(t > 1) t -= 1;
        if(t < 1/6) return p + (q - p) * 6 * t;
        if(t < 1/2) return q;
        if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
        return p;

    var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
    var p = 2 * l - q;
    r = hue2rgb(p, q, h + 1/3);
    g = hue2rgb(p, q, h);
    b = hue2rgb(p, q, h - 1/3);

return [r * 255, g * 255, b * 255];


Apple getting serious about gaming

When I wrote about Apple and their future games plans before (here and here), I was being optimistic on their timetable for expanding their games offering beyond playing on iOS device screens.

This seems to have changed; there’s strong signs on iOS 7 that Apple is about to put more energy on Big Screen playing. As detailed by Techcrunch and AppleInsider, Apple is not only adding a new games specific SDK into iOS 7, as well as launching support for new game controllers that connect wirelessly to an iOS device.

The SDK makes sense in pure play on iOS device screen context, but the controllers strongly suggest Apple is making a bet that increasing amount of people will play multiplayer games on iOS, in play contexts where more than one person shares the same screen. And sharing a screen is hard on small screens, so this is clearly an Apple TV bet. The current Apple TV allows gaming where you stream your game onto a big screen and indeed games like Real Racing provide very smooth split screen play experience using this tech.

Having said that, almost no game takes advantage of this. There’s two reasons this is happening. Firstly, the API to stream a second screen to the TV is confusing at best and there’s no API to setup the screen in app, vs user having to setup the streaming using semi-hidden iOS menus. Second, Apple is not promoting this type of play scenario anywhere, so there’s no bandwagon to jump on for developers, so most devs just won’t bother.

Now, my prediction here is, Apple will update the Apple TV set top box and/or release a TV set in fall of 2013 that runs a version of iOS 7, and are betting game developers will want to develop games for the platform. They’re releasing the SDK now to make developers familiar with it and to get some developers make reference games for the upcoming platform. If I was a betting man, I’d get my hands on one of these controllers and create a game that works beautifully with the streaming scenario on current Apple TV, assuming I’m porting it to a new box very soon.

Teaching your kid to ride a bike, the right way

The summer has arrived and I’m seeing a lot of parents teach their children to ride a bike in my visits to Victoria Park. And it’s painful, as most of them are doing it utterly wrong. Learning to ride a bike is safe, fun and easy when done the right way, as opposed to the episodes of frustrated crying I’m having to witness.

Here’s how to do it the Right Way:

* You need a bike where you can adjust the saddle to go so low, your child can have both his feet on the ground simultaneously, knees bent.
* Do not purchase stabilizers, and if the bike already has one or more, take it off. Stabilizers make it harder for your child from learning actual balance.
* Remove the pedals from the bike, which turns it into a kick bike.
* STEP 1 for your child: learn to kick yourself forward using his/her feet without falling over. When he/she is good enough to glide forward for 5+ meters without touching ground, the balance is 90% there for biking. It’s probably a good idea to spend a couple days at this level, before progressing on.
* STEP 2: Put the pedals back on. Do not raise the saddle – you kid still needs to be able to put both feet on ground comfortably. Help the kid get started with the pedaling by pre-positioning the pedal of the stronger foot to be in the optimal position (just push down!), possibly gently pushing from the back to get up to speed (remember, he can balance on the kick bike). Your kid now needs to learn to get to speed and STOP on her own. Doing this bit on the lawn might be a good idea.

How long does this take? My daughter, age 3, learned the kickbiking to perfection within two days of practice (and didn’t need much encouragement as it was so much fun), and the pedalling step took about 10 minutes, after I told her she can’t ride on asphalt before she can start and stop by herself.

So what I’m advocating as a Bad Idea is:

* Using balancing wheels – they teach your child something other than balancing on the bike!
* Aiming to save money by getting a large bike, so you don’t have to get another one the next year.

So I’d have one more list here, here’s three additional tips:

* Remember to give a boatload of praise for your kid for trying to learn. Being praised for trying works much better than being praised for success.
* Get a good helmet. Of all biking helmets for kids, the best ones I’ve seen by far, are manufactured by Bell.
* If you can afford it, I recommend getting a learner bike and the real bike from Puky. The bikes are very high quality, and the saddle is adjustable to lowest height for each wheel size, that I’ve seen on bikes from any manufacturer.

Brief history of privacy, and a projection to the future

Privacy, as people currently think of it, is a modern invention.

If you go back 20 000 years, we lived in caves, where nobody had a second of peace. If you go back 200 years, practically everyone lived in small villages, where you had privacy in your home, but in practice everyone knew what everyone was up to.

The Village Privacy Model had a strong influence on people’s behaviour. If you behave in a manner that’s unacceptable to the community, you knew everyone around you go to know it, and you still had to face them. Mess up badly enough, and your life became very hard, regardless of whether there were “official” sanctions against you or not.

Enter urbanisation. People are moving into cities, where you’re effectively anonymous. It’s very easy to go and misbehave in a manner that wasn’t possible in smaller communities, and have no repercussions on it whatsoever. You won’t see those people again. You’re in the City Model of Privacy.

What this also means is the reverse – you can assume you’re in semi private mode at all times. Not only are you safe in your home, you’re also anonymous outside. I think this is having significant influence on how people perceive the expected level of privacy you have now – while at the village level there was almost no expectation of privacy, you can now expect privacy at all times.

Even further, enter Online use. You’re even more anonymous. Go to some random site to troll and there’ll be no repercussions. Nobody will know who you are. Nobody has the resources to track people.

Except you can’t assume this anymore. Technology caught up.

We’re entering a phase where it’s sensible to assume someone sees you at all times, and is probably making a recording of it. Both online and offline.

What inspired this post is this video. Some idiot tripped and severely hurt a young hockey player. It got recorded and went viral, and effectively ruined his life.

So for whatever it’s worth, we’re now getting back to the Village Model, from the brief experiment of the City Model. It’s Marshall McLuhan’s Global Village, with all of it’s privacy implications. He didn’t personally witness the computing technology explosion and so didn’t predict the implications to the extreme, but I’m sure he’d be excited if he was living today.

A lot of people are finding this new lack of privace extremely creepy and I don’t blame them. It’ll be interesting to see how the society adjusts. Going back to City Model is not going to happen.