The Bakery That Runs On Emacs

When it comes to managing ingredients and baking at a professional bakery, we know that most people would turn to an SQL database and emacs.  Really, what else do you need? Okay, so maybe there are a few who would think that emacs couldn’t help you with this, so, here’s how [Piers] uses emacs and PostgresSQL to manage the day to day needs at his bakery.

[Piers] had tried a spreadsheet to keep track of things, but didn’t really like it when he had to create a new recipe:  “lots of tedious copying, pasting and repetition of formulae” is how he put it. As a ex-professional programmer, [Piers] was familiar with emacs and so set up a daily worksheet in emacs using org-mode. Each morning he runs org-capture to create the template for the day’s work. Some code in the org file (run with org-babel) can run a query on the database. He’s created some code to set up each day’s journal entry and to run the complicated database queries that he needs.

There is a list of things that [Piers] is working on next, including ingredient order management and accounting, but it works for him. And to stop any potential flame wars that might break out, it’s good to mention that the system does just that: It works for him. There are other possibilities. Take a look at Al’s Editor Wars article, or Elliot’s rebuttal, or, ignore the wars and read this article on baking with steam.

23 thoughts on “The Bakery That Runs On Emacs

  1. Personally I’d probably use Python and SQLite to create a web-based app running locally on the laptop or maybe a pi, but I’m not going to judge a guy for using something that works.

    Pretty cool hack, Emacs is almost like retro console homebrew in the level of stuff people do with it that wasn’t intended.

    1. Oh, the Pi is for when I get really brave and replace the direct thermostat control of the ovens with a few thermocouples and SSRs and a PID system on the Pi. Which is quite some way in the future. 3-phase is scary.

    2. Actual online web apps are good for things you want others to be able to use w/o requiring an installation.

      Local web apps though? That’s like making food with all the flavor of the absolute worst health-food yet the nutrition of a paczki!

      Instead of writing code that displays a UI you have to write code that writes code that displays a UI. Or, in some cases you write code that writes code that writes code that displays a UI. Fun! And if you want responsiveness you have to use Javascript, the languages where classes are implemented as functions containing functions but functions are somehow usable as objects. I think instead of the keyword “function” Javascript would have done well to use the “marklar”!

      1. Hmm, I’ve only used SQLite once, for a home project way back when I was in university, so maybe I didn’t manage to recognise its flaws. What’s the problem with SQLite?

    3. For having worked in a bakery before, apparently they’re rather use the photocopy of a photocopy of a hand written paper, write the extra stuff in the margins, strike through stuff they don’t do anymore and make sure only 120 years old “Irma” has the knowledge of terrible abbreviations used on said paper. Most efficient, we don’t need no fancy spreadsheets.

  2. Wow this is so cool. But then again, there is this local Bakery it barely runs on any electricity. Its gas-powered and uses electricity just for the sign up front and the lights inside, probably has HVAC, not sure, AC at least.
    What’s the next super-unnecessary use of emacs? I am still waiting for the moment when its going to be a nice editor, yet vim is just perfect.

      1. Meh. Vi is for old farts that just couldn’t let go of Edlin. You might as well be fat-fingering your input with a bank of toggle switches and a push button. Viva le Altair!

  3. I think this is a good example of “if your only tool is a hammer, every problem looks like a nail”

    Because I have a different hammer I would have used Excel, and lots of cunning macros and VBA. I almost never use actual formulae, I see Excel as a surprisingly nice IDE with a flexible OO language and a handy grid display :-)

    1. I see VBA as ‘the language I am forced to use because the PCs in my lab are segregated from the Internet and locked down so I can’t install anything better.” The VBA IDE isn’t bad, though. Especially considering 95 percent of users will never see it.

      1. (Wandering a log way off topic)
        It is astonishing what you are allowed to do with VBA, like deleting and replacing all the menus.
        I have a (20,000 line!) VBA macro that basically converts Excel into a completely different application with all different menus and ribbon graphics. It runs automated dynamometer testing.

  4. lol, so today instead of working I looked up and learned what Emacs was. I’m not an “apple-fan-boi”, but seriously thought this was a bakery running SQL on Apple e-Macs circa 2004…

    (it’s a Apple Macintosh computer featuring a “G4” processor in an original iMac style chassis with an inbuilt CRT built mainly for the education market, hence the “e” in e-Mac…)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.