design

What is the difference between system configuration and system state ?

Today in a design meeting we discussed the topic of where to store configuration and state of a distributed application. It turns out that in that meeting, some developers understand different things when they hear configuration or state. Some even think that configuration and state are exactly the same thing. My very shortly summariz...

Need ideas for where to start on RateMyProfessors-type site

I'm trying to create a website that accepts submissions into a form, and then later on I can display it in tables organized by categories, similar to how RateMyProfessors does it: http://www.ratemyprofessors.com/SelectTeacher.jsp?sid=399 To me, my main concerns are: Figuring out a good way to read in submissions and save it into a da...

How to process Oauth nonces on the server side ?

I am writing the provider part of the OAuth protocol on the serverside and I'm cracking my ahead over how much of the nonces sent by OAuth consumers that I need to cache. According to twitter's docs, Twitter will only allow a nonce to be used once by your application. Prevents replayed requests. The question: My implementati...

Custom master page for dialogs

I am using a custom master page for branding, but the way I have designed it makes popup dialogs (like new item for lists) look terrible. I know I could probably change the design to make it work, but that would break the actual page (which for the moment looks perfect just the way it is). My question therefore is this: Is it possible t...

WPF/Layered Architecture Question -

I'm thinking through the high level architecture of a WPF application. Usually I would think in terms of this A database server A data access layer on its own server A business logic layer on its own server WCF wrapper round the business layer UI Layer for use on the client. E.g. a thin client with all the magic happening on remote...

Database connection/update mechanism for continuous data

I am working on system where there are huge (2000-5000 records per minute) amount of incoming events which have to be recorded in the database (SQL server 2000). We are using ODBC connection to connect with the database. Currently we open a single connection during the app startup and push the data using the connection since we won't be...

MVC (codeigniter) design question

users want to see some reports from stored data in the db for example: all sales in a time interval (user submits a just a time interval), all the sales in the selected city in a time interval (same with above but this time extra city select dropdown), top selling 20 shops (another report , no form submission and different db tables i...

How to designate "priority" levels in a database application "low" "normal" "high"?

I'm working on a database-driven web application that must keep track of "tasks" that are assigned to users by management. I was told that the tasks should be categorized by priority: "low", "normal", or "high". I told the manager who described the requirement this way that I am familiar with another application that keeps track of tas...

Single instance with methods in java

Hi, I am wondering about programming decision - which I think is matter of style. I need to have single instance of class which has only methods and no attributes. To obtain that in java I have two options: create an abstract class with static methods within, thus it will not be possible to create any instance of the class and that...

Android or iPhone OS - Programmatically enabling/disabling certain functionality

Hi all, I asked this a while back and didn't get anything useful. I'm hoping now that Android has advanced a few releases, that there will be more options. Here are the things I'm trying to accomplish: Prompt for a PIN when you uninstall a particular app. This would have been set at install time by the user. Disable certain services (...

Incorrect icon size when imported to exe

EDIT: Solved, (at least for the explorer) the problem was it keeps the old thumbs.db. I have a png icon and I've created a 128px, 96px, 64px, 32px, 16px icon using several tools. But the result is always the same.. when I compile the exe using that icon and resize to max icon size, it stays to something like 32-48px. Anyone got the same...

How to make custom buttons in vb.net

Do you know of any tutorial that could help me make a custom button in vb.net. Because visual studio 2008 doesn't allow you to create buttons in circle or triangular shapes. I've tried searching and found this one but, I cannot make use of it because there are lots of errors. http://www.codeproject.com/KB/buttons/CButton.aspx ...

What is the algorithm for counting the number of 1's and 0's in a 16 bit number in lc3 machine language?

Provided adresses: x4000 - address of the input number x4001 - address to store count for 0's x4002 - address to store count for 1's ...

Regular Expressions Algorithm

Given a sub-string, is there a way to generate all the possible regular expressions (most restrictive to least restrictive) that would match that sub-string for a given string? For example, say you have a sub-string "orange" and a string "apple banana orange grape". How would I get a list of regexes that match "orange" (I know there wil...

What are the essential elements of a workflow?

Long version: What would be the essential elements/components of a workflow to be implemented in C# (without using any part of WF 3.5 or WF 4)? Note I: I want to implement a master-slave communication where server-side is always passive(slave) and my workflow mainly performs tasks related to such communication scheme. Note II: Since i...

What would be the best way to wrap up this void pointer?

Alright, I have library I wrote in C that reads a file and provides access to its' data. The data is typed, so I'm using void pointer and a few accessor functions: typedef struct nbt_tag { nbt_type type; /* Type of the value */ char *name; /* tag name */ void *value; /* value to be casted to the corresponding type */ ...

Which programming tools techniques have empowered you most?

I'm curious which programming tools have empowered you as the programmer the most. By empower I essentially mean tools have made complex tasks simpler (both conceptually and implementation wise). I am talking about Objective C and Cocoa primarily, although I suppose this question is rather language independent. For instance, before I di...

Why does fwrite have both size and count parameters when just bytes to write would suffice?

Possible Duplicate: What is the rationale for fread/fwrite taking size and count as arguments? In C, fwrite and fread take both the number of elements to write and the size of each element. It seems like just having a parameter that tells the number of bytes that should be written would more obvious and more general because th...

Database schema design for schedules

Hi! I have two tables: Companies and Employees. I also have a relation table Employs which contains the foreign keys company_id, employee_id as a composite primary key. Note: employees can work at multiple companies. I would like to have another table EmployeeSchedules which simply contains schedules (company_id:integer,employee_id:in...

AI and Design of an El-fish like simulator environment?

Hi there, first post here on stack overflow, hoping to get some advice on how to construct a simulation program akin to the 1993 maxis simulator known as El-Fish wiki here , Also, game info here . Are there known "Simulation system" algorithm groups that can function and create real life interaction etc... e.g. the visualization known a...