DEV Community

Discussion on: A basis for a coding interview using "FizzBuzz" only⁉- 8 challenges for beginners AND Pros [with a twist for Pros! 😱]

Collapse
 
siddharthshyniben profile image
Siddharth

Done!

It's still undergoing refactoring and extra credit exercises, but I'm kinda busy (I got exams!). It might be done in 24 hours.

Collapse
 
grahamthedev profile image
GrahamTheDev

I have added the following paragraph to section 7 to clarify this part as it was not well written:

"So you should now have 3 buttons, "next", "complete the run" and "reset" plus a checkbox with the label "Reverse order". If "Reverse Order" is checked then pressing "Next" will decrease the number by one and pressing "complete the run" will count downwards from the current number. "

Collapse
 
grahamthedev profile image
GrahamTheDev • Edited

When you have tidied up (and fixed a naming bug, hint hint wordmap and wordMap) then let me know!

After an initial look though it looks good ❤, but I won't test properly until you tell me to!

P.s. my instructions might not have been clear enough but there should be no "decrease" button, the "next" button coupled with the checkbox should dictate direction. I will check that the instructions don't cause confusion there.

Collapse
 
siddharthshyniben profile image
Siddharth

Hmm the decrease button came up a accidentally because of my initial confusion, and I decided to keep it. Consider it a bonus.

Collapse
 
siddharthshyniben profile image
Siddharth • Edited

You can consider it done! After a lot of testing and stuff, it seems bug free. Test it out and tell me if there's any problems.

About my attempt

Challenge 1: Was not very hard, just had to reimplement division, which was pretty easy
Challenge 2: Still pretty easy. Just had to add some event listeners. This was made even more easy by the fact that my fizzbuzz function only checked a single number.
Challenge 3: Just had to add a few lines
Challenge 4: This was easy at first, but would ultimately be the biggest problem and I had to rewrite it.
Challenge 5: That was literally what I was doing. I was just logging to the console outside my fizzbuzz function. Just needed to change a few lines.
Challenge 6: Easy again, because my fizzbuzz function just checked one number, and I just had to change the numbers in the recursion I was doing earlier
Challenge 7: Easy, but this was where I made 99% of my silly mistakes (I was trying to reverse recursion, until I realized I need to pass in the minimum). This part took the most time.
Challenge 8: This was pretty easy, because I'm used to manipulating objects in this manner.

What I learned:

  • Open/Closed principle is awesome!
  • Recursion is not as easy as I thought (but still pretty easy)
  • I make billions of silly mistakes (why didn't that variable change? of course i didn't assign any value to it)

PS: These challenges are awesome, would love it if you make more! I might even make a challenge myself! (I did once but no one answered. I guess it was too hard)