An Hour A Day

Welcome to my blog about random thoughts and explorations in software

University College London - Part 2

I’ve recently wrapped up my master’s at University College London, bringing to a close one of the most intellectually challenging and personally rewarding years of my life. I wanted to take the opportunity to reflect on what initially motivated me to pursue a master’s, the research I ended up conducting, my experience living in London, and what I’ve taken away from it all. Why a Master’s at UCL? I completed my undergraduate degree in Chemical Engineering and Computer Science at the University of Ottawa in 2019....

December 1, 2024 · 8 min

Need for Speed: Making Permutation Testing Fast in Python

Table of Contents Permutation Testing Paired vs Unpaired Tests Exact Testing of the Null Hypothesis Monte Carlo Permutation Testing Optimizing the Implementation Tooling Baseline Implementation Vectorization Algebraic Optimization Cython: Compile the Remaining Loop Final Results Conclusion Lately, my favourite statistical test is permutation testing. I find it to be one of the most intuitive and powerful ways to test a frequentist hypothesis. The fundamental idea behind permuation is rather simple: given two groups and a comparison statistic, randomly shuffle the samples between the groups and observe how the statistic changes....

November 30, 2026 · 14 min

University College London - Part 1

I wrote my last final this week, and so I wanted to take the opportunity to give a recap of my first two terms in Machine Learning at University College London. First weeks in London While courses started mid-October, I ended up moving to London sometime mid-September to give me some time to get settled in. Notably, I spent about 2 weeks reviewing “Mathematics for Machine Learning” by Deisenroth et al....

May 24, 2024 · 9 min

Meta-strategies for Software Development

A lot of blog posts discuss the correct architecture or strategy for a given situation. In this post, we will not discuss strategies or architectures, but rather a meta-strategy. A meta-strategy is a strategy for choosing strategies. In the context of software development, a meta-strategy would not be a recommendation of a particular architecture or tech stack, but rather actionable advice on how to evaluate and choose architectures and implenentations. In this post, I will outline 6 core concepts and how they fit together to form my own personal meta-strategy:...

September 12, 2023 · 9 min

Effective Ownership in Software Development

From low-level design to high-level project planning, ownership is central to succesfully enacting change. In this post, I will talk about what ownership is, and several ways to achieve effective ownership. What is ownership? Before we can talk about what ownership means and how to achieve it, we need to agree on a definition of ownership. For me, ownership has three pillars: the authority to influence outcomes, responsibility for the outcomes, and a commitment to making sure that the things that need to be done, get done....

September 11, 2023 · 3 min

Principled Development

I am a very strong believer in consistency. In fact, I think that consistency is at the heart of any engineering endeavor. Towards this end, I implemented what I call “Principled Development” into my daily work as a Machine Learning developer. In this post, “Principled Development” refects to having a framework of clear and actionable heuristics for making technical decisions, and evaluating designs and implementations. Having a framework for making consistent technical decisions is incredibly valuable, it allows for alignment and a unified technical vision within the team, provides a scaffold for ideologically consistent development over time, and increases overall code quality....

September 10, 2023 · 9 min

University College London - Part 0

This September I am taking a leave from my job at $dayjob$ to pursue a Master’s of Science in Machine Learning at University College London. As I am opening a new chapter in my life, I want to reflect and write down some of the key themes from my first 5 years in industry. Background Context At $dayjob$, the bulk of my work was focused on time series forecasting for supply chain management....

September 9, 2023 · 8 min

Generators and Coroutines in Python

Generators and Coroutines are very powerful tools in Python that can help simplify logic, speed up data-intensive programs or provide flexible and re-useable APIs. In this post, we will explore three main concepts in Python : Generators, Coroutines and Cogenerators. Generators Generators in Python are objects that contain some sort of internal state, and know how to produce the “next” value in a sequence. Before we talk about what generators are, we should talk about what problems they can help solve!...

May 10, 2022 · 8 min

Reproducible software in research using Python - Part 1

One of the big issues in Machine Learning research is reproducibility. In fields like biology that have many experimental variables and uncertainties, it is expected that results may be difficult to reproduce due to small sample sizes and the inherent complexity of the research. However, there is no excuse for Machine Learning research to be anything but trivial to reproduce. In this blog post, I will be demonstrating ways to make the software environment used for an experiment easily replicated as well as ways to add testing as a part of the experimental process to catch errors that might threaten the integrity of the results....

June 19, 2021 · 8 min

Monads in Python

Monads are a super interesting and useful design pattern often seen in functional programming languages such as Haskell. That being said, it is pretty simple to implement our own monads in Python. When talking about Monads, there are three “main” things that I use to describe in practical terms what a Monad is and what it does: Monads are essentially containers for values. In other words, you will have a Monad that will contain some arbitrary value or variable....

February 16, 2021 · 9 min