Skip to content

Water - Sophia#52

Open
SoCodeDo wants to merge 11 commits into
Ada-C14:masterfrom
SoCodeDo:master
Open

Water - Sophia#52
SoCodeDo wants to merge 11 commits into
Ada-C14:masterfrom
SoCodeDo:master

Conversation

@SoCodeDo

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? Hashes, Arrays, Methods(in comparison to functions)
Did you need to use different strategies to find information online about JavaScript than you would for Ruby? no, I used google and the JS docs, and also talked through code with a classmate.
What was something you needed to do independent research on for this project? What did you learn? case statements. I originally had a switch/case statement for my wave 3 and could not get it to pass the tests. even after going over it with Simon I am not sure where I was going wrong with my code. I ended up using key values instead for that wave.
What was a challenge you were able to overcome on this assignment? My old ruby Adagrams felt really hard to read. It was early on in the program and looking back the code was way overcomplicated. Because of this I started from scratch with JS Adagrams rather than just translating over my old code. This ended up being a headache and taking a lot of time since JS is so new, but I feel good about my code and JS right now.
What has been interesting and positive about learning a new programming language? I'm realizing just HOW much i've learned the past few months. Looking back it can sometimes be hard to give yourself credit for what you KNOW cause you're so busy working yourself up over what you haven't learned yet, or are struggling with. I've retained a lot more than I gave myself credit for and am feeling good about JS.
What is something to focus on your learnings in JavaScript in the next week? I really want to finish the first few sections of FreeCodeCamp to get a stronger base for basic syntax. In ruby I did feel I rushed through some basics to keep up and I don't want to make that mistake again. I want to go into internship feeling really strong in both languages.

Comment thread src/adagrams.js
Comment on lines +126 to +139
let topScore = 0
let topWord = ""

for (let word of words) {
let score = Adagrams.scoreWord(word);
if (score > topScore) {
topWord = word
topScore = score
} else if ((word.length == 10) && (score == topScore) && (topWord.length < 10)) {
topWord = word
topScore = score
} else if ((score == topScore) && (word.length < topWord.length) && (topWord.length != 10)) {
topWord = word
topScore = score

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

whoops, missed semicolons at the end of these variable assignments

Comment thread src/adagrams.js
for (let i = 0; i < 10; i += 1) {
lettersInHand.push(letters.pop());
}
return 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.

needs a semicolon

@spitsfire spitsfire 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. ✔️ This looks great! Lines 129 and 143 could use const instead of let
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. Lines 56, 60, 126-139
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 ✔️
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 ✔️
Yellow (Approaches Standards) 4+ in Code Review && 2+ in Functional Requirements, or the instructor judges that this project needs special attention
Red (Not at Standard) 0-3 in Code Review or 0,1 in Functional Reqs, or assignment is breaking/doesn’t run with less than 5 minutes of debugging, or the instructor judges that this project needs special attention

Additional Feedback

Wow, this is great! The only thing I have to say is just double check your semicolons. All assignments should end in a semicolon, as well as return statements.

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

@SoCodeDo

Copy link
Copy Markdown
Author

ahhhhhhh dang semicolins. Thanks for looking at this claire!

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