Assembly Documentation

June 2, 2019 08:30

Why?

…use a cup of…

…may need to stir it until it is fluffy…

What is a cup?! What do you define as fluffy? And that’s the reason why I started to “program” my recipes. That way I am forced to think step by step and as detailed as I can, so you can exactly reproduce my results just by following the assembly program without knowing the magic terms to describe what ‘clumpy’ means…

Documentation

The used language is a mix of Javascript, C++ (inheritance) and Python (variable handling). Its main goal is just to be readable, not syntaxtically correct. And yes, sometimes I may use something like pot.content is not cooking to describe what I mean - the main reason is that I have this expression not yet listed below and it is so rarely used, that it does not make any sense to do so…

Global Methods

function mix(something...);
function spread(something, target);
function stir(target);
function wait();

Objects

Could be a pot, or cake - whatever I need (mostly the name should be clear enough). I can also access arbitrary properties and interact with them. Some common properties are:

something.temperature
something.content //Not to be confound with KitchenTool.content
something.stateOfAggregation

KitchenTool

class KitchenTool {
    var content;

    //Insert the given stuff into the content
    function insert(something...);
}

Stove

class Stove : KitchenTool {
    //Heat the target (e.g. a pot) with the throttle (0%-100%)
    function heat(target, throttle = 100%);
}

Toaster

class Toaster : KitchenTool {
    var isToasting;
    
    //Toast the target (e.g. a slice of bread) with the throttle (0-7) - may need to scale it for other Toaster models...
    function toast(target, throttle = 3);
}

Microwave

class Microwave : KitchenTool {
    var isEnabled;

    //Microwave the current content (make sure to insert() it before) for the given duration and with the throttle
    function enable(duration, throttle = 100%);
}

Hand

class Hand : KitchenTool {
    //Crush the object into rough pieces
    function crush();
}