This project was put together quickly while waiting for a physics job to finish. It was an exercise to see how quickly I could make a useful page with my current setup on my website. Including time to research, write, upload, and test the page it took around 20 minutes.
This page uses a Monte Carlo method to estimate π. This is a pure method in that it does not rely on knowledge of π to make the estimate, as some methods do. It throws random numbers in a two dimensional area and counts how many lie within the circle of radius \(1\) compared to a square of side \(2\).
Challenge: This was all about speed.
Solution: I already knew everything I needed to put this page together, so it was simply a matter of how quickly I did it. I’m quite happy with the end result of 1020 seconds. (Resolved)
The script loads a song randomly and displays blank spaces for the lyrics on the screen. The user then enters guesses and the script checks for matches, keeping track of which words have already been suggested by the user. The score depends on the total number of guesses, the time, and whether the user chooses the hard or easy mode.
Challenge: The lyrics must be hidden from the user.
Solution: Initally the lyrics were “whited out”, but some users simply highlighted the lyrics to cheat. To prevent this the lyrics were replaced with underlined monospaced blank characters. (Resolved)
Challenge: The users should be able to collect achievements, to encourage subsequent visits.
Solution: I don’t usually pester my users to come back a second time, but with this game it seemed natural to do so. User’s gain achievements for various actiosn which are then stored via AJAX to the MySQL backend, building on previous knowledge of these methods. The achievements are then highlighted by changing the CSS of HTML elements. The user id is store in a cookie, and can be recovered by copying and pasting a uri. (Resolved)
Challenge: The users interface should be as intuitive as possible.
Solution: As usual the user interface is a significant stumbling block, and what is obvious to the designer si not obvious to the user. After some iterating with friends the user interface was adapted based on their feedback, and now the game starts with the correct element on focus so that the user can start guessing immediately. (Resolved)
When dealing with systematic uncertainties in physics it’s often important to know the relative contributions of each unceratinty to the overall uncertainty. This script compares all the uncertiaties, assuming they are \(0\%\) correlated.
The script arranges the uncertainties by size, then adds the uncertainties in quadrature and then expresses them as a radial distance from the lower left corner, showing the effect of each uncertainty. This makes it easy to determine where to focus effort in an analysis, and which areas of analysis will not give much benefit in terms of systematic uncertainty reduction.
Challenge: The output needs to be clear and easy to read.
Solution: The code needed to create the relevant geometry is fairly trivial to write. The only difficult part was adding the labels in such a way that they are all unambiguous and legible. At the moment the script works, but for a much larger list of systematic unceratinties, the labels may fall outside the plot area. (To be revisited)
This page takes input from Wikipedia (although at the moment this is extracted manually from the main page) and then produces a C script which summarises the data for further analysis. ROOT is then used to make a plot showing the data. The idea behind the project was to make data scrubbing easier and to give me practice in data scrubbing. If I ever get sufficient time I intend to create some resources to make data scrubbing easier and make sharing of publically accessible data simpler. The the data are taken from an outdated Wikipedia page which is missing many sources.
Challenge: The data needs to be scrubbed from the page easily.
Solution: To save time I manually copied the data from Wikipedia for offline analysis, but this should be fixed to read the data online. (Resolved, to be revisited)
Challenge: The output needs to be some kind of source file, for example C or python.
Solution: The source file I chose was a ROOT macro for convenience. Ideally the user should be able to choose what output they want (including xml) to best suit their needs. (Resolved, to be revisited)
In 2014 the CMS experiment at CERN released their 2010 data to the public for analysis. As a quick exercise I decided to analyse the dimuon mass spectrum to show that this could be done in a reasonable amount of time.
The input file is the 2010 Run B comma separated values file. The python script then produces mass spectra for same sign and opposite sign mass spectra and zooms in on the interesting regions.
Challenge: The main challenge was that this project was made as quickly as possible.
Solution: This project uses python and existing ROOT libraries for the maximal development speed. The other data format available was using CMSSW and a virtual machine. In principle using CMSSW should be straightforward, but I decided against using this because the software was already four years old and support would be minimal or non-existant, even to current CMS physicsts. (Resolved)
This is one of my more puerile projects. My older sister asked me if I could make a website that replaced the word “cancer” with the words “uncontrollable urge to bum farm animals” for Daily Mail articles. Seeing this as a chance to practice page scrubbing I took up the challenge and gave my sister a new toy.
The user supplies a Daily Mail uri and the script fetches the relevant page. It then performs a mildly intelligent search and replace to make the word substituions.
Challenge: The script must get the style, scripts, and images correct.
Solution: The script goes through the source code and removes all scripts safely. The uris and images are then remapped to give tne user a seamless experience. Page scrubbing has never been so easy! (Resolved)
No matter how much we try to keep these changes under control there is no denying that HTML standards are for the most part an accumulation of incremental bug fixes designed to keep up with the latest capabilities without breaking things too much. I might start to add automatic validation to my website to catch these problems as soon as they arise.
The user has to guess the code and gets a score in the form of \(S=10A+B\) where \(A\) is the number of correct guesses in the correct place and \(B\) is the number of correct guesses in the wrong place.
Challenge: The number of rows and columns must match the user input and be maintained correctly..
Solution: This was the main purpose of the project, to investigate the safest and most performant way to achieve this. It’s mostly a matter of bookkeeping once it was achieved it made many future projects much easier. (Resolved)
This projects presents a wide range of different challenges. The aim is to create a fractal browser that pushes the operating environment to the limit in terms of performance, while still being user friendly and responsive. In its current iteration the user clicks on the region of the fractal they wish to explore and the project zooms in to that region. The user can change the way the fractal is coloured by changing the palette its properties. They can also move from the Mandelbrot set to the corresponding Julia set. There is also the option to explore the cubic Mandelbrot set. Past iterations have included even more fractals, including Newton iterations and generalised Julia sets. However these have been removed in this iteration as they should be refactored into a separate fractal class rather than inserted by hand.
Challenge: The algorithm must be responsive and make reasonable use of memory.
Challenge: The algorithm must make reasonable use of CPU.
Challenge: The user interface must be intuitive.
Solution: In some senses it will never be possible ot make the user interface entirely transparent, given the technical nature of the fractal’s inner workings. In spite of this the way the user navigates is relativelt straightforward, but more improvments can and should be made. (Resolved, to be revisited)
Challenge: The palettes should be easy to edit.
Solution: The asethetic properties of the fractals often depend on the choice of palette. The palette scales can be manipulated, using slders on the log scale. This solution borrows from another project being developed in parallel, and leads to an easier interpretation of the scaling and distorting of the palette scale. This method should be tested in a “focus group” style environment. The user should be able to create and store a palette from scratch with their own choice of colours stops. (Resolved, to be revisited)
Challenge: The user should be able to store fractals.
Solution: The user can currently choose to save a fractal to the server, storing the \((x,y)\) coordinates, zoom, and other factors. This uses AJAX requests with a PHP and MySQL backend, which has become fairly standard in my projects by now. This comes with the usual MySQL injection overheads and PHP safety issues. In the future, as the number of fractals in the gallery increases, the gallery should be orgainsed in some manner to reduce bandwidth and CPU usage. (Resolved, to be revisited)
Challenge: The project should support arbitrary fractals for future expansion.
Solution: At the moment the fractal algorithms are hard coded into the project. This needs to be more object oriented in the future so that other developers can contribute their own fractals. (Partially resolved, to be revisited)