Technology, Business, and Doritos

Experiences and help from a wandering techy and entrepreneur

Contact Me

Send any questions you have about food, or programming in PHP, MYSQL, DHTML to tmiskin@gmail.com and I will blog it. And I mean any question.

Never going to be happy

May 12th, 2007

I have talked about it before, that I believe we will never see a President with a positive approval rating throughout his presidency ever again.  It doesn’t matter what party or what they do, most will hate them because of the overwhelming negativity of media and opinion pages.  Want some proof?  A poll this week shows the approval rating of the Democrats in congress at 30-35%.  President Bush’s approval rating?  30-35%.  At this point the American people have no idea what they want, they just don’t want what we have and what we will ever have.  Any future President will get no help and make their effectiveness low.  Instead of judging policies individually, we label a leader evil or good and once that is done the American people will never like a decision of that person regardless of its merits.  With watching the presidential hopefuls I view it as watching a bunch of people lining up to get a shot at sticking their head in a guillotine.  Enjoy guys.

del.icio.us:Never going to be happy digg:Never going to be happy furl:Never going to be happy

Cereal Treasure

April 10th, 2007

Anyone who doesn’t know how kids in your house can spread disease easily need look no furthur than the box of Cap’n Crunch with a prize inside.  With six kids under the age of twelve, these prizes were a premium in our home.  Most of the kids eyed an opened box of cereal carefully in the cupboard.  We were looking for the star callout in the bottom corner of the box, which signaled that there was a pad of stickers or a cheaply made plastic wristwatch inside.  Being the oldest boy, I usually got first dibs on the toys but had to occasionally defer to younger siblings so that it didn’t cause an uproar.

Most of the prizes in the boxes were broken and in the trash before breakfast was even over.  Some watches didn’t even work at all.  Still, I would proudly wear a bright yellow cartoon character with a blank lcd for days.  However, the novelty soon wore off and I would wait for another fresh box to attack.  The all important prize grabbing technique came after you nabbed the box.

If you were lucky enough to get the new box without another sibling noticing you had to try to get the prize discreetly.  However, some boxes were just too stubborn to let you get the toy.  These boxes required extra special care.  First, you would squeeze the box starting from the bottom and work up so the cereal was evenly distributed vertically.  Then, very carefully so as to not let the cereal settle back down, you would tip the box so you could look in.  If the cereal box was too full, you were in for a very large bowl of cereal that day.  Even if I didn’t like the cereal, I remember eating bowls four times a serving size just to grab the prize.  After emptying the box partially you had to stare in for any sign of the magical plastic corner of the prize package.  If you saw it then it was time for diving.  Careful to not lose site of it, you would dive your hand in until you could grab it.  Small cereals like Rice Krispies were easy to push aside, but others like Honey Combs were just tactical nightmares.  This was worsened by the fact that the Honey Combs box was gigantic.  Soon, everything but your head was immersed in the box, with your entire arm contaminating the entire box.  But it didn’t matter, because you came out victorious.  You were the proud owner of a new Teenage Mutant Ninja Turtle press-on tattoo.

It was on one of these mornings that I noticed a new box of Cap’n Crunch.  My mouth was still shredded from the last time that I ate them, but I wasn’t interested in eating them.  No, this time there was a very different prize offered on the front.  It was foreign paper currency.  Now, most kids might not find this very cool, but I enjoyed reading encyclopedias straight through.  So, while a few siblings noticed, my excitement over the prize won over.  Soon I was holding a fresh Chinese bill, worth probably somewhere in the vicinity of 5 cents.  By the end of breakfast the bill had been worked over and looked like I had owned it for weeks.  I was so excited about my new prize I decided to ask my mom if I could take it to my kindergarten class.  She agreed and I walked happily to school with my new riches in hand.

Anyone who knows me will attest to the fact that I indeed have a mouth, and that it is open a lot.  This was no different then.  By the time an hour had gone by in our class, I had shown every student my chinese bill more than once.  One kid tried to take the money, but I think the look of death I gave him probably dissuaded him from keeping it.  The day was going perfectly until reading time came.  After listening to the story for at least 5 seconds, I began to play and show my money to the seated audience again.

“Trent,” my teacher said sternly.  “You need to put that money away right now or I will take it away.”

Of course I did not acknowledge this, because of course there is no way that an adult would take away the most precious possession of a five year old.  So, I continued showing off the money until my teacher got up from her reading seat, took my money and placed it in her drawer.  While I pleaded to have it back, there was no changing her mind.  That money never felt my hand again, and Mrs. Smith will always be the woman who took my Cap’n Crunch prize.  It was a long walk home.

del.icio.us:Cereal Treasure digg:Cereal Treasure furl:Cereal Treasure

My “auto-bigraphy”

April 10th, 2007

I have written before about the “Great Brain” books by John Fitzgerald.  The books are based on his life and more especially the character of his brother, but sometimes only have a passing resemblance to what really happened.  I also love the movie “Big Fish”, in which the father always exaggerates what really happened in his life.  I have always thought that fiction is more important in literature than non-fiction but that is a long argument that isn’t worth making here.  However, I really enjoy mixing the two.  So, regularly I am going to post passages in my “auto-bigraphy” with names changed, ages changed, or just things completely made up.  It will however be pretty solidly based on experiences I saw, had, or heard.

del.icio.us:My  digg:My  furl:My

I finally got around to watching the video by Channel 4 out of England called “The Great Global Warming Swindle”.  While I know that this video has its own biases with being connected to BP and other organizations that could benefit from global warming being downplayed, it is thought provoking nonetheless and is refreshing to hear a counterpoint to an issue getting no rationale discourse in the opposite direction.  I also spent some considerable time one night searching more on it reading both for and against, and I especially focused on discussions I found among different researches and other interested people.  While I do believe global warming is happening, I am certain we are not the cause.  However, I believe we are CONTRIBUTING to its severity with our pollution, but the consequences in the next 100 years have been extremely exaggerated by Al Gore types and are not helping anything.  In fact, I think it is hindering areas in the environment that truly need more work.  Go ahead and read the latest predictions by the IPCC and those from Al Gore’s “documentary”.  Since Al liked to quote them so much he might find it quite a bit different.

Though I am from Utah and a conservative, I have always been very supportive of environmental controls.  I have held the opinion long ago that it is absolutely absurd that we are still using fossil fuels to run our cars and that it is driven because there is no economic incentive for oil companies or car companies to change.  In my opinion cities have been far too aggressive in zoning residential areas where there is already too much congestion.  The most troublesome piece for me is air and water quality.  Here in Utah Valley, and even more so in Salt Lake, during inversions the air becomes almost toxic.  This last few months had a day where we had air quality five times worse than LA.  It was literally killing people with a distinct increase in heart attacks during those time according to a recent report.  It also made anyone with allergies or asthma home bound.  And it is only going to get worse.  Instead of our focus being on these real problems, everyone is instead expectedly jumping on the doomsday exaggerated claims of global warming when the evidence for even slight disaster being dubious at best.  Instead we have real crises now that are being ignored.  I found this great quote on a comment to a blog I read.

“We should be cutting back on use of fossil fuels due to the resource dwindling not because people are running round saying the sky is falling down, because as soon as it doesn’t people will go straight back to their bad old ways and run the wells dry.”

This is precisely what will happen.  As soon as the apparent danger leaves the people will go back to the status quo and forget about the real problems these things cause.  The proponents of radical measures to stem global warming are doing it on dubious information at best, and most scientists admit this.  Aren’t many of these the same people who have continuously bagged on the Bush administration for doing the same thing in going into Iraq?  Enormous amounts of money are being pumped into this research around the globe, and developing companies everywhere are being severely hampered economically all on a wild hunch.  How are these two things any different?  Well, it is a lot easier to hide the ill effects of bad global warming policy than it is an open war, even if the end effects are just as disastrous.

del.icio.us:Wrong focus with environment digg:Wrong focus with environment furl:Wrong focus with environment

America’s cycle

April 3rd, 2007

Anyone who does not notice that our American culture goes through cycles isn’t paying attention. Today mirrors the late 60’s so much it is scary. An extreme distrust for anyone in power or government, a paranoid view of society and a willingness to accept multitudes of conspiracy theories. Global warming and polution control is at the forefront of discussion and hard drug use is on the rise. Holistic and herbal medicines are the craze, with colonics and enemas making a comeback etc. We are the new hippie generation.

There seems to be so little ability at the moment to be moderate in anything. Moderation is my motto, yet it seems to be the worst way to get an audience today. People are pigeon holing themselves today in everything. What happens is they gain a loyal and fierce, but narrow following who they then pander to. Whether it be the far left Democrats, the far right Republicans, or the Libertarians/Constitutionalists. The Democrats say all the Republicans are evil, the Republicans say all the Democrats are evil, and the Libertarians/Constitutionalists say both sides are all evil. Gone is the day for rational discourse and finding common ground, because for most, their ground is the ONLY ground. There is a big difference between presenting your ideas and standing by them, and tearing down everything someone else believes. When you approach things that way you will get nowhere and have effectively neutralized any affect you could have on the situation. It is like when someone who doesn’t smoke walks up to someone on the street who is smoking and says, “You shouldn’t smoke, it will kill you.” You have immediately ruined any positive impact you could have on the person. I do not advocate being weak, or changing your personal views, but the presentation of these ideas is a huge issue.

People throw around the word “evil” way too easily today. Most of the people tossing it around are not in any position to make that assertion and especially to publicly announce someone as such. And on the other end people are calling the other person evil. It is a huge cycle to the point that every single person is evil in someone’s eyes, but for some reason you are supposed to trust one opinion over the other. In reality they are ALL wrong. I can find over 90% common ground with about anyone I meet. I have met multi-millionaires, politicians, homeless, whoever, and I have realized just how similiar we all are. Unfamiliarity breeds ignorance, and because many have less direct contact with CEOs of large companies or politicians, the average joe has demonized them all as evil or puppets of a giant conspiracy. Maybe you should meet their family, actually find out about them. Instead, we make large sweeping judgements based on personal biases and a desire to blame someone or to make something simple complicated to boost our own importance or to make our place in time more “important”. It is somehow difficult for people to believe that we are all so much the same, so instead there is some mysterious “They” who is controlling all. Some vast conspiracy that is controlling our every move. We have become amazingly neurotic.

I know that people will call me a “sheep” or naive for my views. But my views come from people I have actually met or talked with and realizing that everyone has a reason for what they believe. It has allowed me to have a lot of impact on people I normally would never have been able to talk to. In the end, what we are doing reminds me of my favorite Dr. Seuss story, The Sneetches. They were all the same, but branded themselves different. That is what we are doing, as soon as “the other side” is getting too close to your own views, you change them just to be different. In The Sneetches it says ”

until neither the Plain nor the Star-Bellies knew
whether this one was that one or that one was this one
or which one was what one… or what one was who.


We are all so similiar, afford everyone the benefit of the doubt and realize they are probably looking back at you the same way. Hold your own viewpoints, but allow others their own too. Otherwise you will enjoy a life of little influence on others.

del.icio.us:America's cycle digg:America's cycle furl:America's cycle

For full disclosure, I know the owner of weightlosswars.com well, though I have no financial or other interest in the company at all. In fact, while I am signed up for the service I haven’t used it for my own weight loss because I enjoy just doing things on my own. However, I feel the need to comment on something that happened over the last day with the company. After a few emails back and forth, Jason Calacanis blogged about sites like weightlosswars. Instead of being insightful, he comes off as being ultra defensive and some of his comments are just downright absurd. First he makes the assumpti,on that these sites only work through competition. If Jason actually looked at sites rather than blindly making judgements based on his love for his own ideas he would see that weightlosswars has a section called “Adventures in Health” where the users blog about their struggles and successes. Not only does it do this, but it aggragates all the users blogs into one nice feed so you don’t have to hunt through tons of feeds looking for the weightloss posts as with fatblogging(tm). I shoved that “tm” in there for you since you seem to want that there. Additionally, the site allows you to have friends, read their blogs, share successes, share recipes etc. This goes against Jason’s assertion that fatblogging necessarily gets you friends where these sites don’t. The entire site is built around friends, whether it be for competition or blogging or personal messages. It makes me question whether most bloggers ever visit sites more than a few seconds because of their built in biases.

I don’t even know where to begin with this silly statement, “While weight loss competitions might draw some folks for the short term, it will hurt in the long term because a) many folks don’t like competitions and b) when the competition ends so does the motivation for those who signed up for it.” This sounds like a comment from someone who hasn’t had much experience in any type of competition. The vast, vast majority of people thrive on competition. Some just only compete with themselves. It is still competition. Most people want to get to a weight they were earlier in life, or get to a weight that is at a range set by their BMI. That is competition. You are competing with your former self, or competing with the BMI. Competition can and does produce lifelong changes in people if the people around them have the right goal in mind. Sports, spelling bees, programming contests, all can help people be active for their entire life, read, and learn. Weightlosswars isn’t for everybody, either is fatblogging. To say otherwise is incredibly myopic and shows a lack of desire to consider new ideas other than your own. If you are already blogging and don’t want to add another place where you need to post, fatblogging is a great tool. If you aren’t blogging, and you want to find a great built in community talking about their struggles and you want to find friends to help, I suggest weightlosswars.

del.icio.us:Being defensive is bad for blogging digg:Being defensive is bad for blogging furl:Being defensive is bad for blogging

So this weekend has been pretty tough with my alma mater’s basketball team losing in the NCAA tourney and a few other random things, but luckily when I got home I saw a new flavor of Doritos on our fridge.  Apparently Wild White Nacho is a part of a competition Doritos is having for a new flavor.  The other competitor is Smokin Cheddar BBQ which I will have to try later.  I do have to say that I am scared about the BBQ.  A very well done BBQ chip is awesome, a slightly less well done chip is just awful.  There is no middle ground as far as I am concerned.  Now to the review of the Wild White Nacho flavor.

When I first took a bite the thing that came to mind was Cool Ranch, and then after eating a few more it was more of a cross between Pepper Jack Doritos and Cool Ranch.  Luckily it isn’t as sickeningly loaded with flavor as the Spicy Sweet Chili ones which I hope they take off the shelves quickly.  Anyway, the Wild White Nacho flavor is nice, but I wonder if it is distinctive enough to set it apart from Cool Ranch or Pepper Jack.  Which makes me wonder why the moniker “Wild”.  It would be more accurately called “Tame White Nacho.  The thing I like the most about this flavor over Cool Ranch or Pepper Jack is the cheese coats the chip so the flavor is very mild and consistent over the whole chip.  With the other two flavors, the flavor is more sprinkled on and some bites you get really loaded with flavor and they can sometimes be gritty.  Anyway, I will write again when I try the BBQ flavor and compare the two.

del.icio.us:New Flavor: Wild White Nacho Doritos digg:New Flavor: Wild White Nacho Doritos furl:New Flavor: Wild White Nacho Doritos

Fun with text encoding

March 12th, 2007

We all love to see ? or ^A characters in our webpages. This comes usually from smart quotes or fancy apostrophes in Word being pasted into our webpages. By default webpages are rendered in ISO 8859-1 encoding. Over the last year I have learned how to get around about every possible reason for this in PHP and MySQL, so here are the things that you can do in PHP/MYSQL/HTML.

1. These weird characters can be caused by the html document itself not being in UTF-8 encoding. To do this just put this in between your “head” section.

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

Or you can add this into PHP

header("Content-type: text/html; charset=UTF-8");

2. Sometimes the problem can be that your content is taken from MySQL, and by default it takes it out of MySQL in ISO 8859-1. To take it out in UTF-8, just put the following code after you connect to your database.

mysql_query("SET CHARACTER SET utf8");

3. If you are pulling in the text from an external file you need to first make sure that it was saved in Unicode format.  In Windows you have to explicitly put a unicode header into the file, which is usually available by checking a box when saving the file.

4. Finally, if you just want to convert the string into ISO 8859-1, then you need to use either the mb_string library or iconv.  I personally like iconv, but it doesn’t matter very much.  To convert with iconv and replace characters that are not in one that are in the other, the below code works in PHP.  The //TRANSLIT is so it replaces characters.  Usage is iconv(inputEnc,outputEnc,stringToConvert).

iconv("UTF-8", "ISO-8859-1//TRANSLIT", $stringToConvert);

If you are still having problems, just email me and I will look into it.

del.icio.us:Fun with text encoding digg:Fun with text encoding furl:Fun with text encoding

Nacho, nacho man!

March 11th, 2007

I was thinking about my blog over the weekend and wondering how I could focus it in certain areas to make it more effective and I decided to split it into two subjects.  Food and recipes, and code help and reviews.  So I don’t get bored, I am just going to go every other day for each one.  Today is the day for food, so here it goes!

My family loves nachos, and I guess they aren’t hard to love.  There isn’t anything not to love about it.  Cheese, chips, and spice.  Now there are two types of nachos that I like to make, the liquid cheese sauce type, and then the grated cheese type.  I make whichever one sounds the best at the time.  Below are the instructions for each type.  There are no specific measurements for these.

Nachos made with Velveeta (or other processed cheese)
Despite what they say, it is basically impossible to melt velveeta properly in a pan on direct heat or in the microwave.  It is just too hard not to get it too hot to melt it properly.  So, what you need is a double boiler.  Don’t worry, I don’t have a “real” one either.  To fake it, just fill a medium saucepan with water halfway up and put it on medium heat.  Then get a metal bowl that will float in the saucepan and put it in the water.  Cut a section of the Velveeta off and then cube it and put it in the bowl.  How much you use depends on how many nachos you make.  Better to make too much than too little in my opnion.  You can buy big blocks of Velveeta for cheap at Samsclub or Costco.  Put just a little milk into the bowl with the cheese.  For the heat, the best thing is a canned salsa base called Rotel.  It might be spicy for some people, so put it in toward the end of the melting process and taste it until it is your desired flavor.  While it is melting stir occasionally and make sure that the bowl doesn’t get too hot or the cheese will start actually cooking.  You just want to melt it.  If you don’t have Rotel, go get some.  Or you can use any salsa or cayenne pepper to add some heat.  Lay out chips on a large plate so that the plate is completely full but each chip has some part exposed.  Take the bowl out of the saucepan and immediately pour the cheese over the chips.

Nachos with grated chedder cheese
For these, the best cheese is a very sharp chedder cheese.  I personally like extra sharp Tilamook cheddar.  You can grate the cheese in a bowl first or directly over the plate of chips.  I am lazy and just grate it right over the chips.  Grate the cheese until it completely covers the chips.  Grab some paprika and sprinkle it very liberally over the chips.  Paprika doesn’t have a strong flavor so you can go to town with it and it doesn’t change it much.  Then grab some chili powder and sprinkle quite a bit over the chips.  Next grab garlic powder and sprinkle very lightly over the chips.  Lastly, sprinkle cayenne pepper very lightly over the chips.  If you really like it hot sprinkle more of it on.  Then put the plate in the microwave and let it go for 50-60 seconds depending on the microwave and amount of cheese.  These chips are great, and if you don’t put a lot of cheese on, the chips are actually like cheese-baked chips and can be used for a fancy appetizer chip at a party.

If anyone even reads this and wants any instructions on any type of dish or suggestions for dishes send them my way.  I have cooked or seen enough cooked at this point that I have suggestions on about everything.

del.icio.us:Nacho, nacho man! digg:Nacho, nacho man! furl:Nacho, nacho man!

More on why jQuery is cool

March 10th, 2007

I know most of the stuff I am going to talk about is available in the other popular javascript libraries, but I also know the philosophy and method behind jQuery is great and that the documentation is superb.

First of all, jQuery has great documentation at jQuery.com and also visualjquery.com. For the most part I do not go to the visuajquery.com site as it is more of a platform to show off what you can do with the library. For those that like fancy presentation that is a great place to go though.

The core jQuery library is very small. If you are not planning on modifying the core code (which you probably shouldn’t in a production environment), then just download the latest compressed version. As of right now, the compressed library is only 19k! It takes the philosophy of Firefox, with a very small footprint and a lot of different plugins you can download. All you need to do to “install” a plugin, is download or write the javascript function and include it in your page along with the core jQuery library. Below are some of my favorite pieces of jQuery along with the plugins I have tested.

The power of the core jQuery library is the DOM selection process. To select any element on a page, is use the $(element) syntax. For the basics, you can select items by ID, name, class, type. For example to select a tag with the id of “test”, you would use $(”#test”). At the bottom of this article I will put a getting a quick start guide on how to get going right away with jQuery.

1. Dimensions – This plugin is essential if you want to use some nifty effects but at the same time want to be cross browser compatible. The coolest part of this library, is it allows you to fix the age old problem of having two “divs” be the same height, and it takes very little code. Here is an example from one of my sites.

$(document).ready(function() {
if($j("#leftContent").height() > $j("#rightColumn").height()) {
 $j("#rightColumn").css("height",$j("#leftContent").height() + "px");
 $j("#leftContent").css("height",$j("#leftContent").height() + "px");
 } else {
 $j("#leftContent").css("height",$j("#rightColumn").height() + "px");
 $j("#rightColumn").css("height",$j("#rightColumn").height() + "px");
 }
});

What it does is use $(document).ready(); which simply runs whatever you put inside the function when the page is ready. In fact, for your site specific code just have one $(document).ready() function and put all of your code inside there. The code above will resize the right and left column to be equal. If you didn’t have dimensions it would take a lot more code to make it cross browser compatible.

2. Thickbox – Really, this is just lightbox with a much smaller footprint and better performance. It also has great documentation from the creator. The creator is a brilliant programmer who regularly mocks the 2.0 movement while at the same time creating libraries for the perpetuation of it. Classic!

3. CurvyCorners – My frustration with corner rounding libraries has always been that it won’t allow you to have a border that is a different color than the background. Well now you don’t have to worry about it. This library is now compressed so it is still really small. To use it all you do is use this syntax $(”.myBox”).curvy(settings). Check out the link to see more details on the settings you can use. The coolest is anti alias so you can actually get smooth corners.

I know there are probably some Scriptaculous users out there saying “Well where are all the fancy effects?!”. Well, never fear, they are here – Interface plugin. The effects include: animate, effects(pulsate, slide, shake, blind, fold, scrollto, scrolltoanchors, drop, open / close / switch, bounce, transfer, grow / shrink, puff, highlight), draggables, droppables, sortables, selectables, resizables, slider, tooltips, slideshow, imagebox, autocompletion, autoscrolling, autoexpander, accordion, tabs in textareas, 3D carousel, fisheye menu. The coolest thing about this plugin is that the download on these pages lets you select whichever pieces you want and then automatically compresses that set of plugins for download so they will still have a small footprint. I haven’t used many of these different effects, so I can’t comment on many of them.

To get started with jQuery, first download the compressed core library and put it wherever you are placing all your javascript files. After you do this, download any of the plugins you want and put them in another file called plugins.js or pick another name if you want. I like putting all the plugins in one file so I don’t have a million includes. Some people have different plugins for different pages, but I tend to think if the plugin is used on only one page I shouldn’t even have it. In general I think that is a good practice. Below is an example from my pages with the includes for the js files.

<script type="text/javascript" src="/includes/jquery/jquery.js"></script>
<script type="text/javascript" src="/includes/jquery/plugins.js"></script>

These includes need to be in the head section of your page. Then, create another .js file with all of your page actions. These can be page or section specific if you have a lot of events and want to cut down on the javascript on each page. For example you can have a file called home.js, and include it like this.

<script type="text/javascript" src="/includes/jquery/home.js"></script>

In home.js put all of your code in a $document.ready(function(){}) like below.

$(document).ready(function() {
$("tr:nth-child(even)").addClass("even");
$("#loginExpand").toggle(
 function(){$("#loginBox").show(); $("#innerLoginBox").fadeIn("slow");},
 function(){$("#innerLoginBox").fadeOut("slow",function() {$("#loginBox").hide();});  }
 ).css("cursor","pointer");
});

What the above code does, is first waits for the document to be fully loaded in the browser. It then gives every other table row the class of even. That is how easily you can do colored table rows. The code below that makes a link that fades and hides a login box and makes the link have a cursor pointer. These are just a few examples, but you can do a lot more. If you want to use AJAX to load content into a certain element it is trivial, which I really haven’t mentioned it. You simply do something like this $(”#dynamicbox”).load(”mypage.html”). Anything returned from the .html page (or any type of page like php, asp, or whatever) will replace the html currently in the selected element. If you have any questions about the library or are stuck on anything just send an email to tmiskin@gmail.com and I will answer it either on the blog or over email

del.icio.us:More on why jQuery is cool digg:More on why jQuery is cool furl:More on why jQuery is cool