Posts
Mother of a Fermentation Chiller
I've been doing the swamp cooler thing for maintaining homebrew fermentation temperatures for too long and have finally built a more controllable fermentation chamber. I used the plans for Mother of a Fermentation Chiller after doing some research and seeing how happy others have been with variations of it. It's lightweight and easy to move around unlike freezer and refrigerator based options and is inexpensive to build as long as you are ok with a big, ugly, box. I have seen people put wood enclosures around them which look very nice and would help insulation even more, but will obviously …
Now Built on Wagtail
It's time for my occasional rework of the back end of this system and attempt to write more by making it easier and nicer to write. This time I killed two birds with one stone by adding Wagtail to the mix.
I stumbled upon Wagtail through work. We build a lot of custom CMSes at Mobelux and so every couple of years we take a look at existing solutions. In the past we've always found something unacceptable about all of them. This time when we gave Wagtail another shot, it was exactly what we are always looking for. The features …
Dependency Injection With Golang HTTP Middleware
I have been playing with Go on and off for a couple of months now and am really enjoying it. I could probably do a post just on why and what I like, but in short, it adheres to and encourages simplicity, obviousness, and explicitness that Python does (moreso than Python in many cases) while adding some new tools, implementation options, and deployment options.
Background
Part of the explicitness and obviousness of Go is in function signatures. In Python you can have named parameters with defaults, so they are optional. You even have the *args and **kwargs parameters which take …
See Ya 2017! This Week Was Awesome
It's just a few hours until 2018 on the east coast. It's been an isanely stressful year so I'm writing this so that I don't forget how awesome this last week has been and how I'll make sure next year is awesome.
- Introduced Ana to Sonic the Hedgehog on the awesome AtGames Genesis my wife got me for Christmas.
- Robin and I watched Star Wars Ep IV with Ana for the first time.
- Built awesome cars with Ana using a kit she got for Christmas.
- Found Zam Zam Kabob with awesome family which took us in for the holidays for …
Dockerfile With Code or Separate?
As I've been working to improve my devops skills and knowledge, particularly in regard to using Docker, I have begun to wonder what the best way is to handle Dockerfiles and the rest of the Docker image build environment. Sometimes I feel that with the code makes the most sense, treating it like a Makefile or other build data. Now that I am looking for references suggesting the this technique I am having trouble finding them, but I have seen it often Here are a couple posts on the web which suggest that. This includes Amazon's ECS Continuous Deployment pipline …
Configuration and Architecture Experiments
I've recently been playing with new tools for configuration management and deployment, both at work and with my own projects. These include Docker, Ansible, and an InfluxDB/Telegraf/Grafana stack. I have been using all them for production in house tools at work as well as this blog.
I first got started with Docker using it at work. It works great as a production environment. I can make an image which is easily deployable anywhere Docker is found. Configuration of images and containers is dead simple, rarely more complex than writing a bash script. After years of fighting with Chef …
Django Fractions Has A User!
I got my first bug report for Django Fractions. That's awesome! It means someone uses it and finds it useful enough to report a bug! The bug was that it was not playing nicely at all with forms in the django admin site (or elsewhere using a ModelForm, most likely). I fixed it and learned a bit more about Django's internals.
The base fix was to implement the formfield() method on djfractions.models.fields.DecimalFractionField. That in itself took a bit more work than expected and in the end I stopped subclassing the built in DecimalField because there are just too many things …
Django Mail Viewer Released!
So I've been delayed on my promised Phoenix for Django Devs post, but I've got something else fun instead.
One of the challenges when developing Django apps is email testing. Having to actually send emails and check in your real email client is kind of a hassle and always risks accidentally sending an email to an incorrect person. You can use something like mailtrap.io, which at least ensures the email will never get to an incorrect person and provides some great functionality, but you still need a network connection and have somewhere else to log in to view the data. …
Running Injuries And Starting More Phoenix Posts
I started trying to post stuff more regularly awhile back. I did well for a few posts and then it died off. I am finally starting to write up the promised follow up post to my previous post about how to implement nested changesets in Phoenix and comparing and contrasting that to using Django InlineFormsets. I have all of the actual work done, but I am now going through my code and cleaning it up. The current code has a lot of "it works, move on" sloppiness to it, so I have to clean that up, make how I do …
Phoenix for Django Devs: Inline FormSet Via Nested Changesets Part 1
A pretty common use case is to create or edit a main object while also manipulating a list of related objects. On the database side the list of objects usually have a foreign key back to your main object's table. Using Django the form, data validation, and saving is handled with a ModelForm while related object saving is handled via an inlineformset_factory. Previous version of Phoenix did not have a very elegant solution to solving the same problem. Posts on Stack Overflow and elsewhere detailed manually handling transactions to create the parent object, then validate the related objects, then …
Phoenix for Django Devs: The {% block %} Tag
Last night I came up with a solution for the specific problem of page or template specific javascript in Phoenix, which I posted here. When I woke up this morning I realized that the more generic problem was simulating the {% block %} template tag. So to expand upon the example from my previous post, a top level parent Django template (without lots of elements to keep it clear) might look like this.
base.html:
<html> <body> Common page elements and text here {% block content %}Page specific content gets displayed here.{% endblock content …
Phoenix for Django Devs: Per Page JavaScript Without The Mess
When I work on a Django project I normally have a simple block at the bottom of my base template which is empty, something like so:
base.html:
<html> <body> Common page elements and text here {% block content %}{% endblock content %} Some more common page elements such as a site footer, etc. here. <!-- Load jquery, etc. whatever common js to every page here --> <!-- now this block is overridden in child templates to load page specific external js or in page js --> {% block page_js %}{% endblock page_js %} </body> …
New Balance Fresh Foam Vongo Followup
I've put about 250 miles on these shoes now and they are great. Knee pain I've been battling with since starting running seriously is gone and I've increased my mileage. I wish the forefoot/toe area was a little more flexible and I have some concerns about how the insole is wearing. The sole/tread has a large open gap down the middle and the insole shows a visible crease right there as well. I do need to try out a bit larger shoe next time, though. I am currently using a 12 2E, but after some half marathon and longer distance …
New Balance Fresh Foam Vongo 1st Run
I've kept the rare posts on this blog technical, but I'm expanding in hopes of having more to say. Back in August or September 2015 I started running fairly seriously. Since then I have been on the search for running shoes which don't suck. I have wide, flat feet, with additional weird bones on the outsides near the middle which stick our further than on anyone else I have spoken with about it. It makes it hard to find decent shoes which fit. Additionally I've been fighting with knee pain... possibly due to over pronation (which tends to go with …
What's Going On?
Alright, so I finished my final class for my Associate's Degree in Computer Science after many years of slowly taking classes while working full time and having a child. It's awesome. I decided to immediately fill up my free time by modernizing the code running bash-shell.net a bit. It's still nothing fancy, but doesn't need to be. I finally updated Django to 1.9, generally reorganized code, added ssl using letsencrypt, and tonight I added django-wysiwyg to hopefully make posting easier and encourage me to do so.
I hope to continue to improve bash-shell.net's system to add interesting features and …