The tag has no wiki summary.

learn more… | top users | synonyms

73
votes
11answers
6k views

How can I make sure that I'm actually learning how to program rather than simply learning the details of a language?

I often hear that a real programmer can easily learn any language within a week. Languages are just tools for getting things done, I'm told. Programming is the ultimate skill that must be learned and ...
56
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 ...
27
votes
9answers
10k 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 ...
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 ...
24
votes
11answers
7k views

How does the “Fourth Dimension” work with arrays?

Abstract: So, as I understand it (although I have a very limited understanding), there are three dimensions that we (usually) work with physically: The 1st could be represented by a line. The 2nd ...
24
votes
9answers
2k views

Why not expose a primary key

In my education I have been told that it is a flawed idea to expose actual primary keys (not only DB keys, but all primary accessors) to the user. I always thought it to be a security problem ...
17
votes
6answers
1k views

What is an example of a computationally impossible business problem?

I have coworker who refuses to accept the reality that Turing machines (and Von Neuman machines by extension) cannot solve their own halting problem stating: You can do anything with enough time ...
14
votes
9answers
1k views

Isn't class scope purely for organization? [duplicate]

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, ...
14
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 ...
13
votes
8answers
2k 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 ...
13
votes
4answers
2k 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 ...
12
votes
6answers
2k 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, ...
12
votes
5answers
2k 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
3answers
604 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
690 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 ...
9
votes
5answers
329 views

What are some possible interactions between multiple bugs? [closed]

I was thinking about how two bugs could interact with one another. The only relationship I can think of is one bug being the cause of another. What other interactions between multiple defects are ...
9
votes
5answers
940 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
3answers
338 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
9answers
1k views

What is the aim of software testing? [closed]

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 ...
7
votes
5answers
2k 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 ...
7
votes
6answers
841 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 ...
7
votes
1answer
419 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
817 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 ...
7
votes
7answers
765 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
3answers
839 views

Japanese Multiplication simulation - is a program actually capable of improving calculation speed?

On SuperUser, I asked a (possibly silly) question about processors using mathematical shortcuts and would like to have a look at the possibility at the software application of that concept. I'd like ...
6
votes
9answers
3k 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
4answers
522 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
2answers
256 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
1k 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
1answer
420 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 ...
6
votes
1answer
643 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
5answers
549 views

Theoretically bug-free programs

I have read lot of articles which state that code can't be bug-free, and they are talking about these theorems: Halting problem Gödel's incompleteness theorem Rice's theorem Actually Rice's ...
5
votes
5answers
1k views

What negative consequences can arise from this language design rule?

Clarification: the rule is meant to prevent accessing variables that are not declared yet. Clarification 2: the rule mandates that the compiler follows calls to functions which are defined in the ...
5
votes
4answers
1k 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 ...
5
votes
7answers
942 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
7answers
882 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
1answer
336 views

Subsumption architecture vs. perceptual control theory

I'm a new person to AI field and I have to research and compare two different architectures for a thesis I'm writing. Before you scream (homework thread), I've been reading on these two topics only ...
5
votes
2answers
319 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
403 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
3answers
288 views

Learning About Languages [closed]

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
326 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
2answers
162 views

Is excessive indirection and/or redundant encapsulation a recognized concept? [closed]

I'm curious if there's a series of tendencies or anti-patterns when programming whereby a developer will always locally re-wrap external dependencies when consuming them. A slightly less vague ...
4
votes
2answers
623 views

Array Multiplication and Division

I came across a question that (eventually) landed me wondering about array arithmetic. I'm thinking specifically in Ruby, but I think the concepts are language independent. So, addition and ...
4
votes
4answers
1k 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
210 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
933 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
242 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
3answers
602 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?
4
votes
1answer
474 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
1k 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 ...