Skip to content
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

Randomizing order of "where did you hear about us" and "industry" options #3177

Merged
merged 7 commits into from
Mar 25, 2024

Conversation

VitorVieiraZ
Copy link
Contributor

MMHowYouFoundUsPage
MMWhichIndustryPage

Obs: Option "other" always last.

@saberraz
Copy link
Contributor

I would use Word of Mouth instead of Mouth.

Copy link

github-actions bot commented Mar 25, 2024

Pull Request Test Coverage Report for Build 8421094700

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.008%) to 60.091%

Files with Coverage Reduction New Missed Lines %
input/app/position/providers/simulatedpositionprovider.cpp 1 90.91%
input/app/projectsmodel.cpp 6 65.75%
Totals Coverage Status
Change from base Build 8420523988: -0.008%
Covered Lines: 7563
Relevant Lines: 12586

💛 - Coveralls

@VitorVieiraZ
Copy link
Contributor Author

I would use Word of Mouth instead of Mouth.

Adjustment applied.

@PeterPetrik
Copy link
Contributor

I would use Word of Mouth instead of Mouth.

Adjustment applied.

It needs to be the same on mobile and web, and definitely the codes sent to backend must match (cc @tomasMizera )

Comment on lines 44 to 46
var j = Math.floor( Math.random() * ( i + 1 ) );
var temp = items[ i ];
items[ i ] = items[ j ];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see it is motivated by this algo which if fine, but I struggle to understand how come this won't lead to exceptions.
If you consider this scenario:

array length = 8

for loop ( i == 7 )
  j = Math.floor( 0.999 * ( 7 + 1 ) ) // j == 8 here
  ..
  items [j] // <<-- here you go outside of bounds of the input array

For that reason, I would prefer a simpler and more readable version: https://stackoverflow.com/a/46545530/7875594 :)

@tomasMizera
Copy link
Collaborator

I would use Word of Mouth instead of Mouth.

Adjustment applied.

It needs to be the same on mobile and web, and definitely the codes sent to backend must match (cc @tomasMizera )

The keys should be the same on the server and here. It was an agreement between @MarcelGeo and @uclaros. Texts should be the same as here https://docs.google.com/spreadsheets/d/1VSrdlT0JdnI4BnMlzVeUaaI9AICFnwVk0m9Rr-MKJZ8/edit#gid=0 - feel free to suggest changes there first

@PeterPetrik PeterPetrik merged commit f477b19 into master Mar 25, 2024
8 of 11 checks passed
@PeterPetrik PeterPetrik deleted the iss105-adjust branch March 25, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants