Scumbag Brain is a Scumbag – Afterword

I’ve recently been thinking a lot about my opinions on mental illness. You can ascertain plenty about a person’s belief about life, as well as philosophy, and perhaps even religion when listening to them speak about mental illness. Unfortunately though, that is another essay entirely that I’ll have to rewrite, that was lost in the great harddrive failure of quite a while ago. Perhaps you can see what I mean in an example of the logical flow of such a conversation.

As an example: It came to mind that if somebody believes that mental illness is not able to be overcome by will, then whatever causes the mental illness is a limitation of free will. If who you are is in your mind, and some piece of your mind has the power to limit your free will, then what are we? Are we slaves to the wiring we happened to get during childbirth? A rebuttal could then simply be to say that we made choices in childhood, and many of these illnesses are caused by experiences during childhood. Thus we are the cause of our own mental illness, in essence choosing to have something block our free will, and thus our free will is not actually stopped, but exercised. If a valid argument is to say that choices and who we are is not based on our mind, but the soul, then why might something in our mind limit the soul? …etc.

This circular style of argument could take branches and ultimately go on forever, while always coming back to the statement; “Ultimately, nobody knows for sure.” I think you can learn more about a person’s belief system by asking them about their opinion on mental health, than asking the common questions about religion. This also would be a more advisable topic if you wish to discover that information, as I have seen more eyes glaze over on the topic of religion than I am able to count.

It shows how much they have truly sat down and thought about who they are and where their thoughts come from. Where their sense of self truly resides. I believe it is a pursuit that all should take. Sit down and think about how you’re thinking.

-Ramblings of a nerd

XmlTransformer – Simplified XML / XSL Transformation in C#

XmlTransformer.cs

After a few days of trying to figure out how to manipulate XML with XSLT stylesheets in C#, I discovered it was slightly difficult. I personally don’t like difficult things remaining difficult, and promptly work on attempting to make them… less difficult.

If anybody wants to know how to apply XSLT to XML – I have included a class that is quite simple to use. Note though that it has only been used for my own purposes, and thus only tested for those purposes. If you do find bugs, or have xml/xslt that it does not work for, please send me examples of failures (if you are allowed) and I would be happy to fix any bugs.

 

If you have an XML document with processing instructions embedded:

1
< ?xml-stylesheet type="text/xsl" href="http://pathtoxslsheethere" ?>

Then usage is extremely simple:

1
2
3
4
5
6
 // optionally you can use XmlDocument:  XmlDocument doc = new XmlDocument();  and then load up the document
 XmlTransformer xmlToTransform = new XmlTransformer(doc,
      XsltAllow.DocumentFunction | XsltAllow.DtdProcessing | XsltAllow.ExternalResources);    
 //You can also explicitly set the settings in the properties of XmlTransformer
 string theTransformedDocument= xmlToTransform .ApplyTransformation();  
//Alternatively, you can pass in XSL or a URI to XSL or an XmlDocument object that has loaded an XSLT stylesheet.

If you do not have an XML document with processing instructions, the only part of the usage that changes is that you must add in a link/string/xmldocument pointing to or containing your XSLT to apply in the ApplyTransformation(); function.

Enjoy.

Gym responses

I was running beside a woman today, a rather extremely… husky, woman. She attempted to keep up to me, and when she failed she still managed to do a decent walking speed for over forty minutes. Since I go nearly every day I could tell the gym was a rather new experience for her, at least this one was, as I had not yet seen her there before. I was proud of the tenacity in her workout so when she turned toward me to remove herself from the treadmill I gave her a smile and a thumbs up. I will not make this mistake again. I have never seen such an angry face from a female stranger in my life.

Today I learned: Don’t give encouragement at the gym, apparently some people hate that.

Return top

INFORMATION

I do not adhere to a schedule. I post when I have something to say. I'm a programmer who in my spare time enjoys contemplating the meaning of life, the universe and, everything. So there will be code as well as random little stories, essays and, musing about whatever interests me at the moment.