On the right, Charles Krauthammer says that the Republican gains in the midterm elections are a pure reflection of the fact that President Obama is more liberal than the country:

No fanciful new syndromes or other elaborate fictions are required to understand that if you try to impose a liberal agenda on such a demonstrably center-right country -- a country that is 80 percent non-liberal -- you get a massive backlash. ...
The story of the last two years is as simple as it is dramatic. It is the epic story of an administration with a highly ideological agenda encountering a rising resistance from the American people over the major question in dispute: the size and reach and power of government and, even more fundamentally, the nature of the American social contract.
An adjudication of the question will be rendered on Nov. 2.

On the left, Peter Daou:

I warned about over-confidence as far back as March of 2009, when I argued against bickering with Rush Limbaugh from the White House podium ...
My larger point was that the lesson from campaign 2008 should not be that there was now an indomitable, web-fueled Democratic force that would sweep away all rightwing resistance. If anything, the right would now fight harder and uglier. Decades in the making, the well-oiled rightwing attack machine wasn’t about to sputter out and die.
So who exactly was the White House official referring to when he/she told Peter Baker “we were overconfident”? I doubt it’s President Obama, since he is too disciplined, introspective and self-aware to lapse into over-confidence. I don’t really think it’s a single individual (though Rahm Emanuel’s famous bluster is emblematic of it) but it’s more a mindset that took over the White House and Democratic leadership, a mindset that denigrated the left’s concerns, that toyed with Limbaugh, that embraced faux-bipartisanship, that began taking measurements for Mount Rushmore, that scoffed at the Tea Party, that relied on an ephemeral email list and the myth of online dominance to convince itself that the GOP was permanently marginalized.
The problem with over-confidence as opposed to mere confidence is that the former makes you insular, the latter motivates you to solicit – and appreciate – external advice. The former leads Democratic insiders to slap down the ‘petulant’ left, the latter compels them to crowdsource strategy rather than rely on the “wisdom” of the same old Beltway strategists, pundits and pollsters.
The big question now is whether the impending electoral train wreck will convert Democratic over-confidence to defeatism or whether the White House can find confidence where they should have sought it all these months, in core progressive principles and values.

Let's go over this once again. Presidents almost always lose seats in midterm elections. Presidents presiding over economies experiencing declining real income always lose a lot of seats:

This chart fails to convey the effect of previous "wave elections," which also contribute to losses. In 2006 and 2008, Democrats scored massive electoral victories, stretching deep into Republican territory, which suggests that simple regression to the mean would also predict significant losses above and beyond those predicted by the chart.

Now, I am not saying that the results of the midterm elections are purely mechanical and have nothing to do with ideology or political tactics. It is reasonable to argue that some different combination of policies and/or political messaging would have produced a less unfavorable outcome than whatever happens on Election Day. It is not reasonable to suggest that there is some alternative combination of policies and/or political tactics -- Krauthammer's imaginary world in which Obama abandons the platform he ran on and ignores the mainstream economic consensus on responding to the economic crisis to instead purdue fringe right-wing theories, or Daou's "core progressive" strategy -- would have avoided any electoral losses. That's just using electoral results to propagandize for your ideology.