tag:blogger.com,1999:blog-381129527146258002.post1276322197069185930..comments2024-03-28T04:51:40.042-07:00Comments on Agile Otter Blog: Code Patching in Legacy MessesAgileotterhttp://www.blogger.com/profile/10773578598860454277noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-381129527146258002.post-23245760748163994032009-04-27T14:30:00.000-07:002009-04-27T14:30:00.000-07:00The anti-cleverness you describe is anti-badness. ...The anti-cleverness you describe is anti-badness. I think we all can agree that bad is bad. But you and most of the other anti-clever crusaders have no definition for it other than it made your life miserable or you at least don't like it.<br /><br />And then you assume someone you never met thought they were being smart. That's where your ice gets really thin. You weren't there and you don't know what the constraints were at the time.<br /><br />And what really makes it irksome is that you have a whole library of well defined "bad code smells" which are a lot more specific. Why don't you use those? Those have meaning and in many cases they have remedies.<br /><br />It comes across as smug blaming of the guy who left, and dirties what I've observed is an otherwise a healthy data driven approach.<br /><br />Rarrrr.Darrin Thompsonhttps://www.blogger.com/profile/04037462028265507114noreply@blogger.comtag:blogger.com,1999:blog-381129527146258002.post-62378459527342215452009-04-24T09:57:00.000-07:002009-04-24T09:57:00.000-07:00I stand by anti-cleverness. Smart is good. Brillia...I stand by anti-cleverness. Smart is good. Brilliant is good. But when someone is exercising their cleverness, I think it's bad.<br /><br />You want the best algorithm for the job at hand, and you want it written in the most obvious way possible. Sometimes it only gets to a certain level of non-cleverness, but you deal.<br /><br />What I hate is when people write things like (!(x^y)) for bools meaning (x==y) and when they try to see just how deeply they can nest lambdas and get away with it, or when they write perl in C or cobol in C++ or rely on Java/C# reflection when simple straight-forward coding will do.<br /><br />And this stupid framework where we could simply write the SQL or we can write dozens and dozens of in-obvious lines of code to piece the query together at some point in the future, YET we have to enter the snippets in order.<br /><br />Sometimes people make things complicated because making a Rube Goldberg machine is great fun, or because they can't find the simpler route, or both. <br /><br />When I finish reverse-engineering someone's code and realize it does something relatively simple (compared to reverse-engineering the code) then I can only think "that's clever" and reach for the delete key.<br /><br />Smart is good. Clever is bad. Being simple is good. Complicated is bad.<br /><br />Here republished:<br />The Zen of Python, by Tim Peters<br /><br />Beautiful is better than ugly.<br />Explicit is better than implicit.<br />Simple is better than complex.<br />Complex is better than complicated.<br />Flat is better than nested.<br />Sparse is better than dense.<br />Readability counts.<br />Special cases aren't special enough to break the rules.<br />Although practicality beats purity.<br />Errors should never pass silently.<br />Unless explicitly silenced.<br />In the face of ambiguity, refuse the temptation to guess.<br />There should be one-- and preferably only one --obvious way to do it.<br />Although that way may not be obvious at first unless you're Dutch.<br />Now is better than never.<br />Although never is often better than *right* now.<br />If the implementation is hard to explain, it's a bad idea.<br />If the implementation is easy to explain, it may be a good idea.<br />Namespaces are one honking great idea -- let's do more of those!Agileotterhttps://www.blogger.com/profile/10773578598860454277noreply@blogger.comtag:blogger.com,1999:blog-381129527146258002.post-50390912505089999732009-04-24T07:37:00.000-07:002009-04-24T07:37:00.000-07:00I've never liked treating clever as bad. I think c...I've never liked treating clever as bad. I think clever is a bad word to use to describe what you hate.<br /><br />http://darrint.wordpress.com/2008/08/21/cleverness-is-good/Darrin Thompsonhttps://www.blogger.com/profile/04037462028265507114noreply@blogger.com