#region
-
Sometimes I have the impression to work for Augeas[^] Stables Inc, but actually I am expected to produce more dung than to get rid of it... In the 13395 lines of code of the main window of one of our applications, I found this little gem (really little - only 320 loc) whose functionality I'll need in a new application (a little anonymized):
/// <summary> /// some description /// </summary> private void DoSomething() { ... #region do X ... #endregion #region do Y ... #endregion #region do Z ... #endregion #region do A ... #endregion #region do B if (some condition) { #region do C ... #endregion } else { #region do D ... #endregion } #endregion ... #region do E try { switch (some swicth) { #region do F case ... break; #endregion #region do G case ... break; #endregion #region do H case ... break; #endregion #region do I case ... break; #endregion } ... #endregion }
Of course with some extra try...catch inside the regions or other try...catch. Well, at least, it looks like the functionality I need to transfer to the new application is - with the exception of some member variables - in that one single function, and not scattered all over the class... ;) "Have you heard of 'Clean Code' by Robert C. Martin? You can download it from the web", said the guy who uses to write such functions.
-
Sometimes I have the impression to work for Augeas[^] Stables Inc, but actually I am expected to produce more dung than to get rid of it... In the 13395 lines of code of the main window of one of our applications, I found this little gem (really little - only 320 loc) whose functionality I'll need in a new application (a little anonymized):
/// <summary> /// some description /// </summary> private void DoSomething() { ... #region do X ... #endregion #region do Y ... #endregion #region do Z ... #endregion #region do A ... #endregion #region do B if (some condition) { #region do C ... #endregion } else { #region do D ... #endregion } #endregion ... #region do E try { switch (some swicth) { #region do F case ... break; #endregion #region do G case ... break; #endregion #region do H case ... break; #endregion #region do I case ... break; #endregion } ... #endregion }
Of course with some extra try...catch inside the regions or other try...catch. Well, at least, it looks like the functionality I need to transfer to the new application is - with the exception of some member variables - in that one single function, and not scattered all over the class... ;) "Have you heard of 'Clean Code' by Robert C. Martin? You can download it from the web", said the guy who uses to write such functions.
-
Sometimes I have the impression to work for Augeas[^] Stables Inc, but actually I am expected to produce more dung than to get rid of it... In the 13395 lines of code of the main window of one of our applications, I found this little gem (really little - only 320 loc) whose functionality I'll need in a new application (a little anonymized):
/// <summary> /// some description /// </summary> private void DoSomething() { ... #region do X ... #endregion #region do Y ... #endregion #region do Z ... #endregion #region do A ... #endregion #region do B if (some condition) { #region do C ... #endregion } else { #region do D ... #endregion } #endregion ... #region do E try { switch (some swicth) { #region do F case ... break; #endregion #region do G case ... break; #endregion #region do H case ... break; #endregion #region do I case ... break; #endregion } ... #endregion }
Of course with some extra try...catch inside the regions or other try...catch. Well, at least, it looks like the functionality I need to transfer to the new application is - with the exception of some member variables - in that one single function, and not scattered all over the class... ;) "Have you heard of 'Clean Code' by Robert C. Martin? You can download it from the web", said the guy who uses to write such functions.
It's a form of modular code: each module goes in it's own
region
so you don't get the visual clutter associated with methods... :doh: X| Find a new job! Life is too short...Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
Sometimes I have the impression to work for Augeas[^] Stables Inc, but actually I am expected to produce more dung than to get rid of it... In the 13395 lines of code of the main window of one of our applications, I found this little gem (really little - only 320 loc) whose functionality I'll need in a new application (a little anonymized):
/// <summary> /// some description /// </summary> private void DoSomething() { ... #region do X ... #endregion #region do Y ... #endregion #region do Z ... #endregion #region do A ... #endregion #region do B if (some condition) { #region do C ... #endregion } else { #region do D ... #endregion } #endregion ... #region do E try { switch (some swicth) { #region do F case ... break; #endregion #region do G case ... break; #endregion #region do H case ... break; #endregion #region do I case ... break; #endregion } ... #endregion }
Of course with some extra try...catch inside the regions or other try...catch. Well, at least, it looks like the functionality I need to transfer to the new application is - with the exception of some member variables - in that one single function, and not scattered all over the class... ;) "Have you heard of 'Clean Code' by Robert C. Martin? You can download it from the web", said the guy who uses to write such functions.
I'm guessing it's a regional issue.
What do you get when you cross a joke with a rhetorical question?
-
Sometimes I have the impression to work for Augeas[^] Stables Inc, but actually I am expected to produce more dung than to get rid of it... In the 13395 lines of code of the main window of one of our applications, I found this little gem (really little - only 320 loc) whose functionality I'll need in a new application (a little anonymized):
/// <summary> /// some description /// </summary> private void DoSomething() { ... #region do X ... #endregion #region do Y ... #endregion #region do Z ... #endregion #region do A ... #endregion #region do B if (some condition) { #region do C ... #endregion } else { #region do D ... #endregion } #endregion ... #region do E try { switch (some swicth) { #region do F case ... break; #endregion #region do G case ... break; #endregion #region do H case ... break; #endregion #region do I case ... break; #endregion } ... #endregion }
Of course with some extra try...catch inside the regions or other try...catch. Well, at least, it looks like the functionality I need to transfer to the new application is - with the exception of some member variables - in that one single function, and not scattered all over the class... ;) "Have you heard of 'Clean Code' by Robert C. Martin? You can download it from the web", said the guy who uses to write such functions.
-
Sometimes I have the impression to work for Augeas[^] Stables Inc, but actually I am expected to produce more dung than to get rid of it... In the 13395 lines of code of the main window of one of our applications, I found this little gem (really little - only 320 loc) whose functionality I'll need in a new application (a little anonymized):
/// <summary> /// some description /// </summary> private void DoSomething() { ... #region do X ... #endregion #region do Y ... #endregion #region do Z ... #endregion #region do A ... #endregion #region do B if (some condition) { #region do C ... #endregion } else { #region do D ... #endregion } #endregion ... #region do E try { switch (some swicth) { #region do F case ... break; #endregion #region do G case ... break; #endregion #region do H case ... break; #endregion #region do I case ... break; #endregion } ... #endregion }
Of course with some extra try...catch inside the regions or other try...catch. Well, at least, it looks like the functionality I need to transfer to the new application is - with the exception of some member variables - in that one single function, and not scattered all over the class... ;) "Have you heard of 'Clean Code' by Robert C. Martin? You can download it from the web", said the guy who uses to write such functions.
If a little of something is good, then a whole lot of it must be better, right?
The difficult we do right away... ...the impossible takes slightly longer.
-
It's a form of modular code: each module goes in it's own
region
so you don't get the visual clutter associated with methods... :doh: X| Find a new job! Life is too short...Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
Why? In order to get experience with even more styles of WTF used in those different places?
-
Why? In order to get experience with even more styles of WTF used in those different places?
So you're saying "better the crap you know"? :laugh:
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
I'm guessing it's a regional issue.
What do you get when you cross a joke with a rhetorical question?
-
Sometimes I have the impression to work for Augeas[^] Stables Inc, but actually I am expected to produce more dung than to get rid of it... In the 13395 lines of code of the main window of one of our applications, I found this little gem (really little - only 320 loc) whose functionality I'll need in a new application (a little anonymized):
/// <summary> /// some description /// </summary> private void DoSomething() { ... #region do X ... #endregion #region do Y ... #endregion #region do Z ... #endregion #region do A ... #endregion #region do B if (some condition) { #region do C ... #endregion } else { #region do D ... #endregion } #endregion ... #region do E try { switch (some swicth) { #region do F case ... break; #endregion #region do G case ... break; #endregion #region do H case ... break; #endregion #region do I case ... break; #endregion } ... #endregion }
Of course with some extra try...catch inside the regions or other try...catch. Well, at least, it looks like the functionality I need to transfer to the new application is - with the exception of some member variables - in that one single function, and not scattered all over the class... ;) "Have you heard of 'Clean Code' by Robert C. Martin? You can download it from the web", said the guy who uses to write such functions.
#endcontract
-
Sometimes I have the impression to work for Augeas[^] Stables Inc, but actually I am expected to produce more dung than to get rid of it... In the 13395 lines of code of the main window of one of our applications, I found this little gem (really little - only 320 loc) whose functionality I'll need in a new application (a little anonymized):
/// <summary> /// some description /// </summary> private void DoSomething() { ... #region do X ... #endregion #region do Y ... #endregion #region do Z ... #endregion #region do A ... #endregion #region do B if (some condition) { #region do C ... #endregion } else { #region do D ... #endregion } #endregion ... #region do E try { switch (some swicth) { #region do F case ... break; #endregion #region do G case ... break; #endregion #region do H case ... break; #endregion #region do I case ... break; #endregion } ... #endregion }
Of course with some extra try...catch inside the regions or other try...catch. Well, at least, it looks like the functionality I need to transfer to the new application is - with the exception of some member variables - in that one single function, and not scattered all over the class... ;) "Have you heard of 'Clean Code' by Robert C. Martin? You can download it from the web", said the guy who uses to write such functions.
Bernhard Hiller wrote:
In the 13395 lines of code of the main window
Bernhard Hiller wrote:
In the 13395 lines of code
Bernhard Hiller wrote:
13395
What? :wtf:
-
Bernhard Hiller wrote:
In the 13395 lines of code of the main window
Bernhard Hiller wrote:
In the 13395 lines of code
Bernhard Hiller wrote:
13395
What? :wtf:
That's clean code, isn't it?