Dad hack: the little one didn't want to sleep, but they were complaining a lot as if they were tired. I started reading to them about cosmology and the big bang. BOOM! Right to sleep.

TODO: There's a bug with link previews: if you post a link whose description is too long, it won't trim the description. Instead, it will simply fail to insert it into the database. What should happen instead: if a page's og:description is longer than expected, we trim it, and append ellipsis.

There was a bug posting link previews with long descriptions 💪🏻

Use case for another user type? If the focus of this platform is rich text, why not poetry, and let some poet friends try it out?

👀

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.

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`!

🎉

👀