• 0 Posts
  • 31 Comments
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle
  • weird dude who writes raw HTML

    Eyy, that’s me! Good excercise to learn actual HTML, instead of directly trying to jump into <insert random JS framework> and getting confused on what’s what.

    Anyway, I ended up switching to Hugo as a static site generator, because it was too damn hard to keep all my <header>, <nav> and <main> aligned for all my HTML files.

    Now I can just write a markdown file as an article, or switch back to raw HTML if I so need (like rewriting Alan Turing’s paper " On computable numbers" in HTML because I can’t use TTS on the PDFs I found; I still haven’t finished writing it, because I am now reading E. F. Codd’s papers on the Relational Model, which is pretty wild how we already figured that shit out in the 1970s!)











  • What’s even the “gold standard” for logging stuff I guess?

    structlog. Or just Structured Logging in general.

    Don’t do:

    logging.info(f"{something} happened!")

    But do

    logging.info(“thing-happened”, thing=something)

    Why? Your event will become a category, which means it’s easily searchable/findable, you can output either human-readable stuff (the typical {date}, {loglevel}, {event}) or just straight up JSONL (a JSON object/dict per line). If you have JSON logs you can use jq to query/filter/manipulate your logs, if you have something like ELK, you can insert your logs there and create dashboards.

    It’s amazing - though it may break your brain initially.