I am writing a simulation of Bananagrams. Currently, I have a GameMaster class that maintains the common collection of pieces. The deal(Player) method deals a certain number of pieces to that player.
I want to write unit tests for this. However, at this point, I have no getters, and thus no way to check the status of the objects.
Why n...
I am trying to design the interface that will be used internally for my application. Following Google's example, I strive to reduce public API clutter. However, there are some convenience methods that are defined in terms of the minimal methods. What factors should I consider as I seek a balance between convenience and tidiness?
Google ...
I'm implementing a system where a customer can use vouchers to gain discounts for a purchase. If a voucher can be used for a certain purchase depends on several circumstances.
For example:
Proper voucher code - is the code correct?
Validity Range - is the voucher still valid?
Can the voucher be used with the type of purchase?
Comb...
Today I saw a job description that requires "significant experience coding in C++ and a thorough grounding in structured design principles", so I thought about what these principles are. First I felt it was a little odd to see C++ and "structured design" in one sentence, then I thought, OK C++ is a multi-paradigm programming language, so...
Back couple of months ago I attended a presentation hosted by two representative of an independent software development company. It was mainly about good software design and practices.
The two guys were talking mainly about Java and I remember them saying, that in some circumstances it is very good practice to use getInstanceOf() instea...
Do you think it's a good practice to implement a possibilty to allow an administrator user to login in as another user, by-passing password? This could by implemented by a master password or a function inside the user administration, "Login as this user".
Administrators are asking for a such function to be able to try to reproduce a re...
I've been charged with the following tasks for a group project:
a) Design/Draw an Architecture Context Diagram
b) ACD Description
c) UML deployment diagram
The UML deployment diagram is no issue as there are plenty of straight-forward resources online but this is not the case for the ACD.
I need resources on exactly what an ACD is and...
I need to introduce basic design principles in my team. I am looking for books which are not restricted to only object oriented design principles. And which can cover concepts such as Modularity, Information hiding etc.
Just for information - The implementation language for all the project in our team is C.
...
In a generic sense of the MVC, is the relationship of the View and Controllers generally expected to be M:1? That is, many views will use the same controller? But a view will not use many different controllers?
Or, should I be able to swap any view with any controller and have everything work? I see a rather tight dependency between th...
When I read articles on software development, I often heard of the phrase "clean interface". People talked about clean interface for APIs, and classes.
How do you define "clean interface"? Is there any guideline for designing a system with clean interface?
...
I've had a few instances where I've been asked about my approach to software design both in job interviews and in less formal settings. Lots of buzz words invariably come up: waterfall model, agile development, design patterns, UML, test driven development, requirements documents, user acceptance testing etc. etc. ad infintium.
My answe...
Let's assume that Stackoverflow offers web services where you can retrieve all the questions asked by a specific user. A request to get all question from user A can result in the following json output:
{
{
"question": "What is rest?",
"date_created": "20/02/2010",
"votes": 1,
},
{
"question":...
Hi,
I always again encounter discussions about where to place the business logic: inside a business layer in the application code or down in the DB in terms of stored procedures. Personally I'd tend to the 1st approach, but I'd like to hear some opinions from your part first, without influencing you with my personal views. I know there...
Hi All,
I am working on a web application which has got good amount of static or pre-login pages. These pages can have some simple forms as well where we would like to capture the visitor's details. Post login, I have got my main application.
I am confused about the development and deployment architecture of my application. Post login ...
I have an analytics web service that provides pageview statistics for several separate websites that are all serving up press releases. The analytics service pulls data for each of its client sites from Google Analytics and then answers API calls like "give me the 10 most viewed press releases for the past week."
I want each of the pres...
I need to generate HTML snippets using jQuery. The creation of those snippets depends on some data. The data is stored server-side, in session (where PHP is used).
At the moment I achieved this
- retrieving the data from the server via AJAX in form of JSON
- and building the snippets via specific javascript functions that read those dat...
I own and have read most of this book, a while back. Now I'm about to embark on a pretty large project and was wanting a refresher. Anyone got a recommendation of something similar that has a focus on C#/.NET. I know the principles remain, but if only for my readability.
...
I am thinking about implementing a program with finite state automaton in an OOP language like Java or C++.
What would you think is the best way to implement this with a manageable amount of available states, regarding to good software design?
Is it good to implement for each state an own class?
If yes, how to do the bridge between two...
I'm trying to figure out the best way to register my C++ Classes constructors with Lua (from a software design perspective, not a coding perspective)
How shall I do this ?
My Ideas:
1) Make some kind of "init Lua bindings" file which binds each of the C++ constructors that I want to have available in Lua ? (problem: this file would ...
Hello All,
I am tasked with building a process which will compensate for replication delays on our LDAP system. Currently, there is one write server and 4 read servers. After writing an entry to the write server there can be up to a 4 second delay on the system before the entry is replicated to the read servers. Therefore, if I call ...