theory

Interface or abstract class?

For my new Pet-Project I have a question for design, that is decided already, but I want some other opinions on that too. I have a two classes (simplyfied): class MyObject { string name {get;set;} enum relation {get;set;} int value {get;set;} } class MyObjectGroup { string name {get;set;} enum relation {get;set;} int value...

Practical application of "Bananas, Lenses, Envelopes, and Barbed Wire"?

First of all, the goofy title is directly referencing this paper: http://eprints.eemcs.utwente.nl/7281/01/db-utwente-40501F46.pdf I understand the theoretical value of this, as it models most, if not all, programming semantics. What problems are most efficiently and practically solved with a programming paradigm based on this? What pr...

Should FPGA design be integrated into a Computer Science curriculum?

If computer science is about algorithm development and therefore not limited to the imaginations of Processor vendors, but to the realm of all that is practically computable. Then shouldn't a FPGA, which is almost ideally suited for studying cellular automata, be considered a valid platform upon which to study computer science. One part...

Rollback and Preview in a CMS

I am creating a CMS and am using serialize to handle publish and rollback, which seems to work fine. Basically, The normal site tables are what gets displayed and anything not displayed is serialized in a separate table. The problem however is in making the 'Preview' functions work. Since the front end is created using normal SQL ca...

What all Programmers actually ever need..

I've coded quite a lot of projects both academically, personally, and commercially. And the one thing that always has seen me through is... Arrays. Sure you create structures or Objects (to put into those arrays), but in the end its held and manipulated via arrays. My question is do we really need anything else? Also on a similar v...

General proof of equivalence of two FSMs in finite time?

Does a general proof exist for the equivalence of two (deterministic) finite state machines that always takes finite time? That is, given two FSMs, can you prove that given the same inputs they will always produce the same outputs without actually needing to execute the FSMs (which could be non-terminating?). If such a proof does exist, ...

How many possible bugs are there?

A user has to complete ten steps to achieve a desired result. The ten steps can be completed in any order. If there is a bug, the bug is dependent only on the steps that have been taken, not the order in which they were taken (i.e., the bug is path independent). For example: If the user performs three steps in the order 10, 1, 2 and pr...

Why is cloning (in .NET) so difficult?

In the past I had the need to clone objects, only to find that they don't implement a Clone() method, forcing me to do it by hand (create a new instance and copy all properties from the original to the new one) Why isn't cloning as easy as duplicating the memory block the object is allocated in, and thus have the Clone method in the obj...

Why do you use a random number generator/extractor?

Hi, I am dealing with some computer security issues at the school at the moment and I am interested in general programming public preferences, customs, ideas etc. If you have to use a random number generator or extractor, which one do you choose? Why do you choose it? The mathematical properties, already implemented as a package or for w...

Learning garbage collection theory

I want to learn the theory behind garbage collection. How do i go about it? The obvious answer is - a compiler textbook... The question is, is it necessary to learn lexical analysis, parsing and other stuff that usually precedes garbage collection in a text? In short, what are the prerequisites to learning about Garbage collection theo...

What are the optimization networks? Where can I find info?

So, i recently found this term related somehow to neural networks, but I don't find anymore info on this topic, and it seems interesting. Does anybody know where I can find more info for starters on this? thanks in advance ...

Saving related records without saving the referenced record first

I'm not sure how to explain this so I am going to try do it as clearly as I can. We have a case logging web app. When one adds a case ticket, one can add contacts and attachments to that ticket. I am trying to find a way for the visitor to fill in the case ticket information, add n contacts and then n attacheents before having to push...

Combinator logic axioms

I'm carrying out some experiments in theorem proving with combinator logic, which is looking promising, but there's one stumbling block: it has been pointed out that in combinator logic it is true that e.g. I = SKK but this is not a theorem, it has to be added as an axiom. Does anyone know of a complete list of the axioms that need to be...

Textual Protocol which is not a regular language ?

Hi, The usual way to represent way the grammar associated with a textual network protocol is using ABNF. Just like any EBNF-related meta-syntax, ABNF enables to describe context-free grammars. These context-free grammars can represent a non-regular language, right ? The usual way to implement a network stack is developing a state ma...

Is it possible to construct a turing-complete language in which every string is a correct program?

Is it possible to construct a turing-complete language in which every string is a correct program? Any examples? Even better, any real-world examples? Precisions: by "correct" I mean "compiles", although "runs without error" and "runs without error, and finishes in finite time" would be interesting questions too :) By string I mean an...

Esoteric JS Question

Is there any particular reason that this sort of construct would not work in JS? (JSLint does not accept it.) (function(function(){ }){ })() I can see this type of chaining going on forever, or at least as far as one would want/need. Does anyone have any thoughts? ...

OCR - most "different" or "recognizable" ASCII characters?

I am looking for a way to determine the most "different" or "recognizable" N ASCII characters... For example, if N = 10, what would be the most different N characters in the ASCII set from 0x21 to 0x7E? Obviously, the character "X" is very different than "O" (the letter), but "O" (the letter) is very similar to "0" (zero). Assuming a ...

Efficiency of Sort Algorithms

I am studying up for a pretty important interview tomorrow and there is one thing that I have a great deal of trouble with: Sorting algorithms and BigO efficiencies. What number is important to know? The best, worst, or average efficiency? ...

Searching through descriptions...

There's a movie which name I can't remember. It's about a carnival or amusement park with a horror house and a bunch of teens who are murdered one by one by something with a clowns mask. I've seen this movie about 20 years ago, and it's sequel, but can't remember it exactly. (And also forgot it's title.) As a result, I started wondering ...

what does driver program mean?

there is a quote from Algorithms for Java (sedgwick 2003) p. 135: "we commonly use driver programs when developing or debugging adt iplementations" what is meant by driver program? google just gives me loads of info about programming drivers, clearly not related ...