Guidelines for GUI design for a risk analysis app [closed] - mfc

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
In my free time, I'm working on a risk analysis application. I have already finished the mathematical and simulation engines, but I'm stuck with the design of the user interface. I want my application to be as easy-to-use as possible for Excel users, but I don't want to make it an Excel add-in, because Excel takes ages to load add-ins. So I'm going to use the old and venerable MFC.
I want to make these things easy in my application:
Modeling tasks:
Defining probability and uncertainty distributions
Defining mathematical relations between the variables
Separating uncertainty from variability (second-order risk modeling)
Validating the risk model
What-if (sensitivity) analysis
Data manipulation/display tasks:
Importing/exporting data from/to Excel and databases
Displaying nice graphs to the user
Do you know any guidelines I could take into consideration in the design of the user interface? The only examples I know, LINGO and Rockwell Arena, are actually examples of what NOT to do. Perhaps I will need to include a simple scripting language in the system but, in that case, it will be an option for advanced users, not for everybody.

1) For risk-specific functionality (at least, in financial world), one of the important guidelines is to allow easy viewing of summary level risk as well as easy drill-down to details (e.g. enterprise-wide down to security level)
2) Plus, don't forget standard GUI design guidelines - there's always Nielsen and there's JoelOnSoftware's Joel Spolsky's design book and series of articles.
High level,
make sure your controls are intuitive (do what the user expects them to),
minimize the amount of work (eye and hand movements) user needs to do to accomplish most frequent tasks,
Allow easy linking (e.g. no dead ends - if you are displaying a list of securities, make an easy way to jump from security's name to detail screen for that security)
Always always usability-test.

Related

Ecology C++ Code [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
New to C++ and stuck on how to start coding this problem which is an Ecology question at first to start a cell with plants antelopes and tigers. Based on initial population, birth rates, food supply, dying off and migration into other cells (once 1 cell is discovered then can expand more). Did some tests on paper to see that plants are going to need a Cap because plants multiply more than antelopes can eat them. I dont really know how to start this if anyone can give me a starting point then that will be grateful.
Thank you.
I sounds like you're trying to build an individual, agent-based, or microscale model: this being subsets of the more general topic of discrete event simulation. Looking into those topics and reading some of the literature and books around them would be a good start.
One way to get started conceptually might be to play with SimPy. Once you think you understand how its pieces fit together and how to build a model, you'll be in a better position to move to a higher-performance language, like C++, where you'll need to build more of the components yourself.
You should also learn how to program. Having to ask a question as general as you are at the beginning of this endeavour should give you pause: people have devoted careers figuring out how to do this the right way. That said: C++ is a decent choice of language because you'll need to run your model not just once, but tens of thousands of times, in order to get an idea of how variable your results are. Remembering that the number of interactions between variables grows exponentially in the number of variables, you'll also want to explore different combinations of environments with an eye to testing the strength of your assumptions.
All of this will also probably require the use of a high-performance environment: you'll want to learn about MPI, R's HPC packages, jug, or Spark: each of which would have to be tamed to work with your implementation of the model.
This paper I recently published has a relatively simple agent-based model, along with an analysis and source code, which might help you get started. It may also help you understand the enormity of the undertaking you propose.

Is my company doing this right, sharing data between exes? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
First off, my company is into power grid, not IT, so software is kinda a secondary role here.
I work on a power system simulation software, very old code base in C++ with MFC, like 15 years old. What we do is take large amounts of data, ~100,000 floating point values then format and write to a text file (most of the code actually uses the C FILE structure to do this). Then, it's read by a separate engine exe which computes the electrical algorithm (Electrical algorithms are mostly numeric solutions of system of diffn equations) and then writes back huge amount of data to another text file, which we read and update the UI.
My question is, is this how it should be done? It there a way to skip writing into the text file and directly pass the data to the exes?
exes are called using CreateProcess() MFC function.
EDIT::
Sorry, site won't let me comment.
#Vlad Feinstein Well, yes, it's like a Ladder. A thing called load flow solves power flow through the lines, which in turn will be used to find stability of the systems, which in turn for overvoltage ect. It's huge, the UI is million+ lines of code, engine exes another million maybe.
Doesn't MFC already implement IPC using Dynamic Data Exchange? I can pass strings to another process's PreTranslateMessage() func. A scaled up version of that?
There is no such a thing as "should be done as ..." there are multiple methods to do IPC and while the method you describe might not be the fastest, it is a viable solution nevertheless. If the performance doesn't bother you in this particular case you should not bother with modifying it. It is exactly the case where the phrase "if it ain't broke, don't fix it" applies.
Probably, you would not want to make any new IPC in the application that way, though.

C++ - Saving & Deleting [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm creating a sample banking programme for fun and I realised I needed some help.
I have it set so that you can create two different types of bank accounts - one for personal and one for a business. I want to be able to save the data given into these accounts & also be able to delete data if they account gets "cancelled" etc.
My idea was to have separate files be created for each account holder - so each person or company will have a file created with the data in it (how much money, name, etc.). Is this a realistic approach or would it just cluster up and take a lot of space? Is there an easier way of doing this? (more efficient or faster).
Note: I don't want a code for this question, I want an explanation on how to approach this problem the best.
Thanks in advance! :)
You can do it with files.
However, eventually as the program becomes complex you'll end up needing more structure (like shared data between multiple accounts), atomicity (no intermediate state visible), transactions (being able to roll back some actions), more throughput, backups, reporting, aggregation, multi-system distribution, check-pointing, migrations and others. You can implement it on top of your file structure, but it's going to be hard.
Luckily there's already a simple solution. It's called a database. You can setup your own instance relatively easy and provides out of the box what you already need and a bunch of features that you didn't think you need right now, but likely you're going to need them at some point in the future.
So checkout a SQL database (like MySql, PostGreSQL, SQlite or some more advanced solutions from Microsoft or Oracle) or one of the NoSQL solutions offered by cloud providers (bigtable for example). At this point any of them is likely to satisfy your need to store, modify and delete data.

Options for hot deployment [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
My requirement is to seamlessly hot deploy code update to a running service without losing the current status, including collection data. Is there any c++ framework out there I can use to develop such a solution?
You probably should read some research papers on dynamic software updating, e.g. on Kitsune (which you might use)
There is a major issue about updating the call stack (and instances in local variables); read also about continuations; and you might have some special case (if your application is event loop driven like most GUI applications are, you probably want to update the code outside of event handlers).
You certainly should think of dynamic software update very early in your design. Perhaps some terminology and concepts from garbage collection & persistence & serialization techniques are relevant.
Your requirement (to seamlessly hot deploy code update to a running service without losing the current status) is very hard and will need a lot of work (probably years) and is still a difficult & interesting research topic (definitely it is a good PhD subject).
You might want to use your own meta-programming techniques, that is generate most of the relevant C+++ support code by your own code generators.
If you already have a significant code base, you could consider customizing a recent GCC compiler with MELT (e.g. to query the compiler's internal representations and generate some code from them) -but even that means a lot of work-
PS. Coding in something better than C++, like Erlang or Common Lisp, would make your goal less difficult.

How do you find a particular piece of functionality in a large codebase? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I was fascinated by the "press Tab to search site" feature in chromium, so naturally I wanted to see how exactly it was implemented in code.
A little background for anybody who aren't familiar with this. After navigating to some site, say wikipedia, and doing a search, chromium remembers the name of the query variable and will let you press tab and search the site directly from the address bar. Neat!
Problem is the codebase for chromium is huge and I've had no luck in finding the method/function that handles this.
How do you approach a large codebase when you are looking for the implementation of a particular piece of functionality? Any tricks for narrowing it down? Preferably it should not require building the software with debug symbols and following the flow through the program.
There is no one size fits all approach to this sort of problem. But for this one I would try these:
If there are any unique messages associated with the operation, grep all the source files for that string. A common pitfall of this technique is that messages might be assembled from pieces within the application, so it is often helpful to grep for a unique short phrase—or even a single word—to identify the source of the message. Once the text is found, then finding what references it often requires more text searches.
Trace execution from an easy-to-find point, like the command processing and dispatch loop. I'd look for a Tab key case and follow where it leads.
Look at source code directory and filenames for hints. Software is often constructed rationally, with good engineers dividing and conquering in a sensible way.
A test coverage tool is a good way to do this. They tell you what part of an application
is exercised by a test.
Instrument the application to collect test coverage. Execute the functionality you care about. Record what is executed. Execute something similar, but not the same as the functionality you want. Record this. Take the set difference over the coverage. The diff selects code involved in the functionality of interest, excluding code which is common to similar functionality.
Ask the Chromium team. They don't give points or bronze pixels but they're definitely the authority and right people to ask this sort of questions.