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

Leaves - Cloudy #47

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Leaves - Cloudy #47

wants to merge 8 commits into from

Conversation

OhCloud
Copy link

@OhCloud OhCloud commented Nov 18, 2019

JS Adagrams

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What patterns were you able to use from your Ruby knowledge to apply to JavaScript? most things translated outside of the foreach situation which i did use and then have to change to a forloop bc you cant break out of it.
Did you need to use different strategies to find information online about JavaScript than you would for Ruby? yes bc there is ALOT of information though not all of it is good or still relevant. it was about using things and seeing if they worked, for example _.samplesize(lodash) did not work for me. begrudgingly.
What was a challenge you were able to overcome on this assignment? the idea that i cant javascript. it was a slow ramp up.
What has been interesting and positive about learning a new programming language? that its not as hard to understand and implement as previously thought. more than anything though, those gosh dang { {{ [] }} } ughh.
What is something to focus on your learnings in JavaScript in the next week? how to know think in terms in functions. translating ruby isnt the approach.

@beccaelenzil
Copy link

JS Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions yes
Small commits with meaningful commit messages yes
Code Requirements
drawLetters method yes -- see comment about small bug
Uses appropriate data structure to store the letter distribution yes -- see comment
All tests for drawLetters pass yes
usesAvailableLetters method
All tests for usesAvailableLetters pass yes
scoreWord method
Uses appropriate data structure to store the letter scores yes
All tests for scoreWord pass yes
Optional
highestScoreFrom method N/A
Appropriately handles edge cases for tie-breaking logic N/A
All tests for highestScoreFrom pass N/A
Overall Good work overall. In this project you’ve taken some interesting logic and worked it into JavaScript syntax. I've left a few inline comment for you to review, but overall, you’ve done a great job of practicing syntax.

const Adagrams = {
drawLetters() {
// Implement this method for wave 1
let allLetters = {

Choose a reason for hiding this comment

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

This should be a const.

Style note: put each letter on it's own line.

let allLetters = {
A: 9, N: 6, B: 2, O: 8, C: 2, P: 2, D: 4, Q: 1, E: 12, R: 6, F: 2, S: 4, G: 3, T: 6, H: 2, U: 4, I: 9, V: 2, J: 1, W: 2, K: 1, X: 1, L: 4, Y: 2, M: 2, Z: 1 };

let letterScores = {

Choose a reason for hiding this comment

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

This should be a const.

Style note: put each letter on it's own line.

allLetters and letterScores are best placed inside the module, but above all the functions.

const myHand = [];

for(let i = 0; i < 10; i += 1) {
const myShuffledLetters = Math.floor(Math.random(letters) * (letters.length));

Choose a reason for hiding this comment

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

Walk through what this line of code is doing. Math.random() shouldn't take an argument.

myShuffledLetters should have a more semantically correct name.

There is a small bug where this could would allow you to pick 10 Z's (for instance), even though there aren't 10 Z's. What chance is necessary?

});
if (word.length >= 7) {
return thisTotal + 8;
} else {

Choose a reason for hiding this comment

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

This else block isn't necessary.

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