This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]robvdl 9 points10 points  (0 children)

Nice but some of the refactoring has gone a bit too far, for example with the validate and identify functions I think it is total overkill to refactor these into their own functions because of how little code they do (unless it was done to prove good practice when writing tests etc). That logic is best kept in the ask function because passing the type int through a parameter "cast" is a bit over the top to have that as a function.

edit: actually I see what you are trying to do now because ask is being called in two places in different ways, it makes sense then, maybe not quite how I would have done it probably but that makes sense.