Cambridge CST Part II Projects and Dissertations…

Foreword: Every project and dissertation is unique and it was not without flaw that I carried out my project and dissertation. Therefore this post is not a comprehensive guide, but serves as something to compare against and highlights some difficulties that may occur. This post is currently incomplete: I will continue updating it until it is complete, but I have published what is reasonably finished so far as it may be of use to people currently studying Part II of the Computer Science Tripos.

Having just gone through the process, I thought I’d share my experience of doing a project and writing a dissertation for Part II of the University of Cambridge Computer Science Tripos.

Dissertation Front Cover: Location-based messaging on phones by Mark

The copy of my dissertation in the Computer Lab's Library

It was about this time last year that I headed back to Cambridge early (term generally starts around the start of October) to come up with, and do some research on, ideas for what my dissertation should be on. It’s great fun being in, and having the resources of, Cambridge while being required to think without limits (though perhaps this is simply because of the nature of computer science: a discipline focused on rules more than creativity). Over the course of a few days I came up with about 4 specific areas of interest. For each area of interest I came up with one or more specific project ideas, each of which I thought could be reasonably stabbed at in the time frame (my director of studies later explained that, as lectures and supervisions go on as normal in parallel, we effectively had up to about 5 weeks to design, implement and evaluate the project before we needed to start our dissertations on it).

Next, still well before term started, I started contacting potential supervisors in my favourite area of interest with my potential ideas in that area. To find suitable supervisors I both searched online and sent emails to the most suitable supervisors I had already been supervised by. As I was trying to briefly summarise a number of similar ideas in a single email, I gave each idea a name.

The name I gave to the idea that I ended up pursuing also became the title for my dissertation: “Location-based messaging on phones”. It would have been nice to revise it a bit to include a reference to the audio networking technology involved, but there was never a huge need to change it as it describes the high-level application developed accurately. Indeed, I made the application loosely-coupled enough for other communication mechanisms to work and adhered to standard networking techniques and terminology (symbols, channels, etc.).

Email is relatively asynchronous so, in parallel, I started familiarising myself with the necessary APIs and libraries. This, for me, involved making a basic Android application, researching the algorithms needed to implement the ideas and investigating the complexity and availability of implementations of these algorithms. Once it was becoming clearer which idea had the most traction, I started writing my first serious code to investigate the feasibility of the different options within the idea (particularly how good mobile devices are at playing and recording near-ultrasound frequencies). This early work also gave me an idea of the range and accuracy possible, highlighted the heavy CPU load caused on the mobile devices by the signal processing and also highlighted the need to play to the strengths of the audio hardware (frequencies in the telephony voice band).

Term arrived. I bounced my full range of areas and ideas off my director of studies who was able to kill some off (problems included ideas too ambitious for the time available – a problem that most people seemed to suffer from). Lectures and supervisions had a significant impact on my progress but I fleshed out the details and timetable for the project, made sure my supervisor, director of studies and overseers were happy with them, and submitted the formal project proposal. At the same time I started designing the final application – this involved actually writing the code that interacts with the audio hardware of Android devices several times as the range of APIs are not particularly good (Android suffers from considerable latency between applications and the audio hardware, hence the lack of good audio-related applications compared to operating systems such as iOS), they are not brilliantly documented and their documentation is not particularly accurate or reliable.

The majority of the development will not particularly interesting to others, so it is omitted. The dissertation, which can be found in the University of Cambridge Computer Laboratory’s Library contains the gory details. Noteworthy problems encountered included the drowning out of the incoming signal by the outgoing signal during full duplex communication (and the computational intensity and imperfection of acoustic echo cancellation algorithms – especially on limited hardware), hiccups caused by the garbage collector on slower devices and more.

Throughout development I kept a log of what I did each day. This was advised by the department to make the dissertation writing process easier. In reality, I didn’t refer to the log too much when writing the dissertation as the word limit made it difficult to include too much detail. However, I did find the log useful during development as it helped me to keep track of what I was doing on several levels at once – it is easy to get caught up in little details for too long and forget other parts of the project.

To be continued with information on the evaluation process, presentations, supervisions and writing the dissertation itself…

Websites of the month, July, August and September 2011…

For various reasons, including reincarnating my blog, I’ve avoided posting about the website of the month for a while. Well, the wait is over: below are three websites for three months. Hopefully these posts should only be dependent on me actually finding good websites going forward as it’s easier than ever for me to post on this blog. For example, the previous post came from Twitter (in fact, I only tweeted it as a test :P).

July 2011
I’ve been running an AOSP ROM on my HD2 for some time now. Unfortunately, Android doesn’t actually support Windows Media Audio (a good format, BTW, in my opinion), and I eventually got round to converting my Windows Media Audio files to something more universally playable using some nice-looking, free and generally well-made software. Consequently, the website of the month for July is the website where this software can be found.

August 2011
YouTubeRepeat.com is the website of the month for August 2011 for being simple, useful and easy-to-use. It also looks like it isn’t making any attempts to make money from advertising, which is both a nice gesture and probably legally wiser than attempting to do so.

September 2011
Sticking with the simplicity theme, here’s another simple and useful website. Mwahahahahahaha!

Pirates of the Caribbean: the missing soundtrack…

While the official soundtracks for previous Pirates of the Caribbean films have lacked some content (including the wonderful part after “Do you think he plans it all out, or just makes it up as he goes along?” in At World’s End), the soundtrack for On Stranger Tides was largely notable for the amount of content that it didn’t have.

I am not for one moment complaining at the inclusion of a large amount of material featuring Rodrigo y Gabriela (both pretty amazing). No, I am complaining about the lack of material that builds on themes from the previous films. Sure, there is some material with familiar themes, but they are largely the same as they always have been.

If you watch the film again, and listening for the music, you will undoubtedly hear some development of familiar themes: Cutler Beckett’s theme during the Jack and Angelica fight scene, and a wonderful combination of Jack Sparrow with Up Is Down (which is, after all, another Jack-inspired theme) as Jack runs along a beach towards Ponce de León’s ship. The former example leads to a side-note from me: unless Hans Zimmer knows some secrets about the characters, the older themes tend to be less strongly coupled to characters than they used to be. There is more use made of themes from The Curse of the Black Pearl than there is in Dead Man’s Chest and At World’s End.

So, is all of that music destined to remain as a background for, and sometimes obscured by the sound effects for, on-screen action? Apparently not, it would seem. While it is a great shame that there is no official method of buying this music for one’s own consumption, some people seem to have acquired the music and uploaded it to YouTube. The source and status of the uploaded music is unclear, but at least a good chunk more of the full score seems to be included.

Let’s hope that one day this music will be available in a more official and polished form, perhaps as another Soundtrack Treasures Collection after the 5th and 6th films which may or may not happen. Until then, I leave you with three extracts that I like (out of those I’ve listened to so far).

Naming Syrena

(Features the combination of Jack Sparrow and Up Is Down 48 seconds in).

Jack’s Escape

(Features a nice arrangement of part of Beckett’s theme 1 minute and 23 seconds in, and and nice developments of Jack Sparrow 10 seconds in).

A Pirate’s Life For Me

Welcome to Mark’s Blog, Cantabits…

…the latest incarnation of my blog. It is very much a continuation of my old blog, but hopefully with some improvements. Below are some related questions that you may want the answers to. I hope that you find this blog interesting and/or of some use.

Various improvements (e.g. theming, plugins, etc.) will come in time.

Cantawhat?

Cantabits has four intended roots/meanings. Cantab refers to members of the University of Cambridge, residents of Cambridge and the suffix indicating a degree from the University of Cambridge. Bits refers to the nature of blog posts (bits – fragments, some might say – of information on the Internet). Bits also refers to the literal nature of these posts and my knowledge, experience and pursuit of computer science. Finally, and slightly accidentally, cantabit is the third-person singular future active indicative of canto which, deriving all of the way back from Proto-Indo-European, is the Latin verb “to sing”. This reflects my knowledge, experience and pursuit of music and music technology, recently culminating in a project, dissertation and Android application investigating and demonstrating ad-hoc acoustic networking between phones.

Why did I give the blog a name, rather than just call it Mark’s Blog (like the previous incarnation)? The idea occurred to me when planning the details of what was going to happen to my older blog. Essentially, it is a much better idea to leave my blog where it is which, unfortunately, means that I can’t reuse g400.co.uk/blog.

Is anything going to be different?

The name (see the question above for more information).

Now that WordPress is taking care of the hard work, hopefully there will be richer content in posts and more frequent posts. Comments will probably have to be approved by me and I hope to integrate things like my public Twitter account into the blog in a less separate way.

The subjects covered by the blog will not be changed significantly (the website of the month will stay, for example), and will continue to drift with my interests (and the interests of the admins). On the subject of admins, I’m happy to re-add any of the old admins but will not do so by default as there’s probably some overhead to that and they haven’t posted in a long time.

Of course, unlike my old blog, this one will not necessarily have valid XHTML, CSS or RSS. But I’m sure you’ll get over that.

Why a new blog?

Two reasons.

Writing your own blog software as well as posting to and maintaining the blog contents itself is very time-consuming when you’re doing it in addition to work, school or university, and life. Consequently the first reason is time. While I did have the time to write the code powering my old blog, I concentrated on university work at university and am now devoting all of my coding time and effort to my job.

Writing a comments system around simple but unusual blog software and then replacing that software with your own, keeping the same comments system, does not lead to well-designed software. All of this was also done in languages I had no prior experience of. Consequently the second reason is the need for the code powering my old blog to be refactored in order to significantly change the design and add features, to keep it up-to-date.