DEV Community

Discussion on: An Examination of Fizzbuzz

Collapse
 
gyorgygutai profile image
gyorgygutai

Well that's a way to over-engineer a simple programming test.

Collapse
 
jeffpollet profile image
Solidarity&Resist

I disagree. I'd much rather debug code from a person who writes code in the second way than the first. For me, at least, posts like this are great little learning tools to help me understand the fundamentals better...

Collapse
 
woahitsjck profile image
Justin Chew

I second this, this shows the fundamentals and importance of clean code. Making it clean makes it readable for others.

Collapse
 
zeeter profile image
D Smith

I'll admit, I went a bit overboard with the argparser. And I could have named the functions better. What I was looking to do with the second version was create a version that could relatively easily be updated for more complicated versions of the problem. For example if the interviewer wanted me to revise it so that it printed fizz on every multiple of 7.

If you have any suggestions on how I could simplify my code, I would be more than happy to potentially incorporate them into fizzbuzz3.

Collapse
 
ben profile image
Ben Halpern

This comment was not constructive. Please consider a more helpful/thoughtful way to provide feedback in future comments.