Thursday, January 25, 2007

Heat ray, rail gun and more and more guns!

New heat ray created by the US Army: http://www.msnbc.msn.com/id/16794717/wid/11915829?GT1=8921.

Looks like it was made out of plaid. Also sounds like something Dr Evil was behind. Also, the Navy is working on a rail gun: http://www.thetechlounge.com/news/11038/Navy+Gets+8Megajoule+Rail+Gun+Working+32+and+64+in+the+works/.

In other news, the Air Force is working on a pretty powerful large weapon code named "Death Star."...read more!

Sysinternals Suite

I'm really exited now that I can download most of the tools that I use from Sysinternals in one simple download.

http://download.sysinternals.com/Files/SysinternalsSuite.zip

Close to 70 helpful exe's....read more!

Sunday, January 14, 2007

Running background processes in a medium trust environment

I was recently in a situation where I needed to run some background processes against some data and in-memory data structures that contained information that needed to be processed from time to time.

My application is an ASP.NET application hosted in a 3rd party environment where they have their trust level set to medium. They host the web applications in such a way as to not disrupt other applications due to my programming, so in a way, its a bit of like sandboxing. The host more than likely set these trust permissions in the machine.config file and didn't allow for the applications to override the settings, as most hosts would. Asking them to add a scheduled task would be an option, but highly unlikely due to security constraints.

One option is to create an .aspx page that had the functionality that I needed to get done and ping it every x seconds and have it do my work, but that requires an external source hitting my website, and it feels and smells dirty.

I ran accross Rob Howard's 10 Tips for Writing High-Performance Web Applications article on MSDN and found an entry on using a timer as a background thread. I decided to pursue this idea further by creating an HttpModule that loads up assemblies at runtime into AppDomains and executes a common method (much like a plug in pattern) to do the work. I ran into a really big issue using AppDomains, so I came up with an alternate way of loading the assemblies using reflection.

In the end I came up with a solution that would run in a high/full trusted environment AND a medium trusted environment. The HttpModule will basically "dumb down" to the lowest setting specified and load the assemblies in that fashion. This allows for better isolation in higher trusted environments, but maintain the base functionality of running tasks in the background in the case of medium trust.

The concept is pretty simple: load assemblies from a given directory (or current executing directory), load types specified in the configuraiton file for the given assemblies, make sure they are compliant to the proper plug in interface, and finaly execute methods on them. It's not very difficult to get something like this up and running, so I'll be posting a binary and possibly the source code as soon as I get it cleaned up, documented, tested and a bit more pretty, so it may take me a few days or week or so....read more!

Sunday, January 7, 2007

Linux in a Microsoft shop

I've always been a Microsoft guy. Mostly because of chance. I started off by playing games on Windows, then learning a bit of HTML and using FrontPage 98. Shortly after that came ASP, then VB6, .NET and here we are now with .NET. Granted, this all happened over a large period of time, and a few technologies where sprinkled throughout.

During most of my time developing, I couldn't see myself making a jump over to *nix. I always thought Linux desktops were cool with their transparent windows and nice screen savers, but I didn't know much about Linux past that. Granted, it was free and if I ever wanted to be truly type casted over to the "hardcore" developers, I thought I at least had to install Linux on at least one of my computers. That never happened. I had no reason to dabble in Linux, I felt nice in cozy drinking Microsoft's Kool-Aid, so I just turned my head to anything Linux... and Mac!

Now, here I am as a small business owner to be, and I'm faced with making cost conscious decisions. How can I run my business at a low cost? Well, I'm fairly new to the market, so I will be learning as I go. I can use my common sense and not go for the most expensive software/hardware/etc... just for the sake of it. I also knew that I had to have at least the bare essentials for my consulting business, two of which are source control and defect tracking.

In comes Linux and VMWare. Shortly after purchasing VMWare Workstation (roughly $200 from time of writing) for testing and development purposes, I noticed that the VMWare site had a section (VMTN) where you could download pre-built Linux machines with applications. We're talking about applications that run bug tracking software, source control, firewalls, software load balancers, coffee makers (latte's not available)... Furthermore, leveraging VMWare's free software to run virtual machines, you can run these solutions pretty much free!

There are some limitations of course, there is no such thing as free lunch, that is of course unless you take it from someone weak, but that's just the bully in me. Some of the VMWare pre-built applications weren't exactly what I was looking for, they were either too hot or too cold. I had to modify something or another to get them to work properly, so in the end I decided to download the image for Ubuntu (flavor of Linux) and install everything myself to my own taste. I preferred this route because I accomplished something I thought I never would, I learned Linux and the outcome benefited me by having software that I could rely on.

I plan to keep on using the VMWare/Linux combination until I find better alternatives that include the cost-benefit/functionality advantages that this duo offers.

But I still don't like Macs....read more!

Tuesday, January 2, 2007

A new year, a new beginning

I've always been one to not like New Year’s resolutions. I’ve tried to convince myself that I shouldn’t wait until the new year to change my life, rather when I have the thought of changing, that I immediately make an effort to change my life for the better. Whether it is personal, work or any other aspect of my life, there is always room for improvement. Yet despite my efforts of continually changing to better myself, I find myself stuck in the same type of plateaus.

Despite the fact that I do not like waiting until the New Year to enforce change, I feel especially positive about the turn of the year, leading into 2007. Primarily because I’ve been starting my new efforts prior to the year’s end.

Part of the reason I’m writing this is to document what I will change in this upcoming year, whether by 180 degrees or just marginal improvements.

One of the places I will improve on is my sense of getting things done. With the help of 2 really good books that I will write about soon, as well as the support of my loving wife, I will accomplish a self satisfying sense of accomplishment. Now let me get something clear: I get things done now. I want to get things done in such a way that I am not distracted by auxiliary tasks and other responsibilities. It comes for a sense of focus and determination to work on a given task without interruption, be it external or internal (distractions, such as email or other tasks to be done).

Continuous education in my professional life which includes learning a new language, not so much for applying it, but allowing me to keep an open mind about new approaches. Learn a new aspect of .NET, perhaps the new Vista technologies (.NET 3.0) and such.

Health is another aspect of my life that I hope to improve on. I will continue my martial arts training and start to attend a gym (that I currently pay for but don’t go to) and start eating better. In the process of eating better comes bringing healthy food to work instead of eating out.

There are other more personal items that I will disclose later, but I wanted to bring up three things that I think are essential in getting my business off the ground: focus and accomplishment, continuing education and the ability to perform my duties for my customers.

One final note: none of this is possible without my sense of faith. Without my faith I will not be able to complete anything noted above. Faith is what wakes me up in the morning, motivates me to finish things and gives me the inspiration to learn new technologies. This is a personal pillar of my life that I will sparingly share through these entries....read more!