New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streak is still inaccurate for many campers #7925
Comments
My first time with open source contributions, but I'd love to see if I'm up for the task. |
This is still an issue that we get a lot of complaints about. |
@QuincyLarson I am interested in helping out |
@sorlovsky Awesome! We're interested in your help! See whether you can write some tests around this that cover various edge cases. It seems to work 99.9% of the time, but there are some situations where it doesn't and I'm not quite sure why. |
I looked into this a bit and it may possibly caused by the fact that it is counting current streaks of Challenges and not the other activities (Projects or Algorithms). It's also possible that it's timezones as stated above. I'm going to look into the issue and see if I can PR if no one else get's to it. |
Can someone please let me know if I'm missing something here. const daysBetween = 1.5; can be updated to const daysBetween = 2; because the logic in the following functions always says less than daysBetween and not less than or equal to daysBetween. This means there will be coverage from 12:00:00AM one day all the way to 11:59:59PM the next. The timezone logic should all stay the same as well. Changing daysBetween to 2 means that two tests break, which can be fixed but I'd have to learn a little bit how the tests work first. The alternative option would be to set daysBetween to 1.99 so all tests pass, but you would have a possibility of missing the streak by 7 mins and 12 seconds. |
@donofriov please go for it I was not able to figure why it didn't work |
@donofriov thanks a lot for the analysis, and great to hear that you are interested to look into this. Here is another related issue #7468 (has to do with log in state of the user) If you need any assistance hit us up on the chat room.
The tests are at Well this is a bit complicated structuring than usual. I'll be around if you need figuring out things. Happy fixing! |
@donofriov Yes - if you think that will fix it, great. Bump If you're able to, please see if you can add some additional test coverage to make sure this is addressing the various corner cases that have cropped up (there are several issues related to streaks). Thank you for your time and attention to this. This has been a major issue for months and is a source of many complaints, so fixing this will be huge :) |
The problem is that the calculation of a |
@Motardo Thanks for investigating this. Would you be interested in and fixing this to get @LenaBarinova's fix working again? |
@QuincyLarson After having another look and sleeping on it, here are my thoughts: Plan A Plan B (simple and straightforward, good temporary fix) Plan C (complicated refactor, possible future roadmap) I am completely new to react and rxjs, and I think Plan C is out of my depth, but I would be happy to make a patch for Plan B, and I would love to hear other ideas and suggestions. |
@Motardo I definitely agree that Plan C makes the most sense. Given that it's been 15 days since you posted this, have you improved much with React and RXJS? This might be a good challenge to push the limits of your client side scripting abilities to the next level 😉 |
Edit: Does anyone know how to use/produce dummy accounts in localhost that has different sets of streaks? Edit: Nevermind all these. |
Hi, I'm writing because I saw @QuincyLarson comment on this post. I'm a new camper and I have a "5 day streak" going on with activities recognized on: I see from reading above there is an expectation the "calendar completed" dates to be offset, but my streak shows only 1 day. === |
@kennethlumalicay Please take a look at this. Any idea what might be causing @ApeCogs's issue? |
@ApeCogs do you know the time you did each challenge on jan 21 and 22?(even rough estimates) What is your timezone? Also do you use VPN? |
@kennethlumalicay - Jan 21st would have been around 22:30 - 23:30 EST. Jan 22nd would have been 09:00 - 10:00 EST. I do use a VPN sometimes but it's for work and the region don't change (eastern). |
I'm having the problem. It usually happens when I do a challenge around 22:00 CST - 24:00 CST. Though I have lost my streak when I have done it on Sunday around 19:00 CST - 20:00 CST. This would also usually happen when I am around a 7 -8 day streak. Not using a VPN. If there is anything I can do more to help please let me know. |
@ApeCogs I used some dummy data but I can't seem to reproduce it. timestamps:
I used 24 and 25 instead of 21 and 22 to recreate your "today" and "yesterday". result:@mriel you lost your current streak too? Could you provide a larger screenshot containing the heatmap and streaks? |
Re-opening, because of ongoing discussion |
@kennethlumalicay here is a my screenshot: Most of the time my previous streaks have been 7-8 days. The next day I will do one lesson at night between 18:00 CST - 22:00 CST. The day after it will say my current streak is 1 day. I have started to keep a log of current streak, day, time, and what challenge. |
In here it says you did something on 20. But in here there's nothing on 20. So I'm assuming your timestamps are being displayed with the wrong timezone.
So if you're not signed in, user would be null and timezone would be 'EST'.
|
I observed how challenges are recorded during the last week and basically saw challenge dates and streak are going by UTC and the heatmap is using EST. This means I and other people in CST need to do challenges before 6pm to be counted for the same day on all the parts. And if I do challenges in the morning one day and in the evening on the next, goodbye streak. Just a thought, the language learning programs I use have an hours left countdown visible next to the streak information. Having a note saying "complete lessons by... to maintain streak." would be just as useful. I'd call getting consistent times the first priority for the streak problem, but letting people know their deadline for the day would be more useful than worrying about adjusting TZ for travel or allowing grace hours (as nice as those things sound). |
A bug that makes the amazing 100DaysOfCode Challange uselessHere is my profile: https://www.freecodecamp.org/dardandmr My 69 Days of Streak is broken for no reason@QuincyLarson please bro, what is this, and can we reverse this?! I am really disappointed, I was so motivated with this 100DaysOfCode Challange, and I have finished all the Front-End Projects and everything else, I have only 4 Advanced Algorithms to solve to claim my Front End Certificate, stayed so many hours without sleep just to keep the streak going... Screenshot |
100DaysOfCode Challange , if such bug persists , it would just ruin us in morale. |
@JohnnyCheung1989 look at my progress since the bug ruined my streak :( |
It seems the video challenges are not counted toward streaks either, but are counted in heat map. |
I'm a beginner especially with production code. Do not know if this algo would create too much overhead... But since heatmap seems to be working fine why can't the algo for streak just check the heatmap for days colored green or go the other way and check for grey gaps and return a value like check if element is '#cccc' etc.. if yes break streak Forgive me if this has been brought up before. I've never seen the heatmap inaccurate but my streaks are well... not so much. Or someway put a flag in the heatmap code and streak outputs cant check it and update? |
@dverdin83 It would be better to check the same thing as the heatmap does, that is what was suggested by Motardo (see his comment on Sep 2, 2017 - Plan C). |
Closing this issue in favor of #17299 |
Does anyone know which timezone is used by the streak counter and the heatmap? I just lost a 74 day streak even though I finished a challenge by 15:45PM KST (UTC +0900). The streak shows only 1 day but today's square on the heatmap is colored green, and on the timeline the challenge is recorded as being completed today as well. It seems like the streak counter is using one timezone, while the heatmap and timeline are using a second timezone. Can someone please confirm? It's really demoralizing as I was taking pride in watching the number grow every day and being able to share it with friends, family, and potential employers. I understand that it may not be a high priority to fix, so at least knowing the rules of the streak would really help me understand and adjust my coding accordingly. Quoted from @sgrayme #7925 (comment)
|
One of the most common complaints I get (as person in charge of support emails) is that the streak isn't accurate. This may be due to timezones.
We probably need to go ahead and write some test cases and really tighten up this code. Any volunteers?
The text was updated successfully, but these errors were encountered: