Sunday, October 27, 2013

grassroots corporatism, celebratory revolutions, and inverted economic policies?

So my Facebook has been blowing up with the Russel Brand video talking about the failures of government to serve the people.

I totally watched it and it's sort of mesmerizing. The British always seem to have a way with words. Russel admits he doesn't vote because (and I'm totally paraphrasing) "we all know our vote doesn't provide for any real change. The problems of the people are not being addressed because the system only entertains the rich, so why would anyone vote for it."

I think he certainly speaks for a lot of people that feel despondent with the current system. Growing unemployment and a growing disparity between the wealthy and middle class are now at red alert in our minds. I would be cautious however to think that a revolution is our only hope. Russel sort of back tracks from the word revolution and clarifies what he means by saying that he's calling for change and that there should be a socialist egalitarian system, heavy taxes on corporations, and taxes on pollution, and et cetera.

I'm not a big fan of socialism, but I do realize that America is already much more socialistic than most think. Social security is by definition a socialistic implementation, and yet most Americans despise the idea of losing it. The interesting thing here is that I'm noticing two distinct groups emerge recently. They both look grassroots and they both use rhetoric like "Wake up America" and "Revolution" and use ideas like "the current system is broken."  The funny part is that apart from that they have one-hundred and eighty degree political viewpoints.

On the right side we have ideas like:
  • Abolish welfare
  • Reduce taxes on corporations and everywhere really
  • No government involvement in healthcare
  • Abolish cap and trade
  • Abolish social security
  • Climate change is a hoax
  • Obama is a communist/Marxist 
  • Free markets
  • Our liberties are being lost
  • The rich create jobs
  • Big government is bad

On the left we have essentially the opposite:
  • Increase taxes on corporations
  • Socialize healthcare
  • Cap and Trade
  • Climate change is real
  • More Regulations to prevent corporate corruption
  • Consumer demand and a strong middle class create jobs
  • Big government isn't bad in the right places.

The fact that there are two almost tangible sides that are so very different and polarizing lets me generalize a bit with who I think these people are. With that said, let's take a closer look at what kind people make up these two groups. We have the Koch brothers who are in the top 10 richest people on Earth funding organizations such as the Americans for Prosperity, and the Tea Party, and Libertarian Party. Tea Party'ers however are supposedly grassroots and not supported by corporations. Yes, while the people themselves may not be paid to promote Tea party ideas, they are certainly learning from those who are paid to. I don't think it's any secret that the Koch brothers are funding these organizations, so it doesn't seem very grassroots if it's being started and funded by a corporation. These people are also associated with really liking if not loving Fox News and Glen Beck and others on that side of the media. 

On the other side we have people who might show up to an Occupy Wall St event. Celebrities like Russel Brand, and Billionaire Nick Hanauer. I'm not sure what kind of crazy person would want his fortune to be more taxed unless he was incredibly altruistic, or unless he actually believed that it would eventually end up benefiting him and/or America at large. He makes a good point in this video (which is funnily enough "too politically controversial" to be uploaded by TED). However I can't help but think that both sides are technically right, and that having the rich create jobs as well as having a strong middle class is the foundation for a healthy capitalistic system, not just one or the other. The Occupy movement folk believe that that the recent corruption precipitates the need for regulation, not to let greedy corporate fat cats lie, cheat, and consequently obliterate the economy into a Part II of the Great Depression.

I freely admit that there's government powers that are certainly getting bigger, such as spying, wiretapping, police brutality, and etc, and I completely despise and condemn those abuses of power. Further I feel like those issues are being planted in the people's minds as the foundation of hating "big" government. Where big government is anti-American, and therefore further regulations and more taxes is anti-American. This is obviously not a directly stated proposition, but an indirect-propaganda induced idea. It kind of works like this. Once you tell someone an idea that they already are passionate for and agree with, you can propose other ideas that follow the same sort of logic. I'd like to think most people are somewhat skeptics like me, but even I find myself believing ideas I've heard over and over and even find myself arguing those ideas without any empirical evidence (although a lot of the times I just like getting other people's opinions when I do that). With politics there's so many factors and so many ideas that are essentially impossible to prove, that you can say almost anything and then throw the burden of proof on someone else. The person who wins is the one with the bigger audience in agreement and therefore their idea wins as well. Almost all of the political arguments I've ever heard is done with rhetoric, opinion and zero facts. Further, even with facts or statistics, you'd get correlation but you won't see any root cause analysis.

I despise this type of propaganda, and usually can see through a lot of it, because it's starting to get so obvious. Rhetoric like Obama is a communist is absurd and classically propaganda. Ideas like you're Anti-American or a Communist if you speak out against your government and/or current system is also propaganda and also completely absurd. Isn't free speech and the right to protest and condemn your system the heart and soul of Americanism? Bear with me, but why couldn't America be a socialistic society and still be true to democracy and free speech and our Constitution? It's not like America was founded as an anti-socialistic country. We have so many examples of socialistic laws that it's insane to think that we are an anti-socialistic. We have libraries, police, fire departments, postal service, public roads, military, student loans/grants, farm subsidies, corporate subsidies, CIA, FBI, EPA, FDA, social security, public schools, prisons, public parks, sewer system, and etcetera. People benefit everyday from these programs, and live prosperous lives because we don't have to worry about the infrastructure of a modern country. We just pay for it through taxes, hence being socialistic. Don't get me wrong the socialistic laws that Stalin/Hitler wanted were extreme and would never work. Capitalism is amazing, everyone benefits from the competitive and quality products our great minds and investors have been able to manufacture. Capitalism and Socialism coexist beautifully in this country. Sometimes private companies work far better than government programs and sometimes vice versa. It's hard to say when sometimes, but why not learn from other countries and why not experiment? Why can't we do something akin to changing the display resolution of our computer monitors and have it roll back if chaos ensues? (Comic relief woo!) I see these types of experiments done all the time in the company I work for. We try different processes and then a year later decide to go back to what it used to be. Everyone would complain about it, but hey at least we're trying to improve! Lesson learned and nobody really got hurt. But watch out for propagandist who will have you believe the country will implode and everyone's a communist if we try something new to improve. 

Personally I have a dichotomy of beliefs, and I know I'm not alone on this. I have personal beliefs that I hold myself to, but I would never automatically assume that those beliefs should be law. Politically I'm a big fan of John Locke who I believe was the biggest inspiration for what makes up the Constitution of the United States of America. That said, America is a nation for all cultures because it is a democracy. If it weren't, my personal convictions would bleed into what I think should become law, but then again so would everyone else (how chaotic would that be?). Lawmaking should make sense to enforce on all people. Let me give you an example of an issue that I struggled with when I was young. I was raised Christian and the Bible says that homosexuality is a sin. However I voted no on Prop 8 because I grew up and realized that religion should not automatically dictate law. Disrespecting your parents or your friends parents is a sin right? But I'll be damned if "yo mamma" jokes ever become illegal (more comic relief! ..or maybe that wasn't very funny.. T.T). My experience has taught me that homosexuality isn't necessarily a choice and according to the Bible it's really no more a sin than lying. In either case, people will try to get away with what they can at the voting booth, and I completely respect that. It's very American to be passionate for an idea and try to make a difference in the government. Just please please, don't let propaganda get the best of you and try to not let your personal beliefs blind you of what's best for everyone.

Thursday, October 24, 2013

JTA connections with Springed HibernateDaoSupport and LOBs and Postgres.

I tried all sorts of things and never got this combination to work with LOB objects and Postgres. T.T

Postgres essentially requires you to use a transactional connection with large LOBs. And by transactional I mean that the application uses a container managed JTA transaction to commit to the database.

The problem with Spring and HibernateDaoSupport is that Spring acts as its own container so when it creates a transaction the real container views it as an application managed transaction, and gives it a non-transactional connection the database. So what's happening is that Spring manages the connection similar to how the container would, so effectively it is a transactional connection, but underneath the container provides a non-transactional connection. This works fine for most objects, but not with Postgres and large LOBs.

The solution would be to change out one of three technologies... either Postgres, Spring, or don't use LOBs.

Postgres might be the least intrusive to swap out, but I have no idea if MySQL has similar requirements.

Friday, October 18, 2013

stopping java threads...

So I'm looking up the best way to close a thread, and there's examples of stopping it with .interrupt().

That shit is whack cuz you gotta have the thread call something (either .wait() or .sleep() or something) that actually throws an InterruptedException in order for the Thread to intercept the interrupt.

So what if you don't need to sleep or wait? I'm not about to write unnecessary code in order to close a Thread "properly". I find that having a flag for my while loop works great and I can even control closing sockets properly and anything else that may be blocking the Thread.

There are definitely good reasons not to use .stop() since the API even says it's deprecated, on top of the weird Exceptions you could get.