|
Dear friends,
Consider the following simple program:
int a= 2, b= 3, c=23, d=5, e= 12, f= 30, g= 100;
if(g>a)
{
DoSomething();
}
if(a==2 && c == 21)
{
if(d== 5)
{
DoSomething
}
else if( e == 4)
{
DoSomethingElse();
}
}
As can be seen from the above program, there are two if conditions in order to fullfil the
client's requirements. The client informed us about these conditions and so we included these
conditions in the program and sent the software to the client.
Now, after few days, the client made a call to us and said that he wanted another condition:
if(d==2 || e==11)
{
DoSomething();
}
So we added this condition in the program, compiled it and sent the copy to the client.
Similarly client again called us and asked us to add some new conditions and this situation
is going on and on. client is daily calling us to add new conditions.
Now we want to give something generic to the client i.e we want to add some feature such that
there is no need for client to call us , instead he should be able to define his conditions himself
whenever he likes and able to customize it.
Can anyone suggest me the solution of this problem ? DO i need to add scripting support ?
The client is not too much technology savvy, so i like to avoid scripting, however if there
is no other solution then i need to give scripting support. If you suggest scripting then whaat
do you think will be the best solution VBScript or something else ??
Oh yes, the functions DoSomething() and DoSomethingElse() are predefined. The client will not write new functions. Instead he should be able to define new *condition* and tell that which of these predefined functions gets called if condition is met.
Imtiaz
|
|
|
|
|
sounds like you want us to do your homework
seriously though, if hes paying for the support on a per job basis then just add it in as he asks for it.
Bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
bryce wrote:
sounds like you want us to do your homework
Seriously though, i was not expecting this kind of reply here at Code Project Visual C++ forum. This is not a school work. I only defined my actual problem in simple words and wrote a simple source code above. The actual code is something else. I defined problem in simple source code in order to avoid complexity. The actual software is that of Stock Exchange. There are no variable like a,b,c as described above. The problem is the same.
Imtiaz
|
|
|
|
|
Imtiaz Murtaza wrote:
Seriously though, i was not expecting this kind of reply here at Code Project Visual C++ forum
you didnt re-read my post and you obviously dont read the forum much or you would be aware we get a truckload of "solve my homework" type questions and quite frankly your one looks like one.
I did however post a thought on the issue, a further two or 3 thoughts occur to me - one of them being the fact your customer is not tech savvy so keep the tech stuff away from them or they'll stuff it up and you'll have to fix it for them,
Bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
I would just add some settings file, if you don't have one yet. There you could add smth like this:
[Custom]
DoSomething=...
DoSomethingElse=...
Given the possibilities you have, you will have to think over what to write in keys to be simple enough for end user to edit it.
Alternatively, you could add some settings dialog which you will adjust to it.
|
|
|
|
|
Imtiaz Murtaza wrote:
DO i need to add scripting support
Given the varying nature of the additions I would add some simple scripting. However I do not think that you (your company) will get away with asking the client to do the changes.
Given that you do add scripting a decent technical person could do the appropriate work on site (or even remotely). This removes the illness from development building and testing a new release.
You will still be able to charge the customer for a technical consultancy day or 1/2 day. You could also add that sort of change to the maintenance agreement albeit a few free callouts per year.
Saying all that. These minor changes will eventually fizzle out. You will have to weight up the pros and cons of adding scripting and see if it is indeed beneficial.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Hi,
If I have the modulus and exponent of a public key, is there any method to import it using Crypto API?
thanks
|
|
|
|
|
Does GetVolumeInformation work on DVD's too?
Does every CD/DVD ever made have a unique serial number?
Does GetVolumeInformation return the serial number thats physically visible on each CD???
Cheers
How do I print my voice mail?
|
|
|
|
|
Has empirical testing not provided the answers to these questions?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi.
i need some help for comparing images.
plesae some help or web site for this techinques.
Thanx
On Earth nothing impossible,
while your mind running.
Faroqtam
|
|
|
|
|
That's a broad question. Do you want to know if images are the same ? If one appears within another ? If both have a similar histogram ? If they have similar shapes on them ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi Christian
I need some help for comparing images regared to them shapes,tha is mean if them equal or no.
please some source code.
thanx alot.
On Earth nothing impossible,
while your mind running.
Faroqtam
|
|
|
|
|
Hi Christian
I need some help for comparing images regared to them shapes,tha is mean if them equal or no.
please some source code.
thanx alot.
On Earth nothing impossible,
while your mind running.
Faroqtam
|
|
|
|
|
This seems like a difficult subject. If you were to compare images on a bit / byte level they could look somewhat different, even though they visually look the same. I guess there are a lot of mathematics involved.
I don't know of any web sites though I suppose you could try google if you have not done so already.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Hello, I was wondering if there is anyway possible of creating a fancy File Edit menu, like Office 2003 using just regular Windows APIs and NO MFC! I personally do not like MFC, I don't like Microsoft, so I was wondering if anybody could point me in the right direction with my problem
-Ryan M.
|
|
|
|
|
Ryan McDermott wrote:
I don't like Microsoft
OK, then why create an Office-2003 like menu?
Seriously though, imho you're much better off using MFC. See this[^] article for a very helpful set of classes.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
OK thanks, I have tried MFC many times but I still can not grasp it. I heard that microsoft doesn't even use MFC they just push it on other people. I have been doing C++ for more than 2 years, I have done 50+ projects but 0 MFC projects. I understand the object oriented concepts extremely well but half that crap code doesn't even look like C++. I want an alternative to MFC. Is there any?
-Ryan M.
|
|
|
|
|
Ryan McDermott wrote:
I heard that microsoft doesn't even use MFC
What's your source? Whoever it is, they're dead wrong since the VC 6 IDE is an MFC app.
Anyhoo, I know MSDN has a sample that shows how to make a toolbar that looks/acts like a menu.
Ryan McDermott wrote:
I want an alternative to MFC. Is there any?
WTL[^]
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb
|
|
|
|
|
Thanks Michael you're a god I guess I will try MFC. I always though the Visual Studio IDE just used regular windows APIs. My Dad's friend that works for IBM, has a few friends at microsoft and that's who told me about Microsoft and MFC.
-Ryan M.
|
|
|
|
|
Ryan McDermott wrote:
My Dad's friend that works for IBM, has a few friends at microsoft
They didn't fire him for that ? :P
He may have been thinking of apps like Word, which predate MFC, and I believe continue not to use it. The reason is the cost of a rewrite, not any problem with MFC itself.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
OK I have always assumed that. I might open up Word or Visual studio in a hex editor and take a look at what DLLs they are linked to
Does anybody have any tutorials on MFC? I would appreciate it.
-Ryan M.
|
|
|
|
|
Ryan McDermott wrote:
Does anybody have any tutorials on MFC? I would appreciate it.
I hear there's a cool site called CodeProject with heaps of MFC articles on it.....
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
ok ok, very cocky now. I have read many a article here at codeproject and I can't really understand all the MFC headers and all those weird APIs. Everything in MFC is so sloppy and I thought it was designed so you can be more productive. Quite the contrary, you write endless lines of classes and macros and where does it getcha? Half of what I say is probably wrong and you all might contradict me but I just am not all that fond of much Microsoft stuff.
-Ryan M.
|
|
|
|
|
|
Ryan McDermott wrote:
Everything in MFC is so sloppy
MFC is an attempt to OO Win32. It's not perfect, by any means. Your best bet is to work your way through some examples, and learn a bit at a time.
Ryan McDermott wrote:
you write endless lines of classes and macros
You shouldn't have to write any macros. Macros are evil. I don't think you need to write endless classes either. Have you done any Win32 ? It's a lot more verbose.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|