Concurrent Programming in Prolog

This week, Tamara gave a presentation on her Part II project – implementing Concurrent Prolog. Tamara began by explaining how most programs only use one core of the CPU, and how her aim was to utilize multiple cores concurrently in Prolog and thus speed up computation.

She went on to explain the 4 fundamental rules of concurrency:

  • Atomicity – Either all actions of a transaction are carried out, or none are.
  • Consistency – Every action applied to consistent data leaves the data in a consistent state
  • Isolation – Operations are isolated, protected from the effects of other concurrently executed operations.
  • Durability – If an operation completes successfully, its effects persist.

To illustrate the benefits of concurrency, Tamara then demonstrated an example of using concurrency when walking a tree in Prolog. Since Prolog is a declarative programming language, there is no shared data when evaluating Prolog Facts and Rules, which turns out to be beneficial when implementing concurrency.

Tamara then outlined two possible implementations of concurrency:

  • Pool of threads: Using multiple worker threads that were able to claim and perform tasks that were held in a stack declared on the main thread.
  • Work stealing: Each worker thread has its own stack of tasks that it works through, stealing work from other threads if its stack is empty.

At the end of the talk, Tamara answered all sorts of fun and tricky questions. Everyone had the chance to give structured feedback on the presentation, using the techniques from Dr Rice’s presentation last week.



Presentation Skills Workshop

A skill often overlooked – but no less important – in the field of Computer Science is presentation. Apple’s keynotes, along with those of other major tech and gaming companies, compete with the year’s most highly awaited speeches. A new startup needs funding, and for that its founders need to be able to pitch their ideas. And even the typical professional or academic will present several papers or projects, often in situations where persuading the audience to believe in their idea has direct and significant consequences. So when the time comes, you need to be able to present effectively, which is why Dr Rice gave us a talk aiming to teach us this crucial skill.

Following annual tradition, we began by dissecting the “How (not) to give a presentation” video published by Neil Dodgson, a former member of the Computer Lab. Apart from more obvious issues such as a lack of preparation, absence of a script, and crazy transition animations and sounds, we were encouraged to pick up on the more subtle mistakes Dodgson (intentionally) makes. By the end, everyone knew the pitfalls to absolutely avoid.

People say that the best way to learn to present well is to practise. But you don’t always have someone at hand to listen repeatedly to your presentations, and if you don’t know what to look for in a good presentation, you can’t even practise usefully by yourself. Therefore, it’s very helpful to give feedback to others; by running critical eye over others’ work, you learn how to evaluate your own. The word “feedback” alone is quite nebulous, so Dr Rice suggests that we make use of a structure: we should comment on script (verbal content), slides (visual content), verbal delivery and body language.

To conclude the talk, Dr Rice covered a few tips to maximise the persuasive appeal of a presentation. Group things in threes. The first 30 seconds are paramount. Appear motivated.

And finally, make your ending snappy and memorable.

Second Years’ Summer Vacations

The Summer Vacation at Cambridge provides ample time for Computer Scientists at Queens’ to try their hand at a variety of new skills, as well as travel and have amazing experiences. The second years this year were impressively proactive in securing placements, expanding their skillset, and perhaps most importantly, recharging for the new academic year ahead – all of which they told us about in this week’s Wednesday afternoon meeting.

Yuzheng Ding began with a trip with his girlfriend travelling through Windermere, Edinburgh, Whitby and York. This well-earned break provided a chance to recover from the stresses of exam term before he returned home to China where he tutored students in maths, physics and IT. This was a great way to learn skills in teaching, and a chance to help others become better at SQL, algorithm design, BASIC, and more. He even found time to try to teach his mother some English and learn to cook, though apparently with mixed results!

Lex van der Stoep similarly took the summer as a chance to learn what he wanted to, studying game playing and machine learning off Kaggle. Impressively, he even got his dad interested in Haskell and to this day he helps him learn more of the functional programming language via email! The summer provided him with time to visit Tuscany in Italy, and the pictures of him basking in beautiful and sunny Split, Croatia certainly made everyone in the room feel very envious!


Meanwhile, somewhere between simply teaching yourself new skills versus working in an established company, Jack Wickham worked for a tiny startup company named FloatPlane Media, a spin-off of a company he had previously worked at. There, he and his team developed a new video platform in full-stack NodeJS, allowing him to get familiar with perhaps the most on-trend web development platform right now as well as the languages powering it (JavaScript and TypeScript), its APIs and tooling. His work involved learning APIs around Stripe and PayPal, as well as dealing with the more mundane side of running a web-service such as migrating user data. It sounded like a huge learning curve but one with large payoff, and all the hard work was rewarded with a family trip to Florida. Apparently the Kennedy Space Center was very impressive!


Aliyah Bond meanwhile worked for a much more established London startup, Monzo. This company’s fluorescent orange debit cards have become a familiar sight around Cambridge Computer Science students as they promise a simplified banking experience, integrated with smartphones with better ease-of-use. To gain experience and knowledge of the codebase, she was initially placed on bug fixes before being moved onto front-end development with React, as well as a some time on the backend writing Go. Aliyah enjoyed the working environment which had all the usual perks you would expect in a funded tech startup – beanbags, a dog-friendly policy, casual atmosphere and the like. And whilst there was only one other intern, she appreciated how it ensured she would interact with full-time, experienced employees.


Interesting insights into life as researcher came from Jamie Lowenthal, who worked in the University of Cambridge’s Computer Laboratory. Specifically, he worked in the Rainbow Group, who specialise in graphics and motion. His team were researching high dynamic range multifocal displays, which promise hologram-like graphics, as well as high dynamic range virtual reality headsets. His work included breaking apart iPads, stitching them to powerful GPUs, and tearing apart virtual reality headsets. It sounds like Jamie enjoyed his experience and whilst research may not have been quite like he expected, he certainly may return again – and highly recommends the UROP scheme for all those interested as well!


What did the third years do over the summer?

Queens’ Computer Scientists have regular Wednesday meetings during term time. Each week we have something new, and this week we were treated to nine 5-minute presentations from our third-year students who told us about what they did over the summer.

First off we had Andy, who worked for JP Morgan Chase and Co. in Canary Wharf, where he produced a data analysis tool for foreign exchange market making. This was clearly very successful: it’s now in production use! After Andy finished his internship, he went inter-railing around Europe and visited loads of exciting destinations including Rome and Berlin.

Next up was Dan, who spent his summer at Optiver after travelling to Barcelona. Optiver are a derivatives trading company based in Amsterdam, where Dan stayed. Similarly to Andy, Dan’s work was focused on building analysis tools for market making. Using mainly C++, Dan produced low-latency tools, which drew on large datasets, to help traders make informed decisions. Dan really enjoyed the company’s friendly character and felt motivated by the competitive atmosphere.

The next presentation was given by Tamara who did something different this summer. After last summer’s internship, Tamara felt like a change and went to volunteer and travel in Ecuador. While she was there, Tamara built houses for local teachers and helped to teach English to the local children. She noticed an interesting technological disparity between the village’s poor infrastructure and the abundance of mobile phones. Hopefully her efforts have helped to improve the living standards for the community that welcomed her during her stay.

Jirka styled his vacation as “A Bohemian Summer”, mainly since he worked in Bohemia. Jirka’s worked in and around Prague with a consultancy company called Boston Consulting Group. While he was there, Jirka undertook two projects: one that produced a global pricing strategy for a large software company; and the other was a machine learning tool that saved the client an estimated €2 million/year, replacing their existing spreadsheet solution. After his internship, Jirka also went travelling.

Bloomberg employed Dhruv over the summer where he built a user analytics tool into existing commercial software, so that Bloomberg can improve their product by considering usage statistics. Using C++, SQL and Javascript, alongside Bloomberg’s internal tools, Dhruv produced a system that collects and displays these usage figures for easy analysis. He had a great time working on a self-driven project and enjoyed sampling Bloomberg’s excellent snacks!

During the vacation, Simon wisely chose to actually go on holiday! He travelled to Northern Italy with his family, and Prague with friends. When he wasn’t travelling around Europe, Simon took several Coursera courses covering the Scala and Machine Learning courses, which he recommends. In addition, Simon also continued his on-going project of implementing a chess engine. Starting from scratch, he decided to use C++ this time (for performance), and summarises the project’s mixed success as “C++, 2.5k lines of code, one big mess”.

Henry M went to work with Microsoft in Ireland, this summer, where he worked on improving some of the infrastructure behind one of Microsoft’s large products. The distributed system he built was focused on ensuring availability and fault tolerance. Henry found that with lots more interns, he had loads of chances to attend social events and engage with them outside of work. While working on a large project can seem daunting, Henry found it rewarding and would also recommend working in another country.

The penultimate presentation was given by Adam, who worked at Telensa, a company that provides smart street lighting solutions to various cities around the world, including our own Cambridge. The aim of Telensa’s software is to detect faults in the lighting and to optimise energy usage. Adam worked on building up the backend system for street light management and found the unique constraints of embedded hardware an interesting and exciting challenge.

Henry T gave the final presentation, and closed our session by telling us about his time working in Redmond with Microsoft. Along with approximately 2000 other interns, Henry spent his time on the massive Microsoft campus, where he worked to ensure the quality of an important part the Microsoft ecosystem. His project streamlined the telemetry data pipeline to ensure that different parts of it remain synchronised. While he was working there, Henry attended loads of great intern events and had fun exploring Seattle and the Bay area.

That concludes the presentations for this week, but next week we have the second-year students telling us about what they did in their first summer since arriving in Cambridge.

Indie game development

Last year we had a talk from Ben Nicholson (aka capeguy), a Queens’ graduate who works in the games industry and is currently starting up his own indie games studio.

He has now shipped his first game! (Currently iOS, with Android on the way)

Ski Three is the world’s first ‘match-three-endless-runner’. Moving and matching tiles in rows of three, the player must clear a path for their skier as she traverses a snow-coated mountain pass, dotted with log cabins, towering alpines, and frozen boulders.

There is more information on Ben’s website.

Congrats Ben!

16/11/2016: Talk by Alex Chan

This week, Alex Chan was invited to give us a talk about Colossus, a British code-breaking machine from World War II. The former Queens’ student noted three remarkable facts about the Colossus: that it was created to decrypt a machine the British know nothing about; that it was created in such a short time frame; and that despite being a huge advance in computing at the time, it had almost no impact on the history of the modern computer.

Alex began with a brief description of the cipher that the Colossus was eventually built to crack, and the machine that was used to implement it. The folk at Bletchley Park knew none of this to begin with, and deduced it entirely by studying the intercepted messages — an incredible feat! Eventually, the team at Bletchley figured how how to decrypt the messages, but unfortunately the process was too slow. To speed this up, they built successively faster and more reliable machines, requiring less and less human input, and this resulted in the construction of the Colossus. This machine could translate any message in about 5 hours, and provided the British war effort with crucial intelligence in time for the D-Day landings in 1944.

In total, there were 10 Colossi at Bletchley Park. What made this collection special is that together, these machines were the first to be Turing complete — a key benchmark in measuring how powerful a computer is. Unfortunately, this achievement was buried deep under the veil of secrecy that covered all that transpired in Bletchley Park, which is why the Colossus did not make its rightful contribution to the field of computing. The talk concluded with a quick summary of the the timeline and how incredible it was that Colossus came around to be.

Apart from finding about a fascinating topic in the history of Computer Science, we also learned plenty from Alex’s polished presentation and delivery. Thank you for a wonderful talk!