Why is quicksort better than mergesort?
I was asked this question during an interview. They're both O(nlogn) and yet most people use Quicksort instead of Mergesort. Why is that? ...
I was asked this question during an interview. They're both O(nlogn) and yet most people use Quicksort instead of Mergesort. Why is that? ...
Can we achieve 100% decoupling between components of a system or different systems that communicate with each other? I don't think its possible. If two systems communicate with each other then there should be some degree of coupling between them. Am I right? ...
Is there a performance hit if we use loop instead of recursion or vice versa in algorithms where both can serve the same purpose? Eg : Check if given string is palindrome. I have seen many programmers using recursion as a means to show off when a simple iteration algorithm can fit the bill. Does the compiler play a vital role in deciding...
We are changing our remote log-in security process at my workplace, and we are concerned that the new system does not use multi-factor authentication as the old one did. (We had been using RSA key-fobs, but they are being replaced due to cost.) The new system is an anti-phishing image system which has been misunderstood to be a two-facto...
I'm not talking about how to indent here. I'm looking for suggestions about the best way of organizing the chunks of code in a source file. Do you arrange methods alphabetically? In the order you wrote them? Thematically? In some kind of 'didactic' order? What organizing principles do you follow? Why? ...
I'm receiving a recovery feed from an exchange for recovering data missed from their primary feed. The exchange strongly recommends listening to the recovery feed only when data is needed, and leaving the multicast once I have recovered the data I need. My question is, if I am using asio, and not reading from the NIC when I don't need ...
I know this is an open-ended question, but I am very curious about how the collective minds of brilliant programmers here think about this one? What do you think is the most difficult/challenging/demanding programming branch or discipline? For example, AI, Graphics, Networking, cryptography, etc. ...
I get asked "how good are you at {a programming language goes here}" and quite honestly, I'm not sure how to answer them. I can judge if I am beyond beginner when I know the key structures and could make a basic web page in that language (assuming it's web based) but the line between intermediate and expert is somewhat blurred. ...
In how many languages is Null not equal to anything not even Null? ...
What are the best anti-code sites that people have found? What I mean by "anti-code" is websites, books, blogs, etc. that describe or explain bad code with the tongue-in-cheek goal of showing us what we should not do. (I made up the phase anti-code for lack of a better term.) These are the sites I'm familiar with: How to write unmaint...
How can I convert a uniform distribution (as most random number generators produce, e.g. between 0.0 and 1.0) into a normal distribution? What if I want a mean and standard deviation of my choosing? ...
I'm teaching a kid programming, and am introducing some basic artificial intelligence concepts at the moment. To begin with we're going to implement a tic-tac-toe game that searches the entire game tree and as such plays perfectly. Once we finish that I want to apply the same concepts to a game that has too many positions to evaluate eve...
Looking back at my career and life as a programmer, there were plenty of different ways I improved my programming skills - reading code, writing code, reading books, listening to podcasts, watching screencasts and more. My question is: What is the most effective thing you have done that improved your programming skills? What would you r...
In what domains do each of these software architectures shine or fail? Which key requirements would prompt you to choose one over the other? Please assume that you have developers available who can do good object oriented code as well as good database development. Also, please avoid holy wars :) all three technologies have pros and co...
Just as the title says, if you know any resource, answer here. Personally I'm more0interested in screencasts more than podcasts, because english is not my mother tonge, so visual clues help a lot: NetBeans TV Screencasts DimeCasts.NET Apple Developer Connection (iTunes) --- Suggested by the community .NET Rocks dnrTV Channel9 M...
What factors determine which approach is more appropriate? ...
Just wondering what projects you would recommend to a beginning programmer who already understands the basics of programming, but has little experience actually creating large or practical projects. If possible you could also mention the reasons you chose the project and some advise and common pitfalls. This question isn't really langu...
What is the single most effective practice to prevent arithmetic overflow and underflow? Some examples that come to mind are: testing based on valid input ranges validation using formal methods use of invariants detection at runtime using language features or libraries (this does not prevent it) ...
Hi! I want lo learn about Information Retrieval and Machine Learning. Which books do you recommend and in what order do you think is better to read them? The idea is to reach a good understanding of recommendation systems. Thanks! Jonathan ...
I have been trying to find a good tutorial on Conditional Random Fields and have yet to find one that didn't start sending my brain into meltdown. I have a good grasp of HMM's, and I get the difference between discriminative and generative models ... but as of yet I have not been able to find a resource that can give a good comparison of...