Posts

  • No More Off-Season: Building a Garage Golf Simulator - Part 3: Asembling the enclosure

    No More Off-Season: Building a Garage Golf Simulator - Part 3: Asembling the enclosure

    Welcome back to my DIY garage simulator build!

    In Part 1, I measured my space and laid out the master plan, dealing with my 10-foot width constraint. In Part 2, I agonized over the “brains” of the operation and landed on the Square Golf launch monitor as the perfect blend of performance and value.

    Now, it’s time to build the “home” for it all: the enclosure. This post will cover everything from the frame and screen to the safety padding and floor.

  • Decoding SwiftUI's Data Flow: @Environment vs. @EnvironmentObject vs. @StateObject

    Decoding SwiftUI's Data Flow: @Environment vs. @EnvironmentObject vs. @StateObject

    If you’ve spent any time with SwiftUI, you know it’s a powerful framework for building user interfaces. But as your apps grow, a common question quickly arises: “What’s the best way to pass data around?” You start with @State and @Binding for simple local data. But soon you find yourself needing to share data across many views, and things get complicated. You’ve probably seen @Environment, @EnvironmentObject, and @StateObject mentioned, but the distinction can be blurry. When do you use which? Let’s demystify these three powerful property wrappers and understand their specific roles in your SwiftUI data flow.

  • Implementing Drag and Drop in UICollectionView and Core Data – Part 2

    Implementing Drag and Drop in UICollectionView and Core Data – Part 2

    In Part 1 of this series, I walked through the process of adding drag-and-drop functionality to a UICollectionView backed by Core Data. While I got it working, I mentioned that the solution, while functional, wasn’t as modern as it could be. The NSFetchedResultsControllerDelegate implementation, with its manual block operations, felt a bit clunky and error-prone. This post is about that additional refactoring: moving from the traditional NSFetchedResultsControllerDelegate to the more modern UICollectionViewDiffableDataSource.

  • No More Off-Season: Building a Garage Golf Simulator - Part 2: Launch Monitor and Software

    No More Off-Season: Building a Garage Golf Simulator - Part 2: Launch Monitor and Software

    Welcome back to my DIY golf simulator journey!. In Part 1, I talked about measuring my space and figuring out the basics of my simulator setup. Now it’s time to choose the heart of the system: the launch monitor. This is the technological brain that translates a physical golf swing into a virtual shot. Making the wrong choice here could mean inaccurate data, endless frustration, or a system that just doesn’t work in my space.

  • No More Off-Season: Building a Garage Golf Simulator - Part 1: Introduction

    No More Off-Season: Building a Garage Golf Simulator - Part 1: Introduction

    It’s a dream many golfers share: the ability to play a round at Pebble Beach or St Andrews at a moment’s notice, rain or shine, day or night. No tee times, no weather delays, just pure golf. For a while now, I’ve dreamed of having my own golf simulator. This year, I’m finally turning that dream into a reality, and I’m taking you along for my entire journey.

  • Implementing Drag and Drop in UICollectionView and Core Data – Part 1

    Implementing Drag and Drop in UICollectionView and Core Data – Part 1

    One of the feature requests I received was to allow users to rearrange gun photos in a custom order. Since I was planning other changes to the photos module, I decided to tackle this request first as it would lay a solid foundation for future updates. What seemed like a simple task turned out to be a bit more complex than expected, so I decided to blog about it.

  • Taming a Herd of View Controllers: Refactoring for Simplicity in Core Data with Swift

    Taming a Herd of View Controllers: Refactoring for Simplicity in Core Data with Swift

    If you’ve worked on an iOS app of any significant size, you’ve likely encountered it: the copy-paste monster. It starts innocently. You build a view controller, get it working perfectly, and then you need another one that’s almost the same. You duplicate the file, change a few lines, and move on. But then you need another, and another. Before you know it, you’re the reluctant owner of a herd of nearly identical view controllers, and any change to one means a tedious and error-prone update to all the others. To be fair - there is the Rule of three (three strikes and you refactor), so some temporary duplication is very much okay as long as it is addressed in a timely manner.

  • Implementing client credentials grant flow with public/private key pair, client assertion, and JWKS in Node.js

    Implementing client credentials grant flow with public/private key pair, client assertion, and JWKS in Node.js

    This blog post will walk you through an implementation of the client credentials grant flow using a client assertion. We will build a system to create, sign, and validate JSON Web Tokens (JWTs) using public-private key pairs and JSON Web Key Sets (JWKS) in Node.js. We’ll use Node/Express for the server framework, Jose for JWT signing and validation, and Axios for HTTP requests. The system is composed of a bootstrapper and three microservices, orchestrated with Docker Compose for easy setup and execution.

  • Auto-sizing UIImage on top of UITableView during rotation

    Auto-sizing UIImage on top of UITableView during rotation

    As part of version 1.2 of Gun Vault I decided to include the functionality of having the primary image of a gun included on top of the Gun Details screen. I wanted the image to take 1/3 of the screen when the device is in portrait mode …

subscribe via RSS