Todd Davies

Me
Recent postsRSS

An open letter to the Prime Minister; let the UK lead from the front on climate change

01.03.2020This is an open letter to Boris Johnson, highlighting the importance of the UK's presidency of the United Nations' conference on climate change in 2020.

Dear Prime Minister,

I have a vision for the future; where foreign conflicts are solved without losing soldiers, disease is overcome before it becomes a pandemic and climate change is avoided while our economy simultaneously thrives. Where countries work together to overcome the many challenges we face across a global landscape; , addressing problems of a size and scale way beyond the capabilities of an individual nation state. All above require determined and concerted action from everybody, everywhere.

As the UK becomes more independent, and bravely ventures into the globalised world as a reinvigorated sovereign entity, these global challenges are more important than ever. Meanwhile as a country, the UK stands in a moment of both transition and renewal; release from the EU provides an opportunity for deep change, in both the UK's image of itself but also the image it projects abroad.

Thankfully, as the UK re-crafts its image, a golden opportunity is approaching; the UK's presidency of the "26th Conference of Parties for the United Nations Framework Convention on Climate Change" in Glasgow later this year. It provides the perfect arena for the UK to showcase its solidarity, its diplomatic clout, and its international leadership in the pursuit of a better world.

At his keynote speech at the Munich Security Conference, Ex-UN Secretary General Ban Ki-moon expressed optimism about the potential of the UK's COP to be as successful as the Paris conference was. Mr Ki-moon based his optimism around the UK's history as a force for good; citing the fact that the UK used its position in the UN security council to push climate change onto the agenda, and that the UK's development aid has had massive impact improving people's lives all around the world. He saw no reason for the UK's success to falter now.

Mr Ki-moon was however, less optimistic about the appetite for multilateral action around the world, and lamented its loss at length. He observed that with its COP presidency, the UK has the chance to double down on its assertions that it wants to be independent not isolated in the post-Brexit world, and lead from the front in embracing multilateralism to pull countries together, showing the world how to overcome the greatest problem of collective-action it has has ever seen.

Of course, concomitant with the responsibility of the COP presidency, comes the power to highlight issues important to the UK, and push for preferred solutions. As climate change becomes ever more important , the scope of agenda setting power conferred by the COP presidency increases too. From investment risk to national security, the effects of a changing climate are no-longer sequestered away to issues that concern only environmental politics, and will surely shape global development enormously over the next half-century.

So, Prime Minister, I'm asking you personally, be ambitious, and invest our Government's resources into making this COP a true success. Use the opportunity to bind the country together around a sustainable transition, to forge an outcome the UK can be truly proud of. Take back control, and extrapolate the values behind one-nation conservatism into a shared vision of one-world conservation. Social obligation over individualism and equity for all. Leaving a legacy for your government, and most importantly, a viable planet for future generations to thrive on.

Yours respectfully, Todd Davies


Getting into the habit of getting stuff down

05.11.2019

My life got more busy lately since I started a masters degree, perhaps it's not the best time to start a blog. But, as the headmaster at my high school would cheekily remark, "if you want something doing, give it to a busy person" (often at the end of a conversation to parents about homework allocation).

In order to make the blog successful, it needs to have content. I think if I try to make each new post as good as I can, then this blog will remain decidedly empty. I aim to embrace the maxim that 'perfection is the enemy of good' and strive to improve the quality blog, at least initially, by simply getting content out there, and getting into the habit of getting stuff down.

Actually, there's a fun anecdote about this; a university professor once split their photography class in two; one half would be graded on the number of photos they produced, and the other on the composition of a single photo that they would select and submit. At the end of the course, the best photos were all from the 'quantity' side of the class, since they had spent lots of time practicing their skills, while the 'quality' side of the class mostly theorised about the best approach, and didn't actually learn as much. There's a more in-depth blog post about that here.

That's not to say that I'd like to post complete junk, I hope each post will have a central theme and something meaningful that I'd like to say as the basis behind it.


How to make a Pull Request (for my notes)

01.11.2019

If you want to skip to the tutorial, click here.

Soon after starting at university, I started to become frustrated with the rather poor quality of the lecture slides we would have to revise from. Though all the information was there, and it was (mostly) perfectly clear if you attended all the lectures, when it came to revising for the exams, it was hard to figure out what exactly was happening from the lecture slides themselves.

Thus, I started to make my own notes and flashcards, which I put online after each of my courses was finished. To my very pleasant surprise, other students at Manchester started to use them for revision too. This is very visible from the large spikes in traffic that my website receives during every exam period.

The peaks in my website's traffic correspond to exam periods at university.

This makes me really, really happy, but with great happiness comes a little bit of responsibility. Since so many students are using my notes to revise and learn, any mistakes in the notes (and there are likely quite a few) could be propagated onto them, which nobody wants. Furthermore, some of the courses have changed and the material has become out of date, argh!

Since my notes are 100% open source, I've always hoped that they would become living documents, and students would update the notes as they found mistakes, or thought of improvements. While I do typically receive a few changes per year, I think there's a very low ratio of eyes-on-page to proposed-amendments, and I'd like to improve that. I recognise that many students, having just come to university, might not be familiar with LaTeX, or with Git or with how pull requests work, so this is my effort to help students contribute.

So, what follows is my guide on how to submit a pull request to my notes, from start to finish.

I'll split the tutorial into three parts; the structure of my notes repositories, how to edit the notes, and how to submit a PR.

How my notes are structured

As of writing, my bachelor's degree notes are split into three repositories on GitHub, corresponding to each year I spent at university. The repositories can be found here, here and here. In this tutorial, I'll use my first year notes as an example, but the other two repositories are similar.

I'll assume that you have a terminal set up that you can type Git commands into. If you've not heard of version control or Git before, perhaps read this intro before continuing.

If you want to make changes to the notes, the first step is to fork the repository. To do that, you need to open the repository in your web-browser and hit the 'fork' button in the top-right corner. This will create a copy of my repository under your GitHub account, that you can make edits to Eventually, you'll send me a request to pull your edits back into the original repository (and that request, is the pull request).

Once you've forked the repository, you'll need to download it to your machine before you can make any changes. To do that, you should run the following command, but replacing `Todd-Davies' with your username so that you download your copy of the repository:

$ git clone https://github.com/Todd-Davies/first-year-notes.git

Now, if you run cd first-year-notes and then run ls, you'll see the structure of the notes directory:

$ ls
> COMP10120 COMP11212 COMP15111 COMP18112 setup
> COMP11120_1 COMP12111 COMP16121 README.rst
> COMP11120_2 COMP14112 COMP16212 page_count.sh

Each of the COMP* sub-directories contain the source for one of my notes files, and as you can probably guess, they're named after the course code for that course.

Lets see what's inside one of the course subdirectories. I'll cd into one of them, then see what's inside:

$ cd COMP15111
$ ls
> build.sh notes.pdf
> content.tex notes.tex
> drawstack.sty packages.tex
> flashcards rm_extras.sh
> kindle.pdf tcolorbox.sty
> kindle.tex two_box_model_diagram.pdf
> meta.tex two_box_model_diagram.tex

How to make a change, and build the PDF files

That's a lot of files, and most of them aren't relevant for the basics. The most important thing to know, is that the content goes inside the .tex files, and the output is in the .pdf files. The actual notes usually live in the content.tex file. In order to convert the tex files into pdf files, then you need to either run a command called pdflatex, or run the build script that's usually provided (later versions of my notes should use makefiles) ./build.sh.

I'm not going to go into editing the LaTeX code now, because that would make a long post already longer than it is, but to get your feet wet, try making a change to some text, saving the file, compiling the code using the build script, and viewing the updated output in a PDF viewer (your web browser should do the trick).

How to make a change in Git, and push to GitHub

Once you've done that, if you run git status, you should see output similar to the following:

$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
(use "git add (file)..." to update what will be committed)
(use "git checkout -- (file)..." to discard changes in working directory)

modified: content.tex
modified: kindle.pdf
modified: notes.pdf

no changes added to commit (use "git add" and/or "git commit -a")

As Git says, the next step is to make a commit with the files we changed! Lets do that, and then push back up to the repository we forked on Github.

$ git commit -a -m 'My first commit'
...
$ git push origin master
...

Note that most of the courses have a section for contributors; please do add yourself in there if you do some editing, however small!

How to make a Pull Request (PR)

Now, if you go back to the repository you made in GitHub, and click on 'Pull Requests' in the tabs, then you should be able to see a 'New pull request' button on the top right side:

The green button on the top right!

If you click the button, you'll be taken to the UI, where you can actually send the PR to me.

Next steps

Now, I'll get an email that you sent me a PR, and within a few days (hopefully!), I'll take a look and either merge the PR into the codebase (which will automatically make the updated versions of the notes available on my website), or give you some feedback if we should make some changes before we merge.

If you'd like to see examples of previous PR's, then you can look here.

Finally, studying CS is hard, revising is hard, exams are hard, writing LaTeX is hard, putting all the knowledge you've learnt into coherent sentences so that other people can understand it is also... hard. So first off, if you do get around to making a PR, then you have my sincere gratitude for the effort, and second, I promise to be friendly, and will spend the time with you to help with any part of the process if required. If you have any problems, feel free to email me!


I'm starting a blog

31.10.2019

The internet has gotten a lot of flak recently for facilitating information pollution via the World Wide Web, which is a shame, since the internet is also an incredible force for good in the world.

I recently realised how much I love looking at what people produce online. It's easy for me to spend lots of time looking at aggregated content on Hacker News and Lobste.rs, in part, because it's rich in stuff that represents the best of the web; highly heterogeneous content from individual creators who are passionate about what they're doing. In particular, Drew De Vault's blog and work is a good example of content I highly value, and Jamie Tanna's post on the indie web helped motivate me to start the blog.

Conveniently, I do a lot of journaling and note taking as it stands; I keep a gratitude journal, a philosophy journal, write notes on lectures and papers for my university studies, and keep track of other random assortments. I hope that the additional effort required to translate the content into a blog and make it accessible to all is low enough that I can post fairly regularly, and enjoy the process.

Here's to blogging!