This article is a short study in web application design. We will be comparing Rails to Django, using a simple web form as an example.
2018 Archives
Dependency Injection Containers vs Hard-coded Constants
09 Aug, 2018 — Tags: Ruby Pigeon, RubyDependency injection (DI) is a somewhat contentious topic in the Ruby community. Some argue that DI containers are unnecessary complexity cargo-culted from Java. Some argue that DI is the path to cleaner, simpler, more-testable code.
In this article, I want to compare and contrast two approaches: hard-coded constants versus using a DI container. The difference might not be as big as you think!
Let’s start with a quick explanation of DI, and DI containers.
Testing Example Code In Your Jekyll Posts
24 Apr, 2018 — Tags: Ruby Pigeon, Ruby, TestingBlocks of code in blog posts and articles often contain errors. I see it frequently, in other people’s writing and my own. Code examples are usually not tested, or even run through a compiler/interpreter, so errors are not surprising.
I’d like my code examples to be as good as the real code that I write. Ideally, all code examples would have tests, which are run before the site is deployed, as part of a CI build process.
And so, I created a Jekyll plugin to enable that workflow.