CD (NNNNN NNNN) wrote:
....
I'm starting to teach myself C# now, as a hedge in the job market, but I
find it hard to concentrate on the application logic without some of the
tools and features of Smalltalk. I've gotten so used to just placing a halt
in an empty method and coding "on the fly" while running. The whole build and
run thing is hard to go back to. Also, I can't remember the last time
I lost
I'm an old Smalltalk guy myself, but working in C# doesn't have to be
that bad.
In Smalltalk I used to do a lot of unit testing in the transcript. In
..Net a unit test program takes the place of the transcript (for me at
least). I use the one called NUnit, available at SourceForge. What you
do is write small snippets of test code, which NUnit will keep
organized and run for you on demand.
Use Visual Studio to attach to an NUnit process containing the code you
want to debug. Set a breakpoint in your code. In NUnit, run the method
you want to debug. The debugger pops up when you hit the code in NUnit.
Make any desired modifications. Rebuild the assembly in Visual Studio.
Pop the NUnit window back to the front. The run button will be disabled
until the project finishes rebuilding at which point NUnit
automatically reloads the assembly you recompiled. The whole process
only takes maybe 15 seconds for perform a complete test,edit,compile
round trip. Note that you don't have to reattach to the process being
debugged. Been doing it for 3 years now.
Now for web pages and the like I usually just attach directly to those
using Vistual Studio. But for back-end code I always debug using NUnit.
As far as stability, for me Visual Studio rarely crashes. There are a
couple of things to avoid,though. For instance, if I inspect too many
SqlDateTimes, VS will lose its marbles after a few minutes. I've
learned dump such stuff out to the console when I want to take a look
at it. I pray this glitch is fixed with this year's release.
I will agree with you that SourceSafe stinks, but it does the job
(barely). I often find myself wistfully daydreaming about how much
easier life was with Team/V or Envy.
It ain't Smalltalk but it ain't that bad.