473,804 Members | 3,211 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Future reuse of code

Hi I'm developing a program and the client is worried about future
reuse of the code. Say 5, 10, 15 years down the road. This will be a
major factor in selecting the development language. Any comments on
past experience, research articles, comments on the matter would be
much appreciated. I suspect something like C would be the best based
on comments I received from the VB news group.

Thanks for the help in advance

James Cameron
Jul 19 '05
242 13469
Malcolm wrote:
Java COBOL and Visual Basic I know little about. VB is unstable, COBOL is
virtually obsolete.


What? COBOL is obsolete? I guess OO and .NET are obsolete too... ;)
--
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
~ / \ / ~ Live from Montgomery, AL! ~
~ / \/ o ~ ~
~ / /\ - | ~ AIM: LXi0007 ~
~ _____ / \ | ~ E-mail: LX*****@Netscap e.net ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ I do not read e-mail at the above address ~
~ Please post if you wish to be contacted privately ~
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~

Jul 19 '05 #11

"Malcolm" <ma*****@55bank .freeserve.co.u k> wrote in message
news:bg******** **@news8.svr.po l.co.uk...
|
| "James Cameron" <ja***********@ bindereng.com.a u> wrote in message
|
| > Hi I'm developing a program and the client is worried about future
| > reuse of the code. Say 5, 10, 15 years down the road. This will be a
| > major factor in selecting the development language.
| >
| Java COBOL and Visual Basic I know little about. VB is unstable, COBOL is
| virtually obsolete.

COBOL ain't dead yet.
It has a history, and some code that surpasses the 15 year reusability
requirement.


Jul 19 '05 #12
I've been very successful reusing COBOL, but mostly by virtue of it being
accessible behind CICS. I can connect to CICS from any platform using various
combinations of middleware, and avail my new system of the legacy of
COBOL-implemented functions as long as those function serve the customer's
purpose.
Donald Tees wrote:
"Peter E.C. Dashwood" <da******@enter net.co.nz> wrote in message
news:3f******** @news.athenanew s.com...
<snip> Aren't you talking about marriage or something? About the *only* code I
know that is still running after 15 years use is in Cobol. I could say the
same for 30 years.

Even in the last five years, the components I have used have evolved into
different packaging, required updates for each OS, etc. etc.

Donald


Jul 19 '05 #13


Peter E.C. Dashwood wrote:

The source language is irrelevant in terms of code re-use. (It is OBJECT
code that will be re-used...)
Simply by virtue of being OO it is not guaranteed to be reusable. Paradigm is
no substitute for design.
You should select a source language SUITABLE FOR THE JOB YOU WANT TO DO!!!
Well said.

Then make sure that an OO or modular approach is adopted, wrap your
functions as components, and you can reuse them FOR EVER not just 15 years.


Again, well said. Good advice.

Jul 19 '05 #14
jce
"James Cameron" <ja***********@ bindereng.com.a u> wrote in message
news:45******** *************** ***@posting.goo gle.com...
Hi I'm developing a program and the client is worried about future
reuse of the code. Say 5, 10, 15 years down the road. This will be a
major factor in selecting the development language. Any comments on
past experience, research articles, comments on the matter would be
much appreciated. I suspect something like C would be the best based
on comments I received from the VB news group.

Thanks for the help in advance

James Cameron


<---repeated from another post---->
In 5/10/15 years the questions come down to (a) Do we have time and money to
port (b) Can we survive with what we have or (c) is there a market product
that has what we want.

In general the argument seems to go straight to (b) and (c). No one wants
to pay for an upgrade.
<---repeated from another post---->

Java already has issues. The backward compatibility isn't the 100%
promised....you constantly need to upgrade to get the latest and greatest.
The API s have a lifecycle of a year or two so you are constantly faced with
question (a).

Seems to me that .NET would work best here because then you can pick the
source of your choice. I don't know much about this so I shouldn't really
comment.

You don't say what the application is which makes the response hard. Some
language are better for some things than others ;-)
It might be better for example as a plug-in to another application (say
eclipse) rather than you developing an entire framework.

I would always suggest a search on sourceforge to see if something is out
there that helps....

Personally I have four views - when you are talking of multiple programmers:

1. If you have COBOL programmers use COBOL. If you have C programmers use
C. This is built on the shaky assumption that they are good coders. I
would rather have competent programmers writing competent code that provides
higher stability than competent programmers writing immature code. Bear in
mind that COBOL has an underground "cool" factor now....no, really...

2. Java is the easiest answer to sell and as pointed out here...it's
pretty vanilla (which doesn't mean no gotchas) but should be relatively
readable. So if you're in competent programmer you can understand this
easily enough.

3. Does anyone really look to an application to last this long? Seems to
me that everything goes through a rewrite as part of natural evolution. I'd
rather go for quality than anything (which means I invested in Betamax over
VHS and Token Ring over Ethernet I suppose).

4. The MOST important question is ........does it matter if I can reuse it
in 5 years if I cannot get it out of the door quickly now? No point
architecting a 15 year plan if it takes 5 years to execute and you need it
in 3 months. I didn't get that priority from your original note.

If you are on your own then I only have one comment:
Narrow choices down to what you are comfortable with then add those
languages you are confident of handling. You have to deliver the quality
product NOW and not 15 years from now.

Here's the kicker:
Imagine......Su n goes belly up in 2006....Microso ft antes up with a few
billion to buy the Java licensing rights....woo hooo.....We'll all try
desperately to port to Inga's free open source virtual software layer Ingot
that runs on EyeBeeEmux to remove Microsoft dependencies... .(remember they
once thought the earth was flat and that Senators were for the people).
In 2015 we no longer run processors as we know them. Electrons have been
isolated on switches that are built on self managed bio matter developed in
the Democratic People's China by po'd shepherds who refuse to divulge their
methods to the Communist States of America.

JCE

(Notice the lack of Pascal support here....why did we ignore ADA?)
Jul 19 '05 #15

"Jacob" <ja***@yahoo.co m> wrote in message
news:3F******** ******@yahoo.co m...
| James Cameron wrote:
| > Hi I'm developing a program and the client is worried about future
| > reuse of the code. Say 5, 10, 15 years down the road. This will be a
| > major factor in selecting the development language. Any comments on
| > past experience, research articles, comments on the matter would be
| > much appreciated. I suspect something like C would be the best based
| > on comments I received from the VB news group.
|
| NOTHING will run 10 years from now!

You might want to qualify this by language.
(NOTHING written in ? will run 10 years from now!)
Be careful, there are people out there with 10 year old software that is
still running.

Come to think of it, you might want to include the hardware, and operating
system.

|
| So just make sure (in logical design, system architechture,
| well written easy-to-read code, proven algorithms, adequate
| domain and storage models and system documentation presence)
| that the fundamental ideas can move along.
|
Jul 19 '05 #16
Harley wrote:

| NOTHING will run 10 years from now!

You might want to qualify this by language.


Just keep it as a rule of thumb. If something made today
runs 10 years from now it is either pure luck or a dead
slow organization. If you expect the world to go on, you
oraganize your software so it can go along.

The fact that 15 years old Cobol (or C or PL/1 or UniFace)
software is still out there is no *proof* that it has
outlived time. Maybe it's is just written in a way that
makes it impossible to move on.

Jul 19 '05 #17
Jacob wrote:
James Cameron wrote:
Hi I'm developing a program and the client is worried about future
reuse of the code. Say 5, 10, 15 years down the road. This will be a
major factor in selecting the development language. Any comments on
past experience, research articles, comments on the matter would be
much appreciated. I suspect something like C would be the best based
on comments I received from the VB news group.


NOTHING will run 10 years from now!


Ehm....

I have a lot of C programs that run perfectly
after more than 10 years!

E.g. see the following C programs that play Draughts
(Dama in italian) written on september 1989:
You can compile the original untouched C-source
(e.g. using gcc) and play it again immediately!

- Dario

#define linee_bianche (void)printf("\ n\n");
#define odd(exp) ((exp)%2)

typedef int scacchiera[9][9];

struct mossa {
int a,b,a1,b1;
int valutatore;
};

static scacchiera s;
static
inizializza(s)
scacchiera s;
{
int r,c;

for (r=1; r<=8; r++)
for (c=1; c<=8; c++)
if (odd(r+c) || (r==4) || (r==5))
s[r][c] = 0;
else
{
if (r>=1 && r<=3)
s[r][c]= -1;
else
s[r][c] = 1;
}
}
static
read_2n(a,b)
int *a;
int *b;
{
char c;

*a = 0;
*b = 0;
do
if (1 != scanf("%c",&c))
c = '0';
while (c<'0' || c>'8');
*a = c-'0';
if (*a)
{
do
if (1 != scanf("%c",&c))
c = '0';
while (c<'0' || c>'8');
*b = c-'0';
if (*b == 0)
*a = 0;
}
}
static
posizione_in_sc acchiera(r,c)
int r;
int c;
{
return (r >= 1) && (r <= 8) && (c >= 1) && (c <= 8);
}
static
muovi(s,r,c,r1, c1)
scacchiera s;
int r,c,r1,c1;
{
s[r1][c1] = s[r][c];
s[r][c] = 0;
if (abs(r1-r) == 2)
s[(r1+r)/2][(c1+c)/2] = 0;
if ( ((r1==1) && (s[r1][c1]== 1))
|| ((r1==8) && (s[r1][c1]==-1))
)
{
s[r1][c1] = s[r1][c1]*2;
(void)printf(" DAMA!\n");
}
}
static
leggi_mossa(s)
scacchiera s;
{
int casella_partenz a_giusta;
int r,c;
int fine;

fine = 0;
casella_partenz a_giusta = 0;
do
{
linee_bianche;
(void)printf(" DA? ");
read_2n(&r,&c);
if (posizione_in_s cacchiera(r,c))
{
if (s[r][c] > 0)

leggi_posizione _arrivo(s,r,c,& casella_partenz a_giusta);
else
(void)printf(" POSIZIONE DI PARTENZA ERRATA.\n");
}
else
{
fine = 1;
linee_bianche;
(void)printf(" HAI ABBANDONATO E QUINDI HAI PERSO.\n");
}
}
while (!(casella_part enza_giusta || fine));
return fine;
}
static
leggi_posizione _arrivo(s,r,c,m ossa_giusta)
scacchiera s;
int r,c;
int *mossa_giusta;
{
int r1,c1;

(void)printf(" A? ");
read_2n(&r1,&c1 );
if (posizione_in_s cacchiera(r1,c1 ))
{
if (mossa_corretta (s,r,c,r1,c1))
{
*mossa_giusta = 1;
muovi(s,r,c,r1, c1);
if (abs(r1-r) == 2)
leggi_altre_pre se(s,r1,c1);
}
else
(void)printf(" MOSSA SCORRETTA.\n");
}
else
(void)printf(" RICOMINCIA DA CAPO.\n");
}
static
mossa_corretta( s,r,c,r1,c1)
scacchiera s;
int r,c,r1,c1;
{
int casella_arrivo_ vuota, senso_giusto, presa_corretta;
int rr,cc;

casella_arrivo_ vuota = s[r1][c1] == 0;
senso_giusto = (abs(r1-r)==abs(c1-c)) &&
(abs(s[r][c])==2 || (r1-r)*s[r][c] < 0);
rr = (r1+r)/2;
cc = (c1+c)/2;
if (abs(r1-r) == 2)
presa_corretta = (s[r][c]*s[rr][cc] < 0) &&
(abs(s[r][c]) >= abs(s[rr][cc]));
else
presa_corretta = abs(r1-r) == 1;
return casella_arrivo_ vuota && senso_giusto && presa_corretta;
}
static
leggi_altre_pre se(s,r,c)
scacchiera s;
int r,c;
{
int r1,c1;

do
{
(void)printf(" +A? ");
read_2n(&r1,&c1 );
if (posizione_in_s cacchiera(r1,c1 ))
{
if ((abs(r1-r)==2) && mossa_corretta( s,r,c,r1,c1))
{
muovi(s,r,c,r1, c1);
r = r1;
c = c1;
}
else
(void)printf(" PRESA SCORRETTA.\n");
}
}
while (posizione_in_s cacchiera(r1,c1 ));
}
static
stampa_scacchie ra(s)
scacchiera s;
{
int r,c;

linee_bianche;
(void)printf(" 1 2 3 4 5 6 7 8\n");
for (r=1; r<=8; r++)
{
(void)printf(" %1d ",r);
for (c=1; c<=8; c++)
switch (s[r][c])
{
case -2: (void)printf("D N"); break;
case -1: (void)printf("-N"); break;
case 0: if (odd(r+c))
(void)printf(" ");
else
(void)printf("--");
break;
case 1: (void)printf("-B"); break;
case 2: (void)printf("D B"); break;
}
(void)printf("\ n");
}
}
static
elabora_mossa(s )
scacchiera s;
{
int r,c;
int fine;
struct mossa m;

fine = 0;
m.valutatore = -99;
for (r=1; r<=8; r++)
for (c=1; c<=8; c++)
if (s[r][c] < 0)
esamina_mossa(s ,r,c,&m,0);
if (m.valutatore == -99)
{
fine = 1;
linee_bianche;
(void)printf(" HAI VINTO.\n");
}
else
{
/* (void)printf("% c",12); */
linee_bianche;
(void)printf(" DA %1d %1d\n",m.a,m.b) ;
do
{
(void)printf(" A %1d %1d\n",m.a1,m.b 1);
muovi(s,m.a,m.b ,m.a1,m.b1);
m.valutatore = -99;
if (abs(m.a1-m.a) == 2)
esamina_mossa(s ,m.a1,m.b1,&m,1 );
}
while(!( (m.valutatore == -99)
|| ( (m.valutatore <= 18)
&& ( (m.a==1) || (m.a==8) || (m.b==1) || (m.b==8) )
)
));
}
return fine;
}
static
esamina_mossa(s ,r,c,m,mangia_s olamente)
scacchiera s;
int r,c;
struct mossa *m;
int mangia_solament e;
{
int r1,c1,dr,dc;

for (dr= -1; dr<=1; dr++)
for (dc= -1; dc<=1; dc++)
if ((dr!=0) && (dc!=0) && ((s[r][c]==-2) || (dr==1)))
{
r1 = r+dr;
c1 = c+dc;
if (posizione_in_s cacchiera(r1,c1 ))
{
if ((s[r1][c1] == 0) && ! mangia_solament e)
valuta_mossa(s, r,c,r1,c1,m);
else
if ( (s[r1][c1] > 0)
&& (abs(s[r][c])>=
abs(s[r1][c1]))
)
{
r1 += dr;
c1 += dc;
if
(posizione_in_s cacchiera(r1,c1 ))
if (s[r1][c1] == 0)

valuta_mossa(s, r,c,r1,c1,m);
}
}
}

}
static
valuta_mossa(s, r,c,r1,c1,m)
scacchiera s;
int r,c;
int r1,c1;
struct mossa *m;
{
int dr,dc,v;

if (r1>r)
dr = 1;
else
dr = -1;
v = 0;
if (r==1)
{
if (s[r][c] == -1)
v-= 8;
else
v-= 1;
}
if (dr ==- 1)
v+= 1;
if (s[r][c] == -1)
v+= 2;
if ((r==8) || (r==1))
v+= 4;
if (s[r][c]==-1 && r1==8)
v+= 8;
if (abs(r1-r)==2)
v+= 20;
else
if (presa(s,r,c))
v+= 6;
for (dc= -1; dc<=1 ; dc++)
if (dc!=0 && posizione_in_sc acchiera(r1+dr, c1+dc))
{
if (s[r1+dr][c1+dc]<0)
v+= 4;
else
if (s[r1+dr][c1+dc]>0 &&
possibile_presa (s,r,c,r1,c1,dr ,dc))
v-= 8;
}
if (v > m->valutatore)
{
m->valutatore = v;
m->a = r;
m->b = c;
m->a1 = r1;
m->b1 = c1;
}
}
static
possibile_presa (s,r,c,r1,c1,dr ,dc)
scacchiera s;
int r,c,r1,c1,dr,dc ;
{
int cas_davanti_vuo ta;
int cas_dietro_occu pata;
int avversario_temi bile;

if (posizione_in_s cacchiera(r1-dr,c1-dc))
{
cas_davanti_vuo ta = (s[r1-dr][c1-dc]==0) ||
(r1-dr==r) && (c1-dc==c) ||
(r1-2*dr==r) && (c1-2*dc==c);
avversario_temi bile = s[r1+dr][c1+dc] >= -s[r][c];
cas_dietro_occu pata = 1;
if (abs(r1-r)==2 && posizione_in_sc acchiera(r1+2*d r,c1+2*dc))
cas_dietro_occu pata = s[r1+2*dr][c1+2*dc] != 0;
return cas_davanti_vuo ta && cas_dietro_occu pata &&
avversario_temi bile;
}
else
return 0;
}
static
presa(s,r,c)
scacchiera s;
int r,c;
{
int dr,dc;
int p;

p = 0;
if ( (r>=2) && (r<=7) && (c>=2) && (c<=7) )
for (dr= -1; dr<=1; dr++)
for (dc= -1; dc<=1; dc++)
if ( (s[r+dr][c+dc] > 0)
&& (s[r-dr][c-dc] == 0)
)
p = p || (dr==1) || (s[r+dr][c+dc]==2);
return p;
}
static
help()
{
(void)printf("D ama (c) 1987 - Dario Dariol\n");
(void)printf("\ n");
(void)printf("I l computer (nero) gioca contro l'avversario (bianco)\n");
(void)printf("a dottando le regole della Dama italiana.\n");
(void)printf("L 'unica eccezione e' che le prese NON sono obbligatorie\n" );
(void)printf("\ n");
(void)printf("L e mosse vengono comunicate scrivendo riga e colonna\n");
(void)printf("d ella casella da cui si muove o su cui si arriva.\n");
(void)printf("U no 0 significa abbandono e/o mossa scorretta.\n");
(void)printf("\ n");
}
main()
{
help();
inizializza(s);
while(1)
{
stampa_scacchie ra(s);
if (leggi_mossa(s) )
break;
if (elabora_mossa( s))
break;
}
}
Jul 19 '05 #18
Dario escribió:
E.g. see the following C programs that play Draughts
(Dama in italian) written on september 1989:
(snip)
help()
{
(void)printf("D ama (c) 1987 - Dario Dariol\n");


1989 or 1987?

Regards.
Jul 19 '05 #19
jce
"Jacob" <ja***@yahoo.co m> wrote in message
news:3F******** ******@yahoo.co m...
Harley wrote:
The fact that 15 years old Cobol (or C or PL/1 or UniFace)
software is still out there is no *proof* that it has
outlived time. Maybe it's is just written in a way that
makes it impossible to move on.


Or that it works and has done what it was supposed to for 15 years.
That's like saying that everyone over 75 has outlived their time coz they're
not supposed to be that old.

JCE
Jul 19 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

253
2785
by: James Cameron | last post by:
Hi I'm developing a program and the client is worried about future reuse of the code. Say 5, 10, 15 years down the road. This will be a major factor in selecting the development language. Any comments on past experience, research articles, comments on the matter would be much appreciated. I suspect something like C would be the best based on comments I received from the VB news group. Thanks for the help in advance James Cameron
0
9707
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9585
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10586
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6856
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5658
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.