design

Design Modular Web Wizards using .Net 2.0 Wizard Control

We have a bunch of different applications that basically do the same thing written using the Wizard Control for .Net 2.0. At this point there are roughly 10 or so of those applications. The steps are pretty simple: User selects option from a drop downs -> Next page has more options more narrowed -> User sees confirmation page -> Rep...

How can I get clients for my Web Design/Development company when none of my connections need work done?

I've asked everyone I know. I've gone to all the shops near where I live, asking if they'd like a website, and even an online ordering facility, to increase their sales. I've even offered to do websites for free. All I get is either: A) We already have a website B) We don't need/want a website C) We'll get back to you (which they neve...

Designing an application protocol

I have an existing standalone application which is going to be extended by a 3rd-party, using a network protocol. The capabilities are already implemented, all I need is to expose them to the outside. Assuming the transport protocol is already chosen (UDP), are there any resources that will help me to design my application protocol? Th...

What issues do you consider when designing a hash function?

I am not looking for links to information on hashing. I am not looking for the worlds greatest hash function. I am interested in mini-stories describing The problem domain you were working in The nature of the data you were working with What your thought process was in designing a hash function for your data. How happy were you with ...

What is your favorite educational programming pearl?

A pearl is an elegant, instructive and fun example of programming, which teaches important techniques and fundamental design principles. For example, I really enjoyed the programming pearl Automata via Macros. It shows how to build a construct for finite state machines using Scheme macros, while touching upon the importance of tail-cal...

Multithreading vs process

Hi, What factors will you look for, to choose implementing a feature as multi-threaded vs using a single separate process. ...

Can Tables completely replace any CSS design?

Can this be done? This site wants to.. http://giveupandusetables.com/ The site doesn't set a good example though.. ...

What programmers gain from design?

We all can write some program code and just design the solution in our heads. Also when we maintain existing code, we can see the design from the code if it is well written. Many people see documenting as an unnecessary burden that mainly causes extra work because the documents need to be updated too. The other option is that we first c...

Interactions between windows

Hello there, what's the best/proper way of interacting between several windows in C# app? Recently, I've run into a problem where one of program windows has to call method modifying main window. My solution was to create factory-like class, that would arrange all underlying model-data and organize the communication between various wind...

Memento implementation on .NET

I've seen two different implementation of memento on .NET. One is pretty straightforward - The object creates another instance of itself. The other is serializing the object using BinaryFormatter and MemoryStream. Which is the preferred method? Can anyone point out advantages/disadvantages of each approach? ...

Design or prototype first?

When first approaching a project is best to step back and think through everything or just dive in and start coding and polish at a later date? Essentially, do you design first or try to rapidly prototype? I have been burned by both methods, sometimes I try and think everything through but when I actually get down to the nitty gritty I ...

Is nesting constructors (or factory methods) good, or should each do all init work

Is it a good idea (from a design POV) to nest constructor calls for overloaded New or Factory style methods? This is mostly for simple constructors, where each overload builds on the previous one. MyClass( arg1 ) { _arg1 = arg1; _otherField = true; _color="Blue" } MyClass( arg1, arg2) : this(arg1) { _arg2 = arg2 ...

Server application design methodologies

During undergrad i opted to take a network programming course using the POSIX sockets for linux. As a reference we used the book Internetworking using TCP/IP (comer and stevens). 2008 its a pretty dated and still applicatable texts which takes one through several server designs. One design that is not really featured in the book is th...

Separating code from DB functionality

I'm developing an object-oriented PHP website right now and am trying to determine the best way to abstract database functionality from the rest of the system. Right now, I've got a DB class that manages all the connections and queries that the system uses (it's pretty much an interface to MDB2). However, when using this system, I've rea...

What architecture can I use to handle a shopping cart where each product requries different attributes to be saved

I am building an application that is very similar to a shopping cart. The user selects a product from a list, and then based on that product, a few properties need to be set and saved. Example. If the user selects a type of paint that allows custom color matches, then I must allow them to enter in a formula number that they received t...

Inventory database design

This is a question not really about "programming" (is not specific to any language or database), but more of design and architecture. It's also a question of the type "What the best way to do X". I hope does no cause to much "religious" controversy. In the past I have developed systems that in one way or another, keep some form of inven...

OOP: Designing a menu system

Hello! I am currently trying to create a menu system for a game and cannot arrive at any really sound way to do it. There are several menu screens, each of them non-trivial, so that I would like to keep these as separate classes. The main problem I am having is passing control between these menu screens. I tried building each of the scr...

Python's ConfigParser unique keys per section

I read the part of the docs and saw that the ConfigParser returns a list of key/value pairs for the options within a section. I figured that keys did not need to be unique within a section, otherwise the parser would just return a mapping. I designed my config file schema around this assumption, then sadly realized that this is not the c...

What is the best way to implement background services for an ASP.NET application?

My ASP.NET application needs a number of supporting services to run periodically in the background. For example: I need to query the database (or cache) every 1-5 minutes, identify overdue work items and notify users by email I need to generate nightly reports that are then emailed to subscribers Plus other system/non-user admin tasks ...

Is there a good reason for storing percentages that are less than 1 as numbers greater than 1?

I inherited a project that uses SQL Server 200x, wherein a column that stores a value that is always considered as a percentage in the problem domain is stored as its greater than 1 decimal equivalent. For example, 70% (0.7, literally) is stored as 70, 100% as 100, etc. Aside from the need to remember to * 0.01 on retrieved values and * ...