Dos and Don’ts For Success If you’ve been developing web applications for your company or a client for a few years, it’s possible you now find yourself with several individual Django projects that you’d like to consolidate. Each project might have one or a few apps with its own set of URL patterns, models, views, and […]
Author: Dane Hillard
Mixins for Fun and Profit
There are certain places where heavy use of mixins can save a ton of time or cognitive load. A use case that came up recently was in a Django project where several class-based views needed to serve only traffic within our intranet. An existing middleware does this check, raising an Http404 if a request comes […]
The Python REPL and More
Creating a Python file is pretty easy. Open a new file in your favorite text editor, put some Python code in it, and save it with a .py extension. Done! “Done” means “but wait, there’s more!” RIP Let’s try creating a simple Python file. Save the following code as two.py: 1 + 1 Since we’re working […]
Get Your Feet Wet with Python
Suppose we want to know the square of a bunch of numbers plus 2. The simplest way to do this in Python would be to print each calculation individually: print((1 * 1) + 2)print((2 * 2) + 2)print((3 * 3) + 2)… This is all well and good, but if we decide later that we […]
Coalescing the Abstract into Software
Now that we’ve gotten to the core of what programming languages do, let’s get a little more concrete and see what some of them are and what they look like. Python Python is one of the most pervasive languages right now, due in part to its relative closeness to English and therefore low barrier to […]
Propositional Logic
You likely learned about the distributive property in your middle school algebra class. The distributive rule says that a term multiplied by two or more terms in parentheses is applied to each of those terms individually. For instance: 2(3 + 4) = (2)3 + (2)4 = 6 + 8 = 14. In propositional logic, the […]