Re: My First C# (warning - long post)



andrewmcdonagh wrote:
Cool!

Yeah those names are a bit long (but then again, you only have to type
them once as intellisense will create them for you every other time),
but I did it deliberately to show the technique of 'convert comments
into private method names' to get you started on 'self documenting'
code.

That's cool. I tend to comment a lot - more than any other programmer in our shop. (We proved that by looking at the output from this class - my commenting average is between 22% and 28% compared to executable lines in COBOL...)

I'll continue to play with the class over the next few days when I get
time and post the new versions on here.... (I'm thinking we'll
transition to something like a dozen small classes working
together....)

This exercise is good for me too, as I've never used c# before, only
read about it...

I appreciate it - I'm glad it's helping you too. Of course, I'm sort of learning the two together, but I've been surprised how much Java works in C# - and if it doesn't work, it probably just has a different name.

Once we have this out of the way...the next biggest priority on your
learning curve, should be how to develop code that has a full suite of
automated Unit tests - NUnit is the unit testing framework of choice
for .Net and should even be integrated into vs2005.... Normally I
wouldn't do any code changes like these without a suite of unit tests
to show me instantly if I break something... but one leasson at a
time.

I'll have to look into that. How should I put this - code "robustness" has been an issue with some of our .net pages.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ / \ / ~ Live from Montgomery, AL! ~
~ / \/ o ~ ~
~ / /\ - | ~ daniel@thebelowdomain ~
~ _____ / \ | ~ http://www.djs-consulting.com ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e ~
~ h---- r+++ z++++ ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

"Who is more irrational? A man who believes in a God he doesn't see, or a man who's offended by a God he doesn't believe in?" - Brad Stine
.



Relevant Pages

  • Re: Test Harness?
    ... Is there a way to pass Rake tasks arguments? ... I'd like to do something where I break my unit tests up into test ... invoke a Rake task like rake suite "sweet" or rake suite ...
    (comp.lang.ruby)
  • Re: My First C# (warning - long post)
    ... vs2005...you'll need to spend a few minutes sorting out the line wraps ... that posting it to here causes...) ... wouldn't do any code changes like these without a suite of unit tests ...
    (comp.lang.cobol)
  • Re: Unit Testing Non-Believer
    ... > Nothing says you have to write a whole suite of tests every time, ... To use unit tests as a development support tool for complex changes is ... So I developed this function as a standalone class, ...
    (borland.public.delphi.non-technical)