Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 959719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:04:14+00:00 2026-05-16T01:04:14+00:00

Stackoverflow has a nifty badge system. One thing I noticed is that badges are

  • 0

Stackoverflow has a nifty badge system. One thing I noticed is that badges are not immediately awarded, but sometimes seem to have some type of a delay after I meet the criteria. I’ve noticed this on some other sites that have badges as well.

Presumably this is because they are using a delayed job that scans periodically to see if any new badges need to be awarded. I see this approach also advised here:
How to implement badges?

However, I don’t really see why this should be necessary, and am favoring in my implementation to simply have a system where after a relevant action is performed, for example a new comment is posted, a checkAwardBadge function is called, which checks if the user meets the criteria for a new comment badge.

Speedwise, I was thinking that all relevant user stats would simply be stashed in a submodel of User, like UserStats so that instead of having to count the number of comments each time, it would just be a simple query.

It strikes me that the system I’m favoring should be fast and very simple to understand. Are there downsides I’m missing here on why it’s necessary to complicate things with delayed jobs?

To clarify:
I plan to have an abstract class Achievements, with each actual Achievement an implementation of Achievements. Each Achievement will have a checkAwardBadge function, which can be called from the controller, or even a delayed job if I should choose to go that route, or any time really, to check whether a user has earned a certain badge. Thus, achievement code would all be centralized.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:04:15+00:00Added an answer on May 16, 2026 at 1:04 am

    Your implementation may work on simple scenarios (like the one you are describing), but if things gets more complex you have a solution that:

    1. Makes unnecessary checks in every action
    2. Adds penalty performance to every action
    3. Does not scale
    4. Does not have a central place for all the rules.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've noticed RAII has been getting lots of attention on Stackoverflow, but in my
I notice that StackOverflow has a views count for each question and that these
I'm guessing the StackOverflow code has something along the lines of a UsersController that
StackOverflow user jolson had a very nice piece of code that exemplifies how one
Stackoverflow has taught me so much about what proper RESTful, MVC, GET/POST is that
In a recent Stackoverflow podcast (#59) , Jeff Atwood mentions that Stackoverflow has some
I know this has been asked a lot of times in StackOverflow already, but
I would like to know if stackoverflow has api's that can be used as
I just found out that stackoverflow has a link to logout every logged computers.
Whats the best way to implement rollover 'buttons' like Stackoverflow has for 'Questions', 'Tags',

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.