Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 4
    In the future, is there a possibility to agree on coding guidelines, that would prevent mistakes like you described? Commented Oct 10, 2011 at 21:32
  • 5
    It is a good thing that you are not immediately running to the management and telling on him. Some companies are blame-oriented. As you check the fixes in, find a way to group them together and then have this guy look at them later. On the other hand, even a fresh graduate should not be coding anything that is O(n^n) unless there is just no other way. If they do, then they probably got a C in algorithms or did not take it or had a crappy teacher. Leveraging some sort of tool to help find common problems would be nice. Perhaps as the next task this guy can write some performance tests? Commented Oct 10, 2011 at 21:35
  • An O(n^n) without documentation as to why is simply wrong, period. If you truly have to do it the comments had better explain why. Commented Oct 10, 2011 at 23:49
  • Was about to write that "hey, O(n*n) is not that bad, many applications requires it..." but then I realized that it wasn't a multiplication sign, but a killer ^! Commented Oct 11, 2011 at 1:32
  • O(n^n) can be by a magnitude faster than O(n) if O(n) has a huge constant, and n is small. codinghorror.com/blog/2007/09/… Then again, n^n is extreme :D Commented Oct 28, 2011 at 21:37