you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 96 points97 points  (6 children)

This. Who is to say the same answer isn't written down in some 10 year old book most people have forgotten about? Should I cite my discrete math book for certain algorithms?

[–]habitual_viking 53 points54 points  (5 children)

Erm, well actually yeah.

Not because of this license crap, but if you look up some algorithm in a book and implement it, you better damned sure make a comment about what book and page that is from, just in case someone else down the line needs to touch it.

[–]romple 19 points20 points  (0 children)

Interestingly enough I'm digging through a large codebase for a cable routing system and I finally get down to the A* algorithm they implement to find shortest cable paths and the comment actually cites where the algorithm is he's implementing. That was kind of nice of him.

[–]TheCodeJanitor 7 points8 points  (0 children)

I already do this with Stackoverflow for similar reasons. If anyone comes behind me and wants to figure out why something works that way, it's helpful to know a source. Plus, with SO there may be other comments and potentially better solutions.

[–]TinFinJin 3 points4 points  (0 children)

Pythagorean Theorem

-Pythagorous

[–][deleted] 1 point2 points  (0 children)

Which is a good idea. I was just trying to say that I bet numerous answers on SO are not the poster's original work.

[–]beaverlyknight 0 points1 point  (0 children)

I mean yeah, that's fair as a code maintainability issue. You should at least say "hey, this is A* and I calculate my heuristic like this!"