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

Poll ids #253

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Try to avoid repetition here. Maybe look into the Random class (nextInt) of squeak to generate the ID.
  • apply prettyPrint formatting (remove blank line)

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
generation
generateIdFromNumbers

^ ((self randomNumber),
(self randomNumber),
(self randomNumber),
(self randomNumber),
(self randomNumber))

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
generation
randomNumber

^ self storedNumbers atRandom

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
generation
storedNumbers
^ {'1'. '2'. '3'. '4'. '5'. '6'. '7'. '8'. '9'}

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"class" : {
},
"instance" : {
"generateIdFromRealWords" : "JT 8/4/2022 21:39",
"randomObject" : "JT 8/2/2022 17:14",
"randomSubject" : "JT 8/2/2022 17:14",
"randomVerb" : "JT 8/2/2022 17:14",
"storedObjects" : "JT 8/2/2022 17:18",
"storedSubjects" : "JT 8/2/2022 17:18",
"storedVerbs" : "JT 8/2/2022 17:18" } }
"generateIdFromNumbers" : "leli 6/5/2024 15:21",
"randomNumber" : "leli 6/3/2024 17:11",
"storedNumbers" : "leli 6/5/2024 16:56" } }

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ testUniqueness

generator := LQPollIdGenerator new.

self assert: false equals: ((generator generateIdFromRealWords) == (generator generateIdFromRealWords))
self assert: false equals: ((generator generateIdFromNumbers) == (generator generateIdFromNumbers))
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
"class" : {
},
"instance" : {
"testLowercase" : "JT 8/2/2022 17:56",
"testUniqueness" : "JT 8/2/2022 17:56" } }
"testUniqueness" : "leli 6/3/2024 17:12" } }
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
supporting
generateRandomID

^ LQPollIdGenerator new generateIdFromRealWords
^ LQPollIdGenerator new generateIdFromNumbers
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"currentQuestion" : "bn 8/2/2022 16:58",
"currentQuestion:" : "bn 6/23/2022 22:15",
"frame:fromTop:fromLeft:width:" : "bn 8/2/2022 16:58",
"generateRandomID" : "JT 6/23/2022 19:34",
"generateRandomID" : "leli 6/3/2024 17:12",
"getIndex" : "bn 8/2/2022 16:58",
"initialize" : "bn 6/27/2022 13:49",
"list" : "bn 8/2/2022 16:58",
Expand Down
Loading
Loading