tag:blogger.com,1999:blog-5022998.post114309566237399229..comments2023-09-23T01:05:56.993-07:00Comments on Iron Monkey: The One Tip That Rules Them AllAnonymoushttp://www.blogger.com/profile/12583994762204223301noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-5022998.post-1143782734995148612006-03-30T21:25:00.000-08:002006-03-30T21:25:00.000-08:00Popular code is often good code, so check things l...Popular code is often good code, so check things like DotNetNuke, etc.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5022998.post-1143674563818630372006-03-29T15:22:00.000-08:002006-03-29T15:22:00.000-08:00When discussing whether one can improve one's code...When discussing whether one can improve one's code by looking at better code, it's worth having a look at Paul Graham's essay <I><A HREF="http://www.paulgraham.com/avg.html" REL="nofollow"> Beating the Averages</A></I>, especially the part about "The Blub Paradox," a parable about the fictional <I>Blub</I> programming language. Its message is that it's difficult to <I>adopt</I> something that's Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5022998.post-1143669194903877832006-03-29T13:53:00.000-08:002006-03-29T13:53:00.000-08:00No, dude. Reading code helps; even good code. But ...No, dude. Reading code helps; even good code. But it's not the best tip ever.<BR/><BR/>The number one tip is TAKE YOUR TIME. Be thorough. Exhaust every possibility. Obsess over data structures. Question and recollect the requirements. Basically programming problems I have ever seen stem from rushing.<BR/><BR/>A close second, however, is don't be too clever. In coding, "cute" is the enemy of good.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5022998.post-1143665090718374182006-03-29T12:44:00.000-08:002006-03-29T12:44:00.000-08:00"Sorry, but you don't learn how to write good code..."Sorry, but you don't learn how to write good code from reading your own bad code, you only learn why bad code is so aggravating."<BR/><BR/>This is dubious. People can and do learn from their mistakes (or other people's mistakes). I reckon a good 75% of my coding improvement is due to bitching about code -- "why did the farking idiot do it that way, when it would have been far more readable/Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5022998.post-1143662090933786082006-03-29T11:54:00.000-08:002006-03-29T11:54:00.000-08:00You have some valid points, but tips 1, 2, and 3 a...You have some valid points, but tips 1, 2, and 3 are more akin to replacing your cheap Walmart guitar and amp that won't stay tuned and sound like crap with a Les Paul and a Marshall stack.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5022998.post-1143657427484728772006-03-29T10:37:00.000-08:002006-03-29T10:37:00.000-08:00Reading other people's code is cool, though its no...Reading other people's code is cool, though its not always easy to know whose code is "good" code. Is the sendmail MTA code "good"? It's some of the most widely deployed code in the world, right? On the other hand, your buddy down the hall may have a beautiful, elegant class library for performing operations in the foo and bar domains, but they've never seen the light of day. They sure are Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5022998.post-1143653341859573072006-03-29T09:29:00.000-08:002006-03-29T09:29:00.000-08:00I guess the truth lies somewhere inbetween. You ce...I guess the truth lies somewhere inbetween. You certainly can learn a lot from good code - but only if you are experienced enough to recognize and <I>appreciate</I> it. If you have never experienced the trouble with copy-and-paste in a bigger project, you will not appreciate the DRY principle and the benefits of factoring that code out. If you never had to go back to a 4000 line java-class to addAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5022998.post-1143646104521073262006-03-29T07:28:00.000-08:002006-03-29T07:28:00.000-08:00Thanks, all, for the comments. Of course you do h...Thanks, all, for the comments. Of course you do have to write code as well, I assumed that was a given. But learning only from your own mistakes is just "trial and error" and it is a slow way to learn, though it may work eventually. Reading other people's code that is better than my own is the quickest way for me to see new approaches that I never would have thought of by myself. Or maybe I Anonymoushttps://www.blogger.com/profile/12583994762204223301noreply@blogger.comtag:blogger.com,1999:blog-5022998.post-1143629368814384982006-03-29T02:49:00.000-08:002006-03-29T02:49:00.000-08:00Amen broda! But how do we tell good code from bad ...Amen broda! But how do we tell good code from bad code?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5022998.post-1143628455366835082006-03-29T02:34:00.000-08:002006-03-29T02:34:00.000-08:00I disagree. The best method to learn is to do it y...I disagree. The best method to learn is to do it yourself and learn from your mistakes.<BR/><BR/>Of course you need to study the good code and understand it, but then you have to read your own bad code and find out why it sucks.<BR/><BR/>You don't learn math by reading the solutions of your teacher. You don't learn to code by reading outstanding code.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5022998.post-1143628227399019682006-03-29T02:30:00.000-08:002006-03-29T02:30:00.000-08:00Reading is too passive. You don't magically become...Reading is too passive. You don't magically become a better writer by reading a bunch of books, no matter how fantastically amazing the authors were. You become a better writer by WRITING!<BR/><BR/>http://www.codinghorror.com/blog/archives/000552.htmlAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5022998.post-1143363930182460582006-03-26T01:05:00.000-08:002006-03-26T01:05:00.000-08:00You're absolutely right, it does apply to martial ...You're absolutely right, it does apply to martial arts, too. That reminds me of a story, which I will have to post soon.Anonymoushttps://www.blogger.com/profile/12583994762204223301noreply@blogger.comtag:blogger.com,1999:blog-5022998.post-1143320681660172812006-03-25T13:04:00.000-08:002006-03-25T13:04:00.000-08:00Hmmm. Maybe the article is not so well-intentione...Hmmm. Maybe the article is not so well-intentioned. There's an 11th tip, not listed in the article: "Give bad advice to your fellow programmers so they will make you look really good by comparison."<BR/><BR/>Your one tip that rules them all (great conversion, btw) applies to many things in life. I got pretty good at karate for a while by constantly sparring with brown belts -- about 4 levels LeesMythhttps://www.blogger.com/profile/07148809853650317019noreply@blogger.com