theory

Theories of software engineering

In my career I've come across two broad types of theory: physical theories and educational/management theories: Physical theories are either correct (under appropriate conditions) or incorrect, as judged by the physical world. Educational/management theories have the appearance of being like physical theories, but they lack rigorous te...

What good are SQL Server schemas?

I'm no beginner to using SQL databases, and in particular SQL Server. However, I've been primarily a SQL 2000 guy and i've always been confused by schemas in 2005+. Yes, I know the basic definition of a schema, but what are they really used for in a typical SQL Server deployment? I've always just used the default schema. Why would I ...

Types of computers.

I have read somewhere recently something related to the kind of computers. The reading was related to Lisp and Emacs that fit into an "architectural" model more like a Turing Machine. In the other hand it was C and the "other" architectural model was named after someone whose name I don't remember, but named as the most successful type...

NP-Complete reduction (in theory)

I want to embed 3 NP-Complete problems(2 of them are known to be NP-Complete, 1 of them is my own idea). I saw "this question" and got idea about reinterpreting embedding problems in theory: The Waiter is The Thief. Tables are store. Foods are valued items which has different weight. Thief know all the items' price and weight before th...

What's the difference between these matrix modes?

GL_PROJECTION and GL_MODELVIEW. I know there are others, but I, conceptually, can't figure out what the difference between any of them are. When you load the identity matrix after setting the mode, how is the identity matrix any different based on the mode? ...

Thread communication theory

What is the common theory behind thread communication? I have some primitive idea about how it should work but something doesn't settle well with me. Is there a way of doing it with interrupts? ...

OOP - Where to put the calls to the Data Access Layer?

I am implementing a Data Access Layer (DAL), which is basically a set of classes with (VB.NET) Shared functions to actually execute the database (CRUD) calls. I am trying to figure out the best place to place the calls to the DAL within the class hierarchy. Let me give an example. Suppose I have a class Customer, with only standard ID, ...

Why can't a null-reference exception name the object that has a null reference?

It seems to me that a lot of my debugging time is spent chasing down null-reference exceptions in complex statements. For instance: For Each game As IHomeGame in _GamesToOpen.GetIterator() Why, when I get a NullReferenceException, can I get the line number in the stack trace, but not the name of the object that equals null. In other w...

OOP - Objects For Entities With Master Lists and Object Composition

I'm trying to wrap my head about how to properly implement an OOP design for business objects that: Have a "master list" in a database (ex. classifications) Are a part of another object as a property (i.e. object composition) but with additional properties Here is where I'm stuck on the theory. Suppose that I have a Classification ob...

What manner of professional is a programmer anyway?

Thanks to "Uncle Bob's" recent pontifications on Hanselminutes and the Stackoverflow podcasts, as well as Jeff and Joel's appropriate disrespect of the "SOLID" principles, I've given a lot of thought to questions like "How perfect does a program really have to be?"; "How closely does it need to follow standards and 'best practice' templa...

How do I check if a directed graph is acyclic?

How do I check if a directed graph is acyclic? And how is the algorithm called? I would appreciate a reference. Niko ...

Good Namespace Naming Conventions

I am creating a class library for a CRUD business application. The major "categories" of business objects (with related data access layer objects) are: Maintenance (for working with master tables (master lists) in the database Incidents (most objects relate to a real-world incident) Search (obvious) As of now, my namespaces are set u...

WinForms App Data Caching - In Which Layer to Cache?

We have data that's updated nightly in a database residing in the same instance as my app's database. So to save on database calls, I want to cache this static-for-the-day data into a List(Of MyObject). From a theory point of view, should this cached List(Of ) be cached in the presentation layer code, via a global variable? Should it be ...

Any value to a programmer to understand the CPU in more depth?

It recently occurred to me that I (and I think most people) learned computer programming starting with something like Visual Basic. I began to wonder if we had started at the lower level first if it would be easier now. Do you think it is any value as a programmer to understand things like how a CPU works, the basic instructions, and th...

Tile based game theory

I'm looking for articles on tile based games, like the old ultima 6&7, or even puzzle pirates. Specifically: How they keep track of objects on the map. Objects such as other characters, or trees, or things the character can move. AI behind the characters. How the game handles character behavior for characters on the map that are off ...

Is it possible to "learn" a regular expression by user-provided examples?

Is it possible to "learn" a regular expression by user-provided examples? To clarify: I do not want to learn regular expressions. I want to create a program which "learns" a regular expression from examples which are interactively provided by a user, perhaps by selecting parts from a text or selecting begin or end markers. Is it pos...

Do interpreters actually pre compile in memory?

Ok guys I thought I'd take my old CS notes and look through compiler theory a little more. I have to say I can't for the life in me remember how all this stuff works but I do have a nice sample application from my college days that helps me understand a few things. This sample application takes the made up language and compiles it down...

When should you use a field rather than a property?

Can anyone clearly articulate when you use a field and when to use a property in class design? Consider: public string Name; Or: private string _Name; public string Name { get { return _Name; } set { _Name = value; } } I realize that the second method is more proper and flexible, so that's what I try to use, generally. But ...

Good books on writing clustered applications?

I'm looking for a general, language agnostic, higher-level/theory of clustering book. Think Principles of Transaction Processing, Gang of Four, Patterns of EAA, etc. These books present general ideas, knowledge, and patterns about a particular aspect of application development. I'm not looking for something hardware centric, nor books ...

Solving the water jug problem

While reading through some lecture notes on preliminary number theory, I came across the solution to water jug problem (with two jugs) which is summed as thus: Using the property of the G.C.D of two numbers that GCD(a,b) is the smallest possible linear combination of a and b, and hence a certain quantity Q is only measurable by the 2 j...