techniques

What techniques are there to prevent / remove shared state?

Problem Shared state is in certain cases a bad thing. I am in a project right now where pretty much all methods perform some sort of state change. I believe that's a problem. On one hand, I can't reuse the methods because depending on the current system state the new system state after the method call will be different. On the other han...

What are the good programming practises in C# to make code more self-explanatory?

I think making code self-explanatory, without need for comments all around the place, is a big advantage. But could you suggest methods and techniques how to reduce the amount of code, make it more readable and understandable. Also what do you think are the good techniques for reducing big if statements and nested for loops and other st...

jQuery shortcuts / technique for toggling classes

Hi! In jQuery, is there another way to write this? Version 1 $("#date_filter-enable").click(function() { $("#search_dates").removeClass("hidden"); }); $("#date_filter-disable").click(function() { $("#search_dates").addClass("hidden"); }); Version 2 $("input[id^=date_filter-]").click(funct...