Hi, this is a general question regarding method block structures. Does anyone have an opinion on what is a better way to design methods given the 2 alternatives below?
private void Method1()
{
if (!A)
{
return;
}
if (!B)
{
return;
}
if (!C)
{
return;
}
// DO WORK.......
...
I am discussing with a friend about design. He proposes a solution, and I propose a different one. My feeling is that we are both right, it's just a matter of "preferring blue to green" but I was wondering if you know good strategies to distinguish between a good and a bad design, provided that they both solve the issue. Simplicity is no...
Suppose I have a function that performs some task (this is in Python pseudocode):
def doTask():
...
But I have several optional features on the platform which results in having code that looks like this:
def doTask():
...
if FEATURE_1_ENABLED:
...
if FEATURE_2_ENABLED:
...
...
Unfortunately, this...
Possible Duplicate:
Human factors design (meeting psychological needs in UI design)
What should a developer know about user interface design, usability and less technical aspects of human computer interaction?
What knowledge of usage scenarios, user behavior patterns and the psychology of user to computer interaction should w...
I'm running into problems implementing statuses for a model. This is probably due to wrong design.
There is a model which has a status. There can be multiple instances of the model and only a few predefined statuses (like: created, renewed, retrieved etc.). For each individual status there is some calculation logic for the model. E.g. m...
Classic scenario, where an order has order lines.
The client wants to be able to apply a rebate to the entire order, that is either a fixed amount or a percentage.
What would be the best way to implement that?
I am thinking storing two fields on the order-object:
Rebate fixed amount
Rebate percentage
And then I can calculate the t...
This morning, I was reading a news article on Apple (either Snow Leopard or FCC), and I came across a part that referred to an old book by Apple (IIRC), that had two parts, and the first part was just on UI design. I was trying to get a copy of that book, but it seems I lost the link to the article. Does this book ring a bell with anyone...
I have been working with ASP.NET MVC for a couple of months now and I'm still not happy with the layout of my project's solution. I am trying to construct a mid-sized website CMS that is as portable and reusable as possible and there are some obvious problems in the design of it. I am looking for some advice regarding how I should struct...
I'm doing formal method and one of the project is to create a finite machine interpreter using java.it needs to read NFA from a text file and then convert from NFA to DFA. It also needs to output DFA to a text file.Then it goes to run through the symbol input and process DFA showing result whether accept or reject.
I don't have much of ...
Hello, I'm interested in how the protocols (and game loop) work for these type of games; any pointers or insights are appreciated.
I guess the main loop would have a world state which would be advanced a few "ticks" per second, but how are the commands of the players executed? What kind of data needs to go back and forth?
...
I am developing the ability for administrators to log in and I'm to the point of creating the admin log-in page, but I'm somewhat torn as to where the best place to put it.
For details, this is part of an MVC framework, and the administration portion is in it's own folder - /admin; so administration is completely separate from the publi...
How can the progress of designing a large programming project be measured to assure managers that employees are in fact moving forward?
...
I was demonstrating my WPF application to a customer and he asked me if I have LDAP or can integrated with Active Directory (AD).
My application has its own in-build user security and data access security. I use my security framework to authenticate and give rights on screen and data access. The client asked me if I could add or integra...
I am using Python for automating a complex procedure that has few options.
I want to have the following structure in python.
- One "flow-class" containing the flow
- One helper class that contains a lot of "black boxes" (functions that do not often get changed).
99% of the time, I modify things in the flow-class so I only want code ther...
Hi SOlers,
some time ago we implemented impersonation into our application (a DMS system). We did this because the users should not have access to the physical files of the document pages.
So the user logs into our application, gets impersonated to a special user so he can access the files he needs from within our application.
When th...
What is a good design for a set of exception classes? I see all sorts of stuff around about what exception classes should and shouldn't do, but not a simple design which is easy to use and extend that does those things.
The exception classes shouldn't throw exceptions, since this could lead straight to the termination of the process wi...
Our in-house system is built on SQL Server 2008 with a 40-table 6NF schema. Most of the tables FK to 3 others, a key few as many as 7. The system will ultimately support 100s of employees working with 10s of 1000s of customers and store 100s of 1000s of transactional records -- prime-time access should peak at 1000 rows per second.
Is...
At my place of work a few people think it's OK to have platform specific configuration items (things like back-end host names/IP addrs, DB connection details etc)
imbedded (as .properties file(s) ) in application packages (a Web App .war file). I think this is a bad bad thing for the following reasons:
there needs to be a separate pack...
I was talking with a programmer pal of mine about inheritance and its use in designing models. He's a big proponent and I'm a little more tepid. Mostly because I tend to design systems from the bottom up: Database -> Application -> Presentation (honestly, I'm not much of a front-end guy, so I often leave presentation entirely to someone ...
I am developing an application similar to Yahoo Answers and debating whether to use tags or categories. Most of the other Q&A sites use categories. Which one do you guys prefer and why.
...