design

How many function parameters is too many?

I was just writing a function that took in several values and it got me thinking. When is the number number of arguments to a function / method too many? When (if) does it signal a flawed design? Do you design / refactor the function to take in structs, arrays, pointers, etc to decrease the amount of arguments? Do you refactor the da...

Safe Width in Pixel for Printing Web Pages?

What is the safe width in pixel to print a web page? My page includes large images and I want to make sure they will not be cut of when printed. I know about different browser margins and US Letter / DIN A4 paper sizes. So we got standard letter sized and some default DPI values. But can I convert these into pixel values to specify in...

Techniques for redesigning convoluted UI

I'm sure you've all seen them. Line of Business UIs that have logic such as: "When ComboA is selected, query for values based on that selection, and populate Textbox B", or "When ButtonC is pressed, disable Textboxes C and D", and on and on ... it gets particularly bad when you can have multiple permutations of the logic above. If pres...

Important UI Features That Are Often Left Out

I really want to know if I'm missing anything obvious in the software I'm developing. What User Interface features that you consider important are often missing in most software? ...

best name for object for collection of semantically-related inputs?

I'm writing an HTML form generation library. There's a top-level Form class, and at the bottom there are classes for each type of HTML form input object (Select, Textfield, Radio, etc.). There's a class in between, that holds groupings of 1 or more semantically related input objects. For example, one type of this class could be called '...

Querying Complex Data Structure in Memory

Hi all, First time posting to a questions site, but I sort of have a complex problem i've been looking at for a few days. Background At work we're implementing a new billing system. However, we want to take the unprecedented move of actually auditing the new billing system against the old one which is significantly more robust on an on...

Designers to Developers-What should I know?

This is a broad question, so let me narrow it a bit. I am a graphic designer entering the world of web design. I'm not totally green in this field, but I know enough to know that I have a lot to learn. From friends and from posts on this site I realize there is often a harmful disconnect between design and development. I'm getting read...

On K.I.S.S and paving cowpaths

I'm currently developing a PHP application that's using an Access database as a backend. Not by choice you understand... the database is what the client used originally and using it is part of the requirements. One of the problems with this database is that the column names have the most insane naming convention you could possibly imagin...

What are important points when designing a (binary) file format?

When designing a file format for recording binary data, what attributes would you think the format should have? So far, I've come up with the following important points: have some "magic bytes" at the beginning, to be able to recognize the files (in my specific case, this should also help to distinguish the files from "legacy" files) h...

BDUF or LDUF? Which one does your shop advocate and why?

Our shop is undergoing some changes in different areas when it comes to how we carry out our development projects. Originally, being a large organization, we've traditionally followed an only slightly modified waterfall model (not my choice!!!). Essentially spending time first on requirements, then lots on design, then lots on coding, th...

How would I approach building a results predictor for a Football Management sim ?

I'm looking for some food-for-thought on how games like Football Manager and Championship Manager achieve a fairly high level of realism when it comes to simulating realistic scorelines. I am conscious that some of these algorithms would probably fill shelves but I'm looking for a more lucid overview. Even some pseudocode which outlines...

Mediums to try out algorithms?

By definition algorithms are independent from the medium they run on. E.g. I use Excel tables to play with data structures and to do some move/shuffling/marking experiments before implementing an algorithm in a programming language. What tools and techniques do you use to design and simulate the function of an algorithm? How do you use...

Defining templates for common look and feel pragmatically

I have a new project which simply put, is an attempt to formalize the look and feel of all of our departmental pages. I Googled around and found many tutorials which discussed the pros and cons of several techniques. And from what I've been reading, the thing I'm ooking for is controls. Basically, I want a common header and footer. <hea...

I need to combine several methods without adding some data members. Any ideas?

Lets say I need to write several functions processing some data. These functions are performing a single task - some mathematical calculations. I suppose there is no need to combine them with some data members. Shall I use: a class without data members and declare these functions as static methods so I can use them without creating cl...

What is the best design for an inquiry system (email to database) automatically filtered by some category?

We are working on an inquiry management system using J2EE. We're looking at a feature, allowing users to send inquiries to particular mail-id and entering into the database. Catch is to automatically allocate it to some categories. ...

Reasoning behind ASP.NET MVC ActionResult being an abstract class?

In ASP.NET MVC, the ActionResult class, which is the base for all results returned by action methods from a controller, is defined as an abstract class with the single method ( Microsoft): public abstract void ExecuteResult(ControllerContext context); Can you think of any specific reasons for this design? Specifically, it seems a bit ...

Flex Icon on Button sizing [Design]

I would like to size the width of my button according to its icon image. I tried to force padding to 0 with no success. In a tile <mx:Button id="m1" icon="@Embed('m1.png')"/> See the result http://img513.imageshack.us/my.php?image=iconkg3.png How could i change this gap ? Thanks. ...

Best way to use Linq2Sql?

I'm struggling to think of a good way to use linq2sql, simply I want to use it, but I can't figure out whether it's best to wrap up the linq2sql generated classes inside my model classes providing some form of generic abstract base class / or interface for the common methods on my model classes like add, update, delete etc, or to extend ...

Should I design the application or model (database) first?

I am getting ready to start building a new web project in my spare time to bring to fruition an idea that has been bouncing around my head for a while. I have never gotten down whether I am better off first building the model and then the consuming application or the other way around. What are the best practices? What would you build ...

C++ design question - Network packets and serialization

I have, for my game, a Packet class, which represents network packet and consists basically of an array of data, and some pure virtual functions I would then like to have classes deriving from Packet, for example: StatePacket, PauseRequestPacket, etc. Each one of these sub-classes would implement the virtual functions, Handle(), which w...