Board index » delphi » Re: Future tools should do less building and more analyzing

Re: Future tools should do less building and more analyzing


2007-08-13 09:44:33 PM
delphi111
Paul Nichols [TeamB] writes:
Quote
John Herbster writes:
>I think that modern computer programmers would be better off if we
>could do more good fact-based analysis and less "wondering".
>
Generally, this is what profilers are for.
Not entirely. I suspect (knowing John) that John refers not just to
speed or coverage or leak checking and the like but to /correctness/ of
code. Profilers don't really do that. Unit testing and the like can
help, but for more thorough testing of this sort you want a prover or
something like QuickCheck, if your code will support it.
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
Useful articles about InterBase development:
blogs.teamb.com/craigstuntz/category/21.aspx
 
 

Re: Future tools should do less building and more analyzing

Paul,
| Hope this helps!!
Nice dissertation.
--
Q
08/13/2007 10:33:59
XanaNews Version 1.17.5.7 [Q's salutation mod]
 

Re: Future tools should do less building and more analyzing

Ed,
| Now, as much as I am furious about it, is that the idiots requiring
| the program is actually expecting me to run it. Basically I
| wasted my time creating some sort of UI when I could've
| just slapped a damn script and ran it.
Personally, I think you did the right thing. I have BT, DT, and made the
"do it right" UI decision even though I knew beforehand that I'd be
"running the job." You now have an app with a UI that can be run by
others if you aren't around. (Ill, vacations, move on to another task
or job, etc.,.) it is the professional thing to have done. Even if you
could have "winged it" easier.
Don't expect any appreciation, either. Jobs such as this are often
only appreciated by ourselves in the knowledge of having "done it
right."
--
Q
08/13/2007 10:35:20
XanaNews Version 1.17.5.7 [Q's salutation mod]
 

Re: Future tools should do less building and more analyzing

Wayne,
| What I think many miss is that refactoring no less applies to
| *requirements and programming specifications* as it does to actual
| code. Just like finding a flaw in the design stage is much cheaper
| than finding and fixing it in the development/QA phases, so
| refactoring at the design and specification stage is cheaper than
| constantly refactoring actual code, and does much more to keep an
| entire code base coherent and consistent, and thus more manageable
| and maintainable.
On the mark!
--
Q
08/13/2007 10:44:12
XanaNews Version 1.17.5.7 [Q's salutation mod]
 

Re: Future tools should do less building and more analyzing

Craig Stuntz [TeamB] writes:
Quote
Paul Nichols [TeamB] writes:

>John Herbster writes:
>>I think that modern computer programmers would be better off if we
>>could do more good fact-based analysis and less "wondering".
>>
>Generally, this is what profilers are for.

Not entirely. I suspect (knowing John) that John refers not just to
speed or coverage or leak checking and the like but to /correctness/ of
code. Profilers don't really do that. Unit testing and the like can
help, but for more thorough testing of this sort you want a prover or
something like QuickCheck, if your code will support it.

Well that is true, if that is what he is referring to.
Personally, I believe, this is where coding standards come into play,
but like the planning stage is usually skipped these days. Remember
coding standards and code walk-throughs?
I will look at QuickCheck however.
Thanks
 

Re: Future tools should do less building and more analyzing

"Paul Nichols [TeamB]" <XXXX@XXXXX.COM>wrote
Quote
>>>... computer programmers would be could do more
>>>good fact-based analysis and less "wondering". ...
>>Generally, this is what profilers are for.
>Not entirely. I suspect (knowing John) that John refers
>not just to speed or coverage or leak checking and the
>like, but to /correctness/ of code. Profilers don't
>really do that. Unit testing and the like can help, but
>for more thorough testing of this sort you want a
>prover or something like QuickCheck, if your code will
>support it.
Features like madExcept and ExceptionMagic, should be
built-ins, not add-ins. Stack overflow, like can be
caused by recursion errors, should not cause the program
to just disappear. The compiler should check for and
issue recursion warnings and maybe even calculate the
max stack size required.
We need tools (or rules that can be followed) to make a
program that will guaranteed not to have memory
fragmentation problems.
But more than that, we need the features in the language
to include analogs of the variables of the world that we
are trying to program for. Here are some examples:
We need time variables that allow us to exactly represent
common civil times (including time-zone) and allow
increments of time which are exact.
We need variable types that can represent decimal fraction
numbers integrated into our programming tools, which would
allow us to match our business data rules, especially for
roundings.
We need compiler warnings when precision can be lost
during assignment statements.
Quote
Well that is true, if that is what he is referring to.
Personally, I believe, this is where coding standards
come into play, but like the planning stage is usually
skipped these days. Remember coding standards and code
walk-throughs?
They were casualties of RAD.
Regards, JohnH
 

Re: Future tools should do less building and more analyzing

John,
| ... and maybe even calculate the max stack size required.
How does one calculate infinity? ;-)
--
Q
08/14/2007 10:09:25
XanaNews Version 1.17.5.7 [Q's salutation mod]
 

Re: Future tools should do less building and more analyzing

Q Correll writes:
Quote
>... and maybe even calculate the max stack size required.

How does one calculate infinity? ;-)
Unnecessary. The max stack size available to the app is known at
compile time.
The harder part is state. Unless your code is purely functional, you
can't really know the max stack size.
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
All the great TeamB service you've come to expect plus (New!)
Irish Tin Whistle tips: learningtowhistle.blogspot.com
 

Re: Future tools should do less building and more analyzing

"Craig Stuntz [TeamB]"
Quote
>>... maybe even calculate the max stack size required.
>How does one calculate infinity? ;-)
The harder part is state. Unless your code is purely
functional, you can not really know the max stack size.
I am not sure what "purely functional" means.
I suspect that it may be possible to calculate the stack
required by building a tree with required sizes starting
the leaves that don't call any thing and working back to
the events that can call them.
--JohnH
 

Re: Future tools should do less building and more analyzing

John Herbster writes:
Quote
I am not sure what "purely functional" means.
Entirely without state; the output of each function is completely
determined by the values of the arguments.
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
All the great TeamB service you've come to expect plus (New!)
Irish Tin Whistle tips: learningtowhistle.blogspot.com
 

Re: Future tools should do less building and more analyzing

Craig,
| | How does one calculate infinity? ;-)
|
| Unnecessary. The max stack size available to the app is known at
| compile time.
I know. I was just being a wise*ss. See the "wink?" <g>
--
Q
08/14/2007 14:07:14
XanaNews Version 1.17.5.7 [Q's salutation mod]
 

Re: Future tools should do less building and more analyzing

"Q Correll" <XXXX@XXXXX.COM>wrote
Quote
I know. I was just being a wise*ss. See the "wink?" <g>
Q, I was not sure. Further, I suspect, but am
not sure that the problem has a practical solution.
What are your comments on my other statements,
copied below?
Quote
>But more than that, we need the features in the language
>to include analogs of the variables of the world that we
>are trying to program for. Here are some examples:
>We need time variables that allow us to exactly represent
>common civil times (including time-zone) and allow
>increments of time which are exact.
>We need variable types that can represent decimal fraction
>numbers integrated into our programming tools, which would
>allow us to match our business data rules, especially for
>roundings.
>We need compiler warnings when precision can be lost
>during assignment statements.
Regards, JohnH
 

Re: Future tools should do less building and more analyzing

John,
| What are your comments on my other statements,
| copied below?
|
| | | But more than that, we need the features in the language
| | | to include analogs of the variables of the world that we
| | | are trying to program for. Here are some examples:
|
| | | We need time variables that allow us to exactly represent
| | | common civil times (including time-zone) and allow
| | | increments of time which are exact.
Hmmm,... I have always written my own time functions when I need
something like that. I guess it never even occurred to me that it
should be in the language-compiler package. <g>
| | | We need variable types that can represent decimal fraction
| | | numbers integrated into our programming tools, which would
| | | allow us to match our business data rules, especially for
| | | roundings.
Yes! I have mentally "grumped" about that for many years. Back in the
very early Turbo Pascal days I even wrote my own decimal arithmetic
functions.
| | | We need compiler warnings when precision can be lost
| | | during assignment statements.
Cool tool. (Even though I'd probably eventually turn it off. <g>
I've always been [painfully] aware of the limitations of binary and
fixed-length arithmetic.)
--
Q
08/14/2007 18:25:22
XanaNews Version 1.17.5.7 [Q's salutation mod]
 

Re: Future tools should do less building and more analyzing

One other bit on this. I haven't looked recently, but I don't think
Delphi does tail recursion optimization. In all seriousness, that would
certainly help with "infinite" recursion.
IOW, you could write a message handling loop like this:
procedure HandleMessage;
begin
case Message of
message1: DoMessage1;
// ..
end;
HandleMessage;
end;
This would be optimized into an infinite while loop.
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
How to ask questions the smart way:
www.catb.org/~esr/faqs/smart-questions.html
 

Re: Future tools should do less building and more analyzing

Craig,
| This would be optimized into an infinite while loop.
My head hurts. <g>
--
Q
08/15/2007 09:40:04
XanaNews Version 1.17.5.7 [Q's salutation mod]