Computer science or computing science (abbreviated CS or CompSci) is the scientific approach to computation and its applications.

learn more… | top users | synonyms

3
votes
3answers
345 views

Is it faster to make a dedicated variable instead of calling deeply nested object several times?

In a JavaScript app, suppose I have a nested object like this: var myObject = { someProp: { someOtherProp: { anotherOne: { yetAnother: { ...
30
votes
13answers
3k views

Help in understanding computer science, programming and abstraction [duplicate]

Until now, I always believed that you should learn programming languages that make you do low-level stuff (e.g. C) to understand what's really happening under the hood and how the computer really ...
0
votes
1answer
58 views

Cyclomatic complexity - what exactly does the word “cyclomatic” mean?

I understand what cyclomatic complexity is, but I was trying to find the origin/meaning behind the word "cyclomatic" and could not find anything that wasn't about cyclomatic complexity. Does this ...
4
votes
8answers
6k views

What specific branches of Mathematics are useful for a programmer to learn? [closed]

I have less than 6 months to learn mathematics for my Master course in CS. (With no prior formal education in any computer/mathematics related area.) So I need to prepare my self to be tested on math ...
4
votes
4answers
1k views

Why do some compilers generate direct machine code?

I was taking this course - CMU 18-447, Computer Architecture at Carnegie Mellon to brush my knowledge and concepts. They say that most of the machine level details and implementations are taken care ...
0
votes
1answer
22 views

What relationship describes two different abstractions of the same dataset

I am wondering if there is a specific term for when multiple representations are data equivalent. Meaning that you can transfer the data from one representation to the other without any loss of data. ...
5
votes
5answers
12k views

Math Major wants to become a Software Engineer [closed]

I am a math major, what would be the best field of computer science/computer engineering for me to go into, where I could apply my skills that I used as a math major (i.e. Linear Algebra, Real ...
1
vote
2answers
74 views

Language interaction

How does a program composed of several languages work? How do the languages work together or interact with each other? How do they understand stand each other? How do you know when to use any given ...
-1
votes
1answer
71 views

Floating point absorption phenomena and ULP

Numerical analysis text books talks about the absorption phenomena (Introduction to Numerical Analysis and Scientific Computing; Nabil Nassif; Dolly Khoueiri Fayyad; CRC Press; 2014) when adding ...
3
votes
5answers
14k views

How many bits' address is required for a computer with n bytes of memory?

How many bits of address is required (for the program counter for example) in a byte-addressed computer with 512 Mbyte RAM? What does the formula look like? How is this connected with the fact that ...
30
votes
8answers
26k views

What methods are there to avoid a stack overflow in a recursive algorithm?

Question What are the possible ways to solve a stack overflow caused by an recursive algorithm? Example I'm trying to solve Project Euler problem 14 and decided to try it with a recursive algorithm....
10
votes
13answers
2k views

As a code monkey, how to discuss programming with a guy who almost has a doctorate in computer science [closed]

A friend of my wife's is coming over for dinner tonight and he is a lot smarter than me. What do we have in common, well... A Bachelor's in Computer Science, and that should be enough of a ...
2
votes
2answers
220 views

Why are semantics and type systems are so important?

I heard that semantics and type systems are very important for all programmers! But I why are they so important? I don't understand. Maybe they are imortant only for theoreticians and compiler ...
0
votes
0answers
51 views

avoid nan and inf in floating point multiplication and division

I have the following hypothesis: It is better to reorder mult and div operation in such a way that we can do our best effort to avoid nan, inf and operating with subnormals. The reorder should follow ...
29
votes
11answers
21k views

What to do when coding begins to feel boring, like it is all just more of the same? [closed]

I started programming at the age of 6 on a Commodore 64. Now I'm 28, and I have to complete 4 courses from a first degree in Computer Science. I'm starting to get bored with writing code after all ...
0
votes
1answer
53 views

Foundations of computation, and relation to modern computers [closed]

I want to understand how the theoretical foundations of computation relate to real-world computers. As far as my knowledge goes, Turing machines, recursive functions, finite state machines, lambda ...
3
votes
2answers
1k views

What does 'upper bound' mean in context of BigO?

My computer science teacher says Big O has an upper bound but no lower bound. When I look at a graph of an algorithm mapped out using BigO though, there isn't an upper bound at all. The upper limit ...
2
votes
2answers
85 views

From a set of rules, derive the implications? [closed]

I've only just become interested in this domain, so sorry if I'm not using the correct terminologies. What I want is the following: Say I have a set of rules (or constraints), I want to derive some ...
1
vote
2answers
280 views

How do Symbol Tables, Lexers and Parsers work together in a modern design? [closed]

I'm working on creating my own scripting language for learning purposes. I've been reading through the Dragon Book and some things are a little unclear to me regarding the Symbol Table as well as ...
0
votes
0answers
129 views

What is this compression algorithm? (Similar to RLE)

In Run Length Encoding (RLE), a large set of information is encoded by storing the quantity of consecutive sequences. A canonical example is: ...
17
votes
26answers
29k views

Most difficult subject/theory in Computer Science? [closed]

Which is the most difficult CS subject/theory that you studied but important to the field? And the reason please?
32
votes
16answers
7k views

Will a computer science college degree ever hurt my employability? [closed]

Too often, I can see that there are many viable programmers without college degrees in Computer Science, Informatics, etc. Now that I've been reading more articles about underperforming education ...
13
votes
3answers
6k views

How is the actor model used?

I have read a bit about the actor model, but don't really understand how to use actors in a real world situation – how to model a problem with them. Can someone please explain? A simple example or ...
5
votes
7answers
4k views

How can variables be created at runtime? [closed]

Is it possible to define variables dynamically? Last night I was writing some code (C and VB2010) and I ran into a problem related to defining variables in my program. The variables needed depend on ...
23
votes
17answers
9k views

What are some good assignments for an introductory course, to reach today's students? [closed]

I periodically teach an introduction to programming course using Java. I want to give my students some exciting assignments that they can relate to or find interesting. At the very least, I want ...
67
votes
32answers
18k views

What's a nice explanation for pointers? [closed]

In your own studies (on your own, or for a class) did you have an "ah ha" moment when you finally, really understood pointers? Do you have an explanation you use for beginner programmers that seems ...
31
votes
2answers
1k views

What is the meaning of “doesn't compose”?

I see a lot of texts, especially functional programming texts, claim that certain CS concepts "don't compose". Examples are: locks don't compose, monads don't compose. I've been having a hard time ...
3
votes
4answers
510 views

How is a state machine different from any other computer program?

I have seen several implementations of "State Machines" on github. As far as I understand, a state machine takes input that may or may not transform its state into one of a finite set of other states. ...
12
votes
5answers
1k views

How come the computer doesn't have to read the entire table when the column is indexed? [duplicate]

Let's say a table with two columns has 100 quadrillion records. And I want to find a record that has column #2 equal something. If column #2 is indexed it returns the result immediately, but if it's ...
8
votes
2answers
23k views

How important is Discrete Mathematics for a Computer Scientist? [closed]

As the title says, How important is Discrete Mathematics for a Computer Scientist? Background: I'm pursuing a Master's degree with a focus on fundamentals such as Algorithms, Complexity and ...
23
votes
12answers
65k views

What's the difference between computer science and programming?

I'm new at computer science and programming, and I was wondering, is there a difference between computer science and programming? and do you get to choose to study only one of them at the university, ...
17
votes
3answers
2k views

Should Software Engineering and Computer Science be separate majors? [closed]

For decades, the accepted degree to get to become a software developer was "Compter Science." We've had a few questions already about whether that degree really prepares students to develop software. ...
6
votes
2answers
230 views

Does any well-known license require to make modifications available when only derived *output* is published?

Is there a way to make sure that modifications to free software are released even when no binaries of modified code are conveyed? Though it may sound odd and from what I understand, e.g., GPL requires ...
0
votes
2answers
868 views

Is studying algorithms important for game development? [closed]

I am fairly new in the programming world, I have a 1-year experience and I learned by watching online courses, and I made few iOS apps. Now I am moving into game development and I already ...
23
votes
17answers
10k views

Is “Computer Science != Software Engineering” an excuse to teach programming poorly?

We've all heard it; whenever there's a discussion about CS grads having poor development skills someone eventually says, Computer science isn't software engineering. The problem that I see is ...
2
votes
1answer
107 views

Find all factors(prime and composite) of a number

We can find all the prime factors using a Sieve of Erastothenes. But how do we find ALL the factors of a number? For instance, 24 = 2x2x2x3 But the complete factor list is - 1,2,3,4,6,8,12,24. I am ...
2
votes
2answers
549 views

Finding common prefixes for a set of strings

I am trying to find common prefixes for a sorted set of strings. i.e. if the following strings are given: AB123456 AB123457 ABCDEFGH ABCDEFGX1 ABCDEFGY XXXX then my function should return three ...
3
votes
2answers
622 views

Looking for a DP algorithm for a specific packing problem

I have the following problem to solve: Given a ferry with length d and a list of n cars conataining their length we must load the cars on the ferry in an order in which they appear in the list on 2 ...
10
votes
4answers
1k views

Good Programming Competitions for Highschool Students [closed]

What are good programming competitions (or web design competitions) available for highschool students in the Northeast (I am looking for a pretty long/comprehensive list)- of the USA? The competitions ...
16
votes
8answers
2k views

Is there a subset of programs that avoid the halting problem

I was just reading another explanation of the halting problem, and it got me thinking all the problems I've seen that are given as examples involve infinite sequences. But I never use infinite ...
6
votes
3answers
3k views

Quantum computers and Turing Machine

As far as I know, a Turing Machine is the widely used model in computational theory to know whether something could be computed and if computed can they can be computed in finite time (P, NP, NPSpace)....
2
votes
4answers
440 views

Should all programmers know how to solve algorithms, etc [closed]

I'm 15 and have been programming for about 3-4 years. I mostly program in Java as it was my first language. I would like to be a programmer when I'm older, but I'm not sure about the differences. I'...
7
votes
2answers
2k views

What is the relationship between lambda calculus and programming languages? [closed]

I am starting my first year (in college) in Computer Science next year and I write mostly in C (if that is to matter). I have tried searching but most of what I find assumes knowledge of lambda ...
11
votes
1answer
587 views

What Is λ-calculus essentially?

I have what I would call a philosophical question about λ-calculus. When you explore λ-calculus you will be surprised to see all the things that you can do there. You can define integers, arithmetic ...
-1
votes
2answers
131 views

Is 'lazy' the correct term for timestamp-based skipping? [closed]

(1) The oldmakeutility looks at timestamps, and if the output is newer than the input, it skips (pointless, time-consuming) re-compilation of e.g. C files. The same is true for many languages and ...
2
votes
1answer
344 views

Implementation of chess endgame engine without Endgame Tablebases

I'm interested in creating an chess endgame solving engine. The endgames in chess are usually solved using the endgame table-bases generated by retrograde algorithm. I have found that Artificial ...
1
vote
2answers
435 views

The physical implementation of quantum annealing algorithm

From that question about differences between Quantum annealing and simulated annealing, we found (in comments to answer) that physical implementation of quantum annealing exists (D-Wave quantum ...
8
votes
3answers
374 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 ...
80
votes
11answers
7k views

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

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 ...
0
votes
1answer
130 views

How are the conceptual pairs Abstract/Concrete, Generic/Specific, and Complex/Simple related to one another in software architecture?

(= 2 (+ 1 1)) take the above. The requirement of the '=' predicate is that its arguments be comparable. Any two structures are comparable in this case, and so the contract/requirement is pretty ...