...i just remembered why I have a MasturbatorPattern repository on my bitbucket, why is it named that way, and what it does.

It's one of the core abilities of that magical AI i've mentioned in my previous rant. And it's called that way, because of how it works:

The Agent has some objects (as in, class instances) available to it, and wants to get some other kind of object. So it inspects by reflection ("touches") all objects around itself, inspecting their public functions, building up a plan/path/tree of "this function takes the object I have as input, and returns this other object which this other function of other object takes as input and returns this different object, which...." etc, etc, until the final function returns the object the Agent wanted to get in the first place.

And then it goes and "does" all those functions, in that order piping the parameters through.

So first it touches them (second layer of metaphor - linux finger command), and then it does those which output (ejaculate =D) something useful to it.

Therefore, MasturbatorPattern =D

Not sure if my sense of humor is just weird or outright unfunny.

  • 22
    ..... ++
  • 4
    so, simplified, you have a Gazelle which has a Kill function that returns Meat which is a subclass of FoodIngredient. and you have a Fireplace object which has a Cook function that takes FoodIngredient objects and returns Food objects (which you want). so you figure out that you need to call Kill on the Gazelle, take the Meat return value, put it into Cook function of the Fireplace, take the result, and voilá, you got what you wanted.

    which is the core of how the AI can know how to operate/use stuff around it even though you have no datastructures that define the uses and requirements. you just need to structure the code itself correctly. No extra work on top of coding the functionality itself (in the right way).
  • 0
    @Lucaspar see my comment above this one
  • 2
    This is fucking brilliant
  • 0
    Clever! But change the name.
  • 2
    @MarkoVlaic0 you mean the name or the idea?
    just so i know whether my paranoia about someone "stealing" it when i clicked "post" was justified.

    you can have the name no prob.
    but if...
    ... then i will find you...
    ... and i'll use my very particular set of skills on you...
    ... and it will make you sorry that i ever learned php...
  • 1
    if you code a fish class in the right way, then yes.
    but don't forget to implement some function tgat returns Nutrition object into the Sushi class, otherwise it won't realize it's edible, and that would be a shame
  • 0
    @Midnigh-shcode Both mate. Don't be afraid, I won't think of making anything similar after I heard those threats.
Your Job Suck?
Get a Better Job
Add Comment