" /> Chris Bunk.com: April 2005 Archives

« March 2005 | Main | May 2005 »

April 28, 2005

Steak

While cooking a steak is one of the easiest things to cook cooking it right is an art. With a good cut of meat I like putting on very little seasoning or marinate to let the meat's natural flavor come through. Recently while cruising around one of my more favorite new cooking blogs I cam accross Cooking for Engineers. The format of the recipes on this site is very unique. Very often they cover simple recipes really really well making it ideal for begining cooks. While looking through their steak recipes I noticed them mention that you should crank up the grill cook for two minutes on each side, then crank down the grill and cook the steak the remaining time on a low heat. I tried it the other night and produced a very well cooked steak (Having really good quality meat helped too). Just in case I'm not the only one who thought steak should be cooked at a constant temperature I thought I'd pass this tidbit on.

April 26, 2005

How to read blogs

Great Article out there for people who want to start reading blogs

100 Gigs of Untagged MP3s and an Ipod Oh My

I love my iPod! I have long been using iTunes for my music management even before I got an iPod. The problem was they are systems completely dependant on ID3 Tags. I had a 100 GB collection of largely untagges MP3s (RIAA if your listening they are all from CDs I own or from the public domain). The only thing I have going for me is that the mp3 are storred by Genre, then Artist, and in some cases album below that. How do I tag some a really large collection of music?

Well my first thought was writing a perl script that went through the collection and based on the foldername would tag all mp3s with the artist tag. The Artist tag was the only really important tag in my opinion to be able to effectively manage your music collection in itunes. If there is Title tag then the filename is used and although the files used many different filenaming conventions they were named with a portion of the title somewhere in the track. The problem with this approach is there are many folders that there are many exceptions to the rule.

Then I started looking at software to acomplish the task and came across a program that stood out from the rest, MP3 Tag Studio. This tool was able to mass set tags based on the folder name. This handled both Genre and Artist. For instances when there was albums I could tag those. For comilation folders or soundtracks I could set the ID3 tages based on the filename of the track. The set from filename feature was extremely flexible and could always find the format I was looking for. I now have a properly tagged collection.

The Armenian Genocide

April 24th is considered the anniversary of the Armenian Genocide that took place in the beginning of the twentieth century. Even though most estimates put the death toll of Armenians at over a million people the Turkish government still denies it was genocide. Many people in the US never even learn about it in school. An interesting quote (its accuracy somewhat disputed) is from Adolf Hitler

"Our strength is in our quickness and our brutality. Ghengis Khan had millions of women killed by his own will and with a gay heart. History sees in him only a great State-builder. What the weak European civilization thinks about me does not matter. I have given the order, and will have everyone shot who utters one word of criticism...
Thus for the time being I have sent to the East only my Death's Head units, with the order to kill without pity or mercy all men, women, and children of the Polish race or language. Who still talks nowadays of the extermination of the Armenians?"

April 20, 2005

Salmon Cakes

Had some friends over for dinner and decided to make up some Salmon cakes. This was my second time making them. The first time I stuck to this recipe. This time I made some variations. I used a combined fry then bake cooking strategy to ensure the cakes were better cooked all the way through. I also added some red bell pepper because a lot of different Salmon cake recipes seemed to include them. My recipe was as follows:

Makes eight 2 1/2- by 3/4-inch cakes


  • 1 1/4 pounds salmon fillet

  • 1 slice of white sandwich bread, such as Pepperidge Farm, crusts removed and white part chopped very fine (about 5 tablespoons)

  • 2 tablespoons mayonnaise

  • 1/4 cup finely grated onion

  • 2 tablespoons chopped fresh parsley

  • 3/4 teaspoon salt

  • 1 1/2 tablespoons lemon juice from 1 lemon

  • 1/2 cup unbleached all-purpose flour

  • 2 large eggs, lightly beaten

  • 1 1/2 teaspoons plus 1/2 cup vegetable oil

  • 3/4 cups panko

  • 1 chopped red bell pepper


1. Locate and remove any pin bones from salmon flesh. Using sharp knife, cut flesh off skin, then discard skin. Chop salmon flesh into 1/4- to 1/3-inch pieces and mix with chopped bread, peppers, mayonnaise, onion, parsley, salt, and lemon juice in medium bowl. Scoop a generous 1/4-cup portion salmon mixture from bowl and use hands to form into a patty measuring roughly 2 1/2-inches in diameter and 3/4-inch thick; place on parchment-lined baking sheet and repeat with remaining salmon mixture until you have 8 patties. Place patties in freezer until surface moisture has evaporated, about 15 minutes.

2. Meanwhile, spread flour in pie plate or shallow baking dish. Beat eggs with 1 1/2 teaspoons vegetable oil and 1 1/2 teaspoons water in second pie plate or shallow baking dish, and spread bread crumbs in a third. Dip chilled salmon patties in flour to cover; shake off excess. Transfer to beaten egg and, using slotted spatula, turn to coat; let excess drip off. Transfer to bread crumbs; shake pan to coat patties completely. Return now-breaded patties to baking sheet.

3. Heat remaining 1/2 cup vegetable oil in large, heavy-bottomed skillet over medium-high heat until shimmering but not smoking, about 3 minutes; add salmon patties and cook until lightly browned, about 1-1/2 minutes. Flip and repeat on second side, about 1 1/2 minutes longer. Transfer cakes to plate lined with paper towels to absorb excess oil on surface, if desired, about 30 seconds. Bake for 8 minutes in preheated oven at 450 degrees then serve immediately, with Creamy Lemon Herb Dipping Sauce.

Lemon Dipping Sauce Recipe
My only variation on this one was adding lemon zest.

Chipotle Style Rice
Cooked white rice with lemon juice, chopped fresh cilantro, and a little salt.

Avocado Tomato Salad
Mixed up Ripe Avocados, Diced Tomatoes, Lime Juice, Cilantro, Chili Powder, Salt.

Broccoli
I also served some steamed broccoli with lemon juice and butter.

Mysterious Question Mark Appearing on my Web Page

I build a website using a custom content management system that inserts links and documents text from a popup window (see earlier post). A bug came up that pointed out that question marks mysteriously appeared after the links and documents in the web page.

I began by looking at the source that was generated on the page to only discover that at first glance there were in fact no question marks in the markup at all. This meant that none of my code accidentally appended a question mark to the end of the display text. I immediately suspected some sort of ASCII Unicode Mix-up and tested that out by going to the View->Encoding setting on the browser and switched from Unicode to Western European displays and found the question marks disappeared. Upon examination of my source I noted that #A0 hex appears as a space in ASCII but a question mark in Unicode. I needed the text to use #20 instead to clear up the problem.

The first thing I did was find where the offending character was getting inserted. I discovered that my popup's JavaScript function returned   in the return string. That got inserted as the ASCII character #A0 instead of the desired actually characters  . Switching this to a simple space worked fine.

My next task was to replace all of the offending characters that had already got inserted in the MSSQL database with the correct space character. For this I simply used the following sql script.

UPDATE content
SET the_content = REPLACE(CAST(the_content AS VARCHAR(8000)), ' ', ' ')

*Note that the space as the second parameter for the Replace Function was actually A0 hex and the third parameter was the correct 20 Hex. I should also note that because the replace function can't handle a text data type as its first parameter I had to cast it into a varchar. This means that any offending characters that appear after the 8000th character would not be replaced. The chances I had that much content inserted was unlikely but I verified it with the query

SELECT content_id, the_content
FROM content
WHERE (the_content LIKE '% %')
No Results, I'm in the clear.
Now I was thinking about ending this entry here but what happens if some poor sole stumbled across this entry, had the same problem, and had huge entries above the 8000 character limit of a varchar. He would have a whole lot of of manual work that needed to be done. Well I did a little Googleing and found you could use this script to replace the text in a text data type in MSSQL.

April 15, 2005

Awesome way to find new music

Want to look for new music artists to start listening to. Up to 11 is a great way to do it. There results were aresome. You can even filter out the really popular bands that you likely already know about. Thanks J$ for pointing out this great site.

Garlic Bread ala Bunk

The secret to good garlic bread in my opinion is lots of garlic and the right cheese. What is the right cheese? Asiago!!!! Sometimes I mix in a little mozzarella as well but usually just use Asiago.

1 loaf French bread
1 head of fresh garlic (some people may want to use less)
1/2 stick of butter

Soften butter a little. Mix in an entire head of garlic pressed (tone down if cooking for a date, no need to worry about vampires after eating this). Add in about 1/2 - 1 pint container of shredded Asiago cheese. Mix together. Chill if you over softened the butter. It should be the consistency of a soft spread. Cut the loaf with diagonal 4/5 cuts separated by about 1 1/2". Cutting diagonally maximizes surface space for the spread. Smear a healthy amount of spread into each slit. Wrap with tinfoil leaving a little bit of the top of the bread exposed. Bake in oven for about 20 minutes at 350 degrees. Props to Dad for perfecting this recipe.

Tomato Pesto Stuffed Salmon

I saw a few similar recipes on the web, modified them to coincide with what I had in my kitchen and came up with this simple recipe.

1 1/4 lbs. Salmon
2-3 Tbs. Pesto
Small handful of pine nuts
1 tomato

Preheat oven to 400. In a bowl I mixed pesto, pine nuts, and the tomato chopped and seeded. I sliced open the salmon along its side about 3/4 of the way through. I stuffed in the mixture. I baked the salmon on a cookie sheet for 8 minutes with the skin side up, flipped, then cooked for about another 7 minutes. I'm sure cooking time will vary depending on the thickness of the salmon

April 14, 2005

Calculating Hold-em Poker Odds

Great article of calculating hold-em pot and hand odds.

Laser-controlled headless zombie flies

Be afraid. Be very afraid.
Article Link

A new Blogger enters the fold

Gary Krajci has started his own blog.

Random Thoughts From a Geek

Gary is a veteran web developer who will hopefully share some of the knowledege he has learned over the years. He's recently gotten into php heavily, hence this first post.

Content Management System that inserts dynamically generated links

The Problem: In designing a custom content management system for a large knowledge management site I needed the ability for links to be administered separately and have Meta attributes, descriptive text, specific icons, etc. tied to them. I also needed the Content Editor that uses the wysiwygPro editor to insert links from this central link database. The inserted links needed to automatically change in all the content sections when changes in the link database were made.

The Solution: Well the design of the link database was pretty straightforward and I won’t get into that here. The challenge was having all the links change in all the content when a modification to the link database was made. The way I looked at it I had two solutions; one was after making a change to link database a script be run to find all the instances of the old link and do a replace with the new link, descriptive text, icons, etc, or I could insert a php function call like displayLink(id) that gets called as the content page gets rendered. The latter is what I chose.

This raised a subsequent problem. The WYSIWYG Editor I used, wysiwygPro, would not display the php function call like it should. After all it was not html yet. Even if I wrapped an eval() function around it, it would subsequently be static html when saved to the db. So what did I end up doing?

Use a span that displayed like it was a link with an id that corresponded to the id of the database id. The display text was used as the content of the span. I would have the link popup insert html like

<span class="fakeLink" id="1077">Solidification in Sealed Ampoules</span>

By defining in a style sheet the class
.fakeLink{
text-decoration: underline;
color: #0000FF;
}
I get the desired look in the WYSIWYG Editor.

Now to get wysiwygPro to insert that code instead of the normal link I had to make some modifications to hyperlink.php with the insert_link function I changed it to output:

textToReturn= '<span class="fakeLink" id="'+document.document_form.link_id.value+'">'
+document.document_form.description.value+
'</span>&nbsp;';

I also had to have the code that generated the listing of links to pull from the database and include a hidden id element. My popup ended up looking like this
linkPopup.JPG
My next task was transforming the span into a function call before it got inserted into the database I accomplished this with a regular expression. The problem I ran into was that wysiwygPro would switch the order of the class and the id on me after submission. On subsequent loads the order would reverse again. So I had to run the submission through a filter to look for either order of class and id appearing. The resultant function was as follows:
function link2func($text){
//the pattern to search for
//$pattern="{<span class=\"fakeLink\" id=\"([^\"]+)\">([^<]*)</span>}";
$pattern="{<span id=\"([^\"]+)\" class=\"fakeLink\">([^<]*)</span>}";
//what to replace occurances with
$replacement="<? displayLink(\${1});/*\${2}*/?>";
//now do the work
$tempText = preg_replace($pattern,$replacement,$text);
//now run it through with the class and id in opposite order
$pattern="{<span class=\"fakeLink\" id=\"([^\"]+)\">([^<]*)</span>}";
//what to replace occurances with
$replacement="<? displayLink(\${1});/*\${2}*/?>";
//now do the work
return preg_replace($pattern,$replacement,$tempText);
}

Notice how I hide the display text in a comment.

Now when a user goes to edit the existing document I needed to transform the function call back into the span. The Function for that is as follows:

function func2link($text){
//the pattern to search for
$pattern="{<\? displayLink\(([0-9]+)\);[\s]*(/\*(([^*]|(\*+([^*/])))*)\*+/)|(//.*)}";
//what to replace occurances with
$replacement="<span id=\"\${1}\" class=\"fakeLink\">\${3}</span>";
//now do the work
$returnText = preg_replace($pattern,$replacement,$text);
return str_replace("?>","",$returnText);
}

Just make sure to wrap the content you pull from the db to display in an eval function so the functions get called. Problem solved.

April 12, 2005

As a person who will soon have a treo

I will be using google local for my directions

You have to subscribe to this blog

Unless you are one of those people who don't care at all about the world around you start reading Rantings of a Sandmonkey. In his most recent entry he explains why he thinks the Iraq was was started. I have to say I completely agree.

Another reason to think twice about smoking...your Grandchildren

In this article published by Scientific America children whose gradmother smoked during pregrancy were more likely to develop asthma even when their mother didn't smoke.

April 11, 2005

Congrats Evan on making it to the WSOP

On Friday Evan McBride was your typical casual poker player. He invested $11 and won a 250 person tournament. The prize was a free buy in(~$350 Value) to a tournament that if you placed in the top 7 you would go to the WSOP. Well he placed 5th. Evan is on his way to the World Series of Poker($10,000 buy-in), with 10-day hotel stay, and $1500 in spending money.

Congratulations Evan!

I think this means I'm going to have to finally head down to vegas and support my friend at going up against the world's best.

Dispelling some reasons on why we waged war on iraq and bolstering others

Sandmonkey offers this insightful post to counter the ridiculous comments from Sen. James Jeffords (I-VT).

April 10, 2005

Sausage Stars

At completion of preperation
Thanks Mom for this great recipe, always one of my favorites. This is a great appetizer for someone elses party. Do the prep work the day before. You only have to spend a very little time doing the final prep.

1lb cooked and crumbled italion sausage removed from casings
1 1/2 cups grated sharp cheddar cheese
1 1/2 cups grated Monterey jack cheese
1 cup of prepared Hidden Valley Ranch (original) salad dressing mix.
1 can (2.25oz.) sliced olives
1/2 cup chopped red peppers
1 package fresh won ton wrappers.
Vegetable oil

Take greased mini muffin tin. Place a won-ton in each hole. Using a shot glass to push in the wontons prevents rips in the wonton and promotes good form. Lightly brush won-tons with oil. Place in oven preheated to 350 for 5 minutes or until lightly browned. Repeat until all wontons are done(Usually about 54 in a package of wontons). When cooled store in ziplock bag. Wrappers stay good for many days. Becareful not to crush them before use though.

For mix take sausage and brown. Drain fat then pat sausage to remove additional fat. Mix with all remaining ingrediants together in bowl refridgerate until ready.

When ready to cook place shells on cookie sheet. Fill with stuffing. Bake at 350 for about 5 minutes or until cheese is bubbly. Then serve.

Happy Birthday Anna & J$

Check out the pics from the dual birthday party

April 08, 2005

An audit of NASA's IT Managment and Security

Review of Organizational Structure and Management of Information Technology and Information Technology Security Services at NASA

Sparring with a VC

Awesome post on why, if you should get in the position where you get calls from them, should take every call that comes along from a Venture Capitalist.

How to Blog Safely (About Work or Anything Else)

Article on How to Blog Safely (About Work or Anything Else)

How out of touch the Vatican is with US Sentiment

To Quote the NyTimes Article

Cardinal Bernard Law, who was forced to resign in disgrace as archbishop of Boston two years ago for protecting sexually abusive priests, was named by the Vatican today as one of nine prelates who will have the honor of presiding over funeral Masses for Pope John Paul II

The sex abuse scandals that rocked the Catholic Church infuriated me. Having some sexually abusive priests was bad but that type of thing happens once in a while when you recruit men who are willing to live a life of celibacy. But what really got under my skin was the way the church handled this. At high levels they simply moved offending priests from parish to parish hushing up the victims and their families. It wasn't until some brave people stepped forward and spoke out triggering a wave of victims coming forward that problem showed itself.
So what was the worst offending parish? Who was in charge of that parish? Cardinal Law. Now he's being positioned as one of the most important cardinals in the time of choosing of a pope. Very disturbing! Again quoting from the times article.
By permitting Cardinal Law to take the limelight in Rome just when the church is mourning the death of John Paul, the cardinals have reminded American Catholics that their most painful recent chapter barely registered in the Vatican.

AMEN

April 07, 2005

Blogs behind the firewall

Here is an interesting article on blogs behind the firewall. The differences between an internal and external blog.

As I read this I think that blogs internal to the comany are a good idea as I believe it would improve company communication and the RSS model is a superior way of reading news when compared with periodically checking a website for new entries. The problem is the company I work for is very distributed across the world on many different ip networks, simply putting a blog server on our corporate intranet would not work.

The solution that is more resonable would be password proteting RSS feeds using http authentication. This requires a news aggregator that supports authentication and a bloggin system that facilitates easy and secure account management.

Where are the RSS aggregators on this technology?
Bloglines and other popular web based RSS Readers to the best of my knowledge do support password protected feeds. There are a few desktop clients that support password protected RSS feeds but I like to access my feeds from the web wherever I am. Looking at the Wikipedia entry for news aggregators there is only two aggregators listed that mention they support password protected feeds in their descriptions. Not Enough!

When it comes to using password protection on blogs, Jeremey Smith talks about the options out there for acomplishing this. For the internal company blog the LDAP integration seems to make the most sense. But it still requires some work to get going. And your still left with a limited set of aggregators that support authentication.

So what needs to happen to internal company blogging practical
- Have all aggregators support HTTP authentication
- Have blogging software support seamless LDAP integration

Until this happens the solution is messy at best.

The new brackets are out

The Pope Brackets Are Out
- $5 an entry
- Unlimited Entries
- Put down the number of days it will take to choose the new Pope as the tie breaker

April 06, 2005

For all you people out there who treat their mother bad

Let Mr. T teach you how to treat your mother right.

April 05, 2005

Using SOAP with PHP

With an upcoming potential project that will be done with PHP interfacing through a SOAP api to another application I decided to do some reasearch to see what the API is like. As I ecpected pretty straightforward. If I implement the solution I'll share what the things to look our for are. Until then check out this IBM article entitled, Access an enterprise application from a PHP script

April 01, 2005

iCopulate

CHeck out this neat new accessory for the ipod, iCopulate.

Pod On Pod Data Transfer Action!... Here's how it works. Simply apply a dab of the included iLube© onto the dock connector of your iPod® and slip it into one end of the iCopulate's™ latex sleeve. Find another consenting iPod® in the vicinity and deftly insert it into the opposite end of the sleeve....

- Unique, ribbed, Latex sleeve surrounding embedded electronics for enhanced iPod® safety and increased user comfort

- Includes one 8oz tube of non-toxic strawberry scented iLube™

The Curious Case of Sidd Finch

The best prospect baseball ever had, Sidd Finch. This april fools day I just want to give an example of one of the best april fools joks of all time. Read the original story of Sidd Finch. You can also read the NY Times article today reminising about Sidd Finch.

Grilled Spice-Rubbed Salmon With Corn Salsa Recipe

My Roomate, Jeff Hawley, came across what I have to describe as the best Salmon recipe ever. My mouth waters just thinking about it. This is definately a must try recipe:

***Grilled Salmon***
2 Salmon fillets - --6 oz ea skin intact
1 tablespoon Ground coriander
2 teaspoons Mustard seed
1/2 teaspoon Ground cumin
1/2 teaspoon Coarsely-ground black pepper
1 tablespoon Brown sugar
1 pinch Salt
Mixed peppers for grilling --quartered

***Corn Salsa***
2 cups Fresh or frozen corn kernels --blanched in Salted water 2 minutes --drained cooled
1/4 cup Finely diced red onion
2 tablespoons Olive oil
2 tablespoons Fresh cilantro --chopped
1 lime, Juiced
1 teaspoon Jalapeo pepper --seeded diced
1 teaspoon Brown sugar
1 pinch Ground cumin
1 pinch Chili powder
1 pinch Salt
Grilled Spice-Rubbed Salmon: Combine spices in a small bowl. Rub mixture over fillets. Cover and refrigerate for at least 1 hour or up to 8 hours. Heat grill to medium heat and place fish skin-side down on grill. Place peppers on grill. Cook fish 5 to 6 minutes, then carefully flip over. Cook peppers until charred, but still firm. When fish is cooked, transfer to serving plate and garnish with corn salsa and grilled peppers. Corn Salsa: Combine all ingredients in a bowl.

Original Recipe URL