Posts
-
Overview of globally unique identifiers
Published:Recently I saw that CUID, a way to generate unique IDs, had been deprecated due to security concerns. That got me really curious. I haven't ever thought of IDs as being "secure." Instead, I've always treated them as untrusted, public-knowledge values. I've always built access controls around my IDs, even when they were randomly generated GUIDs. So I started looking at a lot of ID generators to see if this concept of "secure ids" really did exist, what meant, and what other properties IDs had.
-
Unsigned Integers in JavaScript
Published:Lately I've been experimenting with creating random data generators in TypeScript. I wanted to avoid using the global random number generator `Math.random` since I wanted my generators to be fully determinitic (i.e. if you give them the same input, they will always return the same output). I also wanted a seed to be passed in every time, which meant that I'd be creating a new generator every time. I started looking at alternatives and found TinyMT, which is a memory-friendly version of Mersenne Twister written in C. I decided to port it over to TypeScript, and I ran into a lot of issues due to the differences between C and JavaScript/TypeScript when it comes to numbers. Specifically, I had a lot of issues with unsigned integer arithmetic. After I got it all working, I decided to write this blog post about my journey with unsigned integer arithmetic in TypeScript/JavaScript.
-
Writing a property test library
Published:My journey creating a property testing library, including the mistakes and learnings I had along the way. I go over my requirements for a framework, and my attempts at designing the core generation and simplification aspects. It also covers my progress as I switched between programming languages to get different perspectives.
-
What is property testing?
Published:Property testing is a developmental approach to writing tests (both unit tests and integration tests) which helps developers find the limitations of their software. It isn't an all-encompassing set of principles or practices which impact the development lifecycle, unlike Test Driven Development. Instead, property tests focus on giving developers more tools for the actual test implementation, regardless of the testing practices which exist. Additionally, these tools aim to provide far better coverage and depth to testing than simple "line coverage" and "branch coverage" metrics can provide.
-
Error Handling Across Programming Languages
Published:An overview of many different error handling paradigms in programming. Covers some of the advantages and pitfalls of each method. More of an overview rather than a comparison or opinion post.
-
Stateless Logic
Published:Coupling any form of shared state with business logic causes lots of issues, both for the maintainability of the code and sometimes the performance of the code as well. In this article, we dive deep into what problems state can cause, how to remove state from methods, and the benefits that can come from state.
-
Separating SQL from code with files: Initial thoughts
Published:Some initial thoughts after experimenting with separating SQL from code using SQL files. Comparing it against inline SQL as well as views and stored procedures.
-
Predictions in Tech: Looking Forward from 2022
Published:Some predictions of mine looking forward, focused mostly on the tech industry. Made in 2022.
-
Why Care About Web Accessibility
Published:Anyone with an internet connection can access the internet. But not everyone with access to the internet can use the internet. Millions of people are excluded from using large parts of the internet, and at no fault of their own. Instead, it's the fault of websites and the people who build them.
-
Introduction to Localization and Language
Published:Localization is important to reach a global, international, and interlingual audience. To do that, one of the first major hurdles is to design localization code and best practices to be able to handle the diversities of human languages. In this article, we cover the common unknowns of human langauges and how to adapt code to handle them. We also talk about why avoiding certain sentence structures and phrases can help.