# <!-- METAHEADER
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"*": "https://raw.githubusercontent.com/wefindx/schema/master/method/oo-item.yaml"
# <!-- HEADER
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"base:title": "0oo - Layered problem language"
"og:title": "Layered problem language"
"og:description": "Starting from a blank slate is easier than modifying existing code sometimes. I propose all behaviour is split into snippets that the computer arranges into a whole. You should never have difficulty finding where to insert code to add or modify behaviour in a system. You can specify before/after behaviour between a problem and another problem. Each snippet is an invariant that the system should hold. The snippet has an optional condition when it applies, a bit like an intelligent if statement that is essentially ran after every statement in the system. Problems are matched by types of the Inputs …"
"og:image": "https://avatars0.githubusercontent.com/u/28134655"
"og:url": "/method/69001/"
"base:css": "/static/css/bootstrap.min.9c25540d6272.css"
"base:extra-css": "/static/css/base.57997aeac1df.css"
"base:favicon": "/static/favicon.acaa334f0136.ico"
"base:body_class": ""
"layout:logo": "/static/0oo.8d2a8bbef612.svg"
"layout:index": "/"
"layout:menu": "/menu/"
"layout:categories": "/intents/"
"layout:ideas": "/methods/"
"layout:projects": "/projects/"
"layout:users": "/users/"
"layout:about": "/about/"
"layout:help": "/help/"
"layout:bug_report": "https://github.com/wefindx/0oo"
"layout:login": "/accounts/login/"
"layout:light-off": "/darken/?darken=true"
"layout:set-monolingual": "/mulang/?mulang=false"
"layout:lang": "Language"
"layout:set-language-post-action": "/i18n/setlang/"
"layout:csrf-token": "MqnVasvowhNCYZh14NPRekh5F2Mqgs1WFDvdnKgsZ1PbCXPFQ0u4ZP6TAUfXhReS"
"layout:input-next": "/method/69001/"
"layout:languages": [{"code": "ja", "is-active": "false", "name": "日本語"}, {"code": "lt", "is-active": "false", "name": "Lietuviškai"}, {"code": "zh-hans", "is-active": "false", "name": "简体中文"}, {"code": "en", "is-active": "true", "name": "English"}, {"code": "ru", "is-active": "false", "name": "Русский"}, {"code": "oo", "is-active": "false", "name": "O;o,"}]
# <!-- TOPIC
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"item:parent:intents": [{"url": "/intent/78001/", "title": "Software development doesn&#x27;t scale"}]
"item:title": "Layered problem language"
"item:summary": "Imagine we could define behaviour or code about an attribute of a large system in isolation from other concerns and have them tied together automatically into a whole."
"item:voting": 0
"item:voting:add": "/admin/hlog/voting/add/?method=69001"
"item:voting:csrf_token": "MqnVasvowhNCYZh14NPRekh5F2Mqgs1WFDvdnKgsZ1PbCXPFQ0u4ZP6TAUfXhReS"
"item:voting:submit-value-option": {"selected": "[-]", "value": "-"}
"item:base-administration": false
"item:body": |
    Starting from a blank slate is easier than modifying existing code sometimes.
    
    I propose all behaviour is split into snippets that the computer arranges into a whole.
    
    
    You should never have difficulty finding where to insert code to add or modify behaviour in a system.
    
    You can specify before/after behaviour between a problem and another problem.
    
    
    Each snippet is an invariant that the system should hold.
    
    The snippet has an optional condition when it applies, a bit like an intelligent if statement that is essentially ran after every statement in the system.
    
    Problems are matched by types of the Inputs and outputs.
    
    There is not necessarily an explicit method call.
    
    It looks like this
    
    Problem "form data is sanitised before usage"
    
    Input form FormData # whenever FormData is in scope, this code runs
    
    Body
    
    for key, value in form:
      form[key] = sanitise(value)
    
    
    I want to be able to do a search for matching code on a path such as whenever the database is updated, or sanitisation happens.
    
    If I was writing code for a btree I would have problems for portions of insert and search logic. I could extend the behaviour by adding a problem and solution code.
    
    The system would layer the code accordingly automatically.
    I can also refer to problems from code to create hook points.
    
    Problem "insert into btree"
    
    Body
    
    # find insert location in tree
    leaf, last_child, parents = self.find(key) 
    
            leaf = last_child
            
            # print("Trying to insert {} at Found insertion leaf {}".format(key, leaf))
    
            if len(leaf.children) less than leaf.max_size:
    
                Problem Insert non-full
    
            Else:
                Problem Insert full
    
    
    This way I dont have to pollute the reference implementation of a btree and can handle locking, security, logging, tracing as separate snippets. Not a mess of everything combined together.
    
    The computer can do the matching up of control flow.
"item:source-date": ""
"item:permalink": "/method/69001/?l=en"
"item:owner": "chronological"
"item:created": "2021-09-06T14:59:12.131124"
"item:ownerlink": "/user/198/chronological"
# <!-- LINKS
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"item:link:add": "/admin/hlog/link/add/?parent=69001"
"item:link:items":
"item:project:items":

# <!-- COMMENTS
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"item:comment:items":
"base:js": "/static/js/base.c7357c06cc89.js"
