Certainly there are valuable programming techniques yet to be discovered, or that have been discovered but are not well-known.
I'm interested in hearing about techniques that may be counterintuitive or seem strange, but have real benefit.
Edit: It was suggested that I give an example.
Just to show what I mean, my personal favorite is something I discovered in '86, that I called differential execution. It's a control structure in the same way that recursion or backtrack is a control structure, and just as hard to understand for anyone who doesn't know it yet. But it has a benefit in building UIs with time-varying structure, in reducing source code by about an order of magnitude.
It is hard to understand, no question about it, but once it is understood, it pays off in productivity.
Edit: Another favorite I've seen is a way to do propositional resolution theorem proving with bit patterns. It doesn't get much use, but when you need it it's pretty nifty. Each proposition corresponds to a bit-position in a word. Suppose you have two propositional clauses A and B stated in conjunctive normal form. Let word A0 be the set of propositions that are false in A, and A1 be the set that are true in A. Similarly for B0 and B1. Then you can resolve A and B into a new clause R by the bitwise operations:
// find the propositions in which A and B disagree
int temp = (A0 & B1) | (A1 & B0);
// if they disagree
if (temp != 0){
// make a new clause by combining them
// and removing the proposition where they disagree
int R0 = (A0 | B0) & !temp;
int R1 = (A1 | B1) & !temp;
// do something with the result R
}
So, for example if A = (!X | Y), and B = X, then R = Y.