design

C++ lifetime management of encapsulated objects

What is the best approach to encapsulate objects and manage their lifetime? Example: I have a class A, that contains an object of type B and is solely responsible for it. Solution 1, clone b object to ensure that only A is able to clean it up. class A { B *b; public: A(B &b) { this->b = b.clone(); } ~A() ...

How to Vertically Align a Table in CSS

How can I vertically align a table in the middle of the screen with css? ...

Should User Interfaces be "Sexy"

This is a question I both loathe and respect depending on where it comes from. Its not a question of effective interface design, but rather 'should the UI be a strong selling point for the software product'? This question impacts project planning, design and over-all cost. However you will not find many ergonomic or "sexy" requirements ...

What are good guidelines for writing a design document to ease transitioning?

I am transferring ownership of a project to a team far away. What are tips to smooth the transition? I am wondering about code-level transfer, so anything related to design docs, code-level documentation, etc. How do you document your prototyped code after the fact? ...

Logical versus physical design

I have a very general design question, but I'll frame it in concrete terms with an example. Suppose you're working on embedded software for a digital printer. The machine has 4 print heads (for each of the C, M, Y, K colors). Each print head performs the same task: fetching toner and putting it on the page. At runtime, we could organ...

When to use threading against a scheduled task/web methods

These two may look like they have no correlation but bear with me! In a previous version of the software I develop/maintain there was a web app sitting on top of a web service. There was a scheduled task that run every hour called one of the web methods to carry out some tasks. In the new architecture we now have a web application pr...

PHP 'something like widget' code design

I have a prototype website written in PHP. Lately i've rewritten code to separate logic from layout and database operations. So now I have something like MVC code design. Now what bothers me, is that in MVC I'll have many files and each will display something when combined with other (model+view+controller). So I figured out that it wou...

Implementing a tree in c# managing parent-child

I am implementing a tree think of it as a folder structure so I have a class that looks like: public class Folder { //Various Props like Name etc. public IList<Folder> Children{get;} public Folder Parent {get;} } Now what I want is to be able to walk up and down the tree so given a root I can find a leaf, and given a leaf ...

Repository Pattern - MVC storefront

Have been looking at the MVC storefront and see that IQueryable is returned from the repository classes. Wondering if you are not using LINQ does it makes sense to return that object? In the case of LINQ in makes sense because of deferred execution, so adding filtering in the service layer makes sense, but if you don't use LINQ you wou...

Ideal button Size

My coworker and I constantly argue about button sizes. I like to have buttons that have a fixed size (ie if minimized/maximized the button sizes dont change,other controls may but not buttons), width= text in it and height=27 -30 pixels. My co-worker prefers buttons that are only 20 pixels in height and the width is docked to vary as s...

How can I get into game design coming from a C and Java background?

I have done some C and Java programming but I'm really interested in graphics/game design. What do I need to do in order to pursue this further? If you can share any information with me it would be appreciated! ...

How many variables are too much for a class?

I want to see if anyone has a better design for a class (class as in OOP) I am writing. We have a script that puts shared folder stats in an csv file. I am reading that in and putting it in a Share class. My Boss wants to know information like: Total Number of Files Total Size of Files Number of Office Files Size of Office File...

Communication between modules

I have an application that consists from the following three modules: Search (to search for objects) List (to display the search results) Painter (to allow me to edit objects) - this module isn't always loaded (Each object is a figure that I can edit in the painter). When I open an object in the painter it's added to the objects tha...

Where can I find the source for a small, well-designed C# application (for learning purposes)?

Can anyone direct me to a smallish C# application that would be symbolic of the "right way" to design a program? I'm looking for a relatively simple (potentially trivial) program from which to analyze and learn. The application should have a relatively trivial problem to solve and should solve it in a rather straight-forward way while s...

Balancing HTML/CSS Between Designers and Engineers

I have a development process question. Background: I work for a modest sized website where, historically, the designers created mockups/screenshots of what they wanted pages and components to look like, and the engineering team (myself included) turned them into html/css. This works relatively well from a code cleanliness perspective, ...

auto_ptr design

In my opinion, a class should provide a well defined abstraction and no private members should be modified without the knowledge of class. But when I checked the "auto_ptr" (or any other smart pointer), this rule is violated. Please see the following code class Foo{ public: Foo(){} }; int main(int argc, char* argv[]) { std::auto_...

Letterpress in WPF

How can I achieve the letterpress effect on a text in .NET WPF? ...

Repository Pattern without LINQ or other ORM?

Does it makes sense to use the Repository pattern without the use of LINQ or some other ORM? I am writing an application in MONO and using MySQL, was thinking of using the repositoy pattern but not going to be able to deal with IQueryable. I was thinking of just exposing more methods on the repository to make it obvious that filtering ...

Best Compiler Destination

I've got a few languages I've been building as interpreters. When I'm ready to take "that next step", what options are best for non-native compiled formats... what are the pros and cons of each? I've been looking at compiling to CLR or LLVM, and contemplated C-midcompile a few times, but I'm not completely certain. A few features I'm ...

Generic method for reading config sections

Am trying to implement a generic way for reading sections from a config file. The config file may contain 'standard' sections or 'custom' sections as below. <configuration> <configSections> <section name="NoteSettings" type="System.Configuration.NameValueSectionHandler"/> </configSections> <appSettings> <add key="AutoStart" value="t...