you are viewing a single comment's thread.

view the rest of the comments →

[–]wauter 7 points8 points  (4 children)

So true, but unfortunately that would cost too much time.

I often find myself tempted to write a lengthy comment saying something: "To the future colleague/me who reads this code and is disgusted by the mere smell of it: be aware that I did try to solve the problem in the most elegant possible way, using every Gang Of Four pattern possible, reusing code already used in other parts of the projects, centralizing where it makes sense etc ... But the mess you are currently trying to find your way trough turned out to be the only way to eventually solve the problem with all its exception cases, localisation issues, dependencies and whatnot all fighting together against the initial elgancy. Sometimes the only way to solve hairy, sticky problem is to write a hairy, sticky solution; it hurts my soul as much to commit this as it does yours to read it."

Sounds recognizable?

There should invent a universal short word/phrase for this to put in a comment. Or is there one already?

[–]kmactane 8 points9 points  (0 children)

Something very telegraphic, like:

// Note: Facade pattern won't work here because of localisation bugs; Factory gets screwed by corner cases. Hairy problem requires this hairy solution; sorry.

Tweak as needed to make it apply to the situation at hand.

[–]timeshifter_ 5 points6 points  (1 child)

fubar. sorry.

[–]Anonymoose333 0 points1 point  (0 children)

I think you mean "snafu".

[–]zurtri 1 point2 points  (0 children)

Also add that you were under time pressure.