Skip to content

Adagrams Beatrice#36

Open
Beatress wants to merge 7 commits into
Ada-C14:masterfrom
Beatress:master
Open

Adagrams Beatrice#36
Beatress wants to merge 7 commits into
Ada-C14:masterfrom
Beatress:master

Conversation

@Beatress

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? General programming idioms (loops, helper functions, .map function)
Did you need to use different strategies to find information online about JavaScript than you would for Ruby? Not really, "javascript + search term" worked fine and MDN is great.
What was something you needed to do independent research on for this project? What did you learn? I had to do research to find an equivalent to the max_by and min_by methods in ruby. I learned about the spread operator and how to use it along with Math.max/.min, and .map.
What was a challenge you were able to overcome on this assignment? We didn't write any comments when we did Ruby Adagrams, and the code was pretty packed full of enumerable methods. It took some time to re-read and re-comprehend what was going on.
What has been interesting and positive about learning a new programming language? It has been interesting seeing two totally different solutions to the same problem. Learning to do things a different way is a positive thing so that my general programming skill can level up.
What is something to focus on your learnings in JavaScript in the next week? Getting more comfortable using various built in functions + finding practical uses for functions as first class objects

Comment thread src/adagrams.js
// Implement this method for wave 1
// Turn pool object into flat array
let newPool = [];
for (var letter in POOL) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

oops, oops! no var!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is what I get for looking up syntax on StackOverflow and mindlessly typing 😂

Comment thread src/adagrams.js
let score = 0;
// Iterate through characters in word
for (let c of word) {
switch (c.toUpperCase()) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This totally works! However, since you have to pull in a method to change your alphabet keys to uppercase, any reason why the keys in POOL don't start off as uppercase?

@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. For..in and for..of loops can use const instead of let. A traditional for loop cannot. Line 37 uses a var. Let's change that to const.
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. ✔️ Almost perfect! You missed 2 semicolons on lines 27 and 31
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

Fun use of the switch/case statement! Any particular reason you went this route instead of a map/object of scores?

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
Logical/Organized

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