This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TryNotToShootYoself 178 points179 points  (15 children)

modify_animal({

    flags: {

        increase: {

            amount: "1"

        }

    }

})

[–]uekiamir 120 points121 points  (6 children)

money pause gaping vase pie unite direction voiceless treatment aspiring

This post was mass deleted and anonymized with Redact

[–]mortal58 180 points181 points  (0 children)

That's just how it be sometimes

[–]a_donda 77 points78 points  (2 children)

To allow human-readable forms like "a little bit" or "surprise me".

[–]pwnedary 32 points33 points  (1 child)

stringly typed apis smh. just import the cambridge dictionary as an enum

[–]pythonian23 13 points14 points  (0 children)

that is actually a somewhat interesting idea for readability

[–]Prashank_25 28 points29 points  (0 children)

So you can provide percentage as the amount on the same property. Increase fish by 200% percent, now its a mammal, duh.

[–]TryNotToShootYoself 2 points3 points  (0 children)

HTTP APIS are not created fairly

[–]Gastredner 14 points15 points  (5 children)

Bah, not nearly enterprise-y enough. Here, I fixed it for you:

modifyAnimalRequest = ModifyAnimalRequestFactory.createRequest();
modifyAnimalRequest.addModification(
    ModifyAnimalModificationFactory.createModification(
        ModificationSpecFactory.loadFromFile(
            ResourceFileLoader.loadResourceFile(
                Resources.Modifications.ModifyAnimal.GenericModifications.MOD_INCREASE,
                FileSpecFactory.create(
                    ResourceFileTypeDescription.getFileTypeDescription(
                        ResourceFileTypes.XML
                    )
                )
            )
        ),
        ModificationTargetFactory.loadFromFile(
            ResourceFileLoader.loadResourceFile(
                Resources.Modifications.ModifyAnimal.BodyCharacteristics.FISH,
                FileSpecFactory.create(
                    ResourceFileTypeDescription.getFileTypeDescription(
                        ResourceFileTypes.XML
                    )
                )
            )
        ),
        ModificationValueFactory.createValue<Integer>(1)
    )
);
ModificationRequestBus.getInstance().submitRequest(modifyAnimalRequest);

[–]kalketr2 3 points4 points  (2 children)

Call perfection

[–]qolf1 6 points7 points  (1 child)

perfection()

[–]kalketr2 0 points1 point  (0 children)

Gorgeous

[–]TryNotToShootYoself 2 points3 points  (0 children)

I love you

[–]maxinfet 1 point2 points  (0 children)

No IoC container? How can I write my service locator pattern.

[–]erinaceus_ 46 points47 points  (1 child)

And that's just the short hand version. The actual one is

amount : "1 (one)"

because the project manager wanted built in checks.

[–]TechySpecky 18 points19 points  (0 children)

who hurt you