Ad
  • Custom User Avatar

    In alfe's defense, the description states: "Write a synchronous function that makes a directory and recursively makes all of its parent directories as necessary".

    Does the word "recursively" mean something different here than a direction on how to solve the problem? Maybe something related to unix file system commands?

  • Custom User Avatar

    "And yes, googling for the formula instead of taking a straightforward looping path is a good habit to have, IMO."

    I really have to disagree on this one. In the real world when you are faced with a problem that has never been solved before, "googling the solution" won't help you. I finished my electrical engineering degree a couple years ago, and the biggest problem that most of the students had was with one class where the professor would come up with innovative and challenging problems off the top of his head - and that would be the test. He allowed us to bring in any study materials we wanted: books, notes, anything except a computer or cell phone. The idea was that none of that would help you unless you had previously studied and developed a strong understanding of the basic concepts and principles from the class.

    My other classes were much less difficult, since all of the homework problems were relatively generic and you could easily find solutions on google, which most students would copy down and turn in. Same goes with the test questions. They were homework problems or book problems we had all seen before and could be solved easily having seen them before. Sure there is an ethical problem here, but with the availability of the information these days it is hard to avoid.

    Now that I am out of school, the problem I see with most graduates from my class was that they don't know how to think for themselves. They're really good at finding solutions elsewhere and applying them, or "pattern matching", which is the sort of work that is being outsourced more and more these days and is the type of work that isn't "real" engineering.

    That said, there is nothing wrong with reusing code from other people since it doesn't make sense to solve a problem that has already been solved. The most progress is made when we build off of the work of others. However, a balance needs to be found between teaching people to think through a problem and not have their first response to something unknown be "google".

    Obviously, this is a philosophical difference, but I feel it is an important issue.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I hate to rant, but I don't think this should really be considered "best practices". Maybe it takes the fewest cycles to compute, but getting the answer either because you derived the series math or looked up tetrahedral numbers on wikipedia doesn't seem to follow in the same vein.

    Maybe I'm confused as to what "best practices" really refers to, but I would imagine this exercise is meant to teach the user about loops (and recusion too, I would think, but that is ruled out by one of the test cases), and therefore I think "best practices" should refer to solutions that exemplify the intended lesson. Taking a shortcut removes much of the intended learning process.