tag:blogger.com,1999:blog-381129527146258002.post6170386609903583414..comments2024-03-28T04:51:40.042-07:00Comments on Agile Otter Blog: Code #region considered harmfulAgileotterhttp://www.blogger.com/profile/10773578598860454277noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-381129527146258002.post-29722194054869975752010-03-12T16:18:19.273-08:002010-03-12T16:18:19.273-08:00Today the folded region said "unimplemented f...Today the folded region said "unimplemented functions", and all but two or three were fully implemented. I am done with them. I'm removing them all and not asking for permission.Agileotterhttps://www.blogger.com/profile/10773578598860454277noreply@blogger.comtag:blogger.com,1999:blog-381129527146258002.post-87731140995201646532010-03-05T16:07:05.428-08:002010-03-05T16:07:05.428-08:00It happened again today. I needed to get into a co...It happened again today. I needed to get into a code sample that had regions to organize the code that come from one interface or another.<br /><br />All the code I needed to see was in one folded region or another. It was a troublesome barrier to reading the code.<br /><br />Boo.Agileotterhttps://www.blogger.com/profile/10773578598860454277noreply@blogger.comtag:blogger.com,1999:blog-381129527146258002.post-43190145841433162762010-02-05T09:05:28.594-08:002010-02-05T09:05:28.594-08:00I don't hate every usage of #region, just ever...I don't hate every usage of #region, just every wrong-headed gratuitious use of #region, and especially those that mask the wrongness of long methods and long classes.<br /><br />The problem is, those wrong headed uses of #region are the only ones I've ever seen, and the only ones I've been tempted to include.<br /><br />When I see #region help me <b>read the code</b> then I'll like it. Until then, I suspect all uses are bad uses because that is precisely my experience.<br /><br />Please don't sweep your code under the rug. Some of us need to get under that rug.Agileotterhttps://www.blogger.com/profile/10773578598860454277noreply@blogger.comtag:blogger.com,1999:blog-381129527146258002.post-4787089525882220852010-02-02T05:22:38.385-08:002010-02-02T05:22:38.385-08:00I completely disagree. I use it to organize my cod...I completely disagree. I use it to organize my code. If I am working on code related to a GridView control, why must I see all of the code related to other controls? In an object class, if I am working on a save method, why should I have to see all of the public properties. I use the #region to seperate public methods, private methods, etc. This saves me time from paging through the code.Doug Hyatthttps://www.blogger.com/profile/10808516687481484513noreply@blogger.comtag:blogger.com,1999:blog-381129527146258002.post-41826223967629027482010-01-31T09:08:12.042-08:002010-01-31T09:08:12.042-08:00Totally agree. The first time when I was introduce...Totally agree. The first time when I was introduced to regions in C# I had the some feeling. <br /><br />More feels like a feature you never wanted anyway. You know the bottom 80% features that are simple to think of, but nobody actually needs...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-381129527146258002.post-31149292166333036282010-01-29T03:24:36.508-08:002010-01-29T03:24:36.508-08:00I had exactly the same reaction to Eclipse collaps...I had <a href="http://dantwining.com/2009/06/06/if-my-code-stinks-id-rather-you-just-told-me/" rel="nofollow">exactly the same reaction to Eclipse collapsing my imports</a>. It's nice to know that I'm not alone!Anonymousnoreply@blogger.com