Second-class language

One of my current projects is a mobile game that I’m developing for Pete Schooling of BravoTangoBravo in collaboration with his son Josh.

I won’t get into the details at the moment, but I’m using the Cocos2D-x game engine to build the game.

Cocos2d-x is an interesting beast. It’s a port of the very popular Cocos2d-iPhone (now -Swift) game engine to C++ in an effort to make a multi-platform engine. I’m not sure exactly who runs most of the development work at the moment, but a lot of it is based in China.

This is giving me a novel experience, as a native English speaker, of not necessarily being the target audience. The documentation for Cocos2d-x is pretty scarce – something which is being constantly improved upon – but I get the feeling that if I could read Mandarin, there would be a lot more documentation available. If you look at the showcase of games on their web-site, you’ll see a lot of them in only Mandarin, or made by Chinese companies.

I’m in no way complaining. Firstly, it would be good if online communities understood that English isn’t the be-all and end-all and secondly, the English speaking and bilingual community is doing a fantastic job of bringing a lot of the documentation to English, it’s really getting better all the time.

Posted in Game Development | Tagged | Leave a comment


In Germany they have the concept of a Doktorvater (or Doktormutter obviously). It translates to “doctor-father” or “doctor-mother” and refers to your Ph.D. thesis advisor. It is quite common for someone to mention that so-and-so was their Doktorvater. In my case, I have two Doktorväter

Of course, the analogy of family can be taken further, if two people share a Doctorvater, then they would be Doctorgeschwestern (doctor-siblings). In fact, you could create an entire doctor-geneology based on who are the descendants of whom.

In the case of mathematics, it’s already been done. You can browse the Mathematics Genealogy Project and see which mathematicians were advisors to which students and who their advisors were and so on.

For a couple of extreme cases, we can see C.-C. Jay Kuo and Manuel Bryennios. C.-C. Jay Kuo has the most students of any advisor in the database, 125 at current count. Manuel Bryennios has the most descendants in the database, with 120,596 but only one registered student from 1315.

My own “line” goes back as far as someone who was an advisor in 1941 in Argentina, Alberto E. Sagastume Berra. I’m the only Stainsby in the database it seems.

As you can see, I’ve got a somewhat sordid family history, where one of my Doktorväter is also my Doktorbruder, but we can skip over that.

Posted in Life, Mathematics | Tagged | Leave a comment

Well that’s the end of that: 2014


This year wasn’t nearly as busy as last year, but I’ve certainly had a lot going on, not least of which was finishing my Ph.D.

At the beginning of this year I finally received my Spanish drivers license, which I’d completed the practical exam for at the end of last year.

I started playing the still unfinished game Starbound and developed my own database of items from the game, StarboundBase. In the process I started to think about what I really enjoyed in work if I was spending my spare time developing a web site, just because I could.

Although Andrea and I didn’t manage as many overseas trips as last year, we did escape to Montserrat for a day and have some great weather for it.


For my birthday, Andrea gave me kitesurfing classes. I had my first class and absolutely loved it, although for reasons that will soon become clear, I’ve had to leave the next class until next year.

At the end of April I began the task that would occupy me for pretty much all of the rest of the year. I started writing my Ph.D. thesis dissertation.

Being the programmer that I am, I created an animation of the writing process over at The Original Takeaway.


In June, Chloe and Ben came to visit and we took a trip south of Barcelona to the Penedés region to visit some wineries. In July Andrea and I spent a night in the Parador in Vic as a treat for my birthday from Thea and Bruce. I suppose that in the end we have done a bit of travelling around Catalunya this year, so I shouldn’t complain.

After many, many revisions, I finished the dissertation and deposited in October, just after Andrea’s 30th birthday. In total it took my about five and a half months to write the dissertation and I was very happy with the result.


For Andrea’s birthday we went to Granada for a weekend and caught up with all her family. It was fantastic for Andrea and a great little break for me as well. Andrea and I went out for her birthday in Barcelona as well and enjoyed lunch at a great little sushi place in Sant Cugat.

On the 3rd of December Soph, the wife of my best friend Mike gave birth to their daughter, Eden Rose. I got lots of updates during the process and it was great to finally see photos of her after the birth. A huge congratulations to all the Popkiss family!


In December I defended my Ph.D. thesis. Bruce, Thea, Evan and Steph all came from Australia to see me, and although I’m not sure they understood anything, it was great to have them there. In fact the whole defence went well, after the first couple of slides I relaxed a bit, and I think my presentation went well. The questions weren’t too tough, and I was able to answer them all. In the end I completed my Ph.D. with a Cum Laude, so I was thrilled with the outcome.

The last four and a bit years have been really incredible, I’ve studied something that I knew almost nothing about at the beginning, and by the end I really felt like I have got a grip on the subject in general and earned my Ph.D. with my knowledge of my specific area.



To celebrate and finish off the year, Andrea and I joined the rest of my family in a trip to Iceland. In short, it was incredible. The best parts of the trip were hiking over a glacier and seeing the Aurora Borealis, something I’d wanted to see ever since reading Phillip Pullman’s series His Dark Materials.


We had a Stainsby-Templeton-Martínez christmas on the 25th in the town of Vík in the south of Iceland. It had been 7 years since Evan and I were both with Thea and Bruce for Christmas, so it was something very special made even more so by having Andrea and Steph there as well.

Now I’m with my other family, in Granada for New Years and Three Kings. And so ends one of my busiest years ever.

Posted in Life | Tagged , , , , , , , , , | Leave a comment



Yesterday I defended my Ph.D.

It all went really well and I had lots of people come along to support me, which was fantastic.

Thea, Bruce, Evan and Steph also all came from Australia (by way of various length routes) as well.

Now it’s time to relax a bit and enjoy the Christmas holidays. Research will continue, but that’s something for next year.

I’ll write a bit more about the defence later on.

Posted in Life, Mathematics | Tagged , , | Leave a comment

Thesis defence

Screen Shot 2014-12-03 at 10.19.22

Next week I’ll defend my Ph.D. thesis, titled “Triangular bases of integral closures”, and written under the direction of Jesús Montes and Enric Nart.

It will be on Thursday the 11th of December, at 18:00 CET (that’s 6:30pm in Barcelona for those of you not used to 24-hour time).

It’s a public event, so you’re all welcome to attend. In fact, I’d love to see everyone there.

Posted in Mathematics, Research | Tagged , , | Leave a comment

Down time

I had decided that when I deposited my thesis, I’d take a day or two off, not go in to uni and just relax and recover a bit.

That didn’t really happen, between a course I’m taking at the UB, classes I’m teaching and exams I’ve had to correct, somehow time is rapidly disappearing and now I’m on to preparing for my defence.

Well, after the defence then.

Posted in Life, Mathematics, Research | Tagged , | 1 Comment


Last Thursday I deposited my thesis. This is one of the final steps of my Ph.D. – the last one being the defence, which will be in December. I owe that fact that I’ve made it this far to a lot of people, below I have copied the Acknowledgements from the beginning of my thesis dissertation.

First, I must thank my advisors Jesús Montes and Enric Nart. I would like to thank Jesús for the original idea behind my thesis and his encouragement. It is clear that I wouldn’t be here without the support and assistance of Enric. In accepting me to be his student, I think he was more conscious of the way ahead us than I was. Thanks to his advice, support, and mentorship, today I can venture to call myself a mathematician.

I would like thank Jürgen Klüners for hosting me in Paderborn and providing invaluable advice and a fantastic experience while I was there. The company and friendship of Inga, Thorsten, and Friedrich made my visit so much more enjoyable, I thank you all!

To my friends and workmates at the UAB, the last four years have been an incredible experience, and it’s been wonderful to share it with all of you, especially Jens Bauch, my fellow “student of the Montes algorithm”.

I want to thank everyone in the Barcelona number theory group. Especially to my fellow students, Carlos, Elisa, Iago, Jens, Nuno, and Piermarco, and to my fellow seminar organisers Montse and Piermarco.

A la familia Martínez-Trujillo-Zaguirre-Heras, mi familia aquí en el hemisferio del norte. Me habéis aceptado como uno más de la familia con vuestro amor y apoyo. Quiero agradecer a Mari Carmen y Manolo, quienes especialmente han hecho de Granada mi segunda casa.

To Thea and Bruce, you are my parents, my mentors, and my friends. Thank you for the unconditional support you’ve given me, growing up and then in the nearly ten years since I packed up and left to live on the other side of the world. To my brother Evan, and to Steph, it’s always fantastic to see you guys and catch up on our lives apart. Let’s see if we can spend a few years living on the same continent at some point!

I have, of course, left the most important person to last. To Andrea who, through the entirety of our respective theses, has been my constant companion, partner, friend, and more. There are too few words in any language to describe what you mean to me. I would not have made it here without your love! Thank you for everything!

Posted in Mathematics, Research | Tagged , | Leave a comment

Happy Birthday Andrea

Yesterday was Andrea’s birthday.

We started celebrating last weekend (yep, Andrea is catching onto the Stainsby-Wilson week-long birthday). A quick trip to Granada for the weekend to celebrate with Andrea’s family.

It was great to get away from Barcelona for a few days and catch up with the family. Especially Bruno, who’s talking more and more.

Yesterday we went out for lunch at a sushi restaurant in Sant Cugat. The food was fantastic and there weren’t too many people, being midweek.

Then we had a quiet afternoon between a bit of shopping and resting at home, all in all a relaxing day.

I’ve got some more news from today, but that’s to come.


Posted in Life | Tagged , , | Leave a comment



Bruce once told me a story from when he was working at an agency, sometime just before I finished school I think.

He was working on ideas for a client with a junior creative team. They were both young, probably first “real job”, and the copywriter was a bit obnoxious.

At one point during their brainstorming session, when Bruce had come up with a succession of good angles, the young copywriter turned to him and said, “wow, you’re really good at this!”

I don’t know whether Bruce pointed out that he’d been doing it a long time, or just thought it.

Today I got the corrections for a couple of chapters of my thesis dissertation back from my advisor.

He’d taken what I’d spent a week or so writing, pulled it to pieces and put it back together again in a much clearer, more elegant way. I imagine it took him an hour.

I have to remind myself that he has also been doing this for a long time.

Experience does have it’s advantages.

Posted in Mathematics, Research | Tagged , | 2 Comments

On the brink of disaster

Yesterday I had one of those moments that’s probably the worst nightmare of any PhD student who’s writing their thesis dissertation, and doubly so in mathematics.

Reading through a proof I’d first written some three years ago, I found an error.

What at first seemed to be a small issue, when investigated, turned out to be major.


Mathematical proofs are like towers, each proof sits on top of others, which rest on others and so on, all the way down to axioms that define the basis of everything else.

Well, my entire thesis is sitting on top of a couple of theorems, and it was in the proof of one of those that I found the error.

To put this in perspective, if this theorem turned out not to be true, over 40 pages of mathematical proofs and my entire thesis would be worthless, sitting on a base that wasn’t even there.

Of course, I never really expected that to be the case, but writing a proof can be a tricky thing, and it’s often hard to tell how long it will take to finish one.

Anyway, a day and a half later and while I don’t have it all written out, I’ve got the structure of a new proof sorted out and am confident that I’ve covered everything this time.

As an added bonus, it looks like I can prove something that’s a bit stronger than the original theorem and if that’s the case, it will make the last chapter I have to write a bit more straight forward.

It’s the silver lining that’s important after all.

Note: The xkcd comic is a tenuous link at best, but how could I resist sticking a proof based comic here?

Posted in Mathematics, Research | Tagged , , | Leave a comment