RSSAmplifier

Blog

bradleycarey.com

Recent content on bradleycarey.com

bradleycarey.comRSS feed ↗87 posts

Latest posts

The Software Engineer to Metalhead Pipeline

I did not seek out extreme metal because I wanted increasingly extreme music. I accidentally optimized my work music until screaming became a feature. 
 
 The Open Office
 
 
 Link to heading 
 
 
 Open offices are built on the idea that removing walls makes people collaborate. It mostly makes them audible. 
 I could hear the secretary answering call after call.…

Your Browser Session Is Programmatic Access

A service account is the right way to automate a production system. 
 But refusing to issue one does not mean users cannot automate the system. It usually means they will automate it with their own browser session instead, which is worse in almost every way except paperwork. 
 That is the uncomfortable part. If a user can do something in the web app, and the web app talks to backend APIs,…

How I Hit a 315 lb Bench Press

The projected max got there before the actual lift did. I hit 275 for 5 reps on December 9, 2022, which projects to a 320 lb estimated one-rep max via the Epley formula . I did load 320 on the bar shortly after just to say I’d actually touched it. But the data already called it. That took almost four years of training, two years of spinning my wheels, and one program that finally made the…

Checkbox Canvas: Images & Video

These two demos are the only ones in the series that process external input. One takes images, one takes live video. They’re also the only ones where a canvas element sneaks into the pipeline. The output still goes entirely to checkboxes; the canvas is just the fastest way to sample pixel data from a source that the browser won’t otherwise let you read directly. 
 The underlying…

Checkbox Canvas: Games

Games are an interesting stress test for the 1-bit constraint. A simulation can skip frames and still look fine. A game can’t. Input latency matters, collision detection matters, and the player is paying close attention in a way that they aren’t when watching a visual effect. If the game loop is wrong, you notice immediately. 
 Both of these work. Unironically. 
 
 Pong…

Checkbox Canvas: Visual Effects

Every effect here is the same underlying structure: for each checkbox, compute a number, threshold it to on/off. The interesting part is what function you use to compute the number. Pure math, no textures, no precomputed lookup tables, just trig per cell per frame. 
 
 
 
 
 
 Spirals 
 
 
 Link to heading 
 
 
 Four modes that cycle automatically:

Checkbox Canvas: Simulations

The 1-bit constraint is most interesting when you stack it against a system with real state. These four demos are simulations. They evolve by rules, and the checkboxes just report what happened. The display isn’t the computation; it’s the readout. 
 
 Slime Mold Simulation (interactive) 
 
 
 Link to heading 
 
 
 Physarum polycephalum is a slime mold…

Checkbox Canvas


 
 
 
 
 At some point I asked myself: how bad of an idea is it to use HTML checkboxes as pixels?

I Built a Full CLI for a Legacy Web App in One Afternoon (with AI)

Our platform has been around for nearly two decades. The backend is a sprawl of three separate HTTP services: a legacy REST API (v1), a newer REST API (v2), and an Elasticsearch-backed search service. They share a JWT token but have different base URLs, different conventions, and different quirks. There’s no unified CLI. If you want to poke at the API, you open Swagger, copy a Bearer token,…

Proof Of Work: A Strength Training Dashboard

I’ve been tracking my workouts with the same Android app for almost 7 years. Nearly a thousand workouts, 59,000 reps, 6.8 million pounds of volume. The app does its job, but the data just sits there. I wanted to actually see it. 
 Check out the dashboard 
 
 The Problem
 
 
 Link to heading 
 
 
 Workout apps are great at recording sets and reps.…

I Fed 17 Years of Blog Posts to an AI and It Roasted My Evolution

I’ve been blogging since 2009. That’s 72 posts across 17 years: Java homework dumps as a college kid, strength training posts with programming metaphors as an adult. I recently pointed an LLM at the whole archive and asked it to analyze my writing voice. The results were both flattering and humbling. 
 
 The three eras
 
 
 Link to heading 
 
 
 The AI…

From Many Repos to One: An Honest Nx Monorepo Migration Retrospective

Migrating a standalone Angular app to Nx is a one-liner: npx nx@latest init . Migrating many Angular repos to an integrated monorepo is not. We consolidated several large enterprise Angular apps and libraries into a single Nx monorepo in late 2023. Here’s what that actually looked like. 
 
 Problem Statement
 
 
 Link to heading 
 
 
 To share components…

Weight Projector - Interactive Calorie Tracker

I wanted a simple way to visualize weight loss projections over time, and while sites like Losertown provide calculations, they only display results in an HTML table. I wanted something with a nice graph that shows the trajectory at a glance. 
 Try the Weight Projector 
 
 Features
 
 
 Link to heading 
 
 
 The Weight Projector calculates your weight trajectory…

How to block YouTube Shorts

I’ve always preferred long-form content. YouTube Shorts, TikToks, and Reels feel like junk food to me—quick dopamine hits that leave me unsatisfied and craving more. They disrupt my focus and make it harder to engage with meaningful videos. Here are some methods I’ve found to block YouTube Shorts entirely. 
 
 uBlock Origin with the ublock-hide-yt-shorts filter list 
 
…

Strength Training Is a Force Multiplier for Knowledge Workers


 “It is a shame for a man to grow old without seeing the beauty and strength of which his body is capable.”
— Socrates 
 
 Most knowledge workers treat their bodies like a laptop they never charge properly. Good enough to get through the day, running at 60%, wondering why they’re tired by 3pm. 
 Strength training fixes this. Not walking, not yoga, not…

CLI-Powered Win 11 Setup: Fast, Private, and Bloat-Free

Just unboxed the new machine and the first thing I want to do is strip away all the nonsense and turn it into a productivity powerhouse, quickly. The default Windows 11 setup is slow, packed with bloat, and frankly, a bit invasive. 
 My goal for this setup: 
 
 Speed: Get all my essential software installed in minutes using the CLI. 
 Automation: Set up continuous auto-updating for…

Quasicrystals in Your Browser


 Click here to view the interactive demo 
 
 
 Link to heading 
 
 
 Epilepsy warning: The demo contains rapidly changing patterns and colors which may trigger seizures in susceptible individuals. 
 What is a quasicrystal? From Matthias Matthiesen : 
 
 Quasicrystals are highly structured patterns which are not periodic. Unlike the crystalline structure of…

Nx Angular Component Generation Schematic: Path Does Not Exist

A few years back, I successfully migrated several Angular libraries and applications from individual projects to a monorepo using Nx . Nx is a great tool for managing multiple projects and libraries in a single repository. 
 Nx provides many schematics to generate code and migrate existing code. One of the most common tasks is generating a new Angular component. However, I encountered an issue…

Handling Case-Insensitive Query Parameters in Angular

After searching through Google and StackOverflow and finding nothing, I decided to write my own reusable class to handle case-insensitive query parameters in Angular. I hope this helps someone else! 
 
 How to Use It
 
 
 Link to heading 
 
 
 Using it is as easy as: 
 import { ActivatedRoute } from '@angular/router' ; 
 import { CaseInsensitiveParamMap }…

Safely migrate from hash-based routing to modern routing in Angular

If you have an old angular app that is still using hash-based routing via the HashLocationStrategy , you can safely migrate to modern PathLocationStrategy routing without breaking existing bookmarks or SEO. 
 
 Add this snippet to your AppComponent > ngOnInit : 
 
 this . router . events 
 . pipe ( filter (( event ) => event instanceof NavigationStart && /^\/#/ . test ( event .…

Serving an Angular CLI App over HTTPS Made Easy

I’ve discovered a simpler method than those discussed in this Stack Overflow post for serving an Angular CLI app over HTTPS using office-addin-dev-certs . Don’t be fooled by the name, these certs work for any local development! 
 
 Generate the certificates by running the following command and click “Yes” to trust them when prompted:
 
 npx…

Theme-aware syntax highlighting for Hugo using SCSS + Chroma

Hugo static site generator has built in syntax highlighting for code blocks that uses Chroma udner the hood. The newer CLI, known as hugo-extended , finally supports SASS transpilation. 
 Using the power of SASS @import statements + prefers-color-scheme media queries or CSS class name toggles, we can apply separate themes for light vs dark modes. Tailwind CSS refers to these strategies as…

Customizing my PowerShell CLI using Oh My Posh

For years, I relied on Cmder as my terminal emulator of choise. With the release of Microsoft’s modern terminal, it’s time to transition away from Cmder. In this article, I’ll outline my approach to customizing my CLI for improved productivity: 
 
 Prerequisites
 
 
 Link to heading 
 
 
 I recommend installing as much as you can using Microsoft…

Bypass Angular interceptors using HttpContext factory + HttpContextTokens

If the HttpClient is being used within a dependency outside of your control (such as a 3rd party lib) you can still use the HttpContextTokens that were added in Angular v12 by using a HttpClient factory provider. You can scope this to individual modules or components using the providers array: 
 
 1. Add DisableInterceptorHandler + token (disable-interceptor.handler.ts)
 
 
…

Make dynamic PrimeNG table columns conditionally editable

The PrimeNG table component is a powerful data visualization tool and is a great free alternative to AG Grid . 
 Table columns can be defined dynamically using the *ngFor directive. However, if you do this there is no apparent way to conditionally mark a column as editable! 
 There is actually an undocumented pEditableColumnDisabled boolean directive that can be used to control if a cell…

Customizing my CLI using Oh My Posh (Old PS modules version)


 Update
 
 
 Link to heading 
 
 
 Oh My Posh has since migrated from PowerShell modules to an executable. See the updated version of this article here . 
 
 Why Customize?
 
 
 Link to heading 
 
 
 For years I have used Cmder terminal emulator for a fancy CLI while developing in Windows. Now that Microsoft has finally released a modern…

SQL Server (T-SQL) Data Types to system_type_id list (2022 update)

I received metadata for a SQL Server database which contained the system_type_id but not what I needed: the data types of each column. Google did not seem to have a list of these so I ran the queries and posted them here as reference. I hope you find it useful. 
 
	 
			 
					 system_type_id 
					 datatype…

How I chose my specialization as a developer

Early on in my development career, one of the toughest choices was what to specialize in. Programming is such a broad subject that learning it all is basically impossible! How was I to know what to concentrate on? 
 
 What specializations are there?
 
 
 Link to heading 
 
 
 A non-exhaustive list of specializations from a random post on the internet: 
 
…

Building a PC (during a global chip shortage)

The global chip shortage was such a big deal it has its own wikipedia article . Me (and apparently the entire world) wanted to have the latest tech to use while being locked up at home. 
 
 If you can’t beat ’em, join ’em
 
 
 Link to heading 
 
 
 Basically, finding one of the latest GPUs or CPUs was almost impossible. Scalpers and bots have made…

NgBootstrap Datepicker - US Date Formatter - Improved edition

In a previous post , I outlined my strategy of using the ng-bootstrap datepicker with a formatter for US dates (mm/dd/yyyy). 
 In this post, I will provide an updated version. Check the specs below for specifics on improvements. Among these are: 
 
 Allows basically any separator (including none at all!) 
 Works with or without zero padding months or days 
 Allows entry of…

System.Text.Json.Serialization - Read Numbers from JSON strings

Lets say you are POSTing a json that looks like this: 
 { 
 'someNumber' : '123' 
 } 
 …to a server-side web api DTO that looks like this: 
 public class Stuff 
 { 
 public int? SomeNumber { get ; set ; } 
 } 
 This thing will fail since the number in the json is quoted. It looks like System.Text.Json is adding JsonNumberHandling.AllowReadingFromString…

NgBootstrap Datepicker - US Date Formatter mm/ff/yyyy

If you have used Angular and Bootstrap then you are probably familiar with ng-bootstrap . 
 The default formatter that the datepicker uses is the ISO8601 format (yyyy-mm-dd). The docs have a sample that show you how to format the date as dd/mm/yyyy. I have adapted that sample to use the format that is the most widely used in the US (mm/dd/yyyy). Hope you find it useful! 
 
…

Consulting

Despite my current W-2 status, I’m excited to offer my expertise through small consulting engagements. 
 
 How Can I Assist You?
 
 
 Link to heading 
 
 
 With a wealth of experience accumulated over decades of diving into legacy code, I am here to provide valuable insights that will propel you towards your objectives. 
 Here are some topics I frequently…

SSMS – Selecting rows as json truncates long json strings

In the newer versions of Microsoft SQL Server, it is now super easy to return selected rows as json data . 
 Unfortunately, SSMS seems to truncate json strings that are longer than 2033 chars no matter what you do. This seems to happen no matter if you show the results in the grid, text, or a file. 
 Here is a workaround using a variable and PRINT if you want to just get the json string on…

Chicken tornado - A PixiJS experiment

I was bored and decided to see what PixiJS is all about. Sooo… I made a tornado of chickens. 
 
 
 Confused? No worries! Once you see the demo you will be even more confused! 
 Seizure warning. 200 multicolored chickens violently spinning will grace your screen. 
 
 Click here to unleash the chicken tornado 
 
 
 Link to heading 
 


FluentAssertions – Make null and empty strings be equivalent

FluentAssertions is my assertion library of choice when writing tests in C#. It is very easy to extend and has a ton of nice functionality out of the box. 
 Unfortunately, there seems to be no way to make a string be equivalent if it is both null and empty. Thankfully we can create our own using AssertionOptions.AssertEquivalencyUsing ! 
 AssertionOptions . AssertEquivalencyUsing ( options…

Douglas Adams on teaching programming


 What I mean is that if you really want to understand something, the best way is to try and explain it to someone else. That forces you to sort it out in your own mind. And the more slow and dim-witted your pupil, the more you have to break things down into more and more simple ideas. And that’s really the essence of programming. By the time you’ve sorted out a complicated idea into little…

Contact

I’m available for consulting and 1099 contract work . If you have a project, a stubborn technical problem, or just want to say hi, send me a message. 
 Prefer email? Reach me at contact[at]bradleycarey[dot]com . 
 
 
 
 Name 
 
 
 Email 
 
 
 Message 
 
 Send 


Return of the Bad Error Message


 Yes, it will? What do I click? 
 Source: Microsoft Visual Studio 2015 Update 2 installer

Uncle Bob quote on Work Ethic


 You should plan on working 60 hours per week. The first 40 are for your employer. The remaining 20 are for you. During this remaining 20 hours you should be reading, practicing, learning, and otherwise enhancing your career. Robert Martin in 
 Clean Code 
I’m not a great programmer; I’m just a good programmer with great habits. Kent Beck 


Enum friendly names using attributes in C# ASP.NET MVC

Are you using enums in dropdowns or radiobuttons or something similar? Instead of hard coding display names, a way of reusing these names was coined in the MVC 3 days that involved decorating the enum with the DescriptionAttribute . Judging from posts on stack overflow, this was a very popular method. 
 When MVC 5 came out, it included new helpers for Enums (which was fantastic). However, MS…

The answer to every programming question ever asked

What is the proper answer to every programming question ever asked? Easy: 
 
 It depends. 


Using SQL Server Reporting Services (SSRS) in an ASP.NET MVC project

There are a handful of examples out on the internet on how to use SSRS from an ASP.NET website but all of the ones I came across seemed like hacks. They range from throwing an ASPX page with a ReportViewer control to complex JavaScript hacks. The following method is the one I have used for many years that adheres to the true MVC manner. This method connects to SSRS through the web service using…

Podcasts you should listen to right now


 Programming Related Podcasts
 
 
 Link to heading 
 
 
 
 This Developer’s Life – Podcast in the style of This American Life dealing with programming related topics. An all time favorite of mine. 
 Hanselminutes – Scott Hanselman talks about web development, usually dealing with C#, javascript, ASP.NET, and other MS technologies. 
 Herding Code – K Scott…

Philosophy as told through bad error messages


 Who debugs the debugger?
 
 
 Link to heading 
 
 
 
 
 Who troubleshoots the troubleshooter?
 
 
 Link to heading 
 
 
 
 
 Who delivers the text message which does not exist?
 
 
 Link to heading 
 
 


MSI Web Setup Project: Unable to build project output group


 MSI Web Setup Project - Unable to build project output group ‘Content Files from SOMEWEB (Active)’ 
 
 I stumbled onto this error and thanks to Scott Hanselman’s blog I was able to find a solution to it. 
 The only problem? My project had a TON of files marked as Content (such as multiple versions of angular) and I didn’t want to spend all morning going through the countless…

Savarez Cristal Corum High Tension 500CJ String Review

I recently bought a brand new Cordoba classical guitar. I am extremely happy with my purchase and would recommend this guitar a thousand times over. My only problem with it is the Savarez Cristal Corum High Tension 500CJ strings that came stock on the guitar. 
 
 The good 
On the plus side, these strings seem to settle in and stay in tune much faster than other ones I have tried.…

Segue 3 Classical Guitar Cover

Played using my Cordoba classical guitar. This was recorded mainly as a test for my new Zoom H4N portable digital recorder. 


About


 I’m a principal software engineer and tech lead specializing in business-critical legacy applications, especially CRMs. I have modernized several CRM platforms at this point. 
 Every company eventually builds a CRM. Eventually somebody has to modernize it. 
 Most of my work lives where old software, years of technical debt, and a company’s revenue meet. I help teams…

WebGL 3D Wireframe using GLGE


 This is the same as the 3D wireframe example which was done in OpenGL, only ported to the new technology known as WebGL. WebGL is still a new technology that uses GPU acceleration to render 3D graphics in a web browser and it has shown vast potential to modernize the web. 
 Many browsers do not even fully support WebGL at the moment. As such, to view this example you will need an…