Solved

Help with very large application.

Posted on 2004-05-02
5
163 Views
Last Modified: 2011-09-20
I write thermodynamic Engineering applications for large electric power plants.  One such program is very large and I'm having trouble compiling the application.  I'm using Visual Basic 5.  In this application there are a large number of double presision variable names and a considerable number of subroutines to support the code.  I'm looking for some general programming ideas for very large applications?  I've considered breaking the application into several small sections that call each other.  The problem is this, the solution which the program arrives at is done iteratively.  You start with an initial reasonable guess and then the entire code executes repeatedly.  With each iteration, it uses the results from the previous iteration.  I want a smooth seamless look on the screen with a text or picture box where I can display intermediate data as the iterative process progresses.  Breaking the application into several modules which call each other, makes this difficult and does not look very smooth on the screen.  Any tips would be greatly appreciated.  Perhaps a suggestion for some further reading might be helpful (a suggested book).  Thanks in advance for your time and consideration.
0
Comment
Question by:prionus
5 Comments
 
LVL 9

Expert Comment

by:p_sie
ID: 10973460
what do you mean by very large?
how many lines of code, how many procedures, etc..
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 10974174
Do you have any pure code modules (no form).  If so these could be compiled to a dll or ActiveX control and included in the application.  This might reduce the compilation effort for the project.

mlmcc
0
 
LVL 3

Expert Comment

by:mgronlund
ID: 10985379
Another Solution Might Be To Use TCP/IP And Pass The Information To/From  Another Application To Display The Information, i.e. The Viewer is LightWeight Compiles to under 50k (Depending On The Form Complexity) And The Workload Can Be On Another Machine Even Or Have Multiple Clients Viewing The Data.

My 2 Cents.

Mike

0
 

Author Comment

by:prionus
ID: 11010614
The code is approximately 2000 lines, including the supporting subroutines.  The code uses a little over 2200 unique variable names, all of which are double real values.  I have considered assigning a number to each variable and then writing a "utility" application that would read the source code file, convert each variable into an array element... say V(1), V(2)... etc. and then re-write the source code into another form module for compilation.  This would reduce the space required for the storage of unique variable names down to a single array variable.  I've used this technique with some old FORTRAN applications which were also very large.  Yes, I did say FORTRAN, I started programming back in about 1975 when all I had was the main frame at the corporate office and FROTRAN was all that was available.  Pulling subroutines out into DLLs might help and that is an interesting idea.  I like to have the source code at my finger-tips since I'm the principal user and add/change/enhance as I please on the fly.  Thanks Mike for the TCP idea... but this sounds like something beyond my "typical" skill set.  I'm an Engineer and I'm simply doing very complicated math.  The dispay part of the application is used only for display of intermediate results so I can watch the calculation progress and... if it fails, I can have a good idea where to begin looking.  The real results are sent to a file which is used by another application for viewing. plotting. etc.  I would welcome some other ideas.  I'm not in a hurry for an answer so please... sleep on it and kick it around some.  Thanks for your help.  
0
 
LVL 9

Accepted Solution

by:
p_sie earned 250 total points
ID: 11012454
2000 lines of code is not much. I have modules in a project that each have about 7000 lines so...

what I do think is a a lot is that you have about 2000 variables, almost as much variables as lines, that would mean that at almost every
line you are filling a variable with a value....

The use of arrays is very wise, if a lot of variables contain the same kind of information, then you could name them all the same...
Breaking up the application in different peices is not what I would recommend, your program will only get slower and more
errors can occur if you have to call one program from another.

What size is the compiled program?

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now