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
Starting to reformat loops into a unified concept #2773
base: main
Are you sure you want to change the base?
Conversation
Adding reference resolution Making small updates to instructions Adding blueprint to give to students
…itespace to config.json
I'm aiming to review this early next week, FYI 😉 |
|
||
## Out of scope | ||
|
||
- Specific iteration over a `Map` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this listed here? When I think about loops I don't necessarily think of maps.
Things that are related and seem to be out of scope of this exercise:
- Breaking out of loops using the
break
keyword - Skipping iterations using the
continue
keyword
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding those to the out of scope I prefer mention them and maybe try to add exercise to cover those topics now that you say it, do you have in mind some other topics that could be out of scope? or I should remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be worried that also adding the control-flow statements to this exercise may make it a bit too big.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 tasks in a not very complex concept for me seems acceptable
Co-authored-by: Sander Ploegsma <sanderploegsma@gmail.com>
Co-authored-by: Sander Ploegsma <sanderploegsma@gmail.com>
Co-authored-by: Sander Ploegsma <sanderploegsma@gmail.com>
Co-authored-by: Sander Ploegsma <sanderploegsma@gmail.com>
…pics were introduced Adding links to the corresponding headings topics
Adding a different introduction instead of copying the about.md Adding continue and break statements explanation and exercises
concepts/loops/introduction.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa, I know I said to trim down the contents of the introduction but I think we need to give at least some information 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤣 What do you suggest to add then ? hahaha
"arrays", | ||
"for-loops", | ||
"foreach-loops" | ||
"arrays" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, I don't know to be honest. That would mean that the exercise is limited to just array creation and array indexing?
I'd like to have a good plan going forward, discussions like these become a bit too big for code reviews tbh.
|
||
## Out of scope | ||
|
||
- Specific iteration over a `Map` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be worried that also adding the control-flow statements to this exercise may make it a bit too big.
static int evaluateChallengingExam(List<Integer> studentScores) { | ||
int count = 0; | ||
|
||
for (int score : studentScores) { | ||
if (score <= 40) { | ||
break; | ||
} | ||
|
||
count++; | ||
} | ||
|
||
return count; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually makes for a nice while
task:
class MakingTheGrade {
static int evaluateChallengingExam(List<Integer> studentScores) {
int index = 0;
while (studentScores.get(index) > 40) {
index++;
}
return index + 1;
}
}
😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you suggest to change this one for the one that is actually the while task? and make a new one for break ?
exercises/concept/making-the-grade/src/test/java/MakingTheGradeTest.java
Show resolved
Hide resolved
exercises/concept/making-the-grade/src/test/java/MakingTheGradeTest.java
Show resolved
Hide resolved
Co-authored-by: Sander Ploegsma <sanderploegsma@gmail.com>
…l statements section Adding two tests for task 5 and 6 Updating design.md to remove out of scope and add new missing learning objective
…java into ReformatLoopsConcept
pull request
This PR reworks our current loop structure (
for
andfor-each
) into one big single concept called loops and also introduceswhile
anddo-while
loopscloses #2625
Reviewer Resources:
Track Policies