Skip to content

Leah - Water#47

Open
scottzec wants to merge 8 commits into
Ada-C14:masterfrom
scottzec:master
Open

Leah - Water#47
scottzec wants to merge 8 commits into
Ada-C14:masterfrom
scottzec:master

Conversation

@scottzec

Copy link
Copy Markdown

Assignment Submission: JS Adagrams

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.

Reflection

Prompt Response
What patterns were you able to use from your Ruby knowledge to apply to JavaScript? case & if/else from ruby. comparative operators.
Did you need to use different strategies to find information online about JavaScript than you would for Ruby? I'm still getting used to the JS-verse so it's definitely slower finding anything. As far as definitions or reliable simple examples, I mostly relied on the MDN pages. It seems like MDN and w3schools are the 2 that come up each time, but I find w3schools not so useful because you have to open up a new page and do new clicks to even see what it will yield. So I'm just on MDN. If there are any other good "dictionaries," I'd be interested to learn about them.
What was something you needed to do independent research on for this project? What did you learn? I learned a spread operator is how you copy an array. I also learned that until relatively recently, it was only possible to do so by copying via a loop. Feeling rather spoiled with Ruby these days.
What was a challenge you were able to overcome on this assignment? A challenge for me was translating my thinking in ruby to JS for line 54 lettersInHandCopy.splice(lettersInHandCopy.indexOf(letter), 1), but MDN helped me get there. It was also a challenge figuring out how to do what is so simple in Ruby--> The sample method
What has been interesting and positive about learning a new programming language? Feeling incredibly overwhelmed but seeing things are starting to make sense and it's only been 7 days!
What is something to focus on your learnings in JavaScript in the next week? Learning useful methods. Stumbling a bit less with syntax.

@CheezItMan CheezItMan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

JS Adagrams

Major Learning Goals/Code Review

Criteria yes/no, and optionally any details/lines of code to reference
Correctly uses variables, and only uses const and let variables. The program prefers const variables. The program never uses var. ⚠️ Some issues with extra lets
Practices best-practices in JavaScript syntax. There are semi-colons at the end of most lines that need semi-colons. Variables and functions are named with camelCase. ✔️
Correctly creates and calls functions within an object with proper syntax (parameters, return statements, etc.) ✔️
Uses correct syntax for conditional logic and iteration ✔️
Practices git with at least 3 small commits and meaningful commit messages ✔️, however you should describe functionality added, not waves or tests passed.
Utilizes unit tests to verify code; tests can run using the command $ npm test test/adagrams.test.js and we see test successes and/or failures

Functional Requirements

Functional Requirement yes/no
For the drawLetters function, there is an appropriate data structure to store the letter distribution. (You are more likely to draw an 'E' than an 'X'.) ✔️
Utilizes unit tests to verify code; all tests for drawLetters and usesAvailableLetters pass ✔️
Utilizes unit tests to verify code; all tests for scoreWord pass ✔️
Utilizes unit tests to verify code; all tests for highestScoreFrom pass ✔️

Overall Feedback

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 5+ in Code Review && 3+ in Functional Requirements 💚

Code Style Bonus Awards

Was the code particularly impressive in code style for any of these reasons (or more...?)

Quality Yes?
Perfect Indentation
Elegant/Clever
Descriptive/Readable
Concise
Logical/Organized

Summary

Nice work Leah, you hit the learning goals here. Well done.

Comment thread src/adagrams.js
const Adagrams = {
drawLetters() {
// Implement this method for wave 1
let letters = [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You never reassign letters you only push things into it or remove letters from it.

Suggested change
let letters = [];
const letters = [];

Comment thread src/adagrams.js

},

usesAvailableLetters(input, lettersInHand) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment thread src/adagrams.js
return true;
},

scoreWord(word) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment thread src/adagrams.js
return score
},

highestScoreFrom(words) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment thread src/adagrams.js
},

highestScoreFrom(words) {
let wordScores = []

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
let wordScores = []
const wordScores = []

Comment thread src/adagrams.js

let highestScoreWord = ''
let highestScore = 0
let winningWord = {}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
let winningWord = {}
const winningWord = {}

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.

2 participants