Thursday, March 26, 2009

Nebraska Says NO To Political Parties

Well... I am officially "non partisan." Nebraska today said that they no longer recognize the Libertarian Party. Awesome. Well, there were only about 5 of us in the state anyway.

In the paraphrased words of David Crockett in 1836: You all may go to hell... I will go to Oklahoma.

Rock on David. Rock on.



Story

Profesional Brewer...

I have to admit, ever since last Friday as my wife and I were enjoying a craft beer at our local brewery, and I joked to her that I wanted to give up my life in computers to become a brewer it has stuck in my head.

The problem is that brewing is not really a job that is in demand, unless you live in the Pacific Northwest. That means partnering with a restaurant or starting a brewery all by my self. To be very honest, I don't think I have the business sense or big enough balls to start a brewery, nor do I think that I could sacrifice enough in a partnership to make it work long term.
For instance, what if I make the most kickass IPA in the world, but it has enough hops to make nothing but the most strident hopheads go crying to mommy. The restaurant says, you need to dial down the bitterness in this IPA. Somethings are worth going to jail over, and that just might be one of them.
There is a fine line between what makes sense business wise, and sacrificing your integrity. I know many breweries who cross that line all of the time. Their IPAs have BDU ratings in the 20s and their "stouts" are so weak they have me believing that they use food coloring to turn their brew black. BUT they sell brew, and the sheeple think that the beer is awesome. Just go to any Granite City and you will know what I am talking about.
I am well known in all of the companies that I have worked for that I am rather uncomprimising when it comes to matters of speed and convenience over doing the proper thing. I have a feeling that this would cause considerable tension with a restaurant partner.

I have grown very used to having that safe income that comes from being some company's tool. To be honest it is not the failure of the business that frightens me, it is the potential marital problems that come before the fall as the business is hemorrhaging money that really concerns me. I am 100% confident that my marriage could survive the death of several business, BUT the stress, arguments and pain that the failures would cause is not something that I want to go through, let alone put my wife through.

But then I come across some place like Tampa Bay Brewing Company. The place is absolutely dedicated to beer. They serve 9 beers all year round. The have weekly cask ales. Serve IPAs that have BDU ratings in the 80s, Pale Ales that use unmalted barley to give it an extra kick, and 18 different seasonal ales.
They are in a prime location in downtown Tampa, and they seemed to be doing very well when I was there. Just wow. If I owned and operated a brew pub, I would want it to be just like that.

Perhaps I need to take this time during my wife's residency to try my hand at home brewing. Perhaps I don't like to brew. Maybe I am no good at it. I think that when I look for my new house I need to see if I can put a stove or something in the garage or in an outside shed to begin my brewing legacy... Sounds like a plan to me.

Wednesday, March 25, 2009

OUTSTANDING



I gotta get one...

Tuesday, March 24, 2009

Moving...

The word is in. I am moving from Omaha my home of 16 years to Oklahoma City.

Right now I am happy that my wife got a residency at a good program, that really fits her.

Right now I am a bit apprehensive about selling my house.

Right now I am very nervous about the possibility of entering the worst job market in 30 years in a city that, on the surface, looks to be very tech light.

Right now I am wondering if my company will make good on the promise that they will keep me on while letting me work remotely.

Right now I am looking forward to finding and moving in to a new house.

Right now I am looking forward to training with a bunch of new guys.

Right now I am wondering if my Nebraska CCW license is still good if I move to Oklahoma.

Right now I am wondering if I should find a flying club to join, or just continue to rent from an FBO.

Right now I am nervous that my wife finds friends that she can connect and work with.

Right now I am wondering if we can find a good traditional Japanese restaurant that knows what Sashimi is, and won't serve us frozen crap.

Right now I am wondering if the two BrickTown breweries serve good beer.

Right now I am wondering if I should start learning how to home brew beer if the breweries suck.

Right now I am thinking too much about beer.

Right now I am contemplating letting BJJ go for a while and just doing Muay Thai.

Right now I am wondering if there is a Muay Thai gym in OKC.

Right now I am thinking that I should change careers, from computer geek to brewer.

Right now I am saying to myself: "Seriously, stop thinking about beer. You might have a problem."

Right now I wonder if I will find a group of friends that will understand my humor, and won't kick my ass if I tell the joke where Jesus, Muhammad, Abraham, and Buddha are in a circle jerk...

Right now...

Bias?

Get in to your Way Back Machine. Go back to November 6th 1999. See if you can remember this... As then Governor Bush was doing an interview with a local TV personality a question was asked...
"Do you know who the President of Chechnya is?"
"No," Bush replied testily, "Can you?"

This made international news. The press had a field day, and this fed fuel to the whole Bush is an idiot thing that dogged him his whole presidency.

So, today I learn from a talk show host's website that has a link that President Obama sent a letter to the former President of France, Jacques Chirac.
Wait what?? The FORMER President??? Of France??? Honestly, France? One of the major European powers? Happened in May 2007? His election was a major defeat for the incumbent Socialist Party. The dude married a super model? Remember now? I started eating French Fries again instead of Freedom Fries? Ring a bell??

I don't want to sound like I think the President is a mental midget, but FRANCE???
If that weren't enough, it wasn't just a friendly letter that President Obama originated, it was in RESPONSE to a letter that President Sarkozy wrote to Obama.

Huge gaffe, and, not surprisingly, the press has not covered it. Bush does not know the name of an obscure country's President during an ambush interview and he is the village idiot. Obama replies to the wrong president of an ally since 1778, and all we hear is the sound of one hand clapping.

Not good.


This guy


Not this guy

Obama Story
Bush Story

Friday, March 20, 2009

Ex Post Facto

Latin is no longer taught in school. I think that was done so that we can "keep it real" and not worry about strange phrases in the Constituion shuch as in Article 1:
"No bill of Attainder or ex post facto law shall be passed."

Ex Post Facto means after the fact. You can't pass a law that applies to something that happens in the past. Thus the morons in the House passes an unconstatutional bill that taxes the AIG bouns recievers.
More and more evidence that Congress has simply whiped thier ass with the Constution and sent it down the toliet with the rest of the garbage.

Another thing should be distrubing about this... These people are recieving bonuses based on legal contracts that they signed with a private company. The company would have to pay these bonuses even if they filed Chapter 11, rather than being bailed out by the Government. The Government now taxes these specific people, private citizens working for a private company, for their money. What is to say that the Government won't do this to other private citizens it dosen't like?
One day Nancy Pelosi is reading the Ninja, as she always does, and thinks, You know what? Ninja's UFC picks really suck! How dare he pick Sakuraba over Fedor. Time to teach him a lesson!"
She then proceeds to pass legislation that will force me to pay 90% of my income in taxes.

We need to take this kind of power away from Government! FairTax NOW!!!

Saturday, March 14, 2009

Damn It...



Now I have to start doing TKD again...

Thursday, March 12, 2009

Obligation Of Carry

Where's your gun?

This question was recently posed to me during an email conversation that I have been having with one of my L.E.O. friends.

I explained to him that I don't typically carry my weapon with me during the day because my office has a violence policy that prohibits employees from bringing firearms to work.

So did the guys working at Reliable Metals in Samson, AL. Said my friend. They are morning their friends now.

You have an obligation to those people you work with, he said. They don't know it yet, and hopefully they never will, but they are depending on you for their protection from guys like Michael McLendon.
Michael McLendon did not care about the law, or any company policies that were in place. He just wanted to kill people. By getting you concealed carry permit, you are saying that you are an upstanding citizen, willing to protect those around you. You, just like a L.E.O., are obligated to have your weapon on you, ready in the event of the unthinkable.

Do you flash your gun around? He asked.
No, I say, when I am carrying I do it in the most inconspicuous manner comfort allows.

I know you don't, because you still have a job and you have not been arrested for making terroristic threats, he said.
This is the essence of concealed carry. No cop I know is going to give you a hard time for carring in a place you should not be carring, unless you are being a dick about it.
You are a moderately smart guy who knows how to hide your weapon away from prying eyes. Violence policies are for lawyers and insurance people. You have a higher obligation. Laws don't protect people. People protect people. At the end of the day, somebody has to be ready and willing to take on the bad guy and make him put up or shut up. By having your permit, you are saying that person is me. With out your gun, you are just another victim. But you will carry that guilt around with you for the rest of your life, if you survive. It won't be the fault of the company that had the policy, it will be YOUR fault that those people died, children orphaned, and families torn apart.

Strong words. Very thought provoking. Do I have an obligation to carry?

Ken Shamrock Tests Hot

Story

Quell surprise...
All 45 year old guys who aren't named Colture look like this:

Tuesday, March 10, 2009

S.W.A.T. Hand Signals

Have you ever wondered what those hand singnals S.W.A.T. were giving each other on Cops? Now we all know!!

Holly Crap This Guy Rocks



Business' Claws Come Out

Check out this story on Bloomberg: Manchurian Candidate Starts War on Business

Wow. The author, Kevin Hassett, essentially says that Obama wants to destroy the economy.
Jim Kramer of Mad Money fame said that Obama was the responsible for destroying the country's wealth.

Both of these guys act like they didn't know this was coming. During the campaign Clinton and Obama played dueling new government programs, and we are surprised that Obama is kicking up spending and government control?
Is it a surprise when the guy who said that he was going to spread the wealth around announces that he is going to raise taxes on the people who achieve, and give it to those who do not?
Is it a surprise that the guy who said that he wanted "social justice" for those affected by "Welfare Reform" in the 90's is going to tax the hell out of business?

Elections have consequences. If business wanted a chance in this last presidential election, they should have campaigned harder for Mitt Romney. But, no, no, no we couldn't ever vote for a Mormon. They might have more than one wife! Next thing you know the people may be questioning our moral fiber.
Instead we elect a Communist.

Most of the informed voters knew this was going to happen. Those that thought it was good for the country were either fooling themselves or just plain stupid... No, No, that's not right. There are no stupid people. Only those that choose not to think.

Unless We the People send the right people to congress in 2010, this recession will deepen and lengthen. But we won't. The Republicans betrayed the American trust. Just think what the country would have been like if Congress did not wipe their ass with The Contract With America. If the Republicans did not vote the impotent Denny Hastert as speaker after Newt Gingrich left in disgrace, what would have happened?
What would have happened if the Congress stood up to George W. Bush and backed the Contract?

Monday, March 9, 2009

UFC 96 Recap

Shane Nelson def Aaron Riley TKO (Punch) 0:44 rnd 1
My Pick: Riley by KO second round
There was some controversy here. Riley was defending when the ref stopped the fight.

Brandon Vera def Michael Patt TKO (Leg Kicks) 1:27 rnd 2
My Pick: Vera by KO first round
Brandon gets back to business, and with Leg Kicks no less!!

Jason Brilz def Tim Boetsch Decision
My Pick: Brilz by G&P KO first round
Jason rolls on.

Kendall Grove def Jason Day TKO (Punches and Elbows) 1:32 rnd 1
My Pick: Day by second round KO
Grove finally did something he was supposed to do... Day ran right in to Grove's offence and was pounded out.

Tamdan McCrory def Ryan Madigan Submission (Punches) 3:35 rnd 1
My Pick: Tamdan by KO first round
Tamdan looks very sharp!

Gray Maynard def Jim Miller Decision
My Pick: Gray by decision
Gray beat the living hell out of Jim, but could not put him away...

Matt Hamill def Mark Munoz KO (Head Kick) 3:53 rnd 1
My Pick: Hamill by KO third round
WHAT A KICK!! I think Mark is still asleep.

Matt Brown def Pete Sell TKO (Punches) 1:32 rnd 1
My Pick: Sell by KO second round
Matt destroyed Sell, and because of some very bad officiating, absorbed much more punishment than he should have. Cheers to Matt Brown, Jeers to the ref.

Shane Carwin def Gabriel Gonzaga TKO (Punches) 1:09 rnd 1
My Pick: Gabe by RNC third round
Gabe had Shane all but knocked out, but Carwin showed great fortitude and managed to finish the fight with a very strong right hand.

Quinton Jackson def Keith Jardine Decision
My Pick: Rampage by KO first round
Keith played a good game, but Rampage figured the game out in the second round. Several takedowns and knockdowns later Rampage gets his hand raised.

I stay at 6 for 10... I can't seem to get beyond that... Stupid Kendal Grove.

Friday, March 6, 2009

UFC 96 Fighter Make Weight

Aaron Riley (155) vs. Shane Nelson (155)
Aaron decisioned Jorge Gurgel in his last fight.
Nelson won a split decision over George Roop.
Riley by KO second round.

Brandon Vera (205) vs. Michael Patt (204.5)
Vera lost a split decision to Keith Jardine.
Patt lost to Tim Boetsch.
Vera by KO first round.

Tim Boetsch (205) vs. Jason Brilz (204)
Tim beat Mike Patt his last time out.
Omaha native and my friend Jason Brilz knocked out Brad Morris.
Brilz by G&P KO first round.

Kendall Grove (185) vs. Jason Day (184.5)
Grove beat Evan Tanner by decision to stay in the UFC.
Day beat Michael Bisping his last time out.
Grove should win, that means, Day by second round KO.

Tamdan McCrory (170) vs. Ryan Madigan (169)
McCrory got beat by a highlight armbar from Dustin Hazelett.
Ryan makes his debut.
Tamdan by KO first round.

Gray Maynard (155) vs. Jim Miller (154.5)
Gray is on a streak beating Rich Clementi by decision.
Miller beat Matt Wiman by decision.
Miller's streak ends here. Gray by decision.

Pete Sell (170) vs. Matt Brown (170.5)
Pete Sell is back!! Sell beat Josh Burkman by decision last time out.
Brown took his time and beat Ryan Thomas by armbar.
Two contrasting styles here Sell will come right at Brown, who will try to slow the fight down. Sell by KO second round.

Matt Hamill (205) vs. Mark Munoz (204.5)
Hamill knocked out Reese Andy the last time out.
Mark makes his debut in the UFC with a 5-0 record, two of those fights coming in the now defunct WEC light heavyweight class.
Hamill by KO third round.

Gabriel Gonzaga (257.5) vs. Shane Carwin (259.5)
Gabe knocked the living crap out of Josh Hendricks the last time we saw him.
Shane is 10-0 knocking out Neil Wain.
Great fight, and a tough call. Gabe is good but can be beaten by a calm fighter with a good jab. Is Shane that guy? No. Gabe by RNC third round.

Quinton Jackson (205) vs. Keith Jardine (204)
Jackson knocked Wanderlei Silva in to last week in his last fight.
Jardine beat Brandon Vera by decision.
If Quinton had a good camp he should run through Keith... If he had a good camp. Rampage by KO first round.

Presence In SPGridView

Hot freaking socks... Where are the UFC picks you have been asking. They have been delayed as I worked on what should have been a simple project.
The company I work for will be incorporating Windows Communicator with their VOIP and IM system.
We also have a web based Corporate Directory application.
Wouldn't it be nice, someone thought, if we could put the Windows Communicator Presence Indicator in to our Corporate Directory?
The Corporate Directory is currently a SharePoint Data View Web part. Adding Presence would require custom development.
Off I go.

The first issue I ran in to was that there is some debate on how to get Presence information in to SharePoint 2007, some blogs say to use the IMNRC java script, while others say to use the imnmark image with a IMNImageOnClick java script event.
Confused? Me too. The problem is that Microsoft left the old way to do Presence in to the new version of SharePoint, so what would work in 2003:


<span><img border=\"0\" height=\"12\" src=\"/_layouts/images/imnhdr.gif\" onload=\"IMNRC('"you@domain.com"')\" ShowOfflinePawn=\"1\" alt=\"\" id=\"user_presence_icon\"/></span>


will work in 2007, but the way Microsoft does Presence in 2007 is with the anchor and image tags:


<a href="javascript:" onclick="IMNImageOnClick();return false;" class="ms-imnlink"><img title="" alt="No presence information" name="imnmark" border="0" valign="middle" height="12" width="12" src="/_layouts/images/blank.gif" sip="you@domain.com" id="imn1,type=sip" ></a></span>


Great! It works for just one user, with their email address hard coded. The problem is that I have lots of users, and everything is stored in a database.
Easy!, you say, Just use a GridView and put that stuff in there!! Sounds good, but SharePoint always has a way of messing with us. The SharePoint version of a GridView is the SPGridView. It is just like a GridView, only harder. In SharePoint you do nearly everything in the code. It sucks. Personally, I like the ability to use the Design tap of Visual Studio it lets me know what I have going. So, I tend to use User Controls so that I can see what is going on. Only that does not really apply here.
Anyway, typically what you would do in ASP.NET programming would be to drop a GridView on a page and set up your fields. Because we are using some HTML you will need to create some template fields. Generally looks like this:


<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:TemplateField>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>


No problem! Except that we are in SharePoint and we have to do all of that in code...

This is where it really gets sticky. You will notice that the Template Field is called as a control. That means that it is a part separate from the GridView. That makes your life in SharePoint difficult.

As Oscar Medina details in his awesome blog post SPGridView - Using a custom TemplateField to add a Checkbox Column you can declare a Template Field inside your SPGridView, but you will need to create a class for your Item Templates.

A class that inherits from ITemplate, and you will need to override the InstantiateIn method in order to stick your stuff in.

During my very frustrating trial and error period, I found that the best way to get the Presence stuff to work is to use the new 2007 method, but convert all of that HTML in to ASP.NET controls. The ITemplate object likes those better. So what I ended up doing was creating two Literal Controls for the span tags, a Hyperlink Control for the anchor, and an Image control for the image. I used the Attributes.Add for all of the extra stuff in the anchor and the image tags that is not supported in the normal control.
So your code from above now becomes:


LiteralControl lc = new LiteralControl();
lc.ID = "lcSpan1";
lc.Text = "";


HyperLink hypLink = new HyperLink();
hypLink.Attributes.Add("onclick", "IMNImageOnClick();return false;");
hypLink.CssClass = "ms-imnlink";
hypLink.NavigateUrl = "javascript:";


System.Web.UI.WebControls.Image imgPresence = new Image();
imgPresence.Attributes.Add("name", "imnmark");
imgPresence.Attributes.Add("id", "imn1,type=sip");
imgPresence.ImageUrl = "/_layouts/images/blank.gif";
imgPresence.Attributes.Add("sip", "you@domain.com");
imgPresence.ID = "imgPresence";


LiteralControl lc1 = new LiteralControl();
lc1.ID = "lcSpan2";
lc1.Text = "
";


Sweet huh? Again, it works great for hard coding a single user to a Presence indicator. We don't want that. We want something we can stick in to a SPGridView to display a whole bunch of people. Here we go.

First you need to set up your data source. I like to use DataTables.


DataTable DT = new DataTable("Data");
DT.Columns.Add("Name");
DT.Columns.Add("Position");
DT.Columns.Add("Presence");
DataRow row = DT.NewRow();
row["Name"] = "Natto Ninja";
row["Position"] = "Goofball";
row["Presence"] = "nattoNinja@domain.com";
DT.Rows.Add(row);

row = DT.NewRow();
row["Name"] = "Megan Fox";
row["Position"] = "Megga Hottie";
row["Presence"] = "iamhot@domain.com";
DT.Rows.Add(row);

row = DT.NewRow();
row["Name"] = "Al Sharpton";
row["Position"] = "King of the Goofballs";
row["Presence"] = "KOG@domain.com";
DT.Rows.Add(row);


DataTables are fun. Now we need to create our SPGridView. There are a couple of different ways to do this, if you are using a control, you can use Ted Pattison's approach or you can just create it in the code. Calling it in the code makes it tougher for you to place on the page, but Pattison's approach requires you to create a code behind (not a code beside, very important distinction. If you don't know the difference you need to read Pattison's article). At any rate you have to create the grid.


SPGridView grdSPGrid = new SPGridView();
//Createyourfields
SPBoundFieldfldName=newSPBoundField();
fldName.HeaderText="Name";
fldName.DataField="Name";
grdSPGrid.Columns.Add(fldName);

SPBoundFieldfldPosition=newSPBoundField();
fldPosition.HeaderText="Position";
fldPosition.DataField="Position";
grdSPGrid.Columns.Add(fldPosition);

TemplateFieldfldPresence=newTemplateField();
fldPresence.HeaderText="Presence";

//Call your class that creates your Item Template
fldPresence.ItemTemplate=newGridViewTemplate("Presence");

grdSPGrid.Columns.Add(fldPresence);

//Call the method that inserts your row information in to your image control
grdSPGrid.RowDataBound+=newGridViewRowEventHandler(grdSPGrid_RowDataBound);

//Bind the the DataTable to the SPGridView
grdSPGrid.DataSource=DT.DefaultView;
grdSPGrid.DataBind();


You will notice the place where I call a class to get my Item Template going. It is in that class where I create my objects that will become my Presence indicator.
Here is that class:


public class GridViewTemplate : ITemplate
{

private string columnName;

public GridViewTemplate(string colname)
{

columnName = colname;
}

public void InstantiateIn(System.Web.UI.Control container)
{

LiteralControl lc = new LiteralControl();
lc.ID = "lcSpan1";
lc.Text = "";
container.Controls.Add(lc);

HyperLink hypLink = new HyperLink();
hypLink.Attributes.Add("onclick", "IMNImageOnClick();return false;");
hypLink.CssClass = "ms-imnlink";
hypLink.NavigateUrl = "javascript:";
container.Controls.Add(hypLink);

System.Web.UI.WebControls.Image imgPresence = new Image();
imgPresence.Attributes.Add("name", "imnmark");
imgPresence.Attributes.Add("id", "imn1,type=sip");
imgPresence.ImageUrl = "/_layouts/images/blank.gif";
imgPresence.ID = "imgPresence";
container.Controls.Add(imgPresence);

LiteralControl lc1 = new LiteralControl();
lc1.ID = "lcSpan2";
lc1.Text = "
";
container.Controls.Add(lc1);


}

}


That builds our template field. Now for the last little piece. There has to be a way to insert the data from the DataTable in to a variable that we can set in to the image control.
To do that, we need to go in during the data binding of the SPGridView. Which is why I have this line in the code that creates the grid:


grdSPGrid.RowDataBound+=newGridViewRowEventHandler(grdSPGrid_RowDataBound);


That guy calls this method in the same class:


void grdSPGrid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string row = "";
//Find the row with the data
DataRowView rowView = (DataRowView)e.Row.DataItem;
row = rowView["Presence"].ToString();
//Create a new image control and cast it as the control in the grid
System.Web.UI.WebControls.Image imgPresence =
(System.Web.UI.WebControls.Image)e.Row.FindControl("imgPresence");
imgPresence.Attributes.Add("sip", row);

}


}


That is all there is to it! It took me nearly a week to figure all of this stuff out. It was a lot of fun finding the right events, and creating the proper event handlers and stuff.

In case you are confused, the code that creates the SPGridView and the code that does the special binding all should be in the same class. The class that creates the ItemTemplate can be in a separate class file, or just as another class in the same class file as your other class.
Hope this helps some people.

Many thanks to Oscar Medina and Ted Pattison. Their posts really helped be out, and I surely would not have gotten my grid to work without them.

Thursday, March 5, 2009