I'm creating a game in XNA and was thinking of creating my own scripting language (extremely simple mind you). I know there's better ways to go about this (and that I'm reinventing the wheel), but I want the learning experience more than to be productive and fast.
When confronted with code at run time, from what I understand, the usual ...
When I'm learning a new language, I often program some mathematical functions to get used to the control flow syntax. After that, I like to implement some sorting algorithms to get used to the array/list constructs.
But I don't have a standard exercise for exploring the languages OO features. Does anyone have a stock exercise for this...
What's the worst technical misunderstanding you've ever seen? Worst abuse of a good system due to lack of knowledge?
Edit: The programming gods have let me know that you will be absolved for all sins you confess here!
...
why polymorphism is dependent on inheritance? code example?
...
If you compile a new version of compiler, how many times should you recompile it iteratively?
First: compile the new version of compiler[1] using the old version[0].
Second: compile the new version[2] using the newly compiled one[1], to apply new optimizations and fix bugs to the binary, not present in old[0] compiler.
Now third? Comp...
Why are copy constructors unnecessary for immutable objects? Please explain this for me.
...
I see a lot of the word 'expressiveness' when people want to stress one language is better than the other. But I don't see exactly what they mean by it.
Is it the verboseness/succinctness? I mean, if one language can write down something shorter than the other, does that mean expressiveness? Please refer to my other question - http://...
Hi at all, I need to create a simple web chat ( like facebook chat )
What language do I need to use ( server-side ) ?
Erlang ? PHP ? Python ? Ruby ? ecc
Are there any examples ?
Thanks ^_^
...
I am trying to round up cases when it makes sense to use a map (set of key-value entries). So far I have two categories (see below). Assuming more exist, what are they?
Please limit each answer to one unique category and put up an example.
Property values (like a bean)
age -> 30
sex -> male
loc -> calgary
Presence, with O(1) pe...
Most times I see people try to use linked lists, it seems to me like a poor (or very poor) choice. Perhaps it would be useful to explore the circumstances under which a linked list is or is not a good choice of data structure.
Ideally, answers would expound on the criteria to use in selecting a data structure, and which data structures ...
I'm implementing a interpreter-like project for which I need a strange little scheduling queue. Since I'd like to try and avoid wheel-reinvention I was hoping someone could give me references to a similar structure or existing work. I know I can simply instantiate multiple queues as I go along, I'm just looking for some perspective by ot...
I have a native Visual C++ COM object and I need to make it completely thread-safe to be able to legally mark it as "free-threaded" in th system registry. Specifically I need to make sure that no more than one thread ever accesses any member variable of the object simultaneously.
The catch is I'm almost sure that no sane consumer of my ...
hi,
i have a general question regarding naming convention.
if I separate the data and operations into two separate classes. one has the data elements (entity), the other class manipulates the entity class. what do we usually call that class that manipulates the entity class?
(the entity I am referring to has nothing to do with any...
I've heard this term used a lot in the same context as logging, but I can't seem to find a clear definition of what it actually is.
Is it simply a more general class of logging/monitoring tools and activities?
Please provide sample code/scenarios when/how instrumentation should be used.
...
I remember reading an article that an average programmer spends 90% of the working time for debugging, and 10% for actual development. Even though the number itself may not be correct for everyone, I think the idea itself makes sense.
Then how about the idea of DDE - Development for Debugging Easiness?
In order to do sthat, I think of...
can anyone tell me which is the best algorithm to find the value of determinant of a matrix of size nXn.
...
Does the time always come after the date, with a space in between, in every culture on earth?
i see that Microsoft FCL assumes that it does:
public string get_FullDateTimePattern()
{
if (this.fullDateTimePattern == null)
{
this.fullDateTimePattern = this.LongDatePattern + " " + this.LongTimePattern;
}
return thi...
The Challenge
Guidelines for code-golf on SO
The shortest code by character count to display a representation of a circle of radius R using the *character, followed by an approximation of π.
Input is a single number, R.
Since most computers seem to have almost 2:1 ratio you should only output lines where y is odd. This means that whe...
Lets assume we have a class car.
How would You name parameters of function that takes two different cars?
void Race(Car first, Car second);
or maybe
void Race(Car car1, Car car2);
The same situation with function that takes car and list of cars as a parameters.
I'm used to name 'cars' for list of cars, so it is inconvenient to use ...
I have a project in mind that will require the majority of queries to be keyed off of lat/long as well as date + time.
Initially, I was thinking of a standard RDBMS where lat, long, and the datetime field are properly indexed. Then, I began thinking of a document based system where the document was essentially a timestamp and each doc...