eat some code

Setup Django on Mac in 2020

Setup Django on MacOS Catalina with Python 2 & 3 support

There are many ways to setup Django on MacOS. Here is how to get started while keeping the flexibility to have projects in different versions of Django and different versions of Python too.
June 2020
 
 

Decision making trap & bad technology

Costly decision choices

When developing a website for an organisation, you're usually directly exposed to its IT infrastructure and to its internal organisation / politics. In most cases, it's all fairly coherent; sometimes, it makes no sense at all. In some cases, a …
January 2019
 

Elm & Django #2

Building a basic search

Elm is a great tool to build simple widgets like a search bar. The use case is simple, as the user types, we want to dynamically show a filtered list of results.
October 2018
 

Handling repetitive tests in Django

By using data-driven tests

When writing tests (unit and/or functional), one of the goal is to cover all edge-cases. DDT is a great way to write such tests; here is how to do so in Python and Django.
June 2018
 

When to use pop-ups

Should you use unsolicited pop-ups?

Unsolicited pop-ups are despised by most users but remain commonly used. Why is that? Should you add them to your website?
January 2018
 
 

Elm & Django #1

Embed Elm code in Django

Here is a simple solution to run Elm code within a Django template. This could be used to handle the full frontend or just to embed a "widget" - like a search bar - via Elm.
January 2018

eatsomecode new design

Better, lighter, faster

The year 2017 has been really busy; I haven't blogged since January. I had been planning to change eatsomcode.com design for months and the winter break is the perfect opportunity to do so. Basically, it's a simpler design which will …
December 2017
 
 

Introducing learnkanas.com

Learn hiragana and katakana online

The first step in learning Japanese (unfortunately) is to learn the "kanas". The kanas are two syllabaries: hiragana and katakana. To memorise them, you can copy them countless times or you can play a simple game regularly. You can do …
January 2017
 

Handling statuses in Django #2

Expose transitions to an API

As discussed in the previous article, django-fsm is a great plugin to handle statuses in Django. Let's use it with an API.
October 2016
 

Handling statuses in Django #1

Choice field & finite state machine

Whether you're building up a CMS or a bespoke application, chances are that you will have to handle some states / statuses. Let's discuss your options in Django.
October 2016
 

Testing dates in Django

Testing based on dates & datetime

Django makes unit & functional testing easy (especially with WebTest). Tests on routing, permissions, database updates and emails are all straightforward to implement but how do you test dates & time? You might for example want to test regular email …
September 2016
 
 

Django to Ember #1

Convention over configuration

If you know Django and want to learn Ember (or vice-versa), this guide is for you. To get started, let's see what happens when a user opens the `/contact` page in both frameworks.
August 2016