V2 Badge caption

I went to look at my badges today.

85 % of Exercism users are at least 29 months on the platform?

According to the v1 badge caption, 24 % of users have been around since July of 2018, so adoption seems to have slowed down a little.

Uh… tell your friends about Exercism! In fact, you should make friends for this purpose.

Ha. Good spot, but the metric is just wrong: https://github.com/exercism/website/blob/main/app/models/badge.rb#L66

That 800,000 should now be 1,800,000 :slight_smile:

That’s good news! The adoption curve was a little worrying

1 Like

OK, not to nag, but that shouldn’t be hard coded. Is there an API that gives the current user count? Happy to update it.

Please note: This repo is an internal repo. That means the source code is public, but we do not accept Pull Requests, we do not support the app being run locally, and we do not encourage people to fork or reuse this repository.

As noted on the Website repository README.

No, there’s not. And User.count takes 1m to run in sql (COUNT(*) is extremely slow in MySQL). We can probably cache it, and I’ll add it to our backlog, but it’s less trivial than it seems :slight_smile:

Thanks. As @kotp said, we don’t take PRs to the website though (mainly because from much experience, if something’s not done, it’s probably because it’s complex and takes more time to guide/review than for us to solve)

OK. ANALYZE TABLE USERS; SELECT TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='USERS' should be pretty fast – faster if you do the select first and the ANALYZE TABLE after you’ve returned the number.

Nice. Thanks :slight_smile:

1 Like

You’re welcome, but it only works if you keep statistics updated. I mean, it’s always going to be better than two year old snapshot data, but… update your statistics on a regular basis. I’m not saying you’re not, just standing in possibility.

Yeah, it was 15,000 out of date. Which is ~15 days. But we can analyse the table on a daily job etc.


PR opened: Use actual user count for percentage_awardees by ErikSchierboom · Pull Request #6760 · exercism/website · GitHub