• Day 14 of #100DaysOfSwiftUI: (not) recording progress

    My next step should really be to set up a GitHub repository in advance of the coding projects - practice what I preach. It’s always positive to record and reflect on your progress through a course.

  • Day 13 of #100DaysOfSwiftUI: in review

    Paul Hudson (@twostraws) has produced a fantastic amount of Swift programming resources, including many that would be suitable for high school #CompSci students. Take a look at Hacking with Swift.

  • Day 12 of #100DaysOfSwiftUI: optionals?

    Optionals at first seemed like over-engineering to solve a problem that was already “solved”, but the more I use them the more I appreciate them. Things like the nil coalescing operator just enhance that appreciation.

  • TL;DR - key to positive wellbeing is getting good sleep and having good relationships.

    UK Department of Education publish a report on Children and Young People’s Wellbeing

  • TES pick one part of a DoE report and run with a clickbait headline:

    TES: Mental health: homework ’linked to unhappiness’

  • Day 11 of #100DaysOfSwiftUI: Nigel Tufnel’s happy hour

    Having worked or hobbied with many languages over the years, I think protocols are the magic sauce that turns object-oriented programming gourmet. Turns OOP up to 11, if you will.

  • Day 10 of #100DaysOfSwiftUI: that’s class?

    To change struct property a ‘mutating’ function prefix is needed. This doesn’t work on constant structs, only variables - reasonable. But why need a mutating keyword at all? Oddities like this are why students think programming is hard.

  • Day 9 of #100DaysOfSwiftUI: lazy is as lazy does

    Lazy execution is a powerful concept. It’s like a sophisticated type of procrastination, but with authority.

  • Day 8 of #100DaysOfSwiftUI: for the record

    The humble struct of K&R days has given way to a much more powerful and capable descendant.

  • Day 7 of #100DaysOfSwiftUI: closure closure

    Closures are all very fine and good. Having not programmed in anger, or much more than mild irritation, for so long now, I still need to get my eye in. How do other languages handle closures?

  • Day 6 of #100DaysOfSwiftUI: the λ-calculus calculus

    Almost makes me want to dig out my old Haskell knowledge, dust it off, and… well, almost. One thing at a time.

  • Day 5 of #100DaysOfSwiftUI: get a func on

    The game really gets raised on day 5. On top of the usual functions and parameters, we have variadic functions and error throwing! And TIL: you can use otherwise key words (e.g. for, while) as external parameter labels in Swift.

  • Day 4 of #100DaysOfSwiftUI: goto 10

    Breaking out of loops to a label always feels a bit ‘goto’-like and reminds me of my youth spent hacking “space invaders” in Sinclair BASIC.

    Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ …

  • Day 3 of #100DaysOfSwiftUI: the secret life of modulo

    No idea why the operator is not named today, Some words are magical. For me ‘modulo’ is one of such word, as are ‘plethora’ and ‘dowp’. Operations and conditions are fine.

  • WalesOnline: School completely bans mobile phones and teachers say kids’ behaviour changes

    Or perhaps a highly visible and empowered staff are making a positive impact on improving relationships?

  • Day 2 of #100DaysOfSwiftUI: it’s not Kernighan & Ritchie

    If an enum case is defined with an associated value, then usage of that case must include an associated value? It would be useful to have that be ‘optional’. Use an optional?

  • Day 1 of #100DaysOfSwiftUI: probably not aimed at me

    I still get a warm and fuzzy feeling when I look at simple Swift code.

  • Because there is not enough to do. Time to play with SwiftUI. Thanks to @twostraws and the #100DaysOfSwiftUI. And micro.blog. Finally.

  • Equality and Privilege

    A little while back I read an article in the Guardian on gender imbalance in the most prominent roles within the biggest UK companies. A little further reading confirmed that this was not limited to the UK - not that I was surprised.

    It’s a topic I wanted to explore further for our school assemblies.

    Running our Businesses

    The FTSE 100 is a list of companies that are traded on the London Stock Exchange - specifically the 100 most valuable companies based on their market capitalisation. Each of these companies is run by a board and an executive team.1

    The board determines the long-term strategic direction of the organisation and is headed by a Chairperson - actually typically referred to as the Chairman. I guess that could be considered a hint of what is coming next.

    The executive team handles the day to day operations of a company. This team is led by a CEO.

    Within an educational context, schools also typically have a Board of Directors (or governors) headed by a chairperson, and their head teacher is the operational equivalent of a CEO.

    Counting Davids and Johns

    When you are faced with a room of 200+ pupils and staff at each assembly and you ask everyone called “David” to stand up, it is interesting to note just how relatively uncommon the name has become. Three Davids out of 650 pupils. Compare that to how many of our business leaders are called David.

    14 Chairs/CEOs of FTSE 100 companies are called David

    Repeating the exercise with “John” gets the same result. Three Johns out of 650 pupils.

    17 Chairs/CEOs of FTSE 100 companies are called John

    So then all females are asked to stand up. And suddenly the Davids and Johns are significantly outnumbered. So the open question is ‘How many women are in these positions of power, running the largest companies in the UK?’

    The answer is stark.

    7 Chairs/CEOs of FTSE 100 companies are female

    For every one of the UK’s most influential business leaders that are female, there are two called David.

    It all Comes Down to Money

    It’s not just at the top of the corporate ladder that inequality thrives. According to data gathered by the Office for National Statistics, when comparing those in full-time employment, men earn 10% more per hour than women. And that pay gap rises in managerial, professional, and skilled jobs.

    In fact, when looked at annually and combining all factors, on average the difference is even more significant.

    Average salary for men in full-time employment: ~£30,000 per annum

    Average salary for women in full-time employment: ~£25,000 per annum

    I am sure it could be argued that some of that comes from long-standing cultural factors that mean that women are more likely to take time out of careers to raise children - and new rules on Shared Parental Leave may well have an impact on that in time - but the fact remains that this pay gap exists across all levels and employment sectors.

    Representation of Women

    The leaders of corporations undoubtedly have a significant influence on our lives. They determine hiring policies and pay scales, oversee product and advertising strategies, and these leaders act as role models for those that try to follow in their footsteps.

    However, there is a more insidious gender imbalance that we are all faced with each and every day. It starts in government. Our elected (I will leave the unelected for another day) officials make decisions which affect our daily lives, our prospects, and our descendants.

    At the time of writing, 29% of the Members of the UK Parliament, and 36% of the Members of Scottish Parliament, are female. On the surface this is great news. From the position that faced the suffragettes I guess you could call that progress. But the fact remains…

    There are twice as many men running our country as there are women

    The imbalance is greater in senior ministerial positions. And in the top jobs, in most countries around the world, women are few and far between.

    Masculine Voices in our Heads

    The situation gets worse when you look just below the surface. The media representation of women has often been in the spotlight, from gender stereotypes in advertising to gender inequality in the film industry.

    But that is only half of the story. The news that is reported is typically researched, written, and presented by men.

    On sampling all of the attributed content in a selection of UK daily, national newspapers for a month in 2011, [the Guardian discovered][11] that less than 23% of named journalists were women.

    [11]: http://www.theguardian.com/news/datablog/2011/dec/06/women-representation-media ‘The Guardian. Women’s representation in media: who’s running the show? 6 December 2011.’

    Masculine Expertise in our News

    More concerning, I would argue, is the role of “experts” in the media. City University London, under the direction of Professor Lis Howell, has been studying the number of female experts who are brought in to provide evidence or information to support a reported story in mainstream broadcast news. The most recent round of research reports an increase in the proportion of women experts, however male experts still outnumber their female equivalents by more than three to one.

    Our lawmakers, the journalists that hold our lawmakers to account, as well as the experts these journalists wheel in to provide authority to their reports, they are predominantly male. Even if we assume the best intentions are being pursued by all involved, this is not a good message for our children to see day in day out when they access the most respected and trusted news sources.

    Is it any wonder that equality is slow to arrive?

    Recognising Privilege

    The postscript to this discussion is that gender inequality is just one of the areas in which we, as members of the human race, could improve our record on. Arguably things are getting better, but it’s easy for a professional, degree-educated, heterosexual, middle class, middle-aged, white male to talk about how important equality is when he has never had to face the challenges faced at the sharp end of inequality.

    Getting back to those assemblies… I tried to highlight this privilege by playing a quick game I had set up in advance. It requires a sheet of A4 paper per class (or per pupil if you do this in a single class, or want to make a big mess) and a bin or large box.

    The setup is crucial. It helps that our group classes are arranged in a predictable manner for each assembly, so I was able to arrange for each Group Tutors to give a sheet of paper to one member of their class - for those classes sitting close to the front of the assembly hall the sheet had to be given to a boy, for those at the back it went to a girl.

    During the assembly the nominated members are asked to stand up, and were told their goal:

    1. get your A4 sheet of paper into the bin at the front of the assembly hall

    They were also given the following rules, in the interest of fairness:

    1. participants must not move from their seat, nor move their seat
    2. the sheet of paper can be shaped in any way so long as nothing is added or removed
    3. no other person may help to move the sheet towards the goal

    The pupils are then invited to send their sheet of paper, now inevitably scrunched up into a ball or fashioned into some hopefully aerodynamic craft, hurtling towards the bin.

    This is an exercise in realising that privilege helps you to achieve your goals. It’s not that someone at the back of the hall is not able to reach the goal, but it requires an extra bit of skill, ingenuity, or perhaps luck. Those nearer the bin can more easily achieve the goal with perhaps a suboptimal projectile or a carefree throw.

    All the pupils had a level playing field. Equal opportunities. The same rules. The same rewards. Oddly the boys were more successful.

    My challenge to female pupils was to not sit back and allow inequality as they journey through life. My challenge to male pupils, and indeed myself, was to recognise their own privilege and to work towards countering it.


    1. Apologies to Business Management teachers, or anyone else for that matter, who may find holes in any of my explanations of how companies operate. I have been intentionally simplistic in my approach but hopefully not actually inaccurate. Happy to be corrected. ↩︎

  • Obesity

    I wonder how many of us have truly thought what it means to be obese?

    Of course I am sure, like me, most people have long had a loose understanding of obesity. It is a term that we could hardly be unaware of. There are countless news reports on the subject, often quoting studies into the ill-effects on our health that can manifest from obesity or discussing some current or future obesity epidemic.

    Even the smallest effort placed into actually reading about this topic, demonstrates the extent of the issue. According to Scottish Government statistics:

    In 2014, 65% of adults aged 16 and over were overweight, including 28% who were obese.

    The numbers may well be different in your country, but at the time of writing the most up-to-date figures from the World Health Organisation reveal there are more than 600 million obese adults worldwide, and a McKinsey Global Institute report estimates the annual economic impact of obesity as US$ 2 trillion.

    However, if I am honest, I have long known about this wider context. I have always just thought of obesity as a problem for other people - you know, governments who have to pick up the health bill, and all those obese folk!

    Definition

    So, what is obesity? Essentially a person that carries enough excess body fat that it has a detrimental effect on their health is considered obese. Typically a person’s relative weight is classified using their Body Mass Index (BMI).

    BMI is defined as the ratio: BMI = height in metres / (weight in kilograms)2

    There are many online tools which will calculate your BMI for you, including converting from imperial units if that is more your thing.

    An individual’s BMI is generally classified as follows:

    • a BMI below 18.5 is underweight
    • a BMI greater than or equal to 18.5 but below 25 is normal weight
    • a BMI greater than or equal to 25 is overweight
    • a BMI greater than or equal to 30 is obese

    Note: this does not apply universally, some countries have different classifications to suit differences in their populations, e.g. in Japan, a BMI of 25 or greater is considered obese.

    The Problem

    Without any real planning I have unexpectedly stumbled into middle-age. My jobs, at least since I hit my 20s, have been essentially sedentary - as much as a teacher stands up or walks around, let’s not get carried away by thinking that is exercise. And I haven’t really kept up with the trend towards standing desks (or even treadmill desks, yup you read that correctly) that the development community have now embraced for some time.

    I don’t climb as many hills as I used to, and cycling had become a distant memory. I might be carrying a few extra pounds (even as I type ‘pounds’ it sounds less than ‘kilograms’). But obese? Come on now, that’s for all those obese folk, remember?

    Well, on the 8 July 2015 an idle notion1 came upon me to check my BMI.

    BMI of 32.3 on 8 July 2015

    And there it was. Obese. In actual fact I weighed in at 101.8 Kg (a little over 16 stones in old money). And according to guidelines I should be no more than 79 Kg. Obesity was no longer some naive idea of a much heavier version of myself, rather it was something much more prevalent and significantly closer to home than I had thought to imagine.

    So now I have a problem I didn’t think I had before. Or a set of problems. A greater risk of heart disease, stroke, diabetes, a variety of cancers, and a host of other ailments that a quick Google search will be happy to list.

    And about now, if you have not already worked it out, I should really include a disclaimer:

    I am not a medical professional. If you are concerned you have a medical condition, including being overweight or obese, you should consult a doctor.

    At least I had a suggested solution. I only needed to lose 22.8 Kg (or almost 4 stones, which sounds just a wee bit more than that “few extra pounds”).

    Method & Tools

    Anyone can eat a bit less, or a bit healthier. Anyone can join a gym, or take up [parkour][10]. But whatever is started needs to be sustained. Sustained through cold, damp Winter days when you just can’t face leaping off of rooftops or somersaulting over railings2.

    [10]: https://www.youtube.com/watch?v=NX7QNWEGcNI ‘YouTube video: “The World’s Best Parkour and Freerunning”’

    I knew I needed to to do two things on top of simply changing my diet and activity levels:

    • set realistic goals
    • effectively track progress

    These would allow me to monitor progress, as well as provide meaningful feedback on my performance towards my goal(s) in order to provide ongoing motivation.

    The broad goal I already knew: a target weight. The smaller, intermittent goals are more appropriately the subject of a discussion in their own right, but they needed to work towards that final goal state.

    The tracking was easy, and also might benefit from more in depth discussion. I tracked my food intake with the MyFitnessPal service, using their iPhone app (although I understand they support other platforms). A newly acquired Apple Watch proved to be invaluable at tracking exercise as well as general activity throughout each day.

    Progress

    Almost six months in and I still not done. Although, my next challenge will no doubt be coming to terms with the fact that I can never be “done”. But in those months I have managed to chip away at two-thirds of my goal:

    Weight graphed from Jul 8 2015 (101.8Kg) to 28 Dec 2015 (87Kg)

    The graph shows the rate of weight loss decreasing. Partly, no doubt, because the process gets harder the nearer to the goal I get, but also because it is just that bit more of a chore to tackle this problem alongside a hectic Winter Term at school - which leads to a final observation for this post…

    Health & Wellbeing

    Health and wellbeing is increasingly at the forefront of corporate interest and now the subject of government scrutiny. The impact of a workforce in poor health is absenteeism and lower performance.

    In education, there has rightly been an increasing focus on the health and wellbeing of our students in recent years - both in terms of pastoral care and in the curriculum. This has begun to extend to governments and schools understanding that the wellbeing of their teachers is just as vital. It seems somewhat self-evident to me that as we entrust the safety and happiness of our children to the teaching profession it is essential that the profession is itself awash with teachers who feel safe and happy. Again, perhaps, a discussion for another day.

    But as individuals, teachers, professionals (of any profession) we shouldn’t leave our health and wellbeing to the whim of government or employers. There is is much that can be done to take responsibility for our own health and wellbeing.

    Look after yourself.


    1. In fact, I was evaluating an iTunes U course developed by Plymouth University for use by some of my pupils. The iOS Development in Swift course builds a BMI calculator as an example app. ↩︎

    2. Just for clarity, I haven’t taken up parkour. I have started cycling again though. ↩︎