Fixing Jupyter: ERR_ACCESS_DENIED error using Chromium on Ubuntu

Fixing Jupyter: ERR_ACCESS_DENIED error using Chromium on Ubuntu

I just discovered how to fix a really annoying issue with Jupyter on Ubuntu I’ve had for a while. Whenever I run jupyter notebook, instead of my browser opening right to the notebook page, I would get this:

Access to the file was denied
The file at … is not readable. It may have been removed, moved or file permissions may be preventing access.
ERR_ACCESS_DENIED

Then I’d have to go back into the terminal, and click the link there.

Here’s an easy fix*:

  1. Generate a jupyter config file: jupyter notebook --generate-config
  2. Set c.NotebookApp.use_redirect_file = False

And you’re done! Next time you run jupyter notebook, it should open in your browser without any issues:

*credit for this goes to kosii on StackOverflow

Ten day Vipassana meditation course: my experience

You can find a slightly shorter version of this post here in case you don’t want all the detail, though I’d recommend reading the full version if you have the time. If you’re thinking about taking the course, this post might be helpful to read too. 

I just came back from a 10-day Vipassana course. It was a unique and tough experience full of ups and downs, and very different from what I expected.

I’d been interested in meditation for a few years,  but hadn’t had the discipline to put it into practice. I chose this course because it’s a 10-day immersive course with no communication throughout. No phones, no talking to the other meditators. Not even any eye contact or gestures. I liked the idea of the lack of distraction. Other than that I have to admit I didn’t know too much about this specific course before I went, and that became apparent as soon as I got there!

Upon arrival, we made a vow to live by a number of rules, most of them not too taxing: no killing, stealing, lying, or intoxicants, and complete sexual abstinence. We also agreed not to leave before the end of the course.

Each day of the course started with a gong at 4 AM and finished with a talk at 9:30 PM, with around 11 hours of meditation in between. The rest of the time was made up of meal and rest breaks.

During our first morning meditation I was slightly surprised to hear chanting in a language I didn’t recognise. I later learned that this was Pali, the language spoken by the original Buddha, Siddharta Gautama. It was a little offputting, but I didn’t think too much of it. After all, the introduction had said that this technique was completely non-sectarian, and that people of all (or no) faiths, religions, or cultures could practice it. It also explicitly said that there was no question of conversion. Just a meditation technique.

We started by learning Anapana meditation, which focuses on the breath. This was similar to the techniques I’d learnt in using mindfulness apps like Headspace and Calm, but without any counting or mantras – just a pure focus on the breath and the sensation it leaves on the nostrils.

The first few days were tough, physically and mentally. My back and knees were aching from sitting cross-legged for 11 hours every day. I wasn’t getting enough sleep at night, so I had naps during my meal breaks and occasionally during meditation times. Even when meditating in the hall I often had little involuntary micro-sleeps, where I could feel dreams creeping in to my meditation. This made it difficult to observe reality “as it is”. But I powered through, being determined to improve my willpower, ability to focus, and control of my emotional reactions. And maybe I’d even get some more insight into the illusion of the self and a better experiential understanding of my mind.

The difficulty of the practice was offset by the evening talks. The talks are recordings of S. N. Goenka, who set up the course. The whole series was recorded in 1991, and has been used on these courses since. He seemed like a great speaker, likeable and full of wit and wisdom, with stories beautifully illustrating the ridiculousness of the human condition.All the things we crave, even though they’ll never make us happy. All the things we’re worried about, when in in reality they’re not actually that bad. Many of the ideas really resonated, and reminded me why I was there. I’d come out of the talks eager to get back to meditating. For these few days I felt like going on this course was one of the best decisions I’d ever made, and I thought I’d want to tell everyone to take it when I got back.

Much of this changed on day five. We’d been taught a new technique – proper Vipassana meditation – on day 4, and were putting this into practice. This technique is more nuanced than Anapana.  it involves scanning your body for sensations, and learning to be equanimous towards them. To notice them, be aware that they are impermanent, accept them as they are, and then move on. The idea behind this type of meditation, and the entire course, is that repeated conditioning of this type could change the habit pattern of the mind and make us more able to deal with difficulties on a daily basis. While Anapana trains awareness and focus, Vipassana also strengthens equanimity. We were told that this technique is there to purify the mind.

I liked the idea behind Vipassana, but it was tough. During some of the daily sittings we weren’t supposed to change posture or open our eyes for an entire hour, which inevitably means there’s a lot of pain and many urges to try to feel equanimous about.

The change for me came during the talk at the end of day five. Goenka explained the reasoning behind Vipassana meditation, which had been handed down through the generations from the original Buddha himself, who had come up with it while in deep meditation. At first the explanation sounded vaguely plausible, like a useful high-level psychological model of how we react to stimuli. In this theory, every time we react to a sensation with craving or aversion we generate a sankhara – which I interpreted as an analogy for a reactive emotion – leaving a lasting trace on the body and mind. Not only does it make us blind to what’s really happening, but it conditions us to be more miserable in the future. An example can be anger, where we can be completely engulfed by it for a short period, and the physical tension caused by it can have lasting (if subtle) effects. These effects can build up over time.

Ok so far. I can swallow that.

Supposedly then, the goal of Vipassana meditation is to stop generating new sankharas, and erase all the old ones. All of them. Through meditating and being equanimous towards our sensations, we stop generating sankharas. When this happens, old sankharas come up, and manifest themselves as sensations on the body. When we’re equanimous to those, they also pass away.

Hmm, ok. A little far fetched, but just maybe there’s a meaningful analogy there.

Then Goenka described the Final Goal: complete Liberation from these sankharas, followed by Enlightenment. These sankharas hold us back from observing reality as it is, and through being liberated from them we can observe what’s actually happening. We can train our meditation-sharpened mind to feel ever subtler sensations, right until we can’t go any further. At this point we’re able to feel the vibration of each individual subatomic particle in our body.

A lesson in particle physics. It turns out that there are only 4 types of fundamental particle, called kalapas, and they each have their own characteristics. Earth, Fire, Water, and Wind. These characteristics relate to emotions – for example, Fire is anger. When we feel a sensation of heat in a location on the body, that’s the manifestation of prior anger through a concentration of Fire kalapas in that area. Goenka emphasised the power of personal experience over observation-based science, proudly saying that Buddha had figured this all out by himself while sitting under a tree, just feeling his own particles vibrate. After all, this was obvious to anyone looking hard enough: “it’s just the Law of Nature. The law is universal. ”

In addition to this, while reaching Enlightenment, the Buddha witnessed all his past lives and cleared all the sankharas from those. Oh yeah, I forgot to mention: rebirth is a thing, and when one organism dies its consciousness is transferred into another organism. That’s why the best thing you can do in life is to clear all past sankharas, liberate yourself, and save all future incarnations of your consciousness from the misery that otherwise awaits them. Don’t worry too much about alleviating the apparent causes for suffering – poverty, starvation, cruelty – as long as you’re working on clearing your own sankharas and giving the gift of Dhamma to others. You can do this by teaching them, volunteering to help on a course, or donating to the organisation. Hmm.

At this point I’d had enough. Suddenly my mind snapped from thinking this was the best thing I’d ever done to thinking I’d been deluded into joining a cult, and I saw everything differently. I became a lot more aware of the chants, which felt like odd rituals. (to be fair, we were never required to respond, and any chants we chose to participate in were voluntary)

A few things on which I’d earlier given Goenka the benefit of the doubt started unraveling, and after a short walk I decided I was wasting my time and would have to leave. After all, I’d gained the benefits of wanting to focus my mind and of seclusion. I figured I could just not tell anyone I was back, and carry on a non-religious meditative practice while reading, writing, and listening to music at home. I started to get really excited by this idea.

I decided that before I leave I should speak to the teacher. It was now day 6, which I’d previously heard was notorious for people leaving. Only around 3 out of 60 of the male students had left so far. I wasn’t worried about looking like a failure for leaving, but I did have a slight hint of worry that maybe my mind was somehow tricking me into not continuing to do something difficult. A few friends of mine had done it, and one had specifically told me to ignore anything that seems like bullshit and focus on the parts that are valuable or useful. When I spoke to the teacher he also reminded me of the value people get from the courses, and the reported benefits, so I agreed to stay another day to see how I’d feel then.

On day seven I got into meditating again, and felt my mind focus more. I constantly had to remind myself why I was there – to “purify my mind”, in their language. I slept more, there wasn’t too much superstition in the evening talk, and I felt ok. On days eight and nine I decided since I was there I might as well commit to the technique properly, and so I did almost the complete 11 hour schedule on both days. (I “slept in” until 6AM on day 8 to catch up on sleep)

I spent a lot of time in the meditation sessions just thinking, and since I wasn’t too worried about the exact technique anymore I didn’t feel too guilty about this. My thinking was very scatter-brained at first but by day nine my mind felt very focused and patient and I had long, slow thinking sessions. I went for a lot of meditative walks.

On day 10 the requirement for Noble Silence was lifted, and we were allowed to talk to each other. I was shocked to realise that everyone else’s experiences had been completely different. Some people bought in to the whole thing – one person I otherwise got on with very well had previously met a monk whom he believed capable of experiencing vibrations in his body at the most fundamental subatomic level. Some others bought the particle theories, but not the rebirth. Others still were on the fence about everything, but vowed that the technique worked. I found a handful of people in the same situation as me – revulsed by the pseudoscience and thinly veiled religious aspects, acknowledging that there were benefits but unsure whether these were from the specific technique or just from abstaining from everything which would otherwise be distracting and doing some meditation.

And that’s the stage I’m at now. I do feel a bit different, but I’m completely put off by the cult feel of Vipassana and the way people are persuaded (almost manipulated, in some ways) to swallow the probably useful and certainly testable meditation technique with completely made up theories about kalapas and rebirth, strung along by a far off dream of Universal Truth, Enlightenment, and transcendence of mind and matter.

And all this while being told that Dhamma is “so logical, so pragmatic, so scientific”, and free of “rituals, rites and ceremonies”. I guess it is, apart from the chanting in a language we don’t know. And the repetition of certain phrases. Oh and we can’t point our feet towards the teacher or lie down in the hall. And all the teachers are men. The female teacher in the instructional videos always sits there in silence. Oh and we have to obey their arbitrary version of morality. And the teachers sit on a raised chair, next to a sort of altar covered in white cloth, underneath a huge projected image of the great Goenka. But apart from those, and the other rituals, rites and ceremonies, there are none.

On the other hand, the course is completely free. At the end, you donate what you like. Absolutely no pressure, and no one is (at least visibly) keeping track of who donates. Anyone, with any or no income, can do it. That part really impressed me. And when you try to leave, the people who are volunteering to teach, clean, or cook for you try to persuade you to stay! Bizarre.

Some things I’ve noticed since leaving the course yesterday:

  • Buying a train ticket was harder than I thought. The man at the counter didn’t have infinite patience as I slowly decided which ticket I wanted without acknowledging his question first.
  • The music I’ve listened to has felt more intense. I think I’ve been able to pick out new parts in songs I’ve listened to a lot before.
  • When I poured myself some tea, I could really hear it going in to the cup without looking out for that. It sounds stupid, but it felt kind of nice.
  • I feel like I have more self control and focus. I’m better at single tasking and less likely to be pulled into another task. I’ll catch myself getting the urge to do something else, pause momentarily, and then the urge will disappear.
  • I have a lot of motivation, and a feeling that time is precious.
  • I’ve been smiling a lot, felt appreciative of people and their actions, and been completely undisturbed and mostly amused by anything that might otherwise be annoying.

To be continued…

To get an idea of the nicer side of Vipassana and its goals, this essay is a good place to start: https://www.dhamma.org/en/about/art

And if you’re seriously considering doing the course yourself, this post gives a more balanced view of the good and the bad parts.

Ten day Vipassana meditation course: my experience (short version)

You can find slightly a longer, more detailed version of this post here. I’d recommend reading that version if you have the time! If you’re thinking about taking the course, this post might be helpful to read too.

I just came back from my first Vipassana meditation course. It was a unique and tough experience full of ups and downs, and very different from what I expected.

It’s a 10-day immersive course with no communication throughout. No phones, no talking to the other meditators. Not even any eye contact or gestures.

We had to live by a number of rules, most of them not too taxing: no killing, stealing, lying, or intoxicants, and complete sexual abstinence.

Each day of the course started with a gong at 4 AM and finished with a talk at 9:30 PM, with around 11 hours of meditation in between. The rest of the time was made up of meal and rest breaks.

We started by learning Anapana meditation, which focuses on the breath. The first few days were tough, physically and mentally. My back and knees were aching from sitting cross-legged for 11 hours every day. I wasn’t getting enough sleep at night, so I had naps during my meal breaks and occasionally during meditation times.

At first, the difficulty of the practice was offset by the evening talks. The talks are recordings of S. N. Goenka, who set up the course. He seemed like a great speaker, likeable and full of wit and wisdom, with stories beautifully illustrating the ridiculousness of the human condition. All the things we crave, even though they’ll never make us happy. All the things we’re worried about, when in in reality they’re not actually that bad.

A few days into the course we were taught proper Vipassana meditation – scanning your body for sensations, and learning to be equanimous towards them. To notice them, be aware that they are impermanent, accept them as they are, and then move on.

The change for me came during the talk at the end of day five. Goenka explained the reasoning behind Vipassana meditation: suffering is not inevitable, it comes about due to our aversion to certain sensations or craving for other sensations. If we come to accept reality as it is, we can be at peace with anything and act with love and compassion.

In this theory, every time we react to a sensation with craving or aversion we generate a reactive emotion that leaves a lasting trace on the body and mind. An example can be anger, where we can be completely engulfed by it for a short period, and the physical tension caused by it can have lasting effects which build up over time.

This sounded like it could make sense. But then Goenka went on to explain that through Vipassana meditation we can stop generating these emotions, and reach our Final Goal of Enlightenment. Not only that: we can train our mind to feel ever subtler sensations, until we can feel the vibration of each individual subatomic particle in our body.

This theory, and the belief in rebirth, means they think the best thing you can do in life is to clear all past reactive emotions, liberate yourself, and save all future incarnations of your consciousness from the misery that otherwise awaits them. Don’t worry about alleviating the apparent causes for suffering – poverty, starvation – as long as you’re on you’re on the path to Enlightenment and sharing this gift with others. You can do this by teaching them, volunteering to help on a course, or donating to the organisation. Hmm…

After this talk I felt like I’d been deluded into joining a cult. I thought about leaving, but remembered a friend who’d done the course and told me to ignore anything that seems like bullshit and focus on the parts that are valuable or useful. I managed to get back into meditating, and felt my mind focus more. On the remaining days I did close to the complete 11-hour meditation schedule.

So… how do I feel after doing the course? I do feel a bit different, but I’m put off by the cult feel of Vipassana and the way people are persuaded to swallow the probably useful meditation technique with made up theories about subatomic particles and rebirth, strung along by a far off dream of Universal Truth, Enlightenment, and transcendence of mind and matter.

On the other hand, the course is completely free. At the end, you donate what you like. Absolutely no pressure, and no one is (at least visibly) keeping track of who donates.

Some things I’ve noticed in the since I left the course yesterday:
  • Buying a train ticket was harder than I thought. The man at the counter didn’t have infinite patience as I slowly decided which ticket I wanted without acknowledging his question first.
  • The music I’ve listened to has felt more intense. I think I’ve been able to pick out new parts in songs I’ve listened to a lot before.
  • When I poured myself some tea, I could really hear it going in to the cup without looking out for that. It sounds stupid, but it felt kind of nice.
  • I feel like I have more self control and focus. I’m better at single tasking and less likely to be pulled into another task. I’ll catch myself getting the urge to do something else, pause momentarily, and then the urge will disappear.
  • I have a lot of motivation, and a feeling that time is precious.
  • I’ve been smiling a lot, felt appreciative of people and their actions, and been completely undisturbed and mostly amused by anything that might otherwise be annoying.

To be continued…

To get an idea of the nicer side of Vipassana and its goals, this essay is a good place to start: https://www.dhamma.org/en/about/art

And if you’re seriously considering doing the course yourself, this post gives a more balanced view of the good and the bad parts.

Should you do a Dhamma Vipassana course?

If you’re considering doing a Vipassana meditation course with the Dhamma.org organisation, you’re probably trying to decide whether it’s worth giving up ten days of your time. Here are some pointers from my experience. Hope they’re helpful. There’s more detail on my experience in this post.

 The Good

Environment: if you’re looking for an ideal place to meditate, there won’t be many places that compare to Dhamma centres. Peace, quiet, no communication, no responsibilities, lots of other focused meditators around you in the meditation hall, and places to walk around if you need some space.

Discipline: eating only what they give you, only at set times, following a schedule for a whole day, and coming out of your usual routine.

Cost: the entire course is donation based. At the end of the course, you pay what you think it’s worth based on what you can afford. There’s no pressure to make a donation, and as far as I could tell no one would even have noticed if I hadn’t donated. All of the teachers and staff are volunteers, so the running costs are actually pretty low. Most of the costs come from the food. Once you’ve done a course you can come back to volunteer in return for using their facilities.

Practicality: the course isn’t an academic exercise or a philosophical exploration of mindfulness. It’s very much practical and experience-oriented. For 11 hours each day you sit there in silence. You get instructions on different meditation techniques, including Anapana and Vipassana, and you try to work continuously to put them into practice. In this sense it’s a good fit for someone who’s read a lot about meditation, but hasn’t been able to make progress on actually doing it.

Intensity: the discipline and environment combined with the duration of the course means that you can get into a deeply calm state, which would be difficult to do anywhere else. This might then allow you to make more progress in meditation than you could at home.

Technique: the techniques they teach focus on improving awareness and equanimity, both of which I personally felt I improved at. Equanimity means accepting things the way they are, which makes it easier to deal with difficult situations.

The Bad

Duration: ten days is a long time. And it’s ten days of only Vipassana course, 24/7. No reading, writing, exercise, or contact with the outside world. Only you can know how much these ten days are worth to you, and what you’re giving up.

Sleep: the schedule allows for only 6.5h of sleep each night. While they claim that proper meditation means you need less sleep, for me it meant that I ended up taking naps during all of the meal breaks to catch up. I know a few others did this too.

Superstition: mixed in with the useful meditation technique is a daily evening talk explaining why the technique works and why it’s important to practice it. This relies on Buddhist beliefs like rebirth, enlightenment, and the idea that experienced meditators can feel individual vibrations in their body at the subatomic(!) level. This really put me off, and I got close to leaving when they first started talking about it.

Patriarchy: it’s never made explicit, but it was an uncomfortable theme for me throughout the course. In each of the evening video talks, S. N. Goenka’s wife sits next to him and never says a word. In the meditation hall with us we had both a male and a female teacher, to address each gender group separately. When instructions common to both groups were given, this was always done by the male teacher.

Conversion: while they say they’re not trying to convert anyone to their way of life, they really are. The talk on the last day made it feel like I’d attended a Buddhist Alpha Course. This doesn’t affect the usefulness of the technique, but it made me doubt why I was there throughout. It made me doubt that the technique had any use at all, and it made it harder to practice.

The Equanimous

Meals: there are only two meals per day; at 6.30am and 11am. At 5pm you can have a piece of fruit. Personally I found this useful since it forced me to realise that I don’t need to eat as much as I normally do, and it’s actually much easier to focus when you’re a little hungry. I know not everyone liked this though.

Observation: you spend most of the time in your own head. That’s great if you like it (which I do), but some people struggle with this and have difficult experiences. I saw a few people leave, some crying, and there was one meditation session where a woman suddenly screamed because someone had brushed against her while walking past.

Pain: sitting down for 11 hours a day is painful. My back hurt, and so did my knees. Part of that is by design – what would the point be in an intensive practical course on changing your response to pain, without experiencing any pain? On the other hand, pain isn’t fun.

Boredom: ten days of meditation, with breaks in between where you do nothing but eat, sleep, walk, shower or go to the toilet. That’s literally it, the entire time. Again though, that’s kind of the point. Through experiencing this boredom you can change your response to it, accept it, and become more capable of focusing on boring tasks.

Segregation: there’s complete gender segregation throughout the course. This is done to reduce distraction (for most people). There are separate accommodation areas, dining areas, shower blocks, and walking areas for men and women.

Testimonials: many people who do the course say it has changed their life, even when they don’t believe the pseudoscience parts. There are people who do the course multiple times, even every year. On the other hand, most sceptical people probably wouldn’t go on the course, or would leave before the end. And there are a lot of biases at play here – it’s a tough experience, and our brain tries to find reasons to rationalise our decisions in hindsight. We’re in a big group of people, and the atmosphere is conducive to agreement. Primacy bias means we’re likely to more strongly remember the pleasant final day of the course than the rest of it. And of course we’re happy when we get to talk again!

Evidence: empirical evidence for the benefit of these courses is limited. Studies have been done on meditation, but the few meta-analyses I found come out with moderate to no benefit compare to active treatments (exercise/drugs/etc). On the other hand, the potential side effects of sitting around not doing much are limited. I haven’t been able to find any studies focused on Vipassana, or on similar duration intensive courses, and it did feel like that was an important part of this experience. (many of the studies look at part-time courses). It’s unclear whether any benefit would come from the seclusion and discipline, or from the actual technique. But I’m not sure it really matters – not everyone has a similar place they could go to to spend ten days in silence and be dependent on others, with no obligation of payment.

So… should you go? 

It’s up to you! I think it mostly depends on how much you value your time, whether you can afford to give up your responsibilities for ten days, and whether you think you could sit through sermons on things you completely disagree with. If you can manage those, then I feel like the course can be valuable.

To help you get an idea of some of the good parts of the teachings, it’s worth reading The Art of Living.  For the bad parts, check out the Day Six Dhamma Discourse on YouTube, and skip through the part around 40 minutes in when he talks about rebirth.

Some tips if you do decide to go:

  • Have a clear reason for going. You can repeat this to yourself while you’re there to remind you why you’re doing it when you have doubts.
  • Understand that there will be mysticism, pseudoscience, and thinly veiled religion. At times you’ll feel like you’re a cult. Be prepared for it so it doesn’t throw you off and distract you from what you actually want out of the course. (unless you’re a beginner Buddhist planning for Enlightenment, in which case go ahead!)
  • Ensure you’re well rested before you go. The course doesn’t give you time to catch up on sleep, and I felt like I wasted parts of the first few days falling asleep during meditation because I was tired when I arrived.
  • Take clothes that will cover you, even if you’re a guy. T-shirts are fine, but shorts and vests aren’t.
  • Take flip flops or slip-on shoes, as you’ll be taking them on and off a lot.
  • If you’d like to sit through the entire course but you’re not sure you’ll be able to, just promise yourself you won’t leave on days 2 or 6. (or on the evening of day 5). These are seen as the toughest days, but actually I think a lot of people leave on day 5/6 just because that’s when all the pseudoscience comes out. If you go in armed with the expectation of pseudoscience and that promise to yourself, making it through to day 7 can help you get more out of the course.
  • Every evening there’s a chance to ask the teacher questions in public. Even if you don’t have any questions, I’d recommend sitting in to listen to the answers to other people’s questions.
  • Don’t worry about taking things you think you’ll be tempted by (e.g. phone/notebook), as you can put them in a locker for the entire course. At least this was the case at Dhamma Dipa in UK, where I did my course – it might be worth checking if your centre has lockers too.

Bananas, Porridge, and The Importance of Controlled Experiments

This was meant to be a story about how bad bananas are, and how natural isn’t always better. But it’s not. It’s a story about how bananas are probably ok, and control groups are important.

Crash

For a while now, I’ve been getting occasional symptoms of hypoglycemia (low blood sugar). Shakiness, clamminess, irritability, and a fast heartbeat. It’s no big deal, but it’s annoying when it happens in certain situations, like at work.

I noticed that it seemed to happen more often after I ate certain things. I started paying attention to my diet (see this post on a few things I did, like giving up soft drinks) and figured I was probably doing ok. Sugar crashes tend to be caused by overreaction to sharp sugar spikes, and I thought I was doing a pretty good job of avoiding these.

But I was still getting the symptoms.

So maybe I was still doing something wrong?

By the book

There’s only so much you can learn by reading. Despite trawling through tables on glycemic index (and, more to the point, glycemic load) values for all sorts of foods, I was still getting these sugar crashes. Where to go next?

In The Four Hour Body, I read that Tim Ferriss used a continuous glucose monitoring device to keep track of his sugar levels for a while. The one he recommended was ridiculously expensive (£1k+!), but after a bit of research I managed to find a disposable one that would last two weeks for £60.

So I bought one and, with some help, bravely implanted it in my arm. (thanks mum!)

Then for two weeks I kept track of what I ate and how it affected my sugar levels.

Bananas

Here’s one thing I noticed: when I had my usual breakfast of porridge oats with banana, my blood sugar shot straight up and crashed down quickly afterwards. (for reference, non-diabetics tend to have blood sugar levels of 4–6mmol/l before meals, and 6-8mmol/l a while after eating)

Now I knew bananas weren’t low in sugar, but I didn’t think they’d have that much of an effect! All this time I’d been having that breakfast because I thought it would give me a good mix of quick and slow release energy to keep me going all morning!

I figured it was time to change my ways. But maybe I could do a few comparisons first.

I measured my blood sugar over a few other meals, and it was stable.

I decided to see how a banana compared to pure sugar. Here’s porridge oats with three teaspoons of sugar:

Almost identical to one banana! Crazy, I might as well have been having sugar with my porridge all this time. Right?

Oops

On the very last day my sensor was active, it occurred to me that I should do one last breakfast experiment: a control group. Just to see — what would happen if I had just porridge? No banana, no sugar, nothing else. Just porridge.

Two things:

  1. It’s disgusting. Seriously, don’t do it.
  2. Surprise! The effect on my blood sugar was the same.

Here’s pure porridge (oats + semi skimmed milk):

Spike, and crash! Like the other two cases. So my conclusions were wrong!

Why?

It turns out that the assumption I’d made at the beginning was wrong*.

I’d been reading too many food and nutrition blogs, and took them at their word when they told me that “oats are a source of slow-release energy”. It turns out they’re not**.

I’d somehow selectively ignored the data that said that oats are, actually, quite high GL. One serving of oats is about halfway between a banana and a can of coke, in terms of its impact on your blood sugar.

What did I learn?

Sometimes you need to trust the way you feel over what you’re reading. Oats definitely won’t be my go-to breakfast anymore.

I also learnt that it’s easy to make conclusions based on very little data. It’s important to conduct experiments designed to disprove your hypothesis, not just to support it!

And finally… if you’re one of the people I spoke to after my first two bowls of porridge, I take back everything I said about bananas! (probably*)


* As someone pointed out to me after reading this, technically I never controlled for the milk in my porridge, which also contains some sugar. My sensor has expired now, but if I had another chance I would do another test with just oats and water. And one where I just eat a banana, to see what that does.

** Someone else pointed out that there might be a difference between different types of oats. As I was eating Tesco’s cheapest oats, it might be worth re-doing this experiment to control for that. 

Accuracy Over Precision

At school I had a physics teacher who was extremely pedantic. Nothing would upset him more than if you used the wrong term to refer to something. Even small mistakes most people wouldn’t pick up on would incense him.

I didn’t really get why, and in fact we would take great pleasure in saying the wrong thing so we could watch his face turn red as he shouted “Gravity is not a force! It’s an ACCELERATION!

But one of the distinctions he made has stuck with me. One that has turned out to be useful in many things in life, and not just physics. And that’s the distinction between accuracy and precision. While some people use these almost interchangeably, they have very different technical definitions.

Both apply to problems of measurement. In measuring things, we rarely have perfect tools, and most measurements will have some degree of error in them. Accuracy and precision are words we use to talk about different aspects of those degrees of error.


Accuracy vs Precision

Accuracy is how close our measurement is to the real value we’re trying to measure.

Precision is about the level of detail in our measurement.

It’s not immediately clear why these are different concepts, because in many cases they have the same magnitude. For example, measuring length with a ruler will let you read off an answer to the nearest 1mm (precision), which will probably be within 1mm of the real length (accuracy).

But this isn’t always the case. A watch might show the time to the nearest second (precision), but if you haven’t set it properly it could be out by a few minutes (accuracy).

It gets worse. When we start dealing with estimates and predictions in the presence of noise, these numbers can be much further off.

Estimation

For example, this article in the Telegraph claims that socialising increases our happiness by 6.38%. Yes, it might be true for the set of data points collected on the sample of people surveyed. But the decimal places hardly seem relevant, as the ‘real value’ (if there even is such a thing in this case) probably can’t be measured that accurately in a single study.

What’s happening in the Telegraph article, and in other places, is that by giving results to a high degree of precision, they create the illusion of accuracy and confidence in the results.

It’s not particularly damaging here, as there probably aren’t many people basing their actions on the results of that article. But what about more significant areas?

There’s nothing wrong with predictions or estimates, but giving precise estimates and not stating the variance or the level of confidence can be misleading.

Application

If you’re making a decision based on data, don’t mistake precision for accuracy. If in doubt, ask questions:

  • How many measurements were used to come up with the number you’ve been presented with?
  • What is the range in the sample of measurements? What was the smallest value, and what was the largest value?
  • How close does the person presenting the data think it is to the real value?

The last question will force them to be open about the accuracy of their data, and should allow you to decide how much weight to place on it. Sometimes it can even be best to just ignore the number completely and focus on more important things for your decision!


Thanks for reading! If you’ve found this article useful I’d really appreciate it if you could share or recommend it so other people can find it too. Follow me for more of the same, or check out some of my other articles.

How I Lost Control of My Spotify Account

And How To Prevent Unauthorised Access to Yours

Monday morning. Bag down, headphones on, ready to get to work. But first some music.

Please enter your username and password.

Hmmm, I don’t remember the last time Spotify asked me that.

Incorrect password.

Sigh. I guess I’ll have to reset.

Password reset email sent.

Why am I not getting a password reset email?

Maybe I signed up with my Facebook account?

Welcome to Spotify, would you like to take a tour?

That’s weird, it thinks I’m a new user…


What Happened?

It took me surprisingly long to figure out why I couldn’t access my Spotify account. Someone had managed to log themselves into my account, and had replaced the email address on the account with their own. Luckily it was a premium account, so even though it took several days and a few emails back and forth, the Spotify support team reset my account and restored the playlists I had lost.

Luckily Spotify’s support team were fairly helpful in restoring access to my account

But why would anyone want to hack into my Spotify Premium account?

Surely no one hates ads so much that they would hack into someone else’s account to get rid of them rather than paying the monthly fee?

Months after this happened and I had forgotten all about it, I read this article about Spotify’s royalties model which revealed a motive:

All a fraudster has to do is set up a fake artist account with fake music, and then they can use bots to generate clicks for their pretend artist. If each stream is worth $0.007 a click, the fraudster only needs 1,429 streams to make their $10 subscription fee back, at which point additional clicks are pure profit. But… it’s possible to purchase stolen premium accounts on the black market, making the scheme profitable almost immediately.

So someone got control of my Spotify account, and was using it to play their own ‘music’ on repeat to extract royalties from the system. It turns out that it’s possible to make up to $600 monthly per account this way. But how did they get into my account in the first place?


My Mistake

This is where I have to admit that even though I’ve been interested in computer security for a long time, I’ve been lazy for a much longer time, and sometimes I reuse passwords. I know, I know… When I first set up my Spotify account I used a password I had used before. I didn’t bother changing it when I upgraded to premium.

It turns out that one of the things I had used that same password for was to sign up for an Adobe Photoshop trial. Oh and, in the meantime, Adobe got hacked and the details of 153 million accounts leaked. Oops.

So I’m guessing that some ethically compromised, entrepreneurial faux-artist out there realised that people would reuse their Adobe passwords for other things and checked all the hacked details to see if they could log into Spotify with them. And my account was one of those.


Lessons Learned?

Stop reusing passwords. Seriously! Stop it. Right now.

After this happened I read up a bit on best practices for personal online security, and wrote up a short summary of the easiest things with the greatest impact. You can read it here.

Thanks for reading, I hope you’ve found this useful. Please recommend and share so others can read this too. Leave a comment or response if you have any tips to share! Now, I have some passwords to change…

Eating to Live Forever: A Sustainable Healthy Eating Habit

Visionary technologist, writer, and current director of engineering at Google Ray Kurzweil believes that he’ll live forever. Within mere decades, he says, nanotechnology will allow us to halt and even reverse aging. His current mission is to stay alive until that happens. Much of the advice below is sourced from his book Fantastic Voyage: Live Long Enough To Live Forever.

Eating healthily is hard. It requires willpower and it’s hard to care about long-term benefits when there’s cake in front of you. But there’s an even harder problem — what does ‘healthy’ eating even mean?

Mmm… pop tart butter ball surprise.

I’ve never been visibly unhealthy but a lot of my meals were — picture Eric Cartman and Chief Wiggum in charge of the food for a five-year-old’s birthday picnic, but with more chocolate.

I never thought this was an issue as long as I stayed fit. Since then family illnesses, other people’s opinions, and some basic research convinced me that I should probably reconsider.

The beginning

A few years ago, after reading In Defense Of Food, I decided to give up soft drinks almost entirely. The evidence against soft drinks and refined sugar more generally is uncontroversial, and many think that in a few decades the soft drink industry will be viewed in the same way we view the tobacco industry today. But what about the other aspects of diet?

Is it enough to look at calorie count, or should you care about the balance of macro-nutrients (carbs, fat, protein, etc)? Does it matter more what you eat, where your food is sourced, or how it is prepared? Should you eat low-fat? Low-carb? Paleo? Atkins? Slow carb? Soylent?

As nutritionism is notoriously faddish, it’s important to look beyond what people around you are doing right now (juice cleanses, anyone?) and consider what matches up with the evidence we have and the understanding of how food is processed in our body.

Kurzweil’s approach

It’s hard not to believe Kurzweil — he’s more than just technically literate, has sufficient resources at his disposal, and has an enormous amount of self-interest in following the most effective diet possible. While his book contains a wealth of fascinating information on biological processes and chemical makeup of different types of food, Kurzweil’s main advice boils down to the following points:

  • Cut out sugar and simple carbs almost entirely
  • Eat mainly whole foods
  • Reduce fat intake, especially saturated fats
  • Eat a lot of vegetables of various colours
  • Drink lots of water and green tea, avoid excess alcohol and coffee
  • Take a variety of supplements

Does this make sense? Probably…mostly. Sugar and simple carbs cause glucose spikes, which cause insulin spikes, which might reduce insulin sensitivity, leading to diabetes and potentially other long term downsides. Fats, especially saturated fats, contribute to increased risks of heart disease. Many vegetables are low in both of the above while containing high levels of important vitamins and fibre. Water is important for almost every process in our bodies.

As for supplements… Kurzweil has recently cut down his daily dose of supplements to ‘only’ 150 pills. He believes that aggressive supplementation is a necessary part of a modern diet, as it allows us to make up for dietary deficits and ‘hack’ our bodies by exploiting our understanding of the chemical processes underlying disease and ageing. Though he may have a point, I think Nassim Nicholas Taleb has an interesting stance on this: our knowledge of supplements and their impact is still very limited, and while they may have some positive effects it’s not possible for us to know what negative effects supplements will have without further long-term research.

Further, the fact that Kurzweil has his own dietary supplements business makes this part of the advice less interesting and potentially more biased (though I don’t believe that this is necessarily true).

My approach? Write the above points down on a business-card sized piece of paper that I keep in my wallet and read before every meal, checking whether the meal complies. I’m hoping that this will guide me in the right direction.

Effective Language Learning – Pardon My French

I’ve had an interest in French for a while. I got a basic grasp of the language during primary school, and never learnt enough in secondary school to comfortably have a conversation with someone. I started becoming interested in improving again about two years ago, and since then I’ve tried several different approaches. I’d like to share what has worked for me and what hasn’t.

My initial approach involved all of the usual things well-intentioned newbies do: I signed up to some evening classes, printed off verb tables to review “when I had time” and resolved to “sometimes speak French” with friends who were already fluent in the language.

While these all worked to some extent (I went to two out of ten evening classes, memorised a few verb conjugations and exchanged a handful of sentences in French with my friends before reverting to English), none were really a success. Frustration set in, and soon I was back to square one.


But then I stumbled upon a post on Tim Ferris’ blog, entitled ’12 Rules for Learning Foreign Languages in Record Time — The Only Post You’ll Ever Need’. Though initially sceptical, I found a lot of the advice useful and set about trying it. Here’s what I’ve found the most useful and effective, as well as some other things I’ve discovered since.


Listen to Stromae’s Formidable enough times and you’ll never forget how to conjugate être in the imperfect tense.


Immerse yourself

Almost every language teacher will recommend immersion as the best way to learn. That doesn’t necessarily mean travelling to a place where they speak the language though — there are plenty of other ways to achieve it.

The first step is to make a habit of engaging with things in the language you’re trying to learn, and the only sustainable way to do that is to enjoy it. For me that meant finding some good French webcomics and books, which I now read along with others on an almost daily basis.

It doesn’t matter exactly what you do, but try to consume media in your target language wherever possible, instead of watching films/TV in your own language. There are lots of great French YouTube channels (Nus et cullotés, Norman, news, …), TV shows (Braquo), films (qu’est-ce qu’on a fait au bon dieu, Amélie, …) and books (Le Petit Prince, Le Petit Nicolas) which will help you achieve a feeling of immersion at home. And since this is about having fun, you won’t even realise how much you’re learning — listen to Stromae’s Formidable enough times and you’ll never forget how to conjugate être in the imperfect tense.

Practise speaking

It’s important to practise speaking as early as possible — before you feel ready — because you’ll never actually feel ready. Speaking will force you to make mistakes and discover gaps in your knowledge much more quickly than anything else will. While it can certainly feel difficult and draining at first, there is no substitute for it. After all, what is the goal of learning a new language if it isn’t to communicate with other people?

This can be made fun by combining it with something social. There are great free language exchange groups on Meetup.com and Couchsurfing, where you can meet people who speak the language you’re learning and want to learn the language you speak. The great thing here is that there is an incentive for both sides to speak bits of both languages, and I’ve found it to be more constructive than learning with someone who is already fluent in both languages.

Streamline rote learning

The least fun part of learning a language is memorising grammar, but it has to be done. Everyone hates staring at pages in a book or on a screen for ages only to forget everything soon after, but luckily there’s a better way.

Enter Spaced Repetition Systems.

I wish I’d known about these when I was a student. Spaced Repetition Systems (I use Anki) are like flashcards, but smarter. They’ll track the cards you struggle with, and show you those more frequently. Cards which you consistently get right will be pushed to the bottom of the deck. The really smart thing here is that these tools try to show you each card again just before you’re about to forget it, allowing you to spend as little time as possible memorising things while remembering more! You can make your own flash cards, or use pre-made ones. I use this deck for verbs, but there are also decks for vocab and phrases here.

Commit to doing the boring things

Even though you’ll now be able to do rote learning more effectively you still have to… well… do it. It’s no use having a “learn regular French verb endings” item on your to-do list if you (like me) never get around to doing it. Commit to spending a small amount of time studying these at regular intervals. It doesn’t matter whether it’s 5 minutes every day or 20 minutes once a week, but put it in your diary and make sure it happens. The only way I’ve found to get myself to do this is to use a tool like Beeminder, which is built to help you commit to goals and overcome short-term laziness in favour of long-term benefits.

Experiment — and fail.

There are many ways to approach language learning. The right method for you depends on how you like to learn and what stage you’re at. If a method doesn’t work for you, try not to be discouraged and give up on learning altogether, but switch to a different method. Sometimes the marginal benefit from a certain method might be so low that you’re better off doing something else for a while and coming back to it later (e.g. you’ve memorised present tense verb endings and some basic vocab — get out there and practise speaking before you memorise anything else!).

On the other hand, there’s no shortage of advice or apps for language learning and it’s easy to get stuck in a cycle of changing your approach too frequently. I’d highly recommend reading the post on Tim Ferris’ blog which I mentioned at the beginning of this article as a start. The key apps I keep coming back to are Beeminder and Anki as mentioned above, and Duolingo. Here’s a detailed review of Duolingo as a tool for learning French from scratch, by someone who went through all the lessons on it from start to finish.

What have you found most helpful? I’d love to hear about it. More importantly, bon courage!

Shortcuts to Intermediate Climbing

I’ve been climbing regularly for about a year now. Mostly bouldering (no ropes, just a crash pad), at a great indoor wall in Bermondsey called The Arch. While I’ve still got a long way to go to becoming a good climber, there are a few key things I’ve learnt that let me progress from the beginner stage. As these things seem to be common among climbers but not obvious to beginners, I’ve shared them below to save anyone starting out the trouble of figuring them out for themselves.

Don’t do pull-ups

Overhangs. These climbs, where the wall has a slope of more than 90° (more than vertical), tend to be the hardest for beginners. The key is to expend as little energy as possible by keeping your arms straight and pushing from your legs to move up. Whenever you’re static for more than a second, make sure your arms are straight. Think about doing pull-ups — is it easiest to rest halfway through one, or at the bottom with straight arms?

Twist your body

Most people have their body square to the wall when they start climbing. This feels natural, just like climbing a ladder, but has several disadvantages. Having your body (hips and/or shoulders) twisted will keep you closer to the wall while allowing you to reach further — watch an experienced climber at work on an overhang problem and notice how often they twist their body from left to right depending on which way they have to reach for the next hold.

This was me at The Arch almost a year ago. Arms bent, body square to the wall, standing on the balls of my feet. If only I’d had this article…

Thumbs up

Pushing on a hold with your thumb while pulling with your fingers makes for a much stronger, more stable grip, and is less tiring. Good grip technique will allow you to progress more quickly without having to spend time doing boring finger strength exercises.

Pay attention to your feet

It’s easy to focus on the arms and hands, but if you’re climbing right then your legs will be doing most of the work. Think about where you place your feet, and place them carefully and deliberately. It’s almost always best to use the very tip of your toes rather than the balls of your feet. If there’s only one foothold available, the second leg doesn’t have to dangle. Place it somewhere deliberate on the wall or even in the air for counter balance.

Standard Moves

Flag. Drop knee. Smear. Rock over. Toe hook. Heel hook.

While it took me a while to realise this as a beginner, good climbers largely rely on a combination of standard moves, and knowing what these are gets you a long way. The trick, especially in bouldering, is figuring out how to combine the moves around the available holds. This is why boulder routes are called ‘problems’ — they’re as much a puzzle as an exercise.

Try this book if you like taking a methodical approach to learning. It’s £15 for a used version, but if you ask nicely I’ll lend you mine.

Fail more

As with anything, if you’re not failing regularly then you’re not pushing yourself enough. Once you get comfortable climbing at a certain level, start trying harder problems. If you struggle with specific types of problems (like I do with overhangs), then spend more time trying those.

Get excited

As Einstein said, the best way to learn is by “doing something with such enjoyment that you don’t notice that the time passes”. I find climbing enjoyable, but as with anything there are times when other things take over, you become busier, and find it hard to keep making time for it.

To counter this, remember why you want to climb. Watch amazing videos. Read inspiring books. Try different types of climbing. Challenge yourself. Find a group of people to go with. I was lucky enough to have some people in my group of friends happy to go climbing with me, and am making more friends along the way.


I feel like I’ve learnt a lot this past year, mostly about how much there is to learn. This year I’d like to learn more about rope techniques, and climbing outdoors. While I’ll still be bouldering too, I’ll be making time to go on some trips to the Peak District and other UK climbing sites. Get in touch if you’d like to join me.