Baton Rouge has a Windows Phone 7 User Group.   One of my favorite things about the Microsoft products is there seem to be several communities popping up concerning their technology.   I volunteered to talk about my experiences as relates to the development of Pocket Brewer so I’m doing that.   The slides and demo code as relates to this talk are at the links below for anyone interested in them.

DummyWP7App – Windows Phone 7 Demo App

Pocket Brewer Power Point

 

 

My two most recent home brew beers were outstanding. The flavor, smell and feel of the beers were just far and beyond what I’ve done in the past. For me it was a sign that refinements I’ve made in my brewing process really mattered. Here’s what I did differently:

  • Infusion Mash – bar far the biggest improvement in the arena of brewing. I used a simple 3 step mash popular with brewers of German lagers and the quality of malt taste in the beers was shocking.
  • Hop Balls – Also known as a herb ball these little tools allow you to keep the hops in the wort while keeping them out of the final product. What’s that mean? Well typically when I add hops I have an issue with the boil pushing them on the sides of the kettle and leaving them out of the boil. You can’t get bitterness that way. The second part of that is that once you’re done boiling you want the hop trub out of your beer. Well the hop balls keep the mess all together so you get that too.
  • Purchased New Deep Freezer – I use a deep freezer for my lagering tank. I had an old beat up freezer which had inconsistent temperatures and was hard to control. Appropriate temperature control is key to preventing off flavors and aids in the lagering process where your beer really smoothes out. On my Pocket Brewer Recipes Page you’ll see I have a Baton Rouge black beer. After secondary fermentation it was so harsh I thought it would be terrible but after 6 weeks lagering it’s incredibly smooth.

I got many compliments on my beer before I made these improvements and now I get wow when people try my beer.    Most already had tried some home brewed beer before and knew that usually it’s just average beer.    However with refinements you can make excellent beer unlike anything people can get elsewhere.    It’s rewarding and worth the extra effort.

Here’s a fun little piece of code I scraped together today for an ongoing issue we’ve been having. Seems for years nobody can figure out how to locate whether a user(jodom for example) exists in our Active Directory and how to add them to a group via C#. A few people have tried but always given up and used a web service built by a consultant that no one knows what happened to the source code. The service is a pain because it dies silently whether the user exists or not and whether it succeeds or not.(really dude)

The code isn’t that difficult as you can see and I’m almost certain my peers came up with something similar on previous attempts. I’m almost certain their failure was the result of not being able to obtain appropriate DN because nobody even our network engineers had heard of LDP Tool for Querying Active Directory(LDAP) which will assist you in building LDAP queries in C#. There’s obviously a disconnect there in the developer community because I must of ran through a dozen HELP threads on various .NET boards concerning this topic.

So….code is below and should work fine to add/remove a user to a group that the userName/password provided has Management rights to. It first uses the DirectorySearcher to find the DN of the account and then uses that DN for the Add/Delete. There might be a simpler(mo better) way to do it but this hammer works so swing it.

string NTId = "jsmith";
bool IsAdding = true;
string userName = "UserWithManagementRightsToGroup";
string password = "Password";
var exists = this.ObjectContext.SomeEntitys.Where(p => p.EmployeeID == NTId);
DirectorySearcher userSearcher = new DirectorySearcher();
userSearcher.Filter = "(&(objectclass=user)(objectCategory=person)" + "(sAMAccountName=" + NTId + "))";
if (userSearcher != null)
{
userSearcher.PropertiesToLoad.Add("distinguishedName");
SearchResult searchResult = null;
using (SearchResultCollection src = userSearcher.FindAll())
{
if (src.Count > 0)
{
searchResult = src[0];
string DN = searchResult.Properties["distinguishedName"][0].ToString();
try
{
DirectoryEntry entry = new DirectoryEntry("LDAP://domain.com/" +
"CN=My_Users,OU=Security Groups,DC=domain,DC=com",
userName, password);
 
if (IsAdding == true && !entry.Properties["member"].Contains(DN))
entry.Properties["member"].Add(DN);
else if (IsAdding == false && entry.Properties["member"].Contains(DN))
entry.Properties["member"].Remove(DN);
else if (IsAdding == true && entry.Properties["member"].Contains(DN))
OnError(new DomainServiceErrorInfo(new CustomError("Attempted to add user that is already in group. : " + NTId)));
else if (IsAdding == false && !entry.Properties["member"].Contains(DN))
OnError(new DomainServiceErrorInfo(new CustomError("Could not remove because user was not in group. : " + NTId)));
 
entry.CommitChanges();
entry.Close();
}
catch (Exception uhoh)
{
}
}
}
}

Kind of interesting story I came across today. A lady got burned at the stake for being a Witch a few hundred years ago for prescribing the following to a neighbor who’s symptoms sounded like a bad fever/cold/flu.

A tonic of one part ginger, cloves, aniseed, liquorice and some strong ale blended together.. Served every morning before breakfast and the lady needed to walk a bit before eating.

I guess it didn’t help her case that her ghost friend told her to do it which is what got her the wrong end of the witch treatment. However I found it interesting and decided to use my good friend the Internet to breakdown what was good about this tonic:

ginger – reduces nausea, vomiting, and cold sweating. Very potent anti-inflammatory compounds effective against pain and swelling.
liquorice – soothes a sore throat, loosens bronchial congestion, reduces inflammation, soothes digestive and gastrointestinal issues, helpful with stomach ulcers.
Cloves – A stimulant that acts as a stimulant and improves circulation. Helps stabilize blood flow and regulate your body temperature. Helps with coughs, stops vomiting, headaches, asthma and a bunch of other random things.
Aniseed – Helps remove phlegm from the bronchial tube and helps with digestive disorders, upset stomach, gas.
Strong Ale – Well I found all sorts of things about B vitamins in strong ale, anti-inflammatory and other properties of hops but lets face it: beer makes you feel better.

It sounds like this lady got the torch for creating a 16th century cold medicine….bummer……but it was fun to research what these ingredients do.

I just implemented this IIS Compression article on some business applications we’re delivering over a low bandwidth connection and it reduced. Interesting enough if you simply enable IIS compression as explained by Microsoft and a couple hundred other sites then you do HTTP analysis on how your Siverlight Business App is performing you’re going to see zero improvements. As explained in the article I listed above the Siverlight Business App template with RIA Services will be sending data over the wire in binary by default so it’s already improved. However this type isn’t compressed by default when you enable IIS compression so you’ll need to add the appropriate MIME type to the application host configuration file. Namely you’ll have to add this dynamic type:

add mimeType=application/msbin1 enabled=true

I can’t express enough how much this improves the performance of the requests to the application. Our app made many requests that returned 50-100Kb of data. Shrinking that by 80-90% per request was huge for how the application responded in the field. Compression is a must if you’re going to use RIA Services in a similar situation.

, , , , , ,

1/4 cup bacon fat
3 tablespoons flour
2 medium onions chopped
1 large pod garlic pressed
1/2 large bell pepper chopped
1 cup chopped celery
1/2 pound ground beef
1/2 pound ground pork
1 pound raw chicken giblets
a few dashes Worcestershire sauce
salt, black pepper and red pepper
1 tablespoon green onions chopped
1 tablespoon parsley chopped
2 cups cooked rice

Make a dark roux. Add onion, green pepper, celery and cook 15 minutes. Add ground meat, giblets and cook over medium-high heat until meat is slightly browned. Add enough water in which a bouillon cube has been dissolved to make a the mixture in to a thick gravy. Add garlic and a few dashes of Worcestershire and season to taste with salt and pepper. Cook slowly for 30 minutes being careful that mixture doesn’t get too thick. Mix this with cooked rice and stir. Add green onion and parsley; mix, cover and allow to heat on low heat for about 15 minutes.

1 ham bone
1 pound dried red beans
1 pound ham hocks, smoked sausage or hot sausage
1 large onion chopped
1 cup green onions chopped
1/2 clove garlic minced
1/4 cup parsley chopped
2 bay leaves
1/4 cup butter
salt
Cayenne pepper or Tabasco to taste

Addition of a ham bone adds real color and flavor you won’t get otherwise. Most Cajun cooks like to bring their beans to a rolling boil for a couple of minutes then let them soak in that same water overnight. In the morning brown sausages or fat meat first to remove some of the grease. Bring beans to a boil again and add and add all other ingredients. Reduce heat and simmer for at least 3 hours. Beans should be very creamy. Serve over fluffy hot rice.

, ,

4 lbs stewing hen cut into 12 pieces
1/3 cup cooking oil
1 stalk celery cut fine
1 medium onion cut fine
1 medium green pepper cut fine
1/2 cup flour
1/2 teaspoon paprika
1/4 teaspoon ginger
salt & black pepper

Cut up, wash and season chicken well with salt & pepper. Put oil in pot and let get very hot. Add flour and stir constantly to make a roux. Add onions, celery, pepper and stir until well mixed. Add paprika and 3 quarts hot water and cook on low heat 30 minutes stirring occasionally. Add raw chicken. Let cook over a medium heat until chicken is tender. Serve with rice or dumplings. Will serve 6 people. Optionally you can add a few shakes of tabasco for a piquant flavor.

, , , , ,

1 cup brown sugar
1 cup white sugar
1/2 teaspoon salt
1 cup pet milk
1 stick butter
1 teaspoon vanilla
1 cup pecan halves

Combine the sugars, salt and pet milk. Stir over low heat until the sugar dissolves. Make sure to stir constantly so mixture does not burn. Cook to the “soft ball” stage(15 minutes) then cool slightly. Add butter, vanilla and pecans. Beat until creamy. Drop spoonvils onto a piece of wax paper. Makes about 35 to 40 pieces.

, , ,

1 unbaked 9″ pastry pie shell
3 eggs
1 cup sugar
1 cup white corn syrup
1 cup pecan halves
1 teaspoon vanilla extract
dash of salt

Beat eggs in large mixing bowl until well blended using a fork. Add sugar, syrup, pecans, vanilla and salt. Stir together until well mixed and pour into pie shell. Cook at 400 degrees for 10 minutes then lower to 350 degrees and continue baking for thirty minutes.

, , , ,