1,486 Answered Questions for the topic computer programming
Computer Programming
04/15/19
Fast rectangle to rectangle intersection?
What's a fast way to test if 2 rectangles are intersecting?
Computer Programming
04/12/19
Enums and Constants. Which to use when?
I was doing some reading on enums and find them very similar to declaring constants. How would I know when to use a constant rather than an enum or vice versa. What are some of the advantages of...
more
Computer Programming
04/12/19
Hash Code and Checksum - what's the difference?
My understanding is that a hash code and checksum are similar things - a numeric value, computed for a block of data, that is *relatively* unique.i.e. The probability of two blocks of data yielding...
more
Computer Programming
04/12/19
What is the difference between the terms "arguments" and "parameters"?
I often find myself confused with how the terms 'arguments' and 'parameters' are used. They seem to be used interchangeably in the programming world.What's the correct convention for their use?
Computer Programming
04/11/19
Skip List vs. Binary Search Tree?
I recently came across the data structure known as a [_skip list_](http://en.wikipedia.org/wiki/Skip_list). It seems to have very similar behavior to a binary search tree. Why would you ever want...
more
Computer Programming
04/10/19
The "backspace" escape character '\\b': unexpected behavior?
So I'm finally reading through https://en.wikipedia.org/wiki/The_C_Programming_Language, and I learned something within the first few pages, that there is a backspace escape character, `\\b`.So I...
more
Computer Programming
04/07/19
Why is syntax important in programming?
Computer Programming
04/03/19
What Makes a Good Unit Test?
I'm sure most of you are writing lots of automated tests and that you also have run into some common pitfalls when unit testing. My question is do you follow any rules of conduct for writing tests...
more
Computer Programming
04/03/19
Conventions for exceptions or error codes?
Yesterday I was having a heated debate with a coworker on what would be the preferred error reporting method. Mainly we were discussing the usage of exceptions or error codes for reporting errors...
more
Computer Programming
04/02/19
Why are const parameters not allowed in C#?
It looks strange especially for C++ developers. In C++ we used to mark a parameter as `const` in order to be sure that its state will not be changed in the method. But why can't we mark as method...
more
Computer Programming
04/01/19
Why is Math.pow(0, 0) === 1?
Javascript says that: Math.pow(0, 0) === 1 // true and C++ says the same thing: pow(0, 0) == 1 // true Why does `Math.pow(0, 0)` throw no errors?
Computer Programming
03/31/19
Why do new programmers seem to shy away from libraries?
I've noticed questions from new programmers that can be solved using libraries. People sometimes shy away from using libraries. Is it the learning curve?
Computer Programming
03/30/19
Using an ORM or plain SQL?
For some of the apps I've developed (then proceeded to forget about), I've been writing plain SQL, primarily for MySQL. Though I have used ORMs in python like...
more
Computer Programming
03/30/19
How do I distinguish between 'binary' and 'text' files?
How do you tell if a file is 'text' or 'binary'? And to restrict is further, how do you tell on a Linux like file-system? I am not aware of any filesystem meta-data that indicates the 'type' of a...
more
Computer Programming
03/27/19
What is a good hash function?
I saw a lot of hash function and applications in my data structures courses in college, but I mostly got that it's pretty hard to make a good hash function. I get that is a somewhat good function...
more
Computer Programming
03/27/19
Is a GUID unique 100% of the time?
Is a GUID unique 100% of the time?Will it stay unique over multiple threads?
Computer Programming
03/27/19
What's the difference between passing by reference vs. passing by value?
What is the difference between 1. a parameter passed by reference2. a parameter passed by value?Could you give me some examples, please?
Computer Programming
03/27/19
What are the benefits and drawbacks of OOP?
As far as I can tell, in spite of the countless millions or billions spent on OOP education, languages, and tools, OOP has not improved developer productivity or software reliability, nor has it...
more
Computer Programming Web Design
03/27/19
When should I use anchors and how do I add them to my wix page?
Computer Programming
03/27/19
Function for creating color wheels?
This is something I've pseudo-solved many times and have never quite found a solution for.The problem is to come up with a way to generate `N` colors, that are as distinguishable as possible where...
more
Computer Programming
03/27/19
How to check if the given string is palindrome?
How to check if the given string is a palindrome? Looking for solutions in any language.
Computer Programming
03/26/19
Write an Algorithm in Pseudocode
Write an algorithm that, given a sequence of characters, allows you to find the number of words that begin with letter "A"
Computer Programming
03/26/19
Difference between red-black trees and AVL trees?
Can someone please explain what the main differences between these two data structures are? I've been trying to find a source online that highlights the differences/similarities, but I haven't...
more
Computer Programming
03/26/19
Why is NaN not equal to NaN?
The relevant IEEE standard defines a numeric constant NaN (not a number) and prescribes that NaN should compare as not equal to itself. Why is that? All the languages I'm familiar with implement...
more
Computer Programming
03/26/19
Observer Design Pattern vs "Listeners"?
It seems to me that the Observer design pattern as described in GOF is really the same thing as Listeners found in various toolkits. Is there a difference between the concepts, or are Listeners and...
more
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.