Posts
Overview of globally unique identifiers
Published:Dec. 2, 2023 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:Nov. 30, 2023 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…Writing a Property test library
Published:Nov. 28, 2023 In a previous post I talked about property testing (see ). In that post, I discussed the difference between property tests and more traditional example-based testing, how to write property tests, and the shortcomings of property tests. If you'd like to learn more about property testing, then go give that article a read…What is property testing?
Published:Oct. 23, 2023 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 impacts the whole development lifecycle, unlike Test Driven Development. Instead, it's isolated to the testing process, and it focuses on procedurally generating test inputs and then checking the properties of the output, rather than relying on a predefined list of "Input X gives Output Y.…Error Handling Across Programming Languages
Published:Sep. 10, 2023 One of the most frustrating yet fascinating facets of using a programming language is how it handles errors. Many of these error handling patterns include the traditional try/catch, error flags, unions, multiple return values, error paths, etc. These patterns are fascinating to investigate and see the various methodologies and practices languages and libraries have used to implement them. This is by no means an exhaustive list or investigation. Rather, it's a review of what I've personally experienced with error handling…Stateless Logic
Published:Sep. 9, 2023 State is some form of "global" or "shared" memory. It allows code to "remember" or "know" something without having to be retold that fact every time. For instance, let's consider a simple count method which tracks how many times the method was called. Below is an example using state…Separating SQL from code with files: Initial Thoughts
Published:Nov. 28, 2022 Recently I've been working on a side project (that may or may not get published publicly, I haven't decided yet). For this project, I decided I'd try a lot of new things, not all of which worked out as well as I thought (which may be why it stays private). I've tried a new Java/Kotlin framework, briefly tried a new JVM build system (and then went back to Maven), tried new control flow mechanisms, new error handling techniques, etc. It's been more of a playground for new ideas than a true product…Predictions in Tech: Looking Forward from 2022
Published:Nov. 11, 2022 A lot has happened in the world this year. Most of the world has started to move past COVID-19, especially in the U.S., regardless of whether it's really gone. Russia has started a "special operations" (aka. military invasion) inside Ukraine, has had the war go fairly poorly for it, and is now trying to salvage what it can while hurting NATO and Ukraine as much as it can - especially when it comes to energy prices (aka. gas and oil). Elon Musk just bought Twitter, and it currently looks like the bird is on a hard crash course with the ground. Meta has revealed it's spent multiple billions of dollars in the metaverse. Mass layoffs in tech are starting to happen, and there's talk of a coming recession (or maybe a depression). That's also not mentioning the craziness in politics right now…Why Care About Web Accessibility
Published:Oct. 20, 2022 For most people, websites are visual experiences. We see images, we read text, we move the mouse,scroll with our fingers, tap or click on buttons, etc. The only way most people change howthey interact with sites is by switching to another device, such as from a computer to aphone…Introduction to Localization and Langauge
Published:Sep. 27, 2022 I first published this back in 2022. At the time, I was leading the localization effort of an English-only product. The product had existed for over a decade, and over time a lot of bad habits had crept up. This was the public (non-confidential) write-up I made on localization that I could use both internatally and externally…