The only reason I rewrite something is if I find that I need to use the
same code block somewhere else and can break my existing code into a
procedure so I can use it multiple places.

In a perfect world, you should define your procedural steps first and
then code the procedures, but often, you are unaware that you will need
a procedure more than once.

Rewriting to improve performance, IMO is a waste of time because
computers are sooo fast that rarely does your code bog them down
anymore.

You can always improve your documentation though and I often add more
documentation when I come back to a program and don't remember what is
going on with the logic.

Tom Nesler

Live long!...   Code Well!...   and Prosper!...   V

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Cosmin Prund
> But is the above 'structure' the propper way of doing it ?
> Are there other ways, that are more efficient at run-time ?
> 
> Only one thread is in use, but loads of timer events etc.

There's a syndrome amongst programmers, making us think all code is bad
and needs rewriting, including our own code, including the code we wrote
5 minutes ago :-) In my opinion, if the code works, don't change it.
There's a good chance you'll ether spend a lot of time testing OR you'll
end up explaining to end-users how function X no longer works because
the code that implemented that was a mess and it got lost in
translation. You might be better off keeping the application as it is
and changing bits only when that's absolutely required. This will
certainly be hard at first but I'm 100% sure it would be harder to
re-structure the whole application at once.

Do a google search for "never rewrite working code" and you'll see the
same thing said by smarter people :-)

--
Cosmin Prund

_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to