June 13, 2011

listentothealbum a book club but for albums

Category: Very interesting, but stupid — Jon @ 4:32 pm

A couple years back when I found Pandora my music listening had hit a plateau and I was listening to the same things I had been listening to for the last 5-10 years. Pandora was/is awesome and turned me on to a ton of new music. The problems with Pandora is you only hear one song. That song maybe isn’t representitive of the band (See My Girls by Animal Collective) Albums have always held a special place in my heart. So in the spirit of listening to more music I decided to start a new site www.listentothealbum.com as a book club for albums It’s nothing more than a list of albums for everyone one to listen to. It’s about 10-15 people right now and if no one else participates that’s fine but even more people would be fun.

I kept it on the DL at first because I didn’t have a good way for people to listen to the albums. Once I solved that I started putting the link up for everyone so please check it out and listen to the album

June 2, 2011

Enable Client Integration and Sharepoint 2010 with Forms Based Authentication

Category: Programming — Jon @ 5:21 pm

I was dealing with an issue last week with users to one of our sites being prompted for authentication a second time when attempting to access Microsoft Office documents. The site uses forms based authentication and the users would already be logged in. They would click on a link to a Word document that was hosted in a library on the same site and they had permissions to view the document but an authentication prompt would be displayed even though they were logged in and should have access. To make it even better if you just cancelled out of the authentication window the document would be displayed anyway.

After doing a little digging through error logs and Fiddler it appeared that the document first tries to authenticate via and we were recieving an error code 917656 which Microsoft in one of their webdav documents referred to it as

Access denied. Before opening files in this location, browse to the Web site and select the option to authenticate automatically.

That would be ridiculous for me as this site is not an internal site and I don’t expect users to treat it as an intranet site. This is an anonymous access content publishing site with an FBA protected area. Most of the info I could find said roughly the same thing. Add the site to local intranet sites.

What I ended up trying was going to the authentication provider and Changing “Enable Client Integration” to no under Security->Specify Authentication Providers->Choose the Claims Based Authentication Provider and scroll to the bottom of the page. The other thing that had to be done was in IIS going to Request Filtering and under HTTP Verbs adding 2 entries(Verbs) OPTIONS and PROPFIND and setting them both to false. While this has solved the problem of not prompting multiple times for Word docs it turned off more than I had bargained for. I assumed it would turn off the check in and out features from inside the doc but here is what I have found so far that it affects:

Check in and out from inside Office docs
Connect to library through Explorer(webdav)
Edit library/list data in Excel
Email a link(I used this a lot to get the direct link for a doc)
Connect to the site using Sharepoint Designer(This was the dealbreaker)

We can’t not have Sharepoint designer. Everyone of our sites has custom masterpages and templates so I’m still hunting for an alternative. I keep bouncing back and forth between it’s a known issue or it’s something with our set up. I will update this post once I have a resolution

April 26, 2009

Why I love ballroom dancing

Category: Very interesting, but stupid — Jon @ 8:25 pm

The wozI hate ballroom dancing. I would never want to do it. Dancing in general isn’t that interesting to me and doing it slowly to bad music with a bunch of people in stuffy clothing even less so. Also those people probably like ballroom dancing… but so do I. I love it in fact. I love a lot of things that I don’t like but have absolutely no effect on my life.

I want the whole world to be full of things that I don’t do. Variety is the spice of life some say. I don’t say it but others do and I agree with them in principle. Life would be less interesting if we all did and thought the same things. At the very least the lines for those things would be longer.

I’m not sure what the internet is doing to underground culture but it is certainly making it more accessible. It used to be if you wanted to do something a little non standard you had to really look to find info about it. For me it was radio controlled cars or paintball. You would find a magazine or go to some little shop and talk to people there. Now all you have to do is google (v. to google, also see yahoo).

I had a Western Civ professor in college who claimed pop culture began with the Sears Catalog. One big piece of mass marketing that everyone got so we could all know what to buy. I don’t know if he was the first to think of that but it makes sense. Suddenly everyone had the same options as what to buy. Given the same limited options do we all tend to gravitate to the best options? I don’t know, I’m just making all this up but the internet is both consolidating certain experiences such as shopping with amazon.com or giving us seemingly infinite options for in-depth info on any edge case hobby we want.

What does it all mean? I don’t know but I love the fact that there is a whole world full of stuff I don’t like and know nothing about. It means there are plenty of options of new things to do and others that I don’t need to worry about.

Canceling Workflow in Code in Microsoft CRM 4.0

Category: Programming — Jon @ 7:46 pm

No, I don’t write a lot about coding on here often but since my mission statement for my blog is all things me and I just spent the last few hours digging through SDK to figure out how to cancel a workflow with the CRM 4.0 SDK I figured I should write a blog post. Google had nothing about it so hopefully the next person will find this. Be forewarned, I haven’t fully tested this so use it at your own risk. One thing I haven’t tested is how CRM behaves when you try to change status on something that is waiting for resources. I expect it will work but who knows.

The gist of it is instances of workflows are now contained in the asyncoperationbase table and entity. Go retrieve the asyncoperations you are interested in. In my case I would know the workflow name I was after as well as the CRM objectID of the record the workflow would be running on. Once I have that list I check and see if the status is an a status that I want to cancel. The statuses and states are listed in the SDK. You have to set both the status and state for the operation to take effect. It doesn’t throw an error like I recall CRM 3.0 doing about mismatched status and state combination’s, it just goes along its merry way and doesn’t change anything.

In CRM 3.0 you could use the SetStateWFProcessInstanceRequest but since everything around WFProcess was deprecated I am doing it with the TargetUpdateAsyncOperation as seen below.

TargetUpdateAsyncOperation operation = new TargetUpdateAsyncOperation();
operation.AsyncOperation = singleWorkflowInstance;

UpdateRequest update = new UpdateRequest();
update.Target = operation;
UpdateResponse updated = (UpdateResponse)service.Execute(update);

So here is the code I wrote to do it and it does indeed cancel a workflow. The Utils.GetCrm4Service() method is my own and you will need to either implement it yourself of just instantiate the crmService yourself in place. There are plenty of examples on how to do it. I’d love feedback if you use it or if you know of a better way.

public static void KillWorkflow(string workflowName, Guid entityId)
{
string error = “”;

CrmService service = Utils.GetCrm4Service(null, false);

ColumnSet colsWf = new ColumnSet();
colsWf.Attributes = new string[] { “name”, “statuscode”, “asyncoperationid”, “regardingobjectid”};

ConditionExpression conditionName = new ConditionExpression();
conditionName.AttributeName = “name”;
conditionName.Values = new string[] { workflowName };

ConditionExpression conditionRegardingObjectId = new ConditionExpression();
conditionRegardingObjectId.AttributeName = “regardingobjectid”;
conditionRegardingObjectId.Values = new string[] { entityId.ToString() };

FilterExpression filter = new FilterExpression();
filter.Conditions = new ConditionExpression[] { conditionName, conditionRegaridingObjectId };
filter.FilterOperator = LogicalOperator.And;

QueryExpression query = new QueryExpression();
query.ColumnSet = colsWf;
query.EntityName = EntityName.asyncoperation.ToString();
query.Criteria = filter;

BusinessEntityCollection results = service.RetrieveMultiple(query);

if (results.BusinessEntities.Length > 0)
{
for (int i = 0; i < results.BusinessEntities.Length; i++)
{
asyncoperation singleWorkflowInstance = (asyncoperation)results.BusinessEntities[i];
if(singleWorkflowInstance.statuscode.Value == AsyncOperationStatus.WaitingForResources ||
singleWorkflowInstance.statuscode.Value == AsyncOperationStatus.Waiting ||
singleWorkflowInstance.statuscode.Value == AsyncOperationStatus.Pausing ||
singleWorkflowInstance.statuscode.Value == AsyncOperationStatus.InProgress)
{
try
{
Status statusCanceled = new Status();
statusCanceled.Value = AsyncOperationStatus.Canceled;

AsyncOperationStateInfo state = new AsyncOperationStateInfo();
state.Value = .AsyncOperationState.Completed;

SetStateWorkflowRequest request = new SetStateWorkflowRequest();
singleWorkflowInstance.statuscode = statusCanceled;
singleWorkflowInstance.statecode = state;

TargetUpdateAsyncOperation operation = new TargetUpdateAsyncOperation();
operation.AsyncOperation = singleWorkflowInstance;

UpdateRequest update = new UpdateRequest();
update.Target = operation;
UpdateResponse updated = (UpdateResponse)service.Execute(update);
}
catch (System.Web.Services.Protocols.SoapException ex)
{
error = “KillWorkflow Error ” + ex.Message + “” + ex.StackTrace;
}
catch (Exception ex)
{
error = “KillWorkflow Error ” + ex.Message + “” + ex.StackTrace;
}
}
}

if (error != null && !error.Equals(“”))
{
throw new Exception(error);
}
}
}

December 11, 2008

Me I want a hula hoop

Category: Very interesting, but stupid — Jon @ 6:18 pm

I have always been a fan of Christmas music as well as Christmas in general. My parents had a few Christmas albums around so I never thought too much about it but now as I decide I am feeling festive I realize that I don’t have much of a catalog. So with this post I am requesting proposals for Christmas music to acquire. An “RFP – eace on earth good will towards men” if you will. No? You’re probably right.

So here is what I have:
ChipmunksMerry Christmas From the Chipmunks (full album)


Big Bad Voodoo DaddyMr Heat Miser by Big Bad Voodoo Daddy (single track)


Bing CrosbyBing Crosby Christmas Classics (full album)


O Holy Night by Trombone Shorty (single track) this is from the TV show Studio 60 on the Sunset Strip and it’s amazing and free so go download it


and last today I ordered this. My mom had it as a little girl and I really like it. It’s been discontinued but you can find it if you look. I hope it gets here by Christmas…


Spike Jones ChristmasIt’s a Spike Jones Christmas


What else ya’ got?

July 18, 2008

…I’m afraid to say I think I like a song by Thursday…

Category: The Rock Music — Jon @ 9:36 pm

With the recent addition of the apple iphone application I have been sampling different apps and I installed the Pandora music player. As it turns out this app is just a mobile interface for the web site www.pandora.com. Pandora is a web site that you tell it a band you like and then it plays songs that it thinks you will like. You then give a thumbs up or thumbs down to each song and I assume it alters the future playlist based on what you like and don’t like. However, it occurs to me that it would be funny if it didn’t :) . That said I have Pandora’s reasoning:been fairly impressed on what it has played for me. I took 2 playlists I created and wrote down the next 5 songs it played. These weren’t the first 5 it played because I didn’t think about blogging it fast enough. It is interesting to see how they categorize certain songs. My comments in italics

Playlist #1
Band I Like: Pinback

Song #1
Pinback
Charborg
Pinback

Pandora’s reasoning: Electric rock instrumentation, electronica influences, punk influences, intereweaving vocal harmony, paired vocal harmony, minor key tonality, melodic songwriting, vocal duets

I tell it I like Pinback so it plays a Pinback song for me. Fair enough. Thumbs Up

Song #2
Mellowdrone
Fashionably Uninvited
Box (Explicit)

Pandora’s reasoning:mixed acoustic and electric instrumentation, major key tonality, a vocal centric aesthetic

Thumbs Up

Song #3
Modest Mouse
Heart Cooks Brain
The Lonesome Crowded West

Pandora’s reasoning:Major key tonality, vocal harmonies

I’ve never been terribly fond of Modest Mouse but I liked this song. I hope it doesn’t rank based on band but song characteristics. Thumbs Up

Song #4
Pinback
Subbing For Eden
Autumn of the Seraphs

Pandora’s reasoning:mild rhythmic syncopation, interweaving vocal harmony, paired vocal harmony

Pinback again. Not terribly inventive but it’s hard to fault for playing the hits. Thumbs Up

Song #5
The Ranconteurs
Steady, As She Goes
Broken Boy Soldiers

Electric Rock instrumentation, a subtle use of vocal harmony mild rhythmic syncopation, a clear focus on recording studio production, mixed minor and major key tonality, a vocal centric aesthetic, electric rhythm guitars, a distinctive male lead vocal

I had never heard the Ranconteurs but had heard a lot about them. It’s interesting that they listed vocal centric aesthetic and distinctive male vocal because I think of Pinback having neither. I didn’t like this song. Thumbs down

Then I told them I like Quicksand

Playlist #2 Quicksand

Song #1
Clutch
Promoter(Of Earthbound Causes)
Blast Tyrant
hard rock roots, a subtle use of vocal harmony, repetitive melodic phrasing

One of my favorite bands. Well played sir, well played. Thumbs up.

Song #2
Dinosaur Jr.
Lose
You’re Livin All Over Me
hard rock roots, punk influences , a subtle use of vocal harmony, mild rhythmic syncopation, demanding instrumental part writing, minor key tonality, a vocal-centric aesthetic, electric rhythm guitars

It seems like every time I hear a dinosaur jr song just off hand I like it, ask who it is, and someone tells me it’s dinosaur jr. If I go listen to them on my own then I don’t like them. Thumbs down

Song #3
Unwound
Natural Disasters
The Future of What

We’re playing this track because it features hard rock roots, punk influences , minor key tonality dirty electric guitar riffs a gravelly male vocalist an aggressive male vocalist and many other similarities.

Generally I like Unwound but not this song. Thumbs down

Song #4
Three Penny Opera
Postcards From Far Horizons
Three Penny Opera

features hard rock roots, a subtle use of vocal harmony, minor key tonality, heavy electric rhythm guitars and many other

Thumbs down

Song #5
Shotgun Messiah
Sexdrugsrockn’roll
Second Coming

hard rock roots, a subtle use of vocal harmony, demanding instrumental part writing, minor key tonality and many other

I didn’t like this song but they would have gotten a Thumbs down just for their name. The first band played I have never heard of

Song #6
Gang of Four
Guns Before Butter
Entertainment!

hard rock roots, punk influences, a subtle use of vocal harmony, demanding instrumental part writing, minor key tonality and many other

I had heard of these guys name but not sure if I have ever heard them I dig it. Thumbs Up

All in all I really like this site/application. It definitely is getting me to listen to songs/bands I might not have otherwise. Based off listening I am going to go get Maritime We, The Vehicles as soon as possible. I was disappointed with their first album post Promise Ring/Dismemberment Plan but they are awesome now and Pandora showed me.

June 1, 2008

1776 by David McCullough

Category: Books — Jon @ 7:29 pm

1776For some reason around Christmas time I decided I should learn more about American history. Because of that I named a few history based books from anyone looking for Christmas ideas. This year I got 1776 by David McCullough. I have always been interested in war history going back to reading a book about the German World War II flagship Bismarck. The 2 wars I decided on learning more about were the Revolutionary war and World War I. I knew a little about the American Revolutionary war but not much more than what you what you learn in grade school.

In an odd coicendence HBO also decided to cover the Revolutionary war with their miniseries John Adams based on David McCoullough’s book John Adams. While the miniseries was based mostly around the diplomacy around the Revolutionary war 1776 is based on the battles on the Colonial “Army”.

Some books on historical subjects can read like textbooks and become very bland. McCullough does a very good job of writing 1776 as a narrative. I always have a tendency to question the authenticity of that type of writing style when there can not possibly have been accounts that go to that level of detail.

1776 follows George Washington and the other primary officers of the colonial “Army” such as Henry Knox and Nathanael Green as well as William Howe the Commander of the British Army. I say colonial “Army” in quotes because it can barely be called an army. Generally it is a tale of a woefully disorganized and under-supplied colonial army. It does a wonderful job of fighting the Santa Clausification (to use a phrase I have heard a few times lately and loved) of George Washington and portray him as a real person with faults. It is hard to read this book without realizing that the history I was taught as a child has been terribly glossed over in the spirit of “History is written by the winners”

One of the more telling anecdotes was that Washington, a model southern gentleman, would always present himself in his full dress uniform which was crafted specifically for him. Most soldiers had no uniform whatsoever and those few who did were regiments for specific colonies that were left over from fighting the French and Native Americans. Washington felt that a leader should look like a leader even though his army looked nothing like an army.

Another thing that has stuck with me from the book is that not everyone was for independence. In fact it almost seemed like those for independence were in the minority. The only region that seemed staunchly against the British was Boston and Philadelphia while New York was very pro British.

Overall 1776 was a very worthwhile read and I would recommend it to anyone interested in the Revolutionary war or those who led it British or Colonist. It was more than slightly jarring that it ended so abruptly at the end of 1776 with no more than a couple pages of explanations over the end of the war. I suppose I can’t argue too much though given that the title so accurately should have prepared me for it :) With page upon page of bibliography at the end it is hard not to be impressed with the amount of work that must have gone into it and I will seek out more David McCullough writings with the next being “Mornings on Horseback” about Teddy Roosevelt.

May 29, 2008

Olbermann rips into Hillary

Category: Very interesting, but stupid — Jon @ 6:03 am

This is impressive

I found it on Gibbon Jockey . As he says stick around until the last 2 minutes where he really wraps it up well. It’s amazing that this isn’t/wasn’t more of a story but we had to hear about crazy ministers and $150 dollar haircuts for weeks.

May 28, 2008

Vengeance by George Jonas

Category: Books — Jon @ 10:49 pm

Vengeance coverVengeance is a novel by George Jonas detailing the Israeli counter intelligence department’s response to the killing of Israeli athletes at the 1972 Munich Olympic games. A group of Palestinian terrorists broke into the Olympic compound and took 9 Israeli athletes hostage. All of the hostages died either in captivity or in a rescue attempt. In response to this Israel undertook a covert operation to assassinate 11 people who were believed to have masterminded or been involved with the attack. The story is told from the point of view of the team leader Avner who is regular field agent but is none the less picked to lead this mission. The story is like a movie plot but since it is supposedly true it becomes all the more fantastic. The charge of the Israeli team was to kill the men in fantastic ways, not just to gun them down on the street but to kill them when they feel secure at home or among their peers. For example one way they devise is for a telephone to explode when it is picked up. The plan is not only to take revenge but to attempt to make terrorists paranoid as well as deter and disorganize them.

The story is wildly compelling. It begins with training and background on counter intelligence and covert operations. The firearms teacher tells them they never draw their gun to threaten only to kill. Once your gun is out your cover is blown and you are useless. The only real question is if you believe that it is true. The printing of the book I read had an epilogue describing the dispute over whether or not the book is actually true. You have to wonder why someone who is this undercover decides to come out and tell his story and it goes into what is likely the motivation behind that at the end of the book.

The book reads very much as a narrative and not just a recounting of events which is always nice for books based on historical events. I watched the movie “Munich” which is the Steven Spielberg adaptation of the novel while writing this review and was only half interested in it. It does a very good job of following the story closely but for some reason it didn’t capture me as much as the book did. Generally I try to watch the movies first and then read the book that way I enjoy both but failed on this one.

Overall if you like spy like material or are interested in the Mossad and Israeli counter intelligence then this is something you won’t be disappointed in.

April 14, 2008

So True

Category: Very interesting, but stupid — Jon @ 7:20 pm

Sense