Friday, January 16

Tech Force looks interesting, but unfortunately I won't be applying.

I'm having Claude Code assist me in a major refactor of Apollo. The plan is to break it up into a few smaller modules: apollo-core, apollo-doobie, and apollo-http4s. Claude produced a PR quickly enough. The challenge: how do I, the senior engineer, know that Claude's code works? It's a huge PR that touches the entire project, surely you can't just trust the LLM. At least not yet. So: I set about to update the Apollo giter8 template to use the refactored version of Apollo. Note to self: yes, you need automated tests. Claude Code was less reliable here, but I ended up getting everything I needed from Tertulia and produced a working version. Next steps: I think the Claude PR is safe to merge, but with some caveats associated with the build system. Still, I think the safe thing to do is to copy a clean version into Tertulia's monorepo first, make sure everything works, then mint a new version. Once Tertulia's happy with the refactor... I'm pushing to Maven Central! And once that's done, I'll pull Tertulia off the monorepo to become Apollo's first user.

Thursday, January 15

Finished what I started: Tertulia's login pages now override the newly overridable Apollo defaults. I tested them, they work great (well, except the part about Mailgun not working from this domain yet).

Configuring Apollo is super slick now:

apollo = Apollo(
config = ApolloConfig(
csrfTokenKey
),
templates = ApolloTemplates(
auth = (csrf, focus, flash) => html.auth(csrf, focus, flash),
forgotPassword = (csrf, flash) => html.forgotPassword(csrf, flash),
resetPassword = (csrf, error) => html.resetPassword(csrf, error)
),
services = ApolloServices(
user = userService,
confirmation = confirmationService,
mail = mailService,
session = sessionService,
reset = resetService
)
)

AuthRoutes.routes[F, User, Mailgun.Email, UserId](apollo)

Shout out to Claude for the assist converting my hand-written Bootstrap-using templates into nice, clean Twirl.

🎉

Running toy datasets through scikit-learn, with Claude's assistance, and confusion matrices and the classification report came up.

uv run python .\main.py
Confusion Matrix:
[[14 0 0]
[ 0 14 0]
[ 0 0 8]]

Classification Report:
precision recall f1-score support

class_0 1.00 1.00 1.00 14
class_1 1.00 1.00 1.00 14
class_2 1.00 1.00 1.00 8

accuracy 1.00 36
macro avg 1.00 1.00 1.00 36
weighted avg 1.00 1.00 1.00 36

I did some digging through the documentation and learned:

The precision is intuitively the ability of the classifier not to label a negative sample as positive. The recall is intuitively the ability of the classifier to find all the positive samples.

My rough understanding here is that if false positives are costly, you want your model to be more precise, and if false negatives are costly, you want to ensure your model has good recall. The F1-score balances precision and recall equally, which is tunable using F-beta: beta > 1 favors recall, beta < 1 favors precision.

The F-beta score weights recall more than precision by a factor of beta. beta == 1.0 means recall and precision are equally important.

Creating a Python environment using `uv` is super simple, and the tooling looks nicer than other Python virtual environments I've seen in the past. The wrapper around venv is nice:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
uv init 30-days-of-scikit-learn
cd .\30-days-of-scikit-learn\
uv add scikit-learn pandas

Then, write your Python code:

from sklearn.linear_model import LinearRegression

model = LinearRegression()
model.fit(X_train, y_train)
predictions = model.predict(X_test)

And run with `uv run python .\main.py`!

🎉

Despite the President's campaign of retribution in Minneapolis, and today's threat to invoke the Insurrection Act, we're still following what's happening in Gaza.

According to a 2024 U.N. report, rebuilding Gaza's shattered homes will take until at least 2040. – Reuters
Wednesday, January 14

Link previews are a hard problem for a small platform like this: everyone treats your platform as if you're a scraper and returns 403: Unauthorized. And CORS prevents you from using the user's JavaScript client from grabbing metadata too!

I really and simply don't understand how Musk's open fascism hasn't decimated Twitter's user base. Sure, their numbers are down by tens of millions, but Bluesky isn't up tens of millions of users. Bluesky is trending largely negative, closer to 1 million daily active users (DAU), down from a peak of nearly 1.5 million. Global politicians and mainstream media still use Twitter, despite that it's become a biased, Nazi-infested cesspool, where its owners presence and the platform's biases are inescapable, and, in many cases, actively work to prevent the world they'd personally like to see, or are working towards. Why?

bsky.jazco.dev Atlas - Engagement-Based Social Graph for Bluesky by Jaz (jaz.bsky.social)