Friday, March 13, 2009

The Tao of Chili – No Recipes, Just Ideas…

One thing that every self-respecting man (and most non-self-respecting men) should know how to make is a good bowl of chili.  Chili is awesome.  It’s easy to make (or at least difficult to screw up), tastes great, smells great, stores and reheats well, can be made healthy and can be made in any number of different ways.

Because chili is so flexible and offers so many possible combinations I don’t keep a recipe.  This is not a recipe article and I don’t even pretend to be a great cook.  Instead, I keep a list of things that work well in chili (mostly in my head and now here where you can add to the list by commenting) and throw them together whenever I get an urge for a bowl of red.  I love red chili and that is the focus of this article (no disrespect to other types of chili).

Cooking instructions: I generally cook in a crock pot for a few hours so that all the flavors can meld and the peppers get nice and soft but you can cook it in a pan or pot or over a fire.  If you add pork or chicken just make sure you cook it through.  After that everything from just heating it up to 8-or-more hours slow-cooking is fair game.  Often, I will prepare it the night before and refrigerate it over night.  This started because I didn’t want to get up early and put everything together and just wanted to turn the crock pot on.  Eventually I started doing this intentionally because it seems to get more flavorful by sitting it its own juices, sauces and spices overnight.

What goes in: Below are some categories (meat, vegetables/peppers, beans, spices, other) of things to use.  I will consider anything with meat, tomatoes and chili powder, and served in a bowl, chili.  Of course I add lots of other stuff but that is where the fun part comes in.

Meats (skip this section if you’re a vegetarian but then don’t skip the beans) – I’ve only ever had one vegetarian chili that I would say I love and it comes from Comet Cafe in Milwaukee, WI.  For those of you outside of Milwaukee that aren’t vegetarians you’re probably going to want to have some meat in your chili.  Pretty much any type of beef will work.  I’ve never tried ham but other kinds of pork (especially bacon) work well.  Chicken is interesting in a red chili but worth a try.  Sausages work well (cut up) as does ground turkey and chorizo.  For healthy chili choose extra-lean ground beef, ground sirloin, skinless chicken breast or ground turkey breast.  I often use the lean ground beef or ground turkey.

Vegetables / Peppers: First choose your tomatoes (and please don’t start an argument about it being a fruit).  You can cut up whole tomatoes if you like or choose almost any variety from the canned section (if you use paste you’re going to have to add water).  I like to use crushed tomatoes.  As for peppers pretty much anything goes.  I often use bell peppers (I like green and orange), poblano peppers, chili peppers, jalapeƱo peppers and habanero (if I want to kick it up a nautch[sic]).  The only rule with peppers is don’t rub your eyes after you cut them up. :)  Onions add flavor so don’t skip (or use minced onion like I often do).  I’m not a big vegetable head so I usually stop here but I’m sure there are lots more that could be added (comment please).

Beans: Some say that real chili doesn’t have beans in it but I like beans and their protein, fiber, taste and texture so I usually add them.  As with peppers pretty much anything goes with beans.  Good choices are kidney, black, pinto and butter.  I like to get the chili beans packed in chili sauce to add some more flavor (hot of course).  Skip the refried beans. :)

Spices: First and foremost is chili powder.  I like heat (as if you can’t tell by now) so I even found some extra hot chili powder from Penzeys which I like a lot.  Other things that I like to add include salt (sea salt usually), garlic (real garlic minced will defeat garlic powder or garlic salt anytime), ground black pepper, crushed red pepper, paprika, cayenne pepper, cumin, oregano, basil and sugar (I often use Splenda).  I’m sure there are lots more spices that work well so please comment.

Other: Liquor [bourbon, scotch, rum, wine, beer], barbeque sauce, Worcestershire sauce, chili sauce, hot sauce, and liquid smoke (careful because the great smell might cause you to use too much) all work great.  The Old German Beer Hall in Milwaukee serves a chili made with sausage and sauerkraut that won first place each of the past two years at WMSE’s Annual Rockabilly Chili Contest.

You can make chili based on what you have at home or what you want to experiment with.  I haven’t ever screwed up chili to the point where it was not edible but if you have please post your warnings to the comments.  Chili is an easy-to-make great tasting meal that allows endless creativity and experimentation.  What do you want in your chili?

Monday, February 23, 2009

Stop emailing yourself documents, seriously... Mesh FTW.

So I started using Microsoft's Live Mesh beta and it is seriously cool.  I'm not the type to email myself documents to get them from machine to machine but Mesh is much more than that (and I'm not being paid by Microsoft to say that).  With Mesh I can create a folder to share documents or photos with others (or yes, with myself on different machines in different locations) or even establish remote desktop connections over the web.  Check out the beta and provide feedback so Microsoft can make the product even better.

Thursday, October 09, 2008

HUM Playing Reunion Show New Year's Eve 2008!!1!!

My favorite band HUM, who broke up years ago, is playing a show new years eve at The Double Door.  What is even SUPER MORE AWESOMER is that they're playing with one of my favorite existing bands The Life and Times.  My wonderful wife actually found out about the show looking for a birthday present for me.  I can't believe that I didn't hear about this sooner.  I got my tickets and will commence preparations for rock!  Science!  Loud guitar!  Open bar!  Our tickets are ordered.

"I'll send you flowers made of silent tiny pieces of the sun." - HUM

Visual Basic 6 Support for Microsoft's LOC Counter

Microsoft has released a great free lines-of-code (LOC) counter.  It is available for download here: http://code.msdn.microsoft.com/LOCCounter

The tool, however, doesn't come with VB6 support.  As much as I hate VB6, we still have a ton of it where I work.  Luckily, the tool is extensible and by editing the LineCounters.xml file and creating some regular expressions I was able to get it to work pretty well with VB6.  The LineCounters.xml file is installed in the same directory as the program.  Open it in your favorite text editor and plop in the following lineCounter section (after one of the /lineCounter closing tags of course):

<lineCounter name="VB6">

  <fileExtension>cls</fileExtension>

  <fileExtension>bas</fileExtension>

  <fileExtension>frm</fileExtension>

  <fileExtension>dsr</fileExtension>

  <codeArea name="Blank lines" isCode="false">

    <expression>^\s*$</expression>

  </codeArea>

  <codeArea name="' comments" isCode="false">

    <expression>^\s*'.*$</expression>

  </codeArea>

  <codeArea name="VB6 Class and Form Garbage" isCode="false" multiLine="true">

      <startExpression>^VERSION\s.*$</startExpression>

      <endExpression>^Option Explicit.*$</endExpression>

  </codeArea>

  <codeArea name="VB6 File Attributes" isCode="false">

      <expression>^Attribute\s.*$</expression>

  </codeArea>

  <codeArea name="VB6 Option Explicits" isCode="false">

      <expression>^Option Explicit.*$</expression>

  </codeArea>

  <pspMetricArea name="Class" toCount="true" caseSensitive="false" >

    <pspMetricAreaStartFlag>'(\W)*PSP_METRICS_CLASS_BEGIN</pspMetricAreaStartFlag>

    <pspMetricAreaEndFlag>'(\W)*PSP_METRICS_CLASS_END</pspMetricAreaEndFlag>

    <PspMetricNameFlag>(?&lt;=PSP_METRICS_CLASS_BEGIN(\W)*:(\W)*)(\w)*</PspMetricNameFlag>

    <ObjectType>(?&lt;=&lt;Object_Type&gt;(\W)*:(\W)*)(\w)*</ObjectType>

  </pspMetricArea>

  <pspMetricArea name="Method" toCount="true" caseSensitive="false" >

    <pspMetricAreaStartFlag>'(\W)*PSP_METRICS_METHOD_BEGIN</pspMetricAreaStartFlag>

    <pspMetricAreaEndFlag>'(\W)*PSP_METRICS_METHOD_END</pspMetricAreaEndFlag>

    <PspMetricNameFlag>(?&lt;=PSP_METRICS_METHOD_BEGIN(\W)*:(\W)*)(\w)*</PspMetricNameFlag>

    <ObjectType>(?&lt;=&lt;Object_Type&gt;(\W)*:(\W)*)(\w)*</ObjectType>

  </pspMetricArea>

</lineCounter>

Note that for this to work properly to remove the garbage at the top of a form file the forms must have "Option Explicit" in them.  This worked for me as that has always been a standard.  Hopefully it is useful for someone else.

Monday, September 15, 2008

Guitar Effects Pedal Board - Ninja Style

Almost everyone uses Velcro to secure guitar effects pedals to their pedal boards and, until recently, I was no exception. Unfortunately, the Velcro on my board just wasn't sticking well anymore so I began looking for other options. The board itself was still very nice. It was constructed for me by my former bassist (who is now a carpenter for good reason) and I wanted to reuse the board. I stumbled across the following solution on the Internet somewhere so I cannot take credit for it. I just thought I would provide a write up and some pictures for anyone else who is tired of being oppressed by the tyranny of Velcro.

All you need to mount your pedals securely is a plank of wood (the pedal board itself), a bicycle chain, a bicycle chain repair tool, and some small wood screws. A drill also helps and I also used some cat5 data cable staples to clean up the job a bit.

The idea is to use links from a bicycle chain to mount the pedals securely to your pedal board. If you have the chain you will need to use the repair tool to break the links apart:It was difficult to use this cheap tool (about $5 at Wal Mart) to break the links apart so I assisted myself with a pair of vice grips which resulted in me breaking the tool:After going back to buy two more of the same tool I ended up with a pile of links:Once you have the links you need to attach them to the bottom of your pedals using the existing screws on the bottom of the pedals whenever possible:Then, screw them down to the board using the wood screws:Some pedals didn't have screws on the bottom (or the screws weren't close enough to the edge). On my (modified) Pro Co Rat and my Big Muff I needed to drill some holes then use some random small sheet metal screws I had laying around to attach the links:Here is the mostly finished board:I use a homemade power supply to power all my pedals as it was much cheaper than the commercial alternatives, just as good and fun to build. To keep all the wiring neat I used some cat5 data cable staples (and one NM cable staple) after I had everything routed how I wanted it:Rock on...

Wednesday, August 13, 2008

Converterer - Release at ultrafubar...

I got sick of writing code when I needed to do a data conversion, because what ever tool I had wouldn't accept it in the format I had or spit it out in the format I needed, so I created the converterer. It will convert to/from ASCII,HEX and Base64. It will do HTML, URL and Base64 encoding and decoding allowing you to specify the input as ASCII, HEX or Base64 and allowing you to choose the output format. It will also hash the input (to base64 or HEX) using your choice of MD5, SHA1, SHA256, SHA384 or SHA512. enjoy.

http://www.ultrafubar.com/converterer

Friday, June 13, 2008

Improved Administration of AzMan with DSACLS

I've recently been working with Microsoft Authorization Manager (AzMan) using ADAM for storage. I became frustrated when I noticed that, for administration, AzMan only supports two roles: Administrators and Readers. In our particular implementation, we have a development tier (for application development) a QA tier (for QA testing) and a production tier (for, wait for it, production applications). The idea is that the applications can be defined on each tier and different folks can have access to various application features on the different tiers. For example, developers would have access to all application functions when running in development mode but not when running in production mode.

My desire was to set the development AzMan store so that the developers could create and configure their applications in development and then have their software released to various tiers. Unfortunately, by making them administrators at the store level, they can delete any configured application and delete the store itself. By making them readers they cannot create or configure new applications. It seemed like it was all or nothing here.

Fortunately, I figured out the permission scheme in the underlying ADAM directory service and was able to modify it exactly how I wanted through the use of the DSACLS.EXE program.

The permission set I wanted for developers was read and write and create applications but not delete applications or the authorization store. On our ADAM server, let's say there was an application partition called CN=AzManPartition that was to house our authorization store. By using ADAM ADSI Edit you can see that there is a CN=Roles,CN=AzManPartition container defined where the Administrators and Readers groups are defined. I created a new group here called CN=Developers that I was going to use to put the developers in. If you haven't used ADAM ADSI Edit before it is done like this:

Right-click on CN=Roles,CN=AzManPartition and select New->Object
Choose Group and click Next
Enter the name (in this case Developers) for the cn attribute
For the groupType enter -2147483646 (which denotes a user group)

To edit the membership of this group:

Right-click on CN=Developers,CN=Roles,CN=AzManPartition and select Properties
Find the "member" property and click Edit
Select "Add Windows Account" to add users or groups from Active Directory

One further thing, members of this Developers group will also need read access when we create the store so add the Developers group as a member of the Readers group:

Right-click on CN=Readers,CN=Roles,CN=AzManPartition and select Properties
Find the "member" property and click Edit
Select "Add ADAM Account"
Enter CN=Developers,CN=Roles,CN=AzManPartition and click OK

Now we can create our AzMan store. Run the AzMan snap-in and ensure you're in developer mode:

Right-click on "Authorization Manager" and click Options
Select Developer mode and click OK.

To create the new store:

Right-click on "Authorization Manager" and click "New Authorization Store"
Select "Active Directory"
For the store name enter: msldap://servername:port/CN=AzMan,CN=AzManPartition

Finally, to grant the required rights to developers open the ADAM Tools Command Prompt. I needed to grant Developers the generic read, generic write and create children permissions (not full control as making them administrators would have done). I did this with DSACLS.EXE as follows:

C:\WINDOWS\ADAM>dsacls.exe \\servername:port\CN=AzMan,CN=AzManPartition /I:T /G CN=Developers,CN=Roles,CN=AzManPartition:GR
C:\WINDOWS\ADAM>dsacls.exe \\servername:port\CN=AzMan,CN=AzManPartition /I:T /G CN=Developers,CN=Roles,CN=AzManPartition:GW
C:\WINDOWS\ADAM>dsacls.exe \\servername:port\CN=AzMan,CN=AzManPartition /I:T /G CN=Developers,CN=Roles,CN=AzManPartition:CC

Now developers can create and configure applications in AzMan but if they try to delete anything (or modify permissions) they are denied access.

More information on the different permission sets you can grant with DSACLS.EXE is available here: http://support.microsoft.com/kb/281146

Friday, May 02, 2008

Using AzMan with CSLA Business Objects

Using AzMan to provide authorization to your CSLA business objects is a relatively easy task. In the following examples I'm using AzMan through the Enterprise Library AzMan Authorization Provider. If you're using the COM API directly you should be able to modify the AzManPrincipal class below to wrap that instead of the EL provider.

First, I've created a class called AzManPrincipal which extends the Csla.Security.BusinessPrincipalBase class. This is the class that is an IPrincipal and as such has the implementaion of IsInRole. It is worth noting that my implementation below will authorize access on the "task" defined in AzMan.

internal sealed class AzManPrincipal : Csla.Security.BusinessPrincipalBase
{
private IAuthorizationProvider _authProv = null;
public AzManPrincipal(IIdentity identity)
: base(identity)
{
string providerName = ConfigurationManager.AppSettings["AzMan Provider"];
_authProv = AuthorizationFactory.GetAuthorizationProvider(providerName);
}
public override bool IsInRole(string role)
{
return (_authProv.Authorize(this, role));
}
}


Next, at the start of your application you will need to set your custom principal on the Csla.Application.User

Csla.ApplicationContext.User = new AzManPrincipal(WindowsIdentity.GetCurrent());



Finally, your classes may use the current application context to authorize any actions on the class (CRUD methods or read/write properties) as in the following example:

public static bool CanGetObject()
{
return (Csla.ApplicationContext.User.IsInRole("Read Customer Task"));
}