Archive for December 17, 2010

Obama: No We Can’t?

I don’t normally get into the rubbage that we all hold so dear in our hearts, politics. My personal perspective on the matter is that it’s all the same. There is a persistent cycle that you can’t control but the man in charge always takes the credit, good or bad. I will say this much. I have my theories about the Republican party; they may not be a stupid as we often credit them as being.

Let’s think about this for a moment. Looking at this situation through Republican eyes, we are in the worst-case scenario that we’ve seen since the 20′s; war, unemployment, growing national debt, and more. There is absolutely nothing that could be done in a few short years but stay the course. Election time comes and McCain makes the worst pick in election history as his running mate. I’m starting to think that he did it on purpose, losing gracefully, and with a fist in the air to give hope for the next election year. Republicans dangle some rotting carrots in Obama’s face and he bites; hook, line, and sinker. Obama is now signing a pretty ridiculous bill that is obviously scewed to the rich, based on some weak promises and hand shakes that they will go easy on some of his agendas… Good luck with that. Looks like we’ll be back in the old Republican saddle in just two short years. Maybe it’s time to start investing in cattle and oil again.

XmlReader Made Easy

If you were like me and preferred XmlDocument (before XNA 4.0 compact framework made it disappear) then this snippet should help you. This is a very basic converter that allows you to preload a simple XML file and parse it like a graph instead of the cryptic linear parsings of XmlReader.  Enjoy.

LoadXML() takes an open XmlReader and creates an easy-to-read tree of nodes.  ‘XmlNode’ is a stripped down version of the XmlDocument node, allowing you to easily traverse a node and it’s children, as defined by the XML file.

NOTE: This was a quick a dirty. Attributes are not supported, and there are some O(N) operations that could be optimized out but it worked for my needs.

» Read more..