|
"Clean code? What, like with a cloth?"
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
Of course, some Sr Developers will see 10,000 lines of things that need to be relocated to external methods and will #Regionalize it with a comment of ToDo.... and send it back to junior
Director of Transmogrification Services
Shinobi of Query Language
Master of Yoda Conditional
|
|
|
|
|
I started using .NET 1.0 (whatever it was).
We honestly developed an in-house Web App using .NET 1.1 and from what I remember by the time .NET 2.0 released Microsoft was even decrying the use of #Region telling others not to use it.
I am always amazed (and righteously annoyed!) when I find it in code.
EDIT
Here's a rant on #regions by CodingHorror that dates back to 2008:
The Problem With Code Folding[^]
|
|
|
|
|
Regions are like any other tools - use as appropriate and when needed. I like them because I am OCD and they are the very epitome of neat and tidy - I can hide the code I have no current interest in. Besides, spaces are a far worse crime than regions - they are evil incarnate and I ALWAYS reformat to tabs - what sane person wouldn't?
Keep your friends close. Keep Kill your enemies closer.
The End
|
|
|
|
|
|
Well, C# 1 didn't allow partial classes (WTE!!!) so regions kinda filled the gap.
|
|
|
|
|
PIEBALDconsult wrote: C# 1 didn't allow partial classes (WTE!!!) so regions kinda filled the gap.
That's a good point and I wonder if that is why the Bozos at VSTudio invented them? Then they couldn't remove them later because they created an entire industry behind them.
Also, if I tweet a #region how do I #hashtag it? ##Region?!?
|
|
|
|
|
|
I was tweeting #figuratively.
|
|
|
|
|
PIEBALDconsult wrote: Real men don't tweet.
And there you have it: the slogan for the Democratic presidential campaign!
|
|
|
|
|
|
|
raddevus wrote: We honestly developed an in-house Web App using .NET 1.1 and from what I remember by the time .NET 2.0 released Microsoft was even decrying the use of #Region telling others not to use it.
Regions are purely an editor thing. Is it fair to talk about them in terms of .NET runtime versions?
|
|
|
|
|
dandy72 wrote: Regions are purely an editor thing.
Just referencing the time period via the .NET versions.
I couldn't remember what Studio was called before they called it Visual Studio YYYY.
I remember Visual C++. I remember Visual InterDev. I remember Visual Studio 2000. I think it may have been called Visual.NET or Visual Studio.NET or some such.
|
|
|
|
|
raddevus wrote: Just referencing the time period via the .NET versions
The actual VS names would've been the better reference if you were trying to put things into age perspective: .NET 1.0 shipped with VS 2002, and 1.1 shipped with VS 2003.
I'm looking at the installers right now in my archives folder.
|
|
|
|
|
VisualStudio.net 2002 was what I first used for C#.
|
|
|
|
|
It isn't really a method until it hits the 2K line mark, anything less is barely worth commenting.
Everyone has a photographic memory; some just don't have film. Steven Wright
|
|
|
|
|
Indeed. Why'd it take you so long to realize that?
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
TheGreatAndPowerfulOz wrote: Why'd it take you so long to realize that?
While I don't use regions, I ended up cleaning up some code that did, and had this insightful realization. Most of my career I've only had to undo the damage of my own coding style. Dealing with other people's code, well, that takes "refactoring" to a whole new level -- I believe the historical term was "rewrite" before it fell out of vogue.
|
|
|
|
|
Marc Clifton wrote: Dealing with other people's code, well, that takes "refactoring" to a whole new level -- I believe the historical term was "rewrite" before it fell out of vogue.
When people do it to my code, it's "refactoring". When I do it to other people's code, it's "fixing".
At least that's what I tell myself.
|
|
|
|
|
I was just using Edge (DISCLAIMER: it had popped up earlier for one of the links I clicked -- normally use Chrome.)
I went to search some text in an MSDN article about the author, Ted Neward.
His sig line says, polytechnology consultant so I highlighted and right-clicked because I wanted to see how proliferate that terminology is across the web.
Microsoft Marketing Miss
Microsoft does NOT provide a menu item [Search Bing for "polytechnology consultant"]
Instead, I have to copy the text and go to a search engine etc.
Chrome offers => [Search Google for "polytechnology consultant"]
I'm Patenting This Technology
I'm writing up the patent now, so Microsoft-people, please contact me and I'll sell you this idea for $2 Billion USD or 34 bitcoin.
Update/Edit
Firefox has the [Search Google for "polytechnology consultant"] also.
Interesting. Not sure why Microsoft hasn't shown up to hire me yet.
modified 17-Jul-18 13:42pm.
|
|
|
|
|
raddevus wrote: Microsoft does NOT provide a menu item [Search Bing for "polytechnology consultant"] Because they would get sued for monopolizing.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
011111100010 wrote: Because they would get sued
Plus, once my patent goes into effect...
|
|
|
|
|
raddevus wrote: Microsoft does NOT provide a menu item [Search Bing for "polytechnology consultant"]
Well, no - they know that nobody will ever voluntarily use it...
By the way ... if you set your default search engine to Bong, or Yahoo!, or even Ask then Chrome changes the context menu appropriately - it doesn't force you to use Bong, unlike Cortana.
Sent from my Amstrad PC 1640
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
It annoys to no end that I can not uninstall Cortana.
|
|
|
|