Re: Managing a project as it scales



Thank you for taking the time to elaborate on these topics, Joe.

The last few days have been very interesting. I've read a number of the
articles on your site as well as others that I've found on the Code
Project. I'm still processing all this information, but it is clear
that I have made some obvious and not-so-obvious coding mistakes.

One of the problem areas I have is in error handling, which I basically
ignored (i.e. exceptions) or dealt with in a rather inconsistent
manner. I can address the later but I still have difficulty
understanding the appropriate use exceptions. I mean, even CString can
throw an exception. If I were to try and catch all feasible exceptions
the code would bloat enormously. Or worse, I could implement a
"catch-all" and then not be able to spot legitimate errors while in
development. So the questions is, when and where is a good idea to
acknowledge exceptions? File operations?

Another issue is the manipulation of controls from classes other than
its owner (say, a CDialog derived class). I now realize I shouldn't
pass pointers to controls or even to "this" and use SendMessage or, if
from a thread, use PostMessage. The thing is, how do you identify the
control? It seems you should at least have access to a dialog/window
handle (hwnd). Is that the appropriate method? Updating a progress bar
or a static control from a thread is a fairly common task I implement.
What's the correct approach?

I have also been subclassing to deeply and have ended up having to
populate the base class with scores of virtual methods. My thinking was
that intermediate classes would avoid duplicating code but I can see
how they have complicated the implementation a lot. A rewrite is in
order.

Documentation is an area where I have to start from scratch. I've
looked around and have found some tools (say, Doxygen) but it seems
that your commenting style does not follow a format I recognize. do you
use a documentation tool? If so, which? If not, am I to understand they
are not worth the effort?

Other questions pop to mind but I don't want to tax your patience.
Thanks again.

Alexander

.



Relevant Pages

  • get exceptions while using LoadViewState in ascx
    ... GET EXCEPTIONS: Failed to load viewstate. ... For example, when adding controls ... position of the controls added during the initial request. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Managing a project as it scales
    ... > No use of UpdateData. ... No exceptions. ... > for arrays of identical controls, such as buttons (this exception can come up as often as ... As for GetDlgItem(), I use it all the time. ...
    (microsoft.public.vc.mfc)
  • making UserControl catch all its exceptions
    ... Is there any way to make a UserControl catch all its exceptions? ... (I have a webiste built on one page with placeholders that load controls, ... so even if one of the controls throws an exception I still would like to be ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Disabling Form Objects
    ... (recursively walking through the Control list, disabling controls). ... Controlexceptions) ... ... I've noticed that if you disable a container, such as a Panel, it ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Managing a project as it scales
    ... understanding the appropriate use exceptions. ... or a static control from a thread is a fairly common task I implement. ... use a documentation tool? ... Java, but you know C++ you don't need to know Java in order to follow ...
    (microsoft.public.vc.mfc)