Recent learnings...
- Selectively restoring changes from another branch or commit - November 21, 2024
- Personal git ignore per repository - November 19, 2024
- Raw string literals in C# 11 - November 18, 2024
- SRI integrity hash algorithms - November 12, 2024
- Use `URLSearchParams()` to build a query string - November 7, 2024
Tips for creating merge commits
I’ve reviewed quite a few pull requests in recent years and I’ve noticed some less-than-ideal practices when it comes to creating merge commits so I thought I’d list some things you can do to make life a little easier for someone reviewing your code. Make the commit message as useful as possible A lot has been written about how to write good commit messages, but I rarely see the advice applied to merge commits....
My default apps of 2023
I saw this on Chris Coyier’s blog and thought I would jump on the bandwagon. The idea, is to see for how many things you use the default apps for your system, which for me is mostly on Android/Google. It’s a fun exercise and I totally get the arguments for “just” using default apps, but I also get a little sad at the thought of huge companies like Apple and Google able beat better alternatives simply because they’re the default....
Blazor Best Practices Borrowed From React
Blazor took a lot of design decisions from React and other frontend frameworks and as a stateful component-based UI framework there is quite a bit of experience that can be transferred from one to the other. I gave this talk earlier this year at KCDC and then last week I presented an updated version as a Jetbrains webinar. Special thanks to Khalid for inviting me on and being an excellent host!...
An Assortment of Productivity Tips
This is mostly a collection of my notes on productivity and little tips for saving time or being more efficient while doing knowledge work. Organization vs Execution To me most productivity advice either falls under “organization” or “execution”. Organization being advice like “create task lists”, “process your inboxes”, etc. I could write a whole separate post just this category. Whereas execution is all about finding the time to actually do the tasks that are on your plate....
Git Config Settings I Always Recommend
If you’ve ever worked on a project with me then I’ve probably recommended at least one of these config settings in git. git config --global pull.rebase true - tells git to always pull with rebase instead of merge (the equivalent of pull --rebase). This not only saves you having to type the flag every time, but also ensures gui clients will also use rebase when pulling. Note: You should only enable this if you’re comfortable with rebasing....
How I get things done as a tech lead
I’ve spent the past year as a technical lead for the first time in my career and there have definitely been a lot of lessons learned but in this post I want to focus on personal productivity and time management and the techniques that have helped me in this area. As an individual contributor on a dev team, decisions about what you should be working on are mostly made for you....
My Always-Up-to-Date VS Code Setup for Web Development
I’ve gone through the setup and daily use of a number of editors over the years including most current popular ones for front end development (i.e. sublime, atom, and vs code) and for me VS code is the best choice for front end development at the moment. The team has put a lot of effort into making it a great javascript experience out of the box and it shows (VS code itself is written in typescript and the team uses vs code to build vs code) and with some additional work you can have the best experience while writing javascript....
You Should be Using Git Hooks
In my opinion Git hooks are an incredibly useful yet under-utilized feature of git. There are lots of resources that go into hooks in detail but here I’m just going to list some of the ones I find myself using over and over again. prepare-commit-msg This hooks is great for templating your commit messages. This post does a great job of highlighting some powerful possibilities. I like to use it to automatically insert a ticket number from the current branch name....
Use Netlify for a Poor Man's Self-Hosted Url Shortener
I recently migrated my blog from Github pages to Netlify and so far it’s been an awesome experience! Netlify gives you so much for free it almost feels like stealing! If you’re hosting some static content on github pages or S3 or somewhere, I highly recommend you check them out especially if you have a static gen build process. One of the cool features Netlify gives you is configuring 301 redirects using a simple _redirects file in the root of your site....
Use npm with a proxy that requires authentication
It’s pretty easy to configure npm to connect through a proxy by setting the proxy and https-proxy config settings and you can even use npm config set which will store them in your .npmrc file. Connecting through a corporate proxy that requires authentication, however, can be a little trickier. To specify your credentials, you have to place them in the proxy url so your npm command would look something like this:...