language-agnostic

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? ...

Can we achieve 100% decoupling?

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? ...

Recursion or Iteration?

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...

Is a software token a valid second factor in multi-factor security?

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...

What's the best way to organize code?

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? ...

How Does Listening to a Multicast Hurt Me?

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 ...

Hardest Programming discipline?

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. ...

How good are you at a given language?

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?

In how many languages is Null not equal to anything not even Null? ...

What are the best anti-code sites?

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...

Converting a Uniform Distribution to a Normal Distribution

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? ...

What are some games with fairly simple heuristics to evaluate positions?

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...

What is the single most effective thing you did to improve your programming skills?

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...

Code generators vs. ORMs vs. Stored Procedures

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...

What programming screencasts/podcast resources do you know?

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...

DoSomethingToThing(Thing n) vs Thing.DoSomething()

What factors determine which approach is more appropriate? ...

Recommended projects for beginning programmers?

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...

Single most effective practice to prevent arithmetic overflow and underflow

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) ...

Suggestion needed to learn Machine Learning and Information Retrieval

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 ...

Anyone Recommend a Good Tutorial on Conditional Random Fields

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...