Weeknotes - 2020-11-22by Justin Michalicek on Nov. 23, 2020, 1:40 a.m. UTC
As mentioned before, I'm keeping the weeknotes style, but it won't be weekly. Here's what I've done recently, though.
At work I've been tasked with optimizing performance on a not yet in production Ruby on Rails system (I'm still a Django dev primarily, but I'll work with anything) which relies heavily on ElasticSearch with many large, deeply nested documents. I enjoy ElasticSearch because it allows me to work and think differently than usual and I get the opportunity to really dig into it every year or two at work. This time around I have gotten to learn more about the built in aggregation functions allowing us to calculate aggregate data on the ES side rather than pulling in massive documents into the Ruby code and then figure out the aggregate data. I've learned how to exclude specific fields from the results in search to optimize the amount of data coming back there since it is no longer needed to calculate the aggregate. I have also been working with ES' Painless scripting language to do things like calculate the average amount of time between dates in a list of nested items.
The Painless script work is interesting. The language has no surprises so far in general and just sits on top of Java and so you have access to nearly all of the Java standard library. There are things which are excluded, though, because they are in theory useless or likely to be harmful, such as any sort of IO. Unfortunately, this includes printing to stdout and stderr, logging, etc. which makes debugging a bit interesting. So far I have fallen back on just having the function return whatever value I normally would have printed or inspected in a debugger and then I can pop that out in my HTML or to stdout on the Ruby side of things.
I've been doing quite a bit with the brewing. I've brewed my two Roggenbiers along with the Dunkelweizen they are based on, which I mentioned in the last weeknotes. I finally got a picture of all three of them together for comparison on how they look. The Roggenbiers are distinctly more orangey-brown which comes from the Rye while the Dunkelweizen is more of a reddish brown.
I also brewed a baltic porter based on a bread recipe, making use of fennel seed, molasses, and cocoa powder. That beer was kegged this weekend and while it should age another month probably, I'm going to let it sit until Thursday night and then burst carbonate it for Friday which we are spending putting up our Christmas tree with friends who we have more or less quarantined with. That beer is going to be interesting and possibly not in a good way, but I look forward to trying it and then brewing it again soon with some adjustments.
This past weekend I brewed my first Dark Mild. The Dark Mild style is quickly becoming one of my favorites for session beers and lighter drinking with its malt focus, dark malts, and lower alcohol. The recipe I went with as my first is very simple and so leaves a lot of room to experiment and tweak it.
I finally got around to a long put off server upgrade. I had been running a $5/month Debian Stretch Digital Ocean droplet for a long time. This weekend I finally mucked with my ansible configs and have moved everything to Debian Buster and upgraded to a slightly larger droplet with 2GB of ram. I didn't really need the memory most of the time, but on occasion run into problems on the old 1GB setup when I get a few extra docker containers running. This also let me remove the memory restriction on my blog containers which were previously having issues with Wagtail's image management on large images.