Re: How to do this?
- From: "Kevin Spencer" <spam@xxxxxxx>
- Date: Sun, 8 Oct 2006 21:33:45 -0400
If I might make another observation about Jon's excellent discussion: This
process of refactoring is an excellent way to solve a problem. Quite often,
it is difficult to write the most elegant, or the most optimal code in the
beginning. A good developer will often begin by writing out a long solution,
what I like to call "bludgeoning your way through" the problem, ignoring the
optimizations in the beginning. Once the first draft of the code is done,
one can look it over for sections that can be refactored, repeated code that
can be made into loops or functions, and other optimizations. As Jon
illustrated, the re-analysis and refactoring process can be repeated, as
each new configuration of the code tends to suggest its own optimizations.
This process generally ends up taking less time than attempting to write the
leanest code on the first run.
And of course, for someone who is learning (as we all are, I would hope),
the most important goal is realized first, which is writing code that does
the job. As you progress with your skill and practice, you will be able to
spot more and more ways of making it leaner, more reusable (writing methods
and classes that perform common tasks), and more extensible.
--
HTH,
Kevin Spencer
Microsoft MVP
Computer Control Freak
http://unclechutney.blogspot.com
A man, a plan, a canal, a palindrome that has.. oh, never mind.
"Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> wrote in message
news:MPG.1f936999489b799998d528@xxxxxxxxxxxxxxxxxxxxxxx
Amanda <amanda772008@xxxxxxxxx> wrote:<snip>
Do let us know how you get on with the above - and if any of it doesn't
make sense, please say and I'll go back and explain in more detail.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: How to do this?
- From: Amanda
- Re: How to do this?
- References:
- How to do this?
- From: Amanda
- Re: How to do this?
- From: Amanda
- Re: How to do this?
- From: Jon Skeet [C# MVP]
- Re: How to do this?
- From: Amanda
- Re: How to do this?
- From: Jon Skeet [C# MVP]
- Re: How to do this?
- From: Amanda
- Re: How to do this?
- From: Jon Skeet [C# MVP]
- Re: How to do this?
- From: Amanda
- Re: How to do this?
- From: Jon Skeet [C# MVP]
- How to do this?
- Prev by Date: Re: Question on Background worker
- Next by Date: Re: Alternative to using MatchCollections
- Previous by thread: Re: How to do this?
- Next by thread: Re: How to do this?
- Index(es):
Relevant Pages
|