I’ve just thought of a cool Web application debugging technique that allows me to see the value of something on the server side conveniently on the client side. Wherever I want to see the value of a variable in my server side script I can print a line of javascript that alert()s  the value of the variable. Like so (PHP example):

    <?php print '<script type="text/javascript">alert("' 
    . $variable_to_output 
. '");</script>' ?>

I like this technique because I don't have to print the value to the page itself. Nifty I think. Surprised I never thought of it before.

Finding Jesus in 12 Easy Steps

Posted: February 8, 2009 in Drugs
Tags:

I have the pleasure of being a hardcore psychonaut, and I wouldn’t really want life any other way. However I’ve had the great misfortune of being exposed to the subculture of recoveryism, and 12 step programs because of external pressures. I never wanted any of that but my family does and so do health professionals.

I am however of the opinion that a scientific, medical problem like addiction requires a scientific approach to healing. There is NOTHING scientific about prescribing Jesus for addiction and the so called “health care professionals” that work in substance abuse treatment are doing what is perhaps the greatest disservice to humanity by pushing this whole 12 step nonesense. Would the AMA be satisfied for prescribing Jesus in 12 steps for colon cancer or heart disease? Drug and alcohol counselors are nothing but modern day faith healers. It’s no wonder addicts relapse over and over again. There are no answers for them!

I was recently talking to my primary care doctor about getting off of dextromethorphan and she said, more or less, that unless I’m willing to “let go and let god” then she has no answers. WTF is that about? This whole subculture of recoveryism is the saddest, most pathetic example of humanity I’ve ever encountered outside of a church, and it needs to be stopped now!

Seyret is quite possibly the best argument against outsourcing programming jobs to India. I can’t think of a worse product on any market. The author of Seyret (who’s name is Mustafa something) should be publically humiliated for selling this piece of shit even when he versions it at 0.2.x. The thing is so far from stable and the code is impossible to read. Why the hell hasn’t Mustafa ever heard of CamelCase, underscores, and white space?

It just goes to show that if you can put up a good enough looking website you could sell coal as diamonds. But you can’t polish a terd, and not amount of magic fairy pixey dust could salvage anything more than a great headache from something as crappy and as embarrassing as Seyret for Joomla.

As for you Mustafa whoever the hell…just because you translated your site into English doesn’t give you the right to sell garbage to the Western World. If you want to write shit software go ahead, just keep it in Calcutta where it belongs!

Debugging JavaScript code in Firefox is easy, but what to do with poor old Internet Explorer? Well here’s your answer.  To debug JavaScript in MSIE follow these steps:

  1. Install Visual Web Developer Express Edition from Microsoft. It’s free!
  2. Set IE to be your default browser.
  3. Run Visual Web Developer Express.
  4. Create a new empty Website.
  5. Start debugging by either pressing the “Play” button, the F5 key or the menu options.
  6. Use the browser window that opens up as a result of the debug starting to navigate to the site you wish to debug.

Is that too much to ask? Yes, but it works! You can then debug from within the Visual Web Developer Express application. Enjoy!

After always wondering if it was possible to create private members somehow in JavaScript, I finally took it upon myself to investigate. Due to a concept of ‘closures’ relating a symbol’s scope it is possible to create private class instance members/methods.

Read the rest of this entry »