Punk-coder Blog

The Upper Limit Number of Applications in BizTalk

by on Jun.02, 2010, under Technology

So we had an instance today where we wanted to know if BizTalk would be capable of handling a large number of applications. So we decided to run a small test that would allow us to see how the system holds up under these circumstances. Note that we know that this was not a conclusive test, but was instead designed to see if there was a preprogrammed upper limit.

The environment that we were using was a virtual machine, with 8 cores and 2gb of ram, with that we were able to get the number up over 1024 applications without BizTalk showing any issues. With that said we didn’t have any ports, orchestrations, or schema’s installed in the applications. So this is solely about the number applications.

The next step is to make the multi-threaded version of the app for adding it to the server so that I can go over the 1024 without having to wait for the hour and a half.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Threading;

namespace ApplicationAdder
{
    class Program
    {
        static void Main(string[] args)
        {
            bool isAdd = false;
            int length = 1024;

            for (int i = 0; i < length; i++)
            {
                if (isAdd)
                {
                    ExecuteCommand(@"BTSTask AddApp -ApplicationName:SampleAppNumber" + i, 300000);
                }
                else
                {
                    ExecuteCommand(@"BTSTask RemoveApp -ApplicationName:SampleAppNumber" + i, 300000);
                }
            }

        }

        public static int ExecuteCommand(string Command, int Timeout)
        {
            int ExitCode;
            ProcessStartInfo ProcessInfo;
            Process Process;

            ProcessInfo = new ProcessStartInfo("cmd.exe", "/C " + Command);
            ProcessInfo.CreateNoWindow = true;
            ProcessInfo.UseShellExecute = false;
            Process = Process.Start(ProcessInfo);
            Process.WaitForExit(Timeout);
            ExitCode = Process.ExitCode;
            Process.Close();

            return ExitCode;
        }
    }
}

Update: It appears that BTSTask.exe doesn’t handle multi-threading very well so this will have to stand in the event that someone decides to run this test any further I would really like to hear the results.

1 Comment : more...

Reflection on my own faith following a conversation with Paul

by on May.15, 2010, under Uncategorized

As I continue to grow I have interesting conversations with Paul, I am not an atheist. But I also shared very little in common with the people that he targets.  I worship the earth for it’s cycles as a living being. One that has ways of it’s own.  I believe that we are directly connected to it in a way that is deeply spiritual.

I believe that there is a reason that human as an animal has attempted to break they cycle that appears everywhere in nature.  Our use of tools and weapons was our first step in attempting to control nature,  attempting to grasp our control over the world and elevate ourselves to the level of diety.  I feel that because we have forgotten where it is that we came from that we have transformed from a part of the Ecosystem into a cancer of it. Many now believe that the world is theirs to harness, control, and destroy.

I believe in the duality of nature, found not only in the requirement of my species, but also throughout all of nature. As a species and as a collective we are interdependant not only in our own species, but on other species that require our interaction to continue. Offspring of our species cannot reproduce with our the components of both a healthy female and a healthy male. Becuase of the understanding of this connection it is a relationship that we have no oother ability but to accept as sacred. The requirement for us to secure our liniage is one that is almost universal, which is evident to the sacredness of this connection.

The final portion of this is our connection to the spiritual, our connection to the world.  In some ways this is as simple as finding purpose in your life. But it is the personal connection that you share with yourself and your understanding of your role in relation to nature.  Taking the time to ponder your relation to the world is something both spiritual and rewarding.

I believe that it is the role of humans to be the protector of our gods and to live in harmony with them.  We must stirive for conservation of life and protection of the planet that we live in as well as all of the species that rely on us, we are their keepers and gaurdians.  This I believe is why we were gifted with intellegance and perception beyond our own environment.

I believe the the reconcilliation of these tasks will require the active attention of all of mankind.

Leave a Comment :, , more...

An interesting use for Skype

by on May.10, 2010, under Hak-Simple, Technology

So over the past couple of months we have been adjusting to a new life with our dog. We both love her alot but one of the problems that we are having to deal with is the fact that she has some very serious issues with separation anxiety. While not as bad as some of the cases that I have read about on the internet, it has been a problem to the point where she has managed to destroy a couple of the items around the house.

  • a rug
  • several comforters
  • a multitude of caribeaners
  • a set of sheets
  • one medium dog kennel
  • one large dog kennel
  • finally, she took a bite out of our new bed.

Not one to be discouraged in handling the issue, We have managed to make some changes that I think have managed to get things a little more under control. First she goes for a thrity min walk every morning.  But a slightly more interesting partial solution to the problem is to be more near to her so I can calm her down.   It really seems to be working, but here’s the idea.  I have two laptops with mic’s and webcams.  One is my work laptop and the other is a really cheap netbook that I bought a couple of months back.  Since I am not using it while we are in town, I have set it up so that it sits on  a small nightstand next to my be pointed so that she can see the screen and so I can see her.  Part one done.

The second part of the trick is setting up two different skype accounts one for the netbook and the second for my work computer,  This is simple enough. Then on the netbook I set up the account to only accept calls from the people that are on the friend list, set it to automatically accept calls and to do full screen video.  So as soon as I call in the video goes full screen, with that she can see and hear me.  So the only thing that is left is for her to draw a connection to the image that she sees on the screen and the real person.

This one escaped me for a little while,  I noticed that I could eventually get her to listen to me after repeating ‘lay down’ several times, something that seems extremely strange in a work setting like I work in. Then I finally figured out how to make it happen when I was working from home.  For the first couple of times I would say it over the computer, then when she wasn’t listening I would storm over to the bedroom where her crate was located and I would be assertive in my direction.  It only took a couple of times before she began to realize that if she didn’t listen that there were negative consequences.  Luckily our dog is a people pleaser and responds very well to mild negative and positive reenforcement.

Now while I am at work I can keep her on in the background and I hardly have to say anything more than once, and I have noticed that she is becoming more and more mellow, hopefully this will help in the long run.  But we will find out.

2 Comments :, , more...

Parallel namespace in .NET 4.0

by on Feb.11, 2010, under Code

It was only a couple of months ago that I purchased a new laptop. A very shiny Dell Studio 15, with a core i7 in it.  I have been very happy with it.

But it wasn’t long before I started to notice a problem, when I would run programs it would max  out one maybe two of the cores and the rest of the computer would be idle.  For a machine that has 8 logical cores (4 Physical w/HT) that’s a whole lot of waste without a whole lot of return.  Then I started to think about the problems that come up with doing multi threading in code.  It’s flat hard, and in many cases if  its not something that you were thinking about from the very begining you are in for a world of hurt.  So you could imagine how happy I was when I heard about the Parallel namespace that is included in version 4.0 of the .net framework.

The idea was that because multithreading is difficult especially when you are talking about systems that are generally designed by people whom have little deep understanding about the technology that they are dealing with, it was refreching to see that the people in redmond were thinking about us.  Now it is as simple as working with a single namespace and making sure that your resources are properly taken care of.

How well does it work?  I decided to put together a little test to test the whole thing out. So I decided to create a small code segment that would simulate a thousand segments processing at 10ms a piece and the results were almost exactly what I expected, I tested this on my new laptop, so it’s splitting the work between 8 logical processors.

Single Console Run Time : 9990ms
Parallel Console Run Time : 1216ms

While this is not a super scientific task since we can see that the work that is being done is just putting the thread to sleep, it does effectively show that the framework for parallel core processing is working and can be implemented with little extra work.

Here’s the code so you can test and see what you come up with:

static void Main(string[] args)
{
int MaxCount = 1000;

System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch();

timer.Start();
for (int i = 1; i < MaxCount; i++)
{
Syscode(i);
}
timer.Stop();
Console.WriteLine("Single Console Run Time : {0}ms", timer.ElapsedMilliseconds);
timer.Reset();

timer.Start();
Action sysDelegate = new Action(Syscode);
Parallel.For(1, MaxCount, sysDelegate);
timer.Stop();

Console.WriteLine("Parallel Console Run Time : {0}ms", timer.ElapsedMilliseconds);
Console.Read();
}

public static void Syscode(int x)
{
System.Threading.Thread.Sleep(10);
}
2 Comments :, , more...

The joys of SPAM

by on Feb.11, 2010, under Website

It’s amazing to me the amount of digital waste that is created on the internet.  This blog is no exception, mostly for content. But it amazes me the amount that I can get on a single blog post.  I cleaned out my responses a little less than a week ago and managed to find that there were forty two new items in there waiting for me.  So I wonder just exactly how much of the internet is spam, and is there any chance that we will be able to turn this tide back.  Or is it entirely possible that when they go back through the history books and look at what will be the ‘Source Documents’ of this century are they going to have to sift through all of the bogus ads for extending parts of the body and payday loans.

These are the things that keep me from getting the good jobs.

1 Comment :, more...

Redefinition of Religion

by on Jan.05, 2010, under Uncategorized

It occurs to me that in order to have a conversation about religion and faith we first have to consolidate what we are talking about.  Because there are some many experts on the subject the definitions that are out there are plentiful and on the whole not particularly useful.  The definitions from Dictionary.com seem to be some of the most complete and prolific, they are included below so that we can talk about them in more depth.

religion
–noun
1.     a set of beliefs concerning the cause, nature, and purpose of the universe, esp. when considered as the creation of a superhuman agency or agencies, usually involving devotional and ritual observances, and often containing a moral code governing the conduct of human affairs.
2.     a specific fundamental set of beliefs and practices generally agreed upon by a number of persons or sects: the Christian religion; the Buddhist religion.
3.     the body of persons adhering to a particular set of beliefs and practices: a world council of religions.
4.     the life or state of a monk, nun, etc.: to enter religion.
5.     the practice of religious beliefs; ritual observance of faith.
6.     something one believes in and follows devotedly; a point or matter of ethics or conscience: to make a religion of fighting prejudice.
7.     religions, Archaic. religious rites.
8.     Archaic. strict faithfulness; devotion: a religion to one’s vow.
—Idiom
9.     get religion, Informal.
a.     to acquire a deep conviction of the validity of religious beliefs and practices.
b.     to resolve to mend one’s errant ways: The company got religion and stopped making dangerous products.

Taken from Dictionary.com
link: http://dictionary.reference.com/browse/religion
Date: Jan 05, 2010

The first of the definitions can be both the best description and the most controling of the definitions that are included here.  The problem in defining religion is that the spectrum of faith is far too broad.  There are many groups that would include themselves on the spiritual side that strongly reject the connection to a ‘superhuman agency’, instead worship the natural elements themselves.  In this way the forces of nature are personified only in as much as they help the people to comprehend them.  As the planet itself is not a human being it can be said that it is very much alive, which may make it all the better for personification.  We as humans have a very hard time feeling a connection to something that is incapable of sharing our connection to ourselves.  This is why we love dogs so much, they are just human enough to be personified.  This idea of a supernatural being that watches over things may be just as hard for someone who is practicing in the realm of psychidelics.  For that matter what about the humanist whom holds the golden ideals above all other principals?  I would venture to say that all of these individuals are members of religions but are failing to be covered by the initial statement.

The next section is marking the ritual observances,  in many cases this is one of the greatest cases for the marking of religion. We all have holidays, because at the deepest part of our understanding we all just want another day to celebrate something.  It’s also nice to have a day off once and a while.  But this also offers us a chance to reflect as a group about the nature and future of the congregation,  But this type of activity is not exclusive to religion and can be found in many civic organizations.

In the end when I make a mention of religion the definition that I will use solely because it is mine and I think that it helps me to come to a better understanding:

Religion is man’s best attempt to extract and nurture all of the best qualities, while attempting to discourage it’s worst practices, involving the devotional observances to something outside of oneself, in an attempt to better understand and cope with our existance.

In this way every Christian, Pagan, Bhuddist, and Humanist share the common bond.  There is something out there that controls our though and guides us.  It is also because of this that I believe that there is no such thing as an atheist.  Before you start, I’ve heard the same thing over and over again: ‘I’m an atheist because I don’t believe that there is some cloud man that is sitting over me making me do things and silently judging me.’  The reason that I say that there is no such thing as an atheist is because it is in our nature as human beings to believe in something.  To some of the Atheists it’s the compassion of the human spirit.  To some it’s the belief in the power of science to uncover the mysteries of the world, this is still a belief.

I would love to hear your thoughts on the subject, please use the comment section below to help me flesh out this conversation more.

Note use of definition number 9 in my presance will more than likely generate a conversation that everyone will regret.

Leave a Comment more...

The Introduction of the Reverend Rawk… (give me all your thoughts on god)

by on Jan.05, 2010, under Uncategorized

This has been an interesting year in the fact that I finally managed to get all of my stuff together and gettingh my ordination.  This is something that I usually am not completely public about due to the fact that I still believe that religion is something that should never be pushed on to anyone.  While it is a huge part of my life I realize, mostly though growing up in a very closed minded region, that not everyone thinks the same way that I do.  In fact most people don’t and this is the reason that I have decided to start the collection of my thoughts on religion.

I will do my best to cover the subjects here as thoroughly as possible , while attempting to shed some light on the subjects and reasons that I believe that religion and faith still have a very important place in the world.

Leave a Comment more...

Another post from the couch.

by on Jan.05, 2010, under Uncategorized

We are faced with another year, and looking back on it I realize that there is a lot that has happened over this last year. Accomplishments that I have managed to complete over the last 365 days.

1.) I am a Microsoft Certified Professional Developer for Enterprise Applications.

2.) I have managed to complete the writing of my first novel ( I still have to do the editing)

3.) I have donated clothing.  For me this is huge,  I am now getting to the point where I have to get rid of clothing that no longer fits.  I didn’t lose a lot of weight this year (-6 lbs for the year),  but feel that I have proven to myself that I am capable of keeping off the weight and maintaining.

4.) I have adopted a dog.  This has been one of the most challenging things that I have been through.  Kiddo is a hand full.

All in all I was able to mark eleven of the items off my list that I had set out to accomplish over the next couple of years.  That means that I have about ninety to go in the next two years.  Looks like I have my hands full.

Leave a Comment more...

Become the Media

by on Aug.14, 2009, under Technology

I remember listening to the words of Jello Biafra in high school, his spoken word works definatly help to shape me into the person that I am today. They allowed me to look at things in a way that I consider more intellegant than I think I would have otherwise been. While I don’t agree with everything that he said, the sensationalism really helped to drive the message home.

But there is one of the recordings that I go back to time and time again becuase I think it shares a particular relevance to todays world. The work is called Become the Media in this work he urges people who are disatisfied with the world around them to get out there and do something about it.

As a software professional I am contastantly wondering how I apply my special skills to this equation. Is bloging the correct answer, I really don’t think so. I realized long ago that I really don’t have the writing skills to become a serious writer, but what I do have is a voice and a set of skills.

So this is a solicitation, if you are interested in working on a project that may help others to ‘Become the Media’ please leave me a comment with you name and some way that I can get a hold of you. I have to review each of the comments before they are posted so I will make sure that your info doesn’t make it onto the site.

Technorati : ,
Del.icio.us : ,
Zooomr : ,
Flickr : ,

Leave a Comment :, more...

The Bane of Developers Existance : Experts-Exchange

by on Aug.13, 2009, under Uncategorized

Everyonce and a while I need a good rant. This is one that has been brewing for a long long time.

When I run into a problem that I generally can’t solve immediatly I often search for a solution online. Thats the beauty of the internet, it’s a collection of really great people work to solve problems. But there is nothing more frustrating than searching sites and coming time and time again to the same site. Normally this would be good becuase it allows you to find out who is the leader in this area. But there are a hand full of sites that when I mistakenly click on the link to their site from google that send fire into my veins.

Expert Exchange is a bullitin board that is a pay site for people to exchange infromation. If I remember the speil, the idea is that if people pay for the right to be a member of the board that they will care more about the people and everts that are going on there. The major problem is that I have no interest in being a member of their board. I remember back to a time before they were a paysite and all of the Aweful content that they had there. Most of the questions were genuine questions and the majority of the answers were pure drivel. But they have for a while managed to (i’m sure) sucker people into paying for membership to their boards, the way that they do it is what infurates me. When I search for the content they post the question and say ‘if you want the answer become a member”.

The final note out there is that there are alot og groups out there that really help to make programming easier find one that meets your needs and rock out with it. But if you aren’t going to offer anything real, please for the love of god don’t advertise junk to me.

</ramt>

Side note, thanks to Rick Stahl for all of his posts about using jQuery with WCF. While I desipise the use of javascript ( another rant for another time ) it was made sightly less painful by the fact there were so many good resources out there. So if you get a chance please check out his site.

Technorati : ,
Del.icio.us : ,
Zooomr : ,
Flickr : ,

1 Comment :, more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...