RSSAmplifier

Blog

Mike Johnson

A blog about software development and other things.

mikejohnson.devRSS feed ↗20 posts

Latest posts

CTO in Practice

Taking a big leap

Bad Brains

What counts the most is what we do for our own sake.

Raymond Hettinger doesn't know that he got me my first tech job

Live coding is dumb

Go

Ported the blog to a Go backend

Deleting services tonight

A long migration finally completed

sqlx with Generics

Adding generics to sqlx

A new sqlx fork

Describing plans for the sqlx fork and the reasons behind it.

Mobx Memoizes Components (You don't need React Compiler)

If you're using Mobx and React, you might be tempted to use the React Compiler to auto-memoize your components. But you don't need it.

Opting out of AI scraping

I published my first ever robots.txt to opt out of AI scraping.

PHP Upgrades with Rector

My experience using Rector to help automate PHP upgrades for the last year.

Upsides of Mongo ObjectIds in Postgres

While porting from MongoDB to Postgres, I decided to keep using and generating the MongoDB ObjectIds.

Preventing Cache Stampedes

I got to do some fun stuff at work involving cache expiration algorithms. It's not every day I get to cite a paper in a merge request.

Ported to NextJS

I ported this blog to NextJS.

Jep 3.1 Released

I have just released Jep 3.1 on PyPi. Get it now: pip install jep . 

 New in this release is an improved import hook that can lazy-load Java
packages. This fixes an issue on some JREs where it is not possible to
reflect all packages. 

 Also, I put a lot of work into a DBAPI-2 module that wraps JDBC drivers in Java.
This makes it possible to use the very nice, platform…

Interested in a Teradata Python Driver?

Teradata is big in the data warehousing world, but it has horrible support 
for all of my favorite platforms. I’ve been thinking about writing a native
Python DBAPI 2.0 driver for Teradata. I have to use this database for work,
and I’d like to have first class Python support on all my platforms
(OS X and much more modern Linux distributions than they support).…

Thanks @rdegges - 100 carb habit

Randall Degges wrote about his ketogenic diet about a month ago. I’m not going to pretend
to know much about diet, but the more I read about it the more sense it made to me. 

 I left the Marine Corps with a big appetite. Sure, I tried to continue working out
for a while, but I just wasn’t able to put in 2-3 hours a day like I had been. Not that it would have mattered…

Python string formatting

Because I can never find it when I want to, here’s how to quickly
format a US dollar amount: 
 >>> from decimal import Decimal 
 >>> ' {:,.2f} ' . format ( Decimal ( '12312123.1231212' )) 
 '12,312,123.12' 
 
 This is for Python 2.7 and above. 

 Thanks, Raymond ! 


My fab file

There aren’t enough examples online of Fabric scripts as used in the
real world. The documentation is good but a real example is always
better. 

 Maybe that is because Fabric scripts tend to be closely tied to the
environment they are working on. To be able to post mine, I have had
to change some of the details, too. There are also constraints that I
deal with…

Backup GMail

Google might disable an account for a number of reasons. Accounts may
be disabled because Google requires real names or because an algorithm
decided an account was being used to spam. Accounts can be locked and
users are left at the mercy of Google’s weak customer service . 

 The official recovery process requires befriending a Google employee
and begging. I love…

Site ported to Hyde

I have ported this site to use Hyde , a static website generator
written in Python. I had been actually running a static version of my
Django blog for sometime (using wget mirror), but Hyde does a great
job of making generating a new site, links and templates very easy. 

 The developers are hard at work improving Hyde, so some things are in
a state of flux right now. I…