Code Monkey home page Code Monkey logo

Comments (9)

Lirianer avatar Lirianer commented on May 17, 2024 2

Maybe gain() and lose()?

Reputation::gain(10);

Reputation::lose(5);

from council.

chrisbbreuer avatar chrisbbreuer commented on May 17, 2024

"reverse" is more like inverse of "award", that's why I think it would be a more appropriate use for this specific scenario as well

public static function reduce($user, $points)
{
    $user->decrement('reputation', $points);
}

However, if we ever want to, for some reason in the future, reduce the reputation for whatever reason that's not directly related to the "awarding", it would be more appropriate if it was left named "reduce". It's more broad. Not sure, though, which scenario this would happen to haha

Anyways, I don't mind it being named "reduce", because it leaves it more open for future additions, but I guess it could always be renamed as well

from council.

eoghanobrien avatar eoghanobrien commented on May 17, 2024

How about forfeit? https://www.wordhippo.com/what-is/the-opposite-of/award.html

from council.

JeffreyWay avatar JeffreyWay commented on May 17, 2024

@eoghanobrien I originally used forfeit in that video, but then changed it. It made me think that you're forfeiting all of your reputation, and you're not.

Not sure about reverse. I think there's still a better term.

from council.

JeffreyWay avatar JeffreyWay commented on May 17, 2024

Maybe award is wrong too. Maybe your reputation grows.

Reputation::grow();

And then reverse would be...

https://www.powerthesaurus.org/grow/antonyms

Detract? Shrink?

from council.

MattMangoni avatar MattMangoni commented on May 17, 2024

@JeffreyWay @eoghanobrien I usually try to keep it as simple as possibile in these situations.
I'd probably end up with just Reputation::add() and Reputation::subtract()

Or maybe addPoints() and subtractPoints(), just to be a little more specific.

from council.

eoghanobrien avatar eoghanobrien commented on May 17, 2024

@JeffreyWay I think you're right, changing award is probably a better approach but then why not simply increase and decrease. It's little less exciting perhaps.

from council.

MattMangoni avatar MattMangoni commented on May 17, 2024

@Lirianer that's definitely the best option I've heard.

from council.

JeffreyWay avatar JeffreyWay commented on May 17, 2024

Okay, we'll go with grow and lose for now.

from council.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.