RSSAmplifier

Blog

Sam Mckenzie

Recent content on Sam Mckenzie

samjmck.comRSS feed ↗21 posts

Latest posts

Understanding: interest rates

The European Central Bank (ECB) just announced they will reduce the current interest rate from 3.25% to 3.00%. It’s always big news when a central bank changes their interest rates for reasons that I vaguely understand. I know for example that the rates on savings accounts are mostly dependent on the central bank interest rate, and that low interest (roughly) equals cheaper money (roughly)…

Developing a financial exchange in Go — Part 3

This is part 3 in the series of blog posts where I try to create a financial exchange in Go. In part 1, I talked about the core task of an exchange: order matching. After looking at some data structures to do order matching, I settled with using a sorted list. In part 2, I implemented those things in Go. In this part, I’m going to extend the codebase so that we can use linked lists as a data…

Developing a financial exchange in Go — Part 2

This is part 2 in the series of blog posts where I try to create a financial exchange in Go. In part 1, I talked about the core task of an exchange: order matching. After looking at some data structures to do order matching, I settled with using a sorted list. Let’s try to implement that in Go. Table of contents Setting up the project Go modules, Go packages and Go.

Developing a financial exchange in Go — Part 1

In this series of blog posts, I’m going to try to create a financial exchange from scratch in Go. Why? Because 1) it’s been a few years since I’ve written Go and I’d like to revisit the language and 2) the core idea of a financial exchange seems pretty trivial to me (matching buyers with sellers) at the moment, but I know that once I start, a lot more will come into play…

Publishing to JSR for the first time

I recently decided to publish an open-source library I created to the JavaScript Registry (JSR), a new package registry that seems to be an alternative to npm. JSR is created by the same people behind Deno, the runtime I chose while developing the library. It used to be the case that no matter what JavaScript runtime your library was for, you really only had one registry to distribute it with:…

How to use ts-proto or Protocol Buffers with Deno

One of the most popular tools for using Protocol Buffers with TypeScript is ts-proto, which is a code generator that takes a .proto file as input and outputs TypeScript code. A problem for Deno users is that the generated code makes use of npm packages, meaning it can require some work before it can be used with Deno. In this post, I will show you how to configure ts-proto and Deno so that they…

Using Cloudflare Workers to bypass CORS

CORS (Cross-Origin Resource Sharing) is a system that by default restricts browsers from making requests to a different origin than the one the page was loaded from. This is important for security purposes. For example, if you visit a malicious website thief.com, it should not be able to make requests to bank.com as if it was you. Or imagine the website you are on has been hacked and is serving…

Thinking stateless and serverless: designing a shareable to-do app

I have been playing around with serverless computing for a while now and decided to develop a to-do list app as I though the project would be a good candidate for serverless computing. One of serverless’s limitations is that your code generally has to be stateless meaning the “server” or your code can’t really keep track of what happened during previous executions or…

Automatically calculate the TOB or Belgian transaction tax for Interactive Brokers or Trading212

Calculating the Belgian tax on stock-exchange transcations or taks op beursverrichtingen (TOB) is difficult. I even wrote a whole post about why it’s so confusing to calculate. Domestic brokers automatically declare and pay this tax for you. Most foreign brokers don’t. As I personally use Interactive Brokers, an American broker that doesn’t declare nor pay the tax, I ended up…

Designing a functional and secure finance web app

A few months ago, I made tobcalc, a single-page web app that helps investors with filing and calculating the stock market transaction tax in Belgium. The number one priority while designing the app was security as the app deals with sensitive personal and financial information such as Belgian citizens’ national registration number and transaction history from brokers. Security breaches and…

Creating a free mail newsletter for Hugo and other static site generators

The past week, I’ve been trying to find the best way to start a newsletter for my blog. I wanted it to be as basic as possible, free, accessible through an API and for subscribers to be able to choose which topics they subscribe to. I settled with MailerLite which offers all the functionality I just mentioned and is free up to 1000 subscribers. The whole setup is quite simple: the…

Comparing Cloudflare Workers with Deno Deploy

When it comes to serverless computing platforms, Cloudflare Workers and Deno Deploy are more similar than other platforms in terms of the standard web API’s they implement. This means that they should be easier to get started with for developers that generally write code that is run in a browser. However, they still differ from each other in a number of other aspects. In this post,…

tobcalc

Web app that calculates the Belgian transaction tax from foreign brokers and fills in the tax declaration PDF with the user’s details and the calculated taxes.

Why the Belgian transaction tax is so confusing

Fund providers can register their funds with the Financial Services and Markets Authority (FSMA) if they want to advertise those funds to Belgian investors. However, the tax law says that registered funds have a transaction tax of 1,32%. This rate is notably higher than the 0,12% transaction tax for funds that not registered in Belgium but are registered with another member of the European…

What I learned from my failed SaaS business

Footietracker was a SaaS project I worked on for slightly longer than a year. It provided users with a Google Sheets document that automatically updated with their portfolios and latest pricing data from Football Index, a football gambling site in the UK that used a virtual stock market to allow users to “invest” in footballers. They are now bankrupt, so development on Footietracker…

Configuring Netlify for a multilingual Hugo site

One of the reasons I chose Hugo for this site was its support for a multilingual mode, which is important to me as I am planning on writing some posts in Dutch. I won’t be covering how to setup the multilingual mode in this post, but I will give a very useful tip for people that are using Netlify: use server-side rewrites instead of client-side rewrites. This tip is only for people who have…

eBay monitor

Development of a tool that web scrapes eBay and notifies a Telegram account

How to use Caddy with Cloudflare's SSL settings

Configuring Cloudflare can be quite difficult. There are many settings for proxying and SSL that can be fairly confusing if you don’t understand what they do or how to configure them on your web server. And while there are plenty of tutorials out there explaining how to use configure nginx or Apache for Cloudflare, there aren’t really any that explain how to configure Caddy. Table of…

Netflix redesign

Concept redesign of Netflix’s user dashboard page. I am not affiliated with Netflix.

Footietracker

Development and design of a portfolio tracker for a virtual football stock market (inactive project)

Birch Visas Ltd.

Design and development of website and proprietary content management system