Posted on Mon 23 December 2019

Learning Django in the holidays

Two years ago I learned Swift during the holiday break across Christmas and New Year's. I'd dabbled in Swift but had never really got my head around it (previously I'd taught myself Objective-C as my first ever programming language, and that was all I knew). I read Apple's official Swift book and a bunch of other books and articles, and finally it all seemed to click. I started writing some new code in Swift during that holiday period, and once I got back to work I started incorporating Swift into my work more and more. These days my main iOS project has evolved from 100% Objective-C to 60% Swift, and all new code I write is in Swift.

I really enjoyed that learning project. I intentionally tried to set work aside for a few weeks during the holiday period, since, being self-employed, we rarely switch off entirely from work throughout the year. The break from work was refreshing, but devoting my time and attention to learning one particular thing was also captivating and fun.

This year I decided I'd like to devise a similar holiday learning project. I've picked web development as my topic, which is far broader than Swift, but I've constrained it by choosing to learn using Python and Django, since that's what Josh uses for Hello Code projects.

I've already being working on some bits and pieces of this project, including some reading, a Django tutorial, and playing with the beginnings of two different Django projects. But now that we're officially on holidays for a couple of weeks, I have no work obligations beyond urgent support requests, so I can really knuckle down.

I'm planning on returning to work duties on Jan. 6th, which gives me two full weeks from today. Here's what I'd like to get done in that time:

  1. Finish this Linux tutorial, which is teaching me how to use the command line on my Mac (I'm up to section 9 of 13)
  2. Finish my reading list (right now I have an article on networking basics, 4 articles on SSH, and 3 on HTTP to read), as well as any other articles I need to read to fill in knowledge gaps around networking once I've worked through my current list
  3. Launch a tiny Django project

The third goal is obviously the biggest one, and the one I'll get stuck on the most. I've got an idea for a small project I'd like to make, and I've gone through the set-up process for Django projects a couple of times, so I think I can get this started fairly easily, but I'm sure there'll be parts that stump me along the way. No doubt Josh will jump in and help—that's why I'm using the tech that he's most familiar with (that, and I'd like to be able to contribute to the web parts of our Hello Code projects someday).

The project I have in mind is a very simple app for choosing meals. We tend to rotate through a list of the same recipes, but often forget the ones we haven't had for a while, so I want an app to help me remember what meals I know how to make, and choose one when it's time to plan and buy groceries. Here's what I think I need to complete to have a super simple MVP of this project:

  • Make a Meal model which has a name, and maybe an optional note and/or URL for storing recipes, various flavour/filling/topping ideas, etc.
  • Make an interface for the user to create Meals (although I could just use the Django admin for this in the MVP)
  • Display a list of the user's Meals
  • Meals also need a date for when they were last used, which the user can update with a click
  • Sort the list of Meal items by their last-used date
  • Set up the project on a server

Once the basics are done, I have some other things I'd like to add, if I have the time:

  • Click a button to show 3 random meals from the list that have not been used recently
  • Add multiple lists or categories for meals to belong to, so they can be separated into, e.g. "Dinner", "Breakfast", etc.
  • Add tags to Meal models and tag filtering options to the list view, so you can view, for example, only meals with the tags "salad" and "vegan" in the "Dinner" list/category

I'm not sure yet how feasible it is to get all this done in two weeks, but hopefully I'll get through most of it, at least.


P.S. I make some stuff you might like: Exist, a personal analytics app to help you understand your life, Larder, a bookmarking app for developers, and Changemap, a roadmap and changelog for transparent teams.

© Belle B. Cooper. Built using Pelican. Theme by Giulio Fidente on github, edited by Belle B. Cooper. Theme inspiration from Jordan Smith and DuoTone snow theme.