lkroner / phase_0_unit_2 Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Lauren -
you piqued my interest saying we had totally different solutions - so i wanted to check yours out.
inject is a super handy method to accumulate -
cool to to see you use it to solve both pieces of the challenge
I hope to put it into practice soon!
also - your sentence maker seems more efficient than mine - to convert the whole array to a string, and just capitalize the string, as opposed to iterating through each value then adding them up.
cool.
ok!
back to study -
Avi
Hey Lauren,
Your code looks really good. You've got a strong sense of what's going on, your pseudocode is excellent. Everything looks super solid to me. Great work!
Hi Lauren,
Great job on the Pez Dispenser Challenge. That challenge looks really fun, I ended up doing the playlist challenge instead. But looking at your code and someone else in my accountability group, the way the array is handle is totally different. It seems like your method is doing FIFO (First In First Out), while the other one I saw does FILO (First In Last Out). I guess its really subjective since an array isnt usually seen as a stack but as something from left to right. But either way its cool to see your code push (<<) elements into the pez container and use shift to remove, while the other code I saw uses unshift to push elements and pop to remove them.
I also like your assert statement on checking the count and all the flavors in the stack. I saw in your comment about why we are using assert instead of the plain driver code. I'm not positive but I think they are trying to slowly transition us to using rspec and assert might be a stepping stone. Also when I was first building the assert statement, I found this class in the Ruby doc.
http://ruby-doc.org/stdlib-2.0.0/libdoc/test/unit/rdoc/Test/Unit/Assertions.html
Maybe that has something to do with why we are starting to learn asserts.
Nice work!
Tony
Lauren,
This looks great! Your pseudocode and reflection are both very thorough, and your roll method is interesting. I hadn't thought of just calling sides from within roll - very clever!
I don't have too many suggestions for such a short challenge; I was going to suggest taking advantage of Ruby's implicit return, but I noticed that you already did this when you refactored. Well done!
Molly
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.