Wrote answers for mock exam. Thought seriously about code. Took on new student. Watched a play.
Lemons. Lemons, lemons, lemons, lemons.
Play
I watched Lemons Lemons Lemons Lemons Lemons this week. It is a lovely little play; a 2-hander, 90 minutes or so. Both characters are complicated, and interesting, and just the wrong side of unlikeable. They represent such interesting different approaches to life, and one thing really stuck with me. So I’d like to know what you think.
I shan’t give away the ending. But I’ll tell you it’s a very interesting play, and it makes you think, and I don’t…really think it’s a love story.
Work
Working without a senior or a junior means I am having to be extra-double disciplined in how I write my code and my pull requests and so on. This is causing me no small amount of stress, but is also improving how I write code – not just in the code itself but in the meta work I do around it, documenting and communicating the changes.
My procurement is almost finished, and I’m so keen to get started. There’s a really vital bit of work that I need support with, and with any luck I can get cracking on it very soon. It also means I’ll be even more stretched. That’s fine for now, but I need to keep an eye on it. Thank goodness my university workload will go down from next week.
I’ve also picked up a new student, who asked me to show her what ‘production’ Python looks like. My hope is that she can learn how to do it well before I show her any of my actual code. ‘Production code’ is a lie that we tell people new to the industry. Production code is battle-tested, and if you’ve ever seen a machine get battle tested, you know that it’s held together by duct tape and spite.
Anyway. Here are the questions I’ve set her as homework.
- Given a generator of almost infinite size that returns one of (“up”, “down”, “left”, “right”), each of which moves you one unit in that direction. Assuming you start at (0, 0), use
reduceto identify your final position. - Given a reusable generator of almost infinite size that returns an
int, return an array of all of the numbers in the generator that are within one standard deviation of the mean usingfilterandreduce.
Now, this is not necessarily good Python code. In fact, most Pythonistas don’t recommend reduce, because it’s slow. And it is. That is true. But I maintain that it’s a good initial mindset to get into for a data scientist who will be working with absolutely giant datasets. That mindset is: memory is precious, and loading everything at once is bad.
Next lesson we’re going to make our own generators! Or possibly do classes. One of those things.
Study
I did a mock exam for one of this session’s modules, and I came out of it feeling pretty confident about the content. There were a few marks I know I would have dropped, and I’m okay with that. My notes are getting more and more joined together, and the graph of all of the knowledge I’m generating is getting huge. Like huge huge.

I’m also still doing very silly things like this, which is how you log into something using Facebook or Google. An AS is an authorisation server, which checks that you really are authorising the client, and the RS is the resource server – the thing you want your client to be able to access.

Listen, I am for the most part a very serious professional. But, and I think this is important, I remember things better if the things are absurd or stupid or playful or gross. As an example, when I was about 18 years old I read Darren Brown’s Trick of the Mind, where he teaches you how to remember a list of things. I am now thirty-mumble-mumble, and the list is:
- Phone
- Sausage
- Monkey
- Button
- Book
- Cabbage
- Glass
- Mouse
- Stomach
- Cardboard
- Boat
- Christmas
- Athlete
- Key
- Wigwam
- Baby
- Kiwi
- Bed
- Paintbrush
- Walnut
And this works by creating pairs in your head that are disgusting, obscene, playful, or otherwise memorable. The mouse/stomach pair, for example, keeps me up at night. Your mileage may vary.
I think that’s everything for this week. There’ll be a test on the list above in another 15 years or so, so please do revise them carefully.