Cooking: Getting organized

I prefer staying at home and eating a homemade meal than going out and spending money for a meal I might not even enjoy that much. This attitude might have to do that I’m an introvert, but I also prefer knowing what’s in the food I’m eating (therefore, I’m not the biggest fan of ordering in either). Especially since I have my little sweetheart, I’m way more concerned about healthy nutrition than I was before.

Currently, I fall back to quick and boring suppers way too often due to a few reasons:

  1. There are days, were I just simply don’t feel like cooking.
  2. My little one tends to be very clingy later in the afternoon and as soon as I step into the kitchen, he wants me to pick him up (also because he wants to watch me cooking).
  3. Although cooking is generally cheaper than going out, it can get quite expensive if you choose organic ingredients. Therefore, it’s best to look weekly at the local flyers, buy groceries that are on a good sale and then plan recipes that use those ingredients. Also, stocking up on items while they are on sale is a good idea (as long as they have a due date far in the future of course).

I’ve struggled with the above-mentioned hurdles for quite a while now. It’s time I tackle them finally.

Overcome ‘I’m too tired/lazy’

  • Plan meals ahead (at least a week in advance).
  • Write down recipes (it’s ingredients and maybe just a link to a site) that I like and some that I would like to try in the future.
  • Plan for 5 to 6 quick meals and only one or two more labor intense suppers.
  • Create the list of recipes via org-mode in emacs. Save the files in my gdrive so that I can access it on my phone.
  • Write an elisp script that copies ingredient lists into the ‘grocery shopping’ list via a key-press.
  • Write a script that organizes the weekly grocery shopping list by combining groceries and sorting them by store aisles.
  • Have a few quick meals (such as fish and chips) in the freezer for days where I’m truly lacking time for cooking or just really badly lazy.
  • Manage cooking with my little one

  • Find recipes that don’t require a lot of cutting.
  • Ask my hubby more often for help.
  • Prepare food already on the weekend while my husband and the little one are busy playing.
  • Keep the pantry full and organized

  • Create a list with all pantry items (name and amount) and it’s due date.
  • Create an emacs extension which will automatically search for recipes that use soon to be due pantry items.
  • Keep it cheap

  • Start searching every week for groceries that are on sale and create the meal plan accordingly.
  • Write an elisp script that takes as input groceries (that are on sale that week) and as output all kind of recipes that use those groceries.
  • Elisp code

    So far I have only one little function implemented which helps me copy an ingredients list in org-mode into my grocery.org file.
    An example ingredient list looks like:

    |   2 | small | shallots                 | minced      |
    |   1 |       | garlic clove             | minced      |
    |   2 | tsp   | Dijon mustard            |             |
    | 1/4 | cup   | balsamic vinegar         |             |
    |     |       | salt and pepper to taste |             |
    | 1/2 | cup   | olive oil                |             |
    

    If I have the pointer at the start of the table and call my elisp function, then it automatically puts the first three columns of my table in the kill ring. Afterwards, I just need to yank it into my grocery file and create a macro so that moving ingredient lists into my grocery list goes even faster. Below is my short unspectacular code.

    (defun custom/save-till-end-of-table()
      (interactive)
      (setq cont t)
      (setq startpoint (point))
      (while cont
        (next-line)
        (if (not(char-equal ?| (char-after)))
    	(progn
    	  (backward-char)
    	  (setq cont nil))))
      (org-shifttab)
      (backward-char 2)
      (kill-ring-save startpoint (point))
      (message (string (char-after))))

    My goal is to improve this code still so that it automatically yanks the table into a user-specified file.

    Some reasons to use Emacs

    I’m using emacs for several years now and it is by far my favorite editor. Don’t get me wrong, I do use Visual Studio for my MFC programs and don’t mind working with it, but there is just something about emacs. I recently was thinking of why I liked emacs so much and thought I’ll list my reasons to use emacs here.

    The beauty of simplicity

    Nowadays, there are many powerful and popular editors (Notepad++, Sublime Text, etc.) and IDE’s (Eclipse, Visual Studio, and so on) out there. I just find them often cluttered with buttons, menus, sidebars, etc. Emacs on the other hand (I’m now referring to the command-line and not the GUI version), consists of a simple window and no more.

    For example, when I’m using Visual Studio, I hardly use any of the menu buttons (for many of the menu items, I know the key combinations anyhow). Those just take away space from my editing window. Of course, you can customize the toolbars, sidebars, etc. to your liking, but to enable efficient work on VS, I still end up with sidebars. The issue is not, that it prevents me from writing 200-300 character long lines (which, seriously, is highly undesirable), it’s more that it kind of forces me to switch btw mouse and keyboard frequently (though I’m sure there are some people that know how to work under Visual Studio/Eclipse without having to use the mouse hardly at all).

    Efficiency

    I remember when I started off with emacs. It was not as easy as I thought. I seriously was only able to work for about an hour on emacs without a break. Why? My hands starting aching. Why? I just wasn’t used to having my hands all the time on the keyboard. You don’t realize how often you switch between keyboard and mouse (and therefore wasting time) till you start using emacs (at least that’s how it was for me).

    It took me about two to three weeks till I was comfortable working 8 hours a day on emacs. But as soon as I was, I was hooked. I find myself quicker on emacs than on any other editor since I can leave my hands on the keyboard without having to switch to the mouse frequently.

    Powerful

    Undoubtedly, emacs is a bit more difficult to start with than any other editor. As a beginner, you’ll need to learn at least the basic key commands (like move cursor to left/right/up/down, undo, mark text, etc.) to start using it. I admit that’s a major drawback and the main reason why it will likely remain a bit of a geek editor. But at the same token, as soon as you know the basics, you’ll likely find yourself to be way more efficient in text/code editing.

    For example, I don’t have to switch to the explorer window to search for or copy a file. I simply type in the command to open dired in emacs and do whatever file/folder work I need to do. Emacs provides a huge (and still growing) amount of extensions which makes switching between applications almost dispensible. Emacs provides support for most programming languages, calenders, email program, twitter mode, and much more.

    Customization

    I feel like emacs can be much more customized to your liking than any other editor. You don’t just choose background/text/keyword colors and fonts(as most editors nowadays provide as well), but you can set automatic reminders (from calender, todo list, you name it), start emacs with multiple windows each containing your favorite modes/files (stack exchange, twitter, browser, …), display a clock at all times, and so much more.

    Extensibility

    This part has been completely neglected by me which I’m going to fix now. I’m finally going to start learning elisp. For way too long, I ignored the possibilities of creating my own extensions or of modifying existing ones.

    If you google emacs, you’ll find a lot of beginner tutorials. One blogger, which I would definitely recommend subscribing to (or at least frequently visit her side) is Sacha Chua. She writes quite a bit about emacs (for beginners as well as for novices) and inspires you to use it daily.