Access coding standards- would you ever release an Access application that failed to compile complet

P

Paul Shapiro

I'm in the process of taking over an Access application that was developed
by someone else. Not my favorite work, but the client is a friend. The front
end is Access and the back end is SQL 2000. When I looked at the existing
application, I discovered that it fails to compile. There appear to be a
number of forms and reports where the code references non-existent controls.
There may be other issues also, but I got tired of commenting out invalid
code and quit trying to get it to compile. I suggested the client contact
the original programmer, who is still working on this project, and ask why
the application doesn't compile. The programmer questioned my knowledge,
that I would suggest such a thing as requiring successful compilation.
Apparently he relies on the incremental compilation and is satisfied if the
parts being used work.

I've been doing software development for many years. I've worked with Access
since version 1. In all that time I've never delivered a non-compiling
application to a client, in Access or any other tool. I sent the client a
few quotes from "Code Complete", by Steve McConnell, indicating that
successful compilation was one of the minimal tests for a successful daily
build.

I'm just wondering if maybe I'm missing something here. Does anyone here
deliver applications that don't compile? On purpose? And defend the
practice?
Paul Shapiro
 
A

Albert D. Kallal

I'm just wondering if maybe I'm missing something here. Does anyone here
deliver applications that don't compile? On purpose? And defend the
practice?
Paul Shapiro

As a pracince, I would NEVER deploy an apocation that does not compile. In
fact, I alwasys deployed a mde.

However, we don't live in a perfect world. For example, while I just said I
would "never" deploy a mdb, and *always* use a mde for each workstation, it
not the end of world. We don't have to put someone in jail if they don't
always use a mde.

However, I do think that a "basic" standard for deployment is that the
application should at least compile. So, if you asking is your reaction
"fair", or normal...sure, I agree. A bit of aghast here is needed. I think
deploying an application that don't compile is a sign of laziness, or simply
a lack of professional standards here....

I also think the same about deploying a split application, and again, it
hard to phantom an un-split application..even in single user environments...
 
P

(PeteCresswell)

Per Paul Shapiro:
I suggested the client contact
the original programmer, who is still working on this project, and ask why
the application doesn't compile. The programmer questioned my knowledge,
that I would suggest such a thing as requiring successful compilation.
Apparently he relies on the incremental compilation and is satisfied if the
parts being used work.

I've been doing software development for many years. I've worked with Access
since version 1. In all that time I've never delivered a non-compiling
application to a client, in Access or any other tool. I sent the client a
few quotes from "Code Complete", by Steve McConnell, indicating that
successful compilation was one of the minimal tests for a successful daily
build.

I'm just wondering if maybe I'm missing something here. Does anyone here
deliver applications that don't compile? On purpose? And defend the
practice?

I can't imagine putting something into production that doesn't
compile.

Also, it seems to imply that he doesn't do regular /Decompiles
and Compact/Repairs while developing.

I think the guy's way, way, waaaaaaaaay out in left field -
especially in defending the practice.
 
A

Arvin Meyer [MVP]

I'm just wondering if maybe I'm missing something here. Does anyone here
deliver applications that don't compile? On purpose? And defend the
practice?

No defense that I can think of. I've been developing Access databases for
just shy of 15 years, and every one of my applications compile. Incremental
compilation only worked on Access 97 and earlier databases, so maybe he is
still working on old versions.
 
P

Paul Shapiro

As far as I can tell the on-demand compilation is still working in Access
2003, with an Access 2002-3 format db. Some of the forms with code in them
open without any compilation error, but the application as a whole fails to
compile. From the online help in A2003: "Compiling on Demand: It's a good
idea to explicitly compile the modules in your project by using the commands
described above, but it's not necessary. Microsoft Access compiles a module
before running a procedure in it if the module hasn't already been
compiled."
Paul Shapiro
 
D

Douglas J. Steele

But on-demand compilation in Access 2000 and newer attempts to compile all
code in the database, whereas in Access 97, you could compile a single
module. In other words, there's no way the developer could be doing
on-demand compilation without having the errors appear.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)
 
P

Paul Shapiro

I understand now. But I think just the Compile menu items changed. I
remember there used to be the option for Compile Loaded Modules, and now
that option is gone. But if you don't use the Compile Project menu item,
Access still only compiles each module when you use it. In this case the
developer must never use the Compile command, since it fails. He just lets
Access compile a module as it's loaded. As long as you don't load the broken
ones, you don't see the error.
Paul Shapiro

Arvin Meyer said:
On demand compilation is not quite the same as incremental compilation.
Access 97 and earlier could compile just the module you were working on.
The choices from the Debug menu Item were: Compile Loaded Modules, Compile
All Modules, and Compile and Save All Modules. Now the choice is simply:
Compile [ProjectName]
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Paul Shapiro said:
As far as I can tell the on-demand compilation is still working in Access
2003, with an Access 2002-3 format db. Some of the forms with code in
them open without any compilation error, but the application as a whole
fails to compile. From the online help in A2003: "Compiling on Demand:
It's a good idea to explicitly compile the modules in your project by
using the commands described above, but it's not necessary. Microsoft
Access compiles a module before running a procedure in it if the module
hasn't already been compiled."
Paul Shapiro
 
A

Arvin Meyer [MVP]

Correct. However, broken modules still can cause problems even if never
loaded. Those with broken references can and usually will break common VBA
functions. Uncompiled/broken modules cannot be imported, nor can an MDE be
made. That also means that the versions cannot be upgraded.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Paul Shapiro said:
I understand now. But I think just the Compile menu items changed. I
remember there used to be the option for Compile Loaded Modules, and now
that option is gone. But if you don't use the Compile Project menu item,
Access still only compiles each module when you use it. In this case the
developer must never use the Compile command, since it fails. He just lets
Access compile a module as it's loaded. As long as you don't load the
broken ones, you don't see the error.
Paul Shapiro

Arvin Meyer said:
On demand compilation is not quite the same as incremental compilation.
Access 97 and earlier could compile just the module you were working on.
The choices from the Debug menu Item were: Compile Loaded Modules,
Compile All Modules, and Compile and Save All Modules. Now the choice is
simply: Compile [ProjectName]
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Paul Shapiro said:
As far as I can tell the on-demand compilation is still working in
Access 2003, with an Access 2002-3 format db. Some of the forms with
code in them open without any compilation error, but the application as
a whole fails to compile. From the online help in A2003: "Compiling on
Demand: It's a good idea to explicitly compile the modules in your
project by using the commands described above, but it's not necessary.
Microsoft Access compiles a module before running a procedure in it if
the module hasn't already been compiled."
Paul Shapiro


I'm just wondering if maybe I'm missing something here. Does anyone
here deliver applications that don't compile? On purpose? And defend
the practice?

No defense that I can think of. I've been developing Access databases
for just shy of 15 years, and every one of my applications compile.
Incremental compilation only worked on Access 97 and earlier databases,
so maybe he is still working on old versions.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 
D

Dirk Goldgar

In
Paul Shapiro said:
I'm just wondering if maybe I'm missing something here. Does anyone
here deliver applications that don't compile? On purpose? And defend
the practice?

No. No. No.
 
D

David W. Fenton

I'm just wondering if maybe I'm missing something here. Does
anyone here deliver applications that don't compile? On purpose?
And defend the practice?

You're missing nothing at all. I encountered this exact situation
recently and told the boss man about it. He made the contractor fix
it so that it compiled. The reason I even bothered to check was
because they were saying the component I had built for them was
running too slow. Turned out it was running poorly because the
database was a complete mess, with corrupted modules and
non-compiling code all over the place. I instructed the other
developer on my development practices, and the guy who pays the
bills told him to follow them.

I was luckier than you in having a project manager who was smart
enough to see that I was correct.

You are also correct, but I don't know how you go about convincing
the client and the other developer of that fact.
 
D

David W. Fenton

I think
deploying an application that don't compile is a sign of laziness,
or simply a lack of professional standards here....

It also suggests to me that the developer knows nothing about the
dangers of code corruption in the risk of loss of the whole VBA
project that can happen if you don't take care of your code. That
should be reason enough that the other developer should be forced by
the employer to compile regularly.
 
D

David W. Fenton

However, broken modules still can cause problems even if never
loaded. Those with broken references can and usually will break
common VBA functions. Uncompiled/broken modules cannot be
imported, nor can an MDE be made. That also means that the
versions cannot be upgraded.

And that the whole project is at risk of loss if corruption
continues to develop, which it is likely to do if COMPILE ON DEMAND
is ON and the developer never compiles/decompiles.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top