The theory tag has no wiki summary.
55
votes
22answers
4k views
Why do some programmers think there is a contrast between theory and practice? [closed]
Comparing software engineering with civil engineering, I was surprised
to observe a different way of thinking: any civil engineer knows that
if you want to build a small hut in the garden you can just ...
25
votes
18answers
2k views
What is the one bit of computer science theory I should know? [closed]
Speaking as someone with an Electronic Engineering rather than Computer Science degree, what is the one bit of computer science I should know to make me a better real world programmer?
(By real world ...
22
votes
9answers
5k views
Color schemes generation - theory and algorithms
I will be generating charts and diagrams and I am looking for some theory on color schemes and algorithm examples.
Example questions:
How to generate complementary or analogous colors?
How to ...
17
votes
9answers
1k views
Isn't class scope purely for organization?
Isn't scope just a way to organize classes, preventing outside code from accessing certain things you don't want accessed?
More specifically, is there any functional gain to having public, protected, ...
13
votes
14answers
1k views
Ideal Operating System [closed]
Okay. So I'm currently trying to design an operating system, but I need ideas. Nevermind the feasibility right now, it's just in the design phase. If you had an OS that did whatever you wanted, what ...
12
votes
5answers
878 views
Why does Cem Kaner consider a test not revealing a bug a waste of time?
What about confirming the functionality in positive tests, proving it is working - should I say it is a waste of time? What kind of concept is behind this quote?
Unsuccessful tests, i.e. tests ...
11
votes
6answers
1k views
How to teach a script to detect sarcasm? [closed]
I'm currently building a fun script, that basically matches given phrases and gives a predefined response based on the match-points. You can ask it to retrieve some information based on live feeds, ...
11
votes
8answers
1k views
What non-theoretical, practical programming language has no reserved keywords?
I have been searching for a practical programming language that has no reserved keywords but I haven't had any luck finding one.
I am working on a programming language for my own edification and ...
11
votes
5answers
1k views
How often do CPUs make calculation errors?
In Dijkstra's Notes on Structured Programming he talks a lot about the provability of computer programs as abstract entities. As a corollary, he remarks how testing isn't enough. E.g., he points out ...
10
votes
4answers
529 views
More code = more bugs
Back in college I remember a professor teaching the class one of the laws of computer science. He said something like "More code equals more bugs" and gave it a name (The Law Of Whatchamacallit) and ...
10
votes
7answers
343 views
Is verification and validation part of testing process?
Based on many sources I do not believe the simple definition that aim of testing is to find as many bugs as possible - we test to ensure that it works or that it does not. E.g. followint are goals of ...
8
votes
5answers
640 views
Algorithm refresher. Why is heapsort an insort algorithm?
I can not see why the heapsort is considered an inplace sorting algorithm.
I mean an extra data structure populated with the elements of the array to be sorted i.e. a heap, is used to assist in the ...
8
votes
2answers
269 views
How many copies are needed to enlarge an array?
I am reading an analysis on dynamic arrays (from the Skiena's algorithm manual).
I.e. when we have an array structure and each time we are out of space we allocate a new array of double the size of ...
7
votes
1answer
298 views
Why is the cyclomatic complexity equal to two for a simple Hello World?
I would have two questions related to cyclomatic complexity:
Can I use this metric for a whole app? I guess I cannot, as it would be incredibly large number, considering functions calling functions ...
7
votes
5answers
461 views
Lexical Analysis without regular expressions
I've been looking at a few lexers in various higher level langauges (Python, PHP, Javascript among others) and they all seem to use regular expressions in one form or another. While I'm sure regex's ...
6
votes
9answers
959 views
Negative test cases confusion
In the Software testing book from Koirala, Sheihk, they say:
A positive test is when you put in a valid input and expect some
action to be completed in accordance with the specification.
A
...
6
votes
5answers
1k views
Theta notation on constant time. Why we use the 1?
In asymptotic notation when it is stated that if the problem size is small enough (e.g. n<c for some constant c) the solution takes constant time and is writen as Theta(1).
Why we write 1 inside ...
6
votes
4answers
446 views
What is the correct definition of Moore's law
I see different sources that say the number of transistors will double every 24 months or every 18 months.
Does anyone have a credible source?
6
votes
6answers
583 views
How to recover from finite-state-machine breakdown?
My question may seems very scientific but I think it's a common problem and seasoned developers and programmers hopefully will have some advice to avoid the problem I mention in title. Btw., what I ...
6
votes
2answers
215 views
What would be a non-contrived reason to have an object with Private Copy Constructor as well as Assignment Operator?
Looking for non-conceptual/non-contrived reasons of when one would need to use an object with both a private copy constructor and a private assignment operator?
As in what problem does this ...
6
votes
3answers
395 views
Cyclomatic complexity with two IFs - why it is 3?
I have read an article with following example:
void func()
{
if (condition1)
a = a + 1;
if (condition2)
a = a - 1;
}
It says the CC is 3 as there are three possible paths. How come? Why not 4? I ...
6
votes
7answers
592 views
I have a hard time explaining what I learn [duplicate]
Possible Duplicates:
How do you share your craft with non programmers?
How to explain programming to a non-programmer?
How do I become more articulate?
I love programming and I like to ...
6
votes
1answer
394 views
Space complexity of Iterative Deepening DFS
We read on Wikipedia > Iterative deepening depth-first search that
The space complexity of IDDFS is O(bd), where b is the branching factor and d is the depth of shallowest goal.
Wikipedia also ...
5
votes
8answers
632 views
What is the aim of software testing?
Having read many books, there is a basic contradiction:
Some say, "the goal of testing is to find bugs" while other say "the goal of the testing is to equalize the quality of the product", meaning ...
5
votes
5answers
525 views
Priority list of tasks stored in a database
I am trying to think of the best way to do the following:
I have a list of tasks stored in the database. A task has a priority assigned to it. You can change the priority of a task to reorder the ...
5
votes
1answer
338 views
Why would I care about the asymptotic growth of the lower bound of the worst case time/space?
In mathematics, there are notations for asymptotic lower bounds, upper bounds, and tight (within-a-constant-factor) bounds. When describing the growth of functions in general, it makes sense that all ...
5
votes
7answers
617 views
How do you deal with translating theory into practice?
Being a computer scientist in a research field I am often tasked with working alongside professionals outside of the software domain (think math people, electrical engineer etc), and then translating ...
5
votes
2answers
301 views
solve TOR edge node problem by using .onion proxy?
I would like to improve the TOR network, where the exit nodes are a vulnerability to concealing traffic. From my understanding, traffic to .onion sites are not decrypted by exit nodes, so therefore - ...
4
votes
6answers
325 views
Why isn't there a Boolean for x values of a variable? [duplicate]
Possible Duplicate:
Would you see any use of a Trilean (True, False, ??)
Well first and foremost, I'm not a programmer, I am a civil engineer that does some programming and quite enjoy it.
...
4
votes
4answers
575 views
Is it possible to automatically convert code from a low level language to a high level language?
I have seen several applications that claim to convert Java code to valid C or even C++. Converting from a high level language to a low level language is possible, no doubt about it. At least in ...
4
votes
4answers
309 views
Is code that terminates on a random condition guaranteed to terminate?
If I had a code which terminated based on if a random number generator returned a result (as follows), would it be 100% certain that the code would terminate if it was allowed to run forever.
while ...
4
votes
3answers
200 views
Learning About Languages
I'm interested in learning more about programming languages. In particular, I'd like to look at some of the new developments in programming languages (even the really obscure ones that only academics ...
4
votes
4answers
980 views
Time complexity of a nested loop where the inner value is decreased in every step
I have problems to give the right time complexity in O notation for the following loop:
k := 0
for i := 0 to N
for j := k to M
// something
k = k + 1
Where N = M. Without the modified ...
4
votes
4answers
201 views
objects, classes, types
How does an object oriented programmer understand the word "type"? I'm not aware of there being a type theory for object oriented programming because whenever someone mentions type theory it is always ...
4
votes
8answers
717 views
Data validation best practices: how can I better construct user feedback?
Data validation, whether it be domain object, form, or any other type of input validation, could theoretically be part of any development effort, no matter its size or complexity. I sometimes find ...
4
votes
3answers
175 views
Quality Assurance=inspections, reviews..?
Studying this subject extensively, the most books state the following:
Quality Assurance: prevention activity. Act of inspection, reviewing..
Quality Control: testing
While there are some ...
4
votes
1answer
318 views
Understanding the DIP, DI, IoC theory
For about 2 months I've been reading everything I can find for these 3 topics and I'm not yet sure I got it.
Dependency Inversion Principle. Means you should always only rely on interfaces and not ...
4
votes
4answers
470 views
Stack and heap - dynamic allocation question
Sources usually mention that dynamically created variables are allocated on the heap, while functions' variables on the stack. Also the ones on the stack cease to exist automatically when e.g. the ...
4
votes
1answer
104 views
Has there been any formal work comparing ease of maintenance at the programming language level?
Is there any formal work attempting to measure ease of maintenance for complex programs, comparing at the programming language level? Are there any formal measures for ease of maintenance, at any ...
3
votes
4answers
2k views
Advantages/Disadvantages of NFA over DFA and vice versa
What are the relative pro's and con's of both DFA's and NFA's when compared to each other?
I know that DFA's are easier to implement than NFA's and that NFA's are slower to arrive at the accept state ...
3
votes
4answers
420 views
I don't understand the Halting Problem
I just ran across an answer to another question that references the Halting Problem. He starts with this snippet:
def halts( code_block ):
# Some magical code
def whistler():
while ...
3
votes
2answers
528 views
Functional testing in the verification
Yesterday my question How come verification does not include actual testing? created a lot of controversy, yet did not reveal the answer for related and very important question: does black box ...
3
votes
3answers
344 views
Which aspect of normal forms do entity-attribute-value tables violate, if any?
I'm not asking if EAV tables are good or bad. I'm wondering if they are considered "normalized", and if not, why? If they aren't normalized, which normal form are they violating and why?
3
votes
2answers
391 views
Are suffix trees and suffix arrays identical? What are the differences?
I have read some information through internet...i found that somehow suffix tree is quite similar to suffix array but somehow they are no the same thing..
Given a string, a suffix tree construction ...
3
votes
3answers
664 views
Basic premise on counting sort. How is k related to to Big Oh?
I am reading (Cormen) on counting sort.
I understand the structure of the algorithm but the statement:
In practice, we usually use counting sort when we have k = O(n), in
which case the ...
3
votes
0answers
179 views
Don Knuth and MMIXAL vs. Chuck Moore and Forth — Algorithms and Ideal Machines — was there cross-pollination / influence in their ideas / work? [closed]
Question:
To what extent is it known (or believed) that Chuck Moore and Don Knuth had influence on each other's thoughts on ideal machines, or their work on algorithms?
I'm interested in citations, ...
2
votes
4answers
236 views
Theory about software communications mixing up with other software causing an Apocalypse?
I can remember a very Very long time ago (pre Y2K) , reading an article by some "expert" that theorized that software communicating over the internet, especially video games could get mixed up with ...
2
votes
5answers
287 views
bug: deviation from requirements vs deviation from expectations
I am not clear on this one. No matter the terminology, in the end the software fault/bug causes (according to a lot of sources):
Deviation from requirements
Devation from expectations
But if ...
2
votes
4answers
339 views
What is the difference between skill level amongst programmers? [closed]
I am a beginning programmer and in 5-10 years I'd like to be an expert. I love programming because it is a distinct skill set that you can continually improve on. But then I thought, how can you ...
2
votes
2answers
297 views
Which code is better for branch prediction optimization?
Given branch prediction, and also the effect of compiler optimizations, which code tends to offer superior performance?
Note that bRareExceptionPresent represents an uncommon condition. It is not the ...