Humility in Tech

There have been a lot of amazing attempts recently to help the people of Ukraine, who are obviously suffering on a horrific scale right now. And it makes sense that when people want to help they will draw on their skills and knowledge how best they can. As someone who likes to read into (and generally agrees with) the ideas of effective altruism, I do think this is a positive thing to explore. If you have very sought after commercial skills that often attract high salaries and general support and praise from the wider community, the desire to use those skills can be particularly strong.

Where we can run into an issue though, is when we want to help and the desire to help using your specific set of skills leads to you making the cardinal sin of thinking that helping is straightforward, easy and something you can do on your own. No surprise here, but I am particularly thinking about those working in technology, specifically software and its related disciplines. 

I’m going to pick on this area not just because I know it best but also because I do think this area of expertise is particularly susceptible to what I’m talking about. If you are a software developer or a data scientist, then you have been told by countless media articles that you are working in the coolest areas of endeavour and the economy,you’ve been told constantly how your field is ‘eating the world’ and how your skills are in such high demand and low supply that companies will pay you very well to get you to do your thing for them. I do not want to say that none of this is true, technology is one of the most important and dynamic fields out there and the jobs do indeed pay well. The thing we need to do as technologists (and supporters of tech) though, especially when faced with a horrendous humanitarian crisis that asks challenging questions of ourselves like “how can I make a difference?” And “am I brave enough to help?” Is remain humble. What I mean by this is very explicitly we should recognize that while we may have an interesting and cool skill set, this does not make us uniquely positioned to help in super special ways all the time. It also does not give us a license to ignore true, deep subject matter expertise.

A brilliant, and slightly terrifying, example has been making waves recently. You may have seen it on the news as well, essentially a teenage Harvard student spun up a website to help match those wanting to offer their homes to Ukrainian refugees with refugees looking for shelter. On the face of it, this is a very noble and effective use of this person’s technical skill set. However, in the view of being humble, we need to dig a little deeper and check our assumptions about how technology can help without the guidance of subject matter expertise. The big problem here is that people with subject matter expertise and who had worked in this area before quickly picked up on the fact that this website was a security nightmare (see here, where one security expert called this site a potential 'Craigslist for paedophiles') . There was no validation of users, no real background checks in place for those offering accommodations and it was very evidently going to be a soft target for human traffickers and other bad actors. Is the person who built the site a bad guy for trying this? I think it’s very likely his intentions were utterly benevolent, but a bit of humility might have led him down a different path. For example, if he had contacted some effective charities working to help refugees (or even just looked into the topic a bit) it would have become pretty clear that actually a far better alternative would have been to signpost people to these charities on his site, or even help channel donations to them somehow. This is because these charities are effectively organizational embodiments of subject matter expertise, with very knowledgeable people, networks and processes that work together on the front lines to solve these problems. You can’t replicate that with a website, not with working in partnership with these people. A bit of humility would have gone a long way here.

In fact, our next episode of AI Right will cover this, where we discuss the amazing work that the Code Your Future team are doing right now to help refugees and disadvantaged people in a way that is safe and in line with the direction of charities and subject matter experts. This episode was really inspirational to record and will be humbling in a totally different sense.

Note: the developer in question has since tried to incorporate a lot of feedback on this issue into his solution.

Machine Learning Engineering with Python - available for pre-order!

Machine Learning Engineering with Python: Manage the production life cycle of machine learning models using standard processes and designs by [Andrew McMahon]

After many months of writing, developing, designing and researching after work and at weekends, my book is now available for pre-order on Amazon!

I'm really excited as I've always wanted to write books and I had set myself a goal of writing at least one book by the time I was 30. So as long as the book is fully available for order in October as planned I would say challenge completed (my birthday is at the end of November).

Why did I write this book?

I have been working for a few years in a variety of roles in data science and machine learning (ML), and my career has now strongly went in the direction of focussing on productionization. A totally made up word that we all now use to mean 'taking ML proof-of-concepts and making them into working software solutions'. I've found this to be the hardest problem in industrial data science and machine learning, or at least the hardest problem that comes up often enough to justify focussing on it.

So given this focus and how much I know teams can struggle to understand some of the things they need to go from cool idea or draft model through to working solution, I decided to write this book. It's by no means perfect, but I hope it's a good collection of some of the ideas, tools and techniques that I think most important when it comes to ML engineering.

What's in it?

The book consists of 8 chapters:

  1. Introduction to ML Engineering
  2. The Machine Learning Development Process
  3. From Model to Model Factory
  4. Packaging Up
  5. Deployment Patterns and Tools
  6. Scaling Up
  7. Building an Example ML Microservice
  8. Building an Extract Transform Machine Learning Use Case

The book will kick off with more strategic and process directed thinking. This is where I talk about what I think ML engineering means and what is so different about building ML solutions vs traditional programming.

We then move onto learning about how to create models again and again by building training services and then how to monitor models for important changes like concept or data drift. I then discuss strategies for triggering retraining of your models and how this all ties together.

Moving on there's more of an emphasis about some important foundational pieces like how to create good Python packages that wrap your ML functionality and what architecture patterns you can build against.

The last piece of the book focusses on deep dives on a specific topic covers mechanisms for scaling up your solution, with a particular focus on Apache Spark and serverless infrastructure on the Cloud.

Finally, the book finishes with 2 chapters on worked examples that bring together a lot of what's been discussed earlier in the book, with a particular focus on how to make the relevant choices to be successful when executing a real-life ML engineering project.

What's next?

First of all, I'm just super excited this is real. As I mentioned at the top of the article this has been a dream of mine for a long time and I think the topics are important ones to discuss. Hopefully the book can help people in data science, software development, machine learning and analytics roles be successful. That would make me happy too.

In terms of what's next I'm thinking that it would also be beneficial to expand the topics of the book into an online course. That way, people who would like the material structured in a slightly different way can also get the benefit. It would also allow me to expand on some of the material a bit more, giving a more conversational flavour to the material. I like the sound of that, hopefully you do too!

All in all, I just hope people enjoy the book and get benefit from it. I benefited immensely from technical books in this space when I was starting out (and I still do) so I'm really glad I can make my own small contribution to that body of learning.

 

 

 

Quantum Field Theory [1]

Hi I've learned a lot of physics over the years ... Some of it was dry (introductory optics was booooring) but most of it was pretty cool. One of the single most interesting topics I studied however, was a physical theory called 'quantum field theory', whose aim was to unite the worlds of quantum mechanics with the idea of fields and of special relativity to create a really powerful set of tools for describing phenomena at the smallest scales.

What's a field?

In physics, a field is simply an entity which can be described by a number (or series of numbers) distributed in space. For example, we can consider the temperature across a room as being what is known as a 'scalar field' (scalar = 1 number to describe the field at each point in the room) or we can consider the wind across a country as a 'vector field' (vector = (x,y,z) direction of the wind, for example drawn by an arrow, at each point across the country). Fields crop up a whole lot in physics, and in fact the study of them mathematically is known as 'field theory'.

Further to this, there is a distinction in physics between what are known as 'classical' or 'quantum' field theories. Classical field theories include the theory of electromagnetism, or of general relativity (gravity). They are denoted 'classical' by the fact that they describe classical or pre-quantum physics, not that they are necessarily any simpler or don't still provide fertile research ground.

The whole aim of a classical field theory, is to describe mathematically the properties of a given field (or set of fields) and how they interact with matter. For example, electromagnetic field theory provides a description of how electric and magnetic fields interacting with objects which possess charge, such as electrons and protons. General relativistic field theories describe how objects with mass interact with one another and create changes in the gravitational field through their distortion of spacetime.

So, that's a field theory, but what make 'quantum' field theories so interesting?

What's a quantum field?

The description of the behaviour of very small objects in the universe is  often accomplished by using the tools of quantum mechanics. Quantum mechanics tells us that the world of the very small (atoms, nuclei, electrons, protons, quarks etc) is a world in which the normal rules of motion do not apply. For example, electrons are both waves and particles at the same time and they can be in two places at once. What became clear through the 20th century however, was that quantum mechanics was not providing a complete picture of behaviour at very small scales for a variety of phenomena.

For example, the electromagnetic (EM) field around a point charge, for example the electron, was a bit of a conundrum. Physicists like Jordan, Heisenberg and Born had developed a method for creating a quantum field theory for the free EM field in the mid 1920s (think photons). This was an excellent start but it didn't have the concept of interactions in it, so if you plopped an electron into your system you couldn't really say much about it.

... [TO BE CONTINUED]

Whoa There! The Data Community and Covid-19

The coronavirus pandemic and its affect on our daily lives do not need an introduction - we are all living through it this rather surreal situation. So, I'll just get right to it:

 What can the data science/analytics community do to help in this crisis? 

I think this is actually a really tough question. Given that, in this article I wan't to try and chew over some of my thoughts on this. I'm keen to get the conversation going in the wider analytics community, so please comment with thoughts and suggestions on electricweegie.com, Twitter, LinkedIn. Wherever you find this article and/or me, let's get chatting.

 

The Dangers of Being a Convincing Amateur

The global (and my local) data community consists of an amazing, diverse bunch of supremely talented and passionate people, who often want to go out and "make the world a better place" (as corny as that sounds). They want to do this through building analyses, products, services and technologies that entertain, guide and enable us in ways we never thought possible before. Just think where we were 10 or even 5 years ago in terms of big data, IOT, machine learning and the cloud to get a sense of how our capabilities and reach have grown as data professionals.

Now, when something like a global pandemic hits in this glittering age of data and technology, what are this community going to do other that roll up their sleeves and get analysing and building? Exactly.

I absolutely commend this, and I am desperate to get stuck into this problem myself, but I think we must tread carefully as a community. It is very easy to convince yourself that because you know your way around industrial or academic data problems you can just start creating analyses on Covid-19 datasets and that this will automatically be helpful.

I think there are a few things that can quite quickly go wrong if we, as a community, get ahead of ourselves and do not do the necessary and important groundwork.

Basically, on an important topic like this one, there is nothing more dangerous than convincing amateurs. And let's be honest, if you do not already work in epidemiology or have some training in that area, you are an amateur. It will be a new topic, but because of your years churning out data science and analytics solutions you will be able to build something sophisticated that looks great and uses cool sounding techniques. In other words, you'll be a very convincing amateur.

This can be really dangerous because if we in the analytics community start churning out analyses left, right and centre without key knowledge of this field, we could be coming to conclusions or making suggestions that are very convincing but potentially dangerous. And, as we all know, this is definitely a dangerous situation.

This week I have already seen analyses published on LinkedIn looking at things like case rates and calculated fatality rates for Covid-19 data from across the world where the authors drew some stark conclusions about the efficacy of state interventions or extrapolated outbreaks with some interesting (but ultimately misleading) exponential functions. I am not saying here that these analyses shouldn't have been done, but what I am saying is that

a) there are better things we could/should be doing as a community and

b) we will all need to be careful about the language we use and how we communicate.

Fine, Andy, you aren't happy - so what do we do?

 

Levelling Up & Leveraging What You Know

First, let's consider the case where you really have your heart set on analysing the outbreak data (who doesn't love an armchair epidemiologist?).

In this case, the least you can do is level up your knowledge before you go drawing strong conclusions from your data. At a base level read this thread from Adam Kucharski on Twitter. Kucharski is an associate professor at the London School of Hygiene and Tropical Medicine where he works on, you guessed it, epidemiology. I'd really also recommend his book, The Rules of Contagion (not sponsored btw). You can also do the usual and audit a MOOC, for example I am currently doing the 'Epidemics' course from UPenn on Coursera. Doing this sort of reading will at least get you comfortable with the basics of the field.

I would then suggest that when exploring the Covid- 19 datasets, don't try to do too much interpretation or extrapolation. This way you won't fall into the trap of over-reaching or making any drastic suggestions. I still think doing some exploratory and statistical analysis super useful so by all means get stuck in. Just check yourself as you go though and be mindful of how you communicate your results - if you think you've discovered some weird quirk of the pandemic or some previously unknown intervention side effect, you probably haven't*.

If you are keen to look at the relationships between interventions and case rates or fatalities then please try and work in collaboration with someone who knows what they are talking about (but obviously be mindful that if they are indeed a disease modeller, they may be working flat out already and will not have much to give you an education).

The other very important way we can all help is by leveraging what skills we have and what fields we know inside out. It might require some thought, but I am almost certain that all of you out there have skill-sets you can apply in a way that will genuinely help people in this pandemic.

Some ideas to get the ball rolling:

1. Dashboarding & Visualisation: I think one of the ways we can absolutely help other scientists working on this is to bring together the datasets they need and provide them with the tools they need to interact with it dynamically and easily. This is  something that so many of you out there will be world class at. If you have developed Power BI or Tableau dashboards for organisations, if you're a whizz at building R Shiny or Flask Apps for customers then you can probably build something that will allow researchers to interact with relevant Covid-19 datasets and to glean insights from them.

2. Getting the Message Out: Whatever country you are in just now you have no doubt been watching a lot of press conferences, briefings and announcements by world leaders, health experts and of course the World Health Organisation (WHO). The greatest weapons we have in the fight against Covid-19 are the advice, suggestions and knowledge being expounded by WHO and other scientific bodies on an almost daily basis. Can you help get their message across? Perhaps you can build some web scraper that brings together all of the relevant health body advice in your country, or can you build automated alerts that link to different government sources to help people keep track? Could you even use those skills you developed in marketing analytics to work out the best ways to re-share, plug and package all this information so that the message gets out to the most people and the advice is followed?

3. Support the System: By far I think the best thing we can do is support the organisations and people who will both fight the disease and also keep your country running throughout this crisis. In the UK we've already seen some of the systems and processes we rely on in our daily lives being stretched and strained. For example we've had people panic buying and leaving supermarket shelves empty, even when there is no shortage of food or essential items. We've had to call up thousands of retired and lapsed medical staff to make sure we can cope with the coming surge in Covid-19 cases and the government have had to step in with a promise to pay people's wages. This is all unprecedented stuff and will not be solved by creating another Jupyter notebook that tracks the cases of Coronavirus. These are challenges to the system that supports our way of life. So what we need to is find the people that are working to solve problems in logistics, economics, communications, transport, energy, social care and so on and ask if they need data produced or analysed, and help them if we can. If we can do this guided by their expertise (similar to my point on epidemiology above) then we will all automatically be so much more effective and our voluntary efforts will have more of an impact.

I have seen two great examples of this the other day (and I'd be keen to hear if you have found more!):

1. Crowd Fight Covid19 : This initiative is acting as a market place for scientists to help one another and collaborate. Why not see if anyone needs a data scientist or data analyst? From the site:

"Our proposal: This is a service for COVID-19 researchers. They only need to state a wish or a task, which can go from a simple time-intensive task to be performed (e.g. transcribe data, manually annotate images), to answering a technical question which is beyond their expertise, or to setting up a collaboration. They only need to explain their request in a few lines. Then, another scientist makes the effort of understanding that request and making it reality."

2. UCL made a call for mathematical modellers and data scientists to help them with their research. The call was filled up pretty quickly, but I bet you there are others like it out there. Seek these sorts of partnerships out!

Conclusion

If I was to summarise what I have been saying in a few bullet points it would be this:

  • Data skills can definitely help people during this crisis
  • Do not be an armchair epidemiologist, but by all means support epidemiologists (and other health care professionals) with your experience and skill sets. Most preferably under their guidance
  • Do work on tools to enable relevant professionals
  • Work on getting the public health messaging out there
  • Think laterally about the problems you can help solve. You may not think that helping the NHS work out who to send their most urgent advice to is as sexy as predicting the number of cases in a country, but you will definitely save more lives.

*I mean you might have .... but you probably haven't.

 

Educating Clients about Machine Learning and AI

The responsibilities of a data scientist or machine learning engineer can vary tremendously depending your industry, the company you work for, the type of projects you typically work on and what stage of your career you are at. An important and, I believe, commonly overlooked skill that is key to master if you want to progress in your data science career however is ‘teaching the client’.

I know that there will be many ways of interpreting what I mean by this so I am going to focus on a very specific problem often faced by data scientists who have to map out the problem with clients (either internal or external):

How do you communicate the ideas, concepts and potential utility of machine learning and AI to non-experts in a way that:

  1. Empowers them to make decisions based on fact and not hype,
  2. Helps them understand the what is required to successfully implement machine learning and AI,
  3. Manages their expectations.

This is no easy task, but in this article I am going to share some of the things I have learned from discussing, designing and executing machine learning projects with a variety of clients and managers. Hopefully there will be something in my experience that you can apply to your own work!

WTF is AI, WTF is ML?

It is so important not to go in all guns blazing when explaining what may be a complex solution to a client. Focus on the high level concepts, what data you are using and, most importantly, if and how it solves their problem.

The best place to start with someone who has heard only tangentially about machine learning or AI is to try and define it for them. The key is not to go all heavy in jargon like these from wikipedia:

In computer science AI research is defined as the study of “intelligent agents”: any device that perceives its environment and takes actions that maximize its chance of successfully achieving its goals.[1] Colloquially, the term “artificial intelligence” is applied when a machine mimics “cognitive” functions that humans associate with other human minds, such as “learning” and “problem solving”

Machine learning is a field of computer science that uses statistical techniques to give computer systems the ability to “learn” (e.g., progressively improve performance on a specific task) with data, without being explicitly programmed.”

That’s not to say there is anything wrong with these descriptions, they are just a bit … academic. Some of the ways I’ve tried to explain machine learning and AI to clients is by saying something like the following:

You can think of the field of AI as simply the study of how we make computers behave, act and solve problems like humans or animals. Machine learning is a subset of AI where algorithms don’t have to be programmed with hard coded rules (‘if this is the case, then do that’) in order to solve a problem but they work out how to solve specific types of problem through exposure to data.”

Now admittedly this is quite similar to the above, but I feel that it’s a bit less intimidating for a non-scientist or someone new to the field (as most business managers and clients are likely to be!).

Another great tactic is to give examples/concrete use cases. For example, imagine you want to predict the number of umbrellas that you are going to sell in a shop because you want to make sure you have enough stock. You have a look at the data and it’s clear that when it rains, more umbrellas are sold. So you hard code a rule in your system that says ‘if weather forecast predicts rain, order 100 umbrellas’. That’s a very basic way to solve the problem but a client will clearly understand this as your “baseline”. You can then tell them that if you wanted to do this with machine learning, you take the data and tell a machine learning algorithm that the number of umbrella’s is the “target” and the other data are what can be used for predicting this target. The algorithm then takes in the data and produces a model so that when you feed it similar data to what you’ve fed it before (for example the day of the week, the weather forecast and how many umbrellas you sold over the past week) then it makes a prediction with a given accuracy. The first is you hard coding a solution, the second is a machine learning or data science solution.

This is a bit contrived, but I feel that a concrete example like this covers a lot of technical topics, like “targets”, “covariates/features”, “training/testing”, “lift” and even “autoregression” without splattering jargon everywhere. An example like this can be used in many contexts, and most people will get the transferability to any other prediction problem.

Can we get one of them AlphaGo’s? Managing expectations

The next thing you have to do is educate your client or partner on the reality of all of this cool capabilities. A lot of people will have seen AlphaGo beat Lee Sedol or computer vision software successfully count the number of faces in a crowd and think that your problem must be easy. It is very rarely the case.

To manage expectations, just tell the client what you think is feasible given what you know about their data and set up. If you have successfully completed projects with similar starting points before then you are onto a winner, since you can draw quite heavily on this experience and use it as an excellent example. Don’t panic if you haven’t though, managing expectations is still very doable.

First, always make sure people are aware that machine learning is really centred around doing one of the following:

  1. Classifying something — telling you what something is,
  2. Predicting something — telling you what is likely to happen,
  3. Grouping something — pointing out things which are similar.

The optional 4th point to add to this list is ‘Solving something — acting intelligently to achieve a goal’ (read ‘reinforcement learning’), but if the client is new to ML this could create more confusion than is necessary at this point.

Using these stripped back and simplified definitions of classification, regression and clustering then the client can hopefully see a bit more clearly mind than what ML is actually useful for, and they can reign in their expectations accordingly. They can also then hopefully see (with your guidance) that if an algorithm is good at classifying something (e.g computer vision counting faces), then it doesn’t mean the same algorithm can ‘predict something’ (forecast umbrella sales). This helps to highlight the fact that its ‘horses for courses’ when it comes to ML and there is ‘no free lunch’.

Secondly, always bring it back to the ultimate goal, which is to solve a given (business) problem for the minimum amount of investment (time, energy, money). If it is not going to be necessary to predict the number of umbrellas to 99% accuracy every day then it isn’t even worth thinking about. Reiterate the Pareto principle that in many cases ‘80% of the effects arise from 20% of the causes’, so past a certain point you’ll only get small gains for a lot more effort.

Finally, to help reign in expectations, it is sometimes important to highlight that when some company makes a big announcement about some new amazing machine learning system ,they are only showing you the sparkling whites and not their dirty laundry. Any of these highly publicised systems (computer vision as a service systems from cloud providers are one particular case) will have areas where it doesn’t apply, can produce erroneous results and often will have been the result of an army of people with a lot of resources focussed on producing this one particular tool. This doesn’t mean you can’t solve your client’s problem, it just means that they have to be aware that machine learning projects are like any other project, more ambitious goals will require more resource. It’s that simple.

We Are Stardust

Article originally published at http://isciencemag.co.uk/features/we-are-stardust/.

The human body consists of around 37.2 trillion cells, each made up of different kinds of molecules, and each containing several different types of atoms that are categorised into elements. These elements, built into molecules like DNA, RNA, enzymes, proteins, haemoglobin and others, constantly execute an array of processes within your body that keep you alive and functioning.

But where do all of these building blocks come from? The answer to this question may seem somewhat surprising. The simplest elements in the universe can be traced back to the Big Bang itself, but the majority of the elements inside our bodies can be traced back to processes that occur inside stars. We are all stardust.

Stellar Nucleosynthesis

Stars are huge thermonuclear power plants that release vast amounts of energy into space, mainly through the fusion of simple elements into heavier elements. For stars with a mass up to one and a half times that of our sun, the main process is the fusing of hydrogen to form helium. Energy released in this process counterbalances the effect of gravity such that as long as the star has hydrogen to burn, it does not collapse.

This process of nuclear fusion occurs in most stars over periods spanning billions of years. Our Sun has been burning hydrogen for around 4.5 billion years, and we estimate that it has about another 4.5 billion years of fuel left. Although the main nuclear reaction occurring in the star produces helium by fusing hydrogen atoms, sometimes the reaction goes further. In the core of stars with masses close to that of the Sun, helium atoms can fuse together to create beryllium, which can then fuse with helium to create carbon, the most important element for life on Earth. Heavier stars (more than eight times the mass of the sun) can create even heavier elements, such as the calcium and iron that are integral for your body to function.

Stellar Death, Terrestrial Life

As a star runs out of fuel and reaches the end of its life several things may happen, depending on its mass. If a star is large enough (about greater than three times the mass of the Sun), after it has used up its hydrogen fuel it begins fusing helium in a cooling, expanding outer shell. These ‘Red Supergiants’ continue burning for around a million years or so before instantly collapsing under their gravitational interactions. This collapse causes one final rebound due to energetic interactions within the core and the star explodes into a spectacular ‘supernova’, throwing elemental products out into interstellar space.

Smaller stars (of about the same mass as the sun) also expand as they use up their fuel. However, the end of their lives is a much tamer affair as they shed off their outer layers into a ‘planetary nebula’ – a cloud of dust that surrounds the core.

The dust that is left in the aftermath of stellar death contains a wide variety of elements, including those very heavy elements produced during the end stages of the star’s life. This interstellar debris then begins to collect under its own gravity: swirling, colliding and clumping together to create large pockets of gas which will eventually collapse under gravity to produce a new star. The heavier elements will similarly collect to produce rocky material and eventually form planets like the Earth. The elements that were created inside the star and expelled at the end of its life then reside throughout the planets formed. The majority of the time, these elements will have combined to form complex compounds, found as minerals in the Earth’s crust.

As life evolved on this planet, it used the raw materials in these compounds to build sophisticated biological systems. Fast forward approximately 4.5 billion years and you have the huge cornucopia of plant and animal life that we observe on Earth today, including ourselves. So whenever you think of the origins of life on this planet, and think of the origin of the parts that make up your own body, remember that you should thank your lucky stars that you are here. Literally.

Images: Tycho Supernova Remnant (NASA).

Sun, Waves and Carbon - Quick Points on Energy in 2018

A quick look at some of the trends and issue to watch out for in 2018 in energy and environment:

Solar Power

Solar power has been expanding rapidly these past couple of years due to advances in technology and uptake meaning that it is now cheaper than traditional fossil fuels . In fact, the drop in price of solar (and wind) energy infrastructure has been such that a study in late 2017 pointed out that it is actually cheaper to install new solar and wind energy that it is to run (already built) coal and nuclear power plants.

Projections for 2018 suggest that this positive trend will continue, with new  global solar installations expected to exceed 100 GW for the first time ever in 2018, with China dominating demand.

I also have to mention that it looks like the first commercial distribution contract for perovskite solar cells (which my PhD is on) has been signed between Saule technologies and Skanska group. This is an exciting step forward for a technology with huge potential which has continually had major questions asked about its commercialisation potential.

Wind Power

Although wind power often gets lumped into discussions about solar (I committed this same sin in the previous paragraph) it is important to note that the wind energy sector is different and has its own challenges and opportunities.

Among the opportunities are exciting developments like a report from the Global Wind Energy Council in Oct 2017, which suggested that wind could account for 20% of global energy capacity by 2030. There have also been some ambitious projects proposed like the super-sized North Sea wind farm Dutch Power are looking to build, with a possible generating capacity of 30GW and complete with its own artificial island.

I personally feel that the growth of offshore floating wind farms will be a very interesting trend, as explained in further detail in this report by Willis Towers Watson, a huge amount of potential wind energy is located above deep sea locations. For example, that report states that

"80% of the offshore wind resource in Europe is located in waters deeper than 60 meters and has a potential capacity of 4,000GW."

As a Scot, I'm also proud that the first offshore floating windfarm (a 30MW project run by Statoil) was opened off the North East coast of Scotland in Oct 2017. It will be exciting to see more projects like this come online both in Scotland, Europe and the rest of the world in 2018.

Carbon Trading

Finally, as I am currently reading "Earth: The Sequel" by Fred Krupp and Miriam Horn , which is an interesting though slightly outdated look at different enterprises in renewable technology and argues heavily for a carbon cap and trade scheme, I thought I'd finish with a point on carbon trading in 2018.

As this brief article on the David Suzuki Foundation website highlights, there are two clear ways to incorporate environmental damage due to release of carbon dioxide (or indeed other greenhouse gas emissions) into our current economic model that do not require governments attempting to choose specific technologies to back through subsidies: a carbon tax or a so called "cap and trade" scheme.

In a carbon tax model, every unit of CO2 emitted is taxed at some fixed rate. For example, in Sweden the rate is currently $150/tonne of CO2 emitted. This directly discourages the burning of fossil fuels and other activities which emit greenhouse gases and therefore stimulates the growth of the renewable sector. Of the two models, this is the easiest for governments to implement.

In a cap and trade system, the government sets an 'emissions ceiling' which the entire economy must fall below. Emissions quotas are then divided out among potential polluters, for example through auction, and polluters cannot exceed these quotas. If they do then they must buy pollution quotas from other parties who have spare quota to sell in order to cover the difference. As time progresses the government successively lowers the cap, thus reducing the overall emissions produced by the economy. This encourages polluters to reduce their carbon emissions so that they can potentially sell there remaining carbon quota on the market, the market of course also acting to set the price of these quotas. The cap and trade scheme allows businesses the freedom to choose how they reduce their emissions whilst also providing a direct economic incentive to do so.

Of these two I like the idea of cap and trade systems best, as the cap itself provides a certainty about the total amount of greenhouse gas emissions that will be emitted. To my mind this is the clearest way to lower carbon emissions as in line with the reductions agreed to in the Paris Climate Agreement.

Due to my interest in this, it was exciting to hear that China are moving to introduce a carbon cap and trade scheme which it is believed could reduce their peak emissions timescale from 2030 to even earlier. Since China having its peak emissions by 2030 or earlier will be key to the world meeting the Paris Climate Agreement targets of less than 2 degrees warming above pre-industrial levels, I think this is great news.

How did Newton know it was an inverse square law?

I passed a sign in Glasgow today** that told me I was on "Newton Street". I've passed it hundreds of times on my way to the Mitchell library, which I've been frequenting a lot as I race to finish my PhD thesis, and never noticed it before. This got me thinking about good ol' Isaac and his phenomenal contribution to our understanding of gravity. As a physicist, Newton's laws and theory of gravitation are among the main first lessons you learn at University (and even at school). Specifically, we learn that the force between two objects with masses M and m is proportional to the product of these masses and inversely proportional to the square of the distance between them, or in mathematics

Now, the more I think about this formula, the more something puzzles me. I can understand the supposition that the force is proportional to the mass of each object, it makes sense that a more massive object would provide more gravitational interaction than a smaller one. You could rationalise this from observing the solar system through telescopes since Galileo's day - larger planets have more moons and the Sun has everything in the solar system orbiting around it. And if you know it's proportional to some power of the mass, why not just assume the linear relationship (i.e no powers of 2 or 3 etc, I'm supposing this is how Newton's thinking went but the reasoning behind the linear dependence on mass may have been more subtle than this). But how did he know that the gravitational force followed an inverse square law? I think answering this question will be an interesting exercise in showing people how the scientific method works when applied to theoretical physics (I would argue that Newton's law of gravitation is the first example of pure theoretical physics that actually worked!).

Well, it turns out it seems that it's not too difficult to see where it comes from. The realisation that gravity came about from an inverse square law was through Newton doing the following:

1) supposing that gravity was universal, i.e the same law was responsible for an apple falling to Earth and for the moon orbiting the Earth and

2) knowing that he could rely on the most up-to-date observational data, which suggested that objects fell towards the Earth with an acceleration of 9.8 ms-2 and that the moon was accelerating towards the Earth at a rate of 0.00272 ms-2.  He also had to know that the moon was approximately 60 times further away form the centre of the Earth than the surface of the Earth was to the centre of the Earth.

Taking these two observations together Newton could just take the ratio of the two accelerations and observe that they are proportional to the relative distance squared

By the way it useful to note that taking a ratio like this is often a very clever idea, since it means that all the other stuff in Newton's law (which he didn't know yet!) cancels out, so he only needs to focus on the stuff he does know about (the accelerations and distances).

So this is a basic bit of theoretical physics (using your 'noggin' to work something out about how the universe works), but it is important to realise that Newton, and indeed all theoretical physicists, can't do this on their own. Remember, Newton had to rely on experimental data to feed into and check his reasoning. Theoretical physics without reference to experiment is not physics, it is just mathematics. This is important to remember, especially when you read articles in newspapers or popular science magazines about "genius theoretical physicists makes new discovery" - think Stephen Hawking, the people at CERN, Albert Einstein - they didn't, and couldn't, have done it without the most important thing in physics, experiments.

To continue this idea that theory isn't everything in physics, in a future post I will discuss how physics now has three "pillars", whereas before it had two,  theoretical, experimental and computational. Until then, Tschüss!

** Note: I wrote this aaages ago and forgot to publish it ... I'm no longer going to the Mitchell library every day.