Friday, April 18, 2008

One of the things I've been working on for the past week was automating some SVN (Subversion) administrative tasks. As I originally come from a Unix background my first  thought was to use PERL. In the past I've used PERL for lots of these kind of tasks on Windows Servers. ActivePerl made it very easy to install on Windows boxes. Heck I even had a PERL script that FTPed into a remote server and downloaded files with a specific extension and deleted the files on the remote server after the download was over. That script ran for 3 years with minimum maintenance.

However I thought this time I'd see about using Microsoft PowerShell. I have to tell you I think PowerShell rocks. The best way I can describe PowerShell is it's the Windows equivalent of BASH or Korn shell in Unix or Linux. It allows you write a shell script for repetitive tasks, just like any other shell. In fact I found the syntax for PowerShell to almost be a blend of C# and PERL. So I felt comfortable writing PowerShell scripts very quickly.

In SVN I wanted to add new files to the repository.  If you're using TortoiseSVN, this task is easy to do with the GUI. However I want files to be added to the repository any time a automated file sync happens. So I wrote a quick script for this:

$results = @(svn st)
$pattern = "^\?"
$re = new-object System.Text.RegularExpressions.Regex($pattern)
$resultCount =  $results.length - 1
for($j=0; $j -le $resultCount; $j++)
   {
    $add = $results[$j]
    $match = $re.Match($add);
    if($match.Success)
    {
    $add = $add -replace("^\?.{6}","")
    svn add $add
    }
}
Let's go over what this script is doing. First we load the results of the "svn st" command in an array. $results = @(svn st)

Now we use a regular expression to find the items that need added. These are denoted by the "?" at the beginning of the line. So we define the pattern and set the System.Text.RegularExpression object. (This is the .NET System.Text.dll) Then we set the pattern "$re = new-object System.Text.RegularExpressions.Regex($pattern)".

Next we create a $resultCount variable that holds the number of items in our array. This will be used in our "for loop". Now we look through the items in the array, and if the item matches the regular expression it will be added to the SVN repository. However there's one hicup. The file path to be added from our array starts with "?      ". So we need to trip that off. Again we use a simple regular expression and the -replace parameter, and now we have a correct path.

It's added to the SVN Repository and we're done. Well almost. We have to save the script into a ".ps1" file. However it won't run just yet. It has to be signed. Signing a PowerShell script isn't hard, but it does require some work. Scott Hanselman has a great post on his blog about Signing PowerShell Scripts that is just excellent, I highly suggest you read his tutorial.

Happy Coding :-D

4/18/2008 9:15:00 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [2]
 Wednesday, April 16, 2008

Shut Down Day
How much time do you spend on the computer during the week? I know I spend at least 60 hours a week. True I need a computer for my work, but that's still a lot of time spent in front of a machine. That's a lot of time not being active. I've been thinking about this quite a bit lately. Well Saturday May 3rd 2008 is Shut Down Day. The premise is simple, don't turn your computer on that day. See if you can go 24 hours without a computer. More important it's about realizing there is life "outside the monitor". I know I can do it, and I'm sure you can too!

4/16/2008 8:18:40 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [0]
 Monday, April 14, 2008

blue in the face
I'm going to start by warning you that this post is a rant. A rant that I'm sure most Technology Workers have from time to time. A minimum of once a month I meet someone new outside of work and my family. After some chitchat about the weather or whatever we have in common that brought us to whatever event we are at to keep the conversation going they always ask "That" question, you know which one. "So what do you do for a living?". I hate this question.

There are two very good reasons why I hate this question. First, what I do for a living doesn't really tell you what type of person I am. If you'd truly like to learn who I am and what I'm about, ask me about my family or my hobbies. Ask me what I'm passionate about. These subjects are something I can speak volumes on with such enthusiasm we'd talk for hours. I'd be delighted to tell you what the Little Boy did yesterday. I'd love to tell about my Beautiful Wife, and how we meet, and how wonderful she is to me. Heck, I'll even be happy to talk with you about film verses digital photography and the merits of both.

My second reason, most people have no idea what I do. I'm not trying to be mean or condescending. It just from personal experience I know people who don't work in IT (Information Technology) have no idea what I do. They'll ask me what I do for a living and I say "I'm a Sr. Web Developer." And their eyes glaze over while their brain tries to connect any synapse to any other connection to the words "Web" and "Job". The most common reply is; 'my nephew just built a website, I should send you the link, you'll love it! It's got blinking banners and a cute little bunny picture, it's great!". Honestly this has happened at least a dozens of times. So in a futile attempt I try to clarify by telling them that what I write is Online Banking software. Again, the glazed over look, and then they tell me, "You know I have trouble logging in to my Online Banking, why do you think that is?" By this point I just simply shrug my shoulders and say, I have no idea and change the subject.

4/14/2008 10:18:33 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [0]
 Friday, April 11, 2008

wiimote
I'm sure by now everyone has seen an Apple iPhone. The iPhone's true genius lies in its user interface. The ability to scroll through lists with a swipe of your finger or to resize an image by putting two fingers on the screen and moving them apart is both brilliant and intuitive. This kind of innovation is what is needed for consumer electronics. I’ve had several PDAs including an iPaq with a full size keyboard attachment, yet I was never completely comfortable with it as a single source for all my needs. Most of the time I  carried a laptop around with me too. There always seemed to be this lack of understanding between me and the device on how we should communicate. Being left handed the handwriting recognition and I never saw eye to eye. The stylus was another point of contention. Poking at the device with an object smaller than a crochet hook just didn’t seem like a good way to interact with it, let alone try to put in anything more than a couple of words.

The Wii, and more specifically the Wiimote has shown that consumer electronics that are easy to use will rule the market. Let’s face it for the last two holiday seasons in a row people have lined up to purchase a Wii. There are a plethora of articles about the elderly using and loving the Wii. This is because Nintendo understood that changing how we interacted with the games was more important than having the most realistic graphic engine. I’ve played both the Xbox 360 and the Playstation 3, and they are amazing. The graphics are crystal clear and photorealistic. However they just aren’t nearly as much fun as the Wii. The Wii is just plain fun and anyone of any age group can play it. Again the Wiimote is the reason for this.

The Wiimote is a simple controller built on great technology. It connects to the Wii via Bluetooth technology. The way the Wiimote tracks your movements is done by a infrared camera in the remote, and the Wii sensor bar has infrared LEDs in it which the camera can see. Using these common technologies allow the Wiimote to be used for other uses. That is something that Johnny Lee has done and has done well. He recently gave a TED Talk in Monterey California. If you watch this video until the end you'll notice he gets a well deserved standing ovation.

If you haven’t heard of Johnny Lee he is a research scientist at Carnregie Melon University. Instead of using hyper-expensive hardware that most people won’t have a shot at even seeing he uses the Wiimote to do some amazing things with user interfaces. Being a person that wants to share these technologies he’s put the software that he’s written up on his website. What I really appreciate about his work is that he’s made it freely available, but also decided to use tools that are freely available to almost anyone with a computer and an internet connection.

I feel these kind of innovations are vital and I applaud Johnny Lee and his work. The great thing about these technologies is that you can get your hands on it right now. If you have a Wii, you can start playing with the software with just five dollars worth of parts from Radioshack. You can even buy the IR LEDs and the Safety Glasses with LEDs for under 20 bucks.

4/11/2008 5:50:58 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0]
 Monday, April 07, 2008

After my last post, my Beautiful Wife and I were talking and she suggested that I write a follow up post about all the food that have wheat and wheat gluten in them that you wouldn't suspect. We've found these foods after trial and error. Now that I've been living without wheat or gluten in my regular diet, I find that I can taste wheat immediately in almost anything that actually has it. This has been as valuable as being able to read the labels. There is still somefoods out there that don't correctly list all the ingredients. However most are doing a really good job of it. Hopefully this quickly list will help you as in learning to live gluten free.

Candy
Unfortunately I have a sweet tooth a mile wide. So finding which sweets you can't eat is as important as the ones you can. As with all food, you'll learn that you have to read the package, even if you think it's safe.

  • Red Vines: Wheat is it's main ingredient. I loved Red Vines, so this one was hard for me to give up.
  • Twix: Twix has a cookie center, wheat...sorry
  • KitKat: KitKat is just like Twix
Snacks
  • CornNuts: CornNuts, as will most snack foods of this type use wheat as an agent for making the artificial flavoring stick to the snack. The last time I looked original CornNuts were okay, but any of the flavored ones, watch out for.
  • Doritos Nacho Cheese Chips: Like the CornNuts, Doritos use wheat as an agent for making the artificial flavoring adhere to the chip.
Condiments
  • Soy Sauce: Wheat is the second ingredient in Soy Sauce, water is the first. So as much as we may love it, we have to avoid soy sauce or using very sparingly.
  • Hollandaise Sauce: While the original recipe for hollandaise is butter, lemon juice and egg yolks most chain restaurants use a prepackaged hollandaise sauce that they just heat up. Of course this prepackaged sauce uses wheat.
4/7/2008 8:37:23 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [0]
 Friday, April 04, 2008

Like a growing number of people, I have an intolerance to wheat gluten. I've had this for the last 10 years, and it definitely makes meal times a little harder. My intolerance to Gluten is due to celiac disease. While I don't have the most severe case of celiac disease, it definitely has several negative affects on me. So I work very hard to avoid wheat gluten whenever possible, and believe me it's a lot of work. You'd be amazed how many foods use wheat gluten as a thickening agent (almost every brand and favor of soup) or just to add texture and crispyness (is that a word?).

So What is Gluten? 1Gluten is a composite of the proteins gliadin and glutenin. These exist, conjoined with starch, in the endosperms of some grass-related grains, notably wheat, rye, and barley. Gliadin and glutenin comprise about 80% of the protein contained in wheat seed. Basically Gluten is a protein that cause a person with celiac disease not to be able to properly digest and absorb nutrients from their food. The side effect of that for me is severe fatigue.

My challenge is to find things I can eat that don't have wheat, or wheat gluten in them. So the obvious quick meal choices are out, sandwiches, pizza and any kind of bread product. But there are food that have wheat gluten in them that you wouldn't think of. For example French fries are out of the question at the majority of restuarants, however  I can eat the ones at In-N-Out.

Below is a short list in no particular order of fast food restaurants in my area. Some of them have many gluten free choices, and some have none at all.

In-N-Out: In-N-Out is simply the best because basically you can get any burger "Protein Style" Which means they wrap it in lettuce instead of serving it on a bun. Protein Style is listed in their "Secret Menu" Also their french fries are made fresh from potatoes that were wash peeled and cooked minutes before they are served to you. They simply have the freshest food of all the fast food chains in my area.

Wendy's: First off, bravo to Wendy's for having menu items without gluten listed on their website. Not all of the bigger chains do that. Basically all of their hamburgers can be order without a bun. All of their salads that have curtons on the side so you don't have to try and pick them out. Their baked potatoes and chili is gluten free.

Taco Bell: According to Taco Bell's Allergen chart there are only three things on menu that are gluten free.

  • Side of Rice
  • Side of Pinto Beans and Cheese
  • Tostada
  • Panda Express:  Panda Express' site is very to the point on their FAQ/Contact page , the question is "Which of your menu items are gluten free?" the answer "None of our food is gluten free".  I actually just found this out today doing research for this blog post, and man was I surprised!

    McDonald's: I personally don't eat at McDonald's. However I did look at their site to see if they posted an allergen chart. Which they do but they don't. They've mixed the allergen information with the "ingredient" list of their food. Basically they've made it hard to find which items do and don't have gluten in them. With other fast food chains being so forth coming with this information McDonald's hiding it in such a way that they can technically say it's on their website, makes them seem a little shady to me.

    Subway: Subway does actually have a few items on their menu that are gluten free. It took a little looking but they do have a allergen chart on their website. Of their 16 salads listed on their menu, 13 are gluten free, 3 are not. Here are the 13 that are gluten free.

    • Chicken & Bacon Ranch (includes cheese)
    • Cold Cut Combo
    • Ham (Black Forest)
    • Italian BMT®
    • Roast Beef
    • Roasted Chicken Breast
    • Tuna
    • Turkey Breast
    • Turkey Breast & Ham
    • Spicy Italian
    • Subway Club®
    • Subway Club®
    • Veggie Delite®

    Jack in the Box: Like McDonald's Jack and the Box does List the Allergens with the Ingredients of each item, however they did do a little better job of highlighting which items have which allergens. That being said I didn't find any entree that was gluten free.

    Carls Jr: It took a little digging around on their site to find the Allergen chart, but they do have a pretty good one. That's the good news. The bad news is that there are really only two items on the menu to eat.

    • Lo-Cal Six Dollar Burger
    • French Fries (maybe)

    I hope you've found this helpful in your search for gluten free fast food.

    Bon Appétit :-D

    As Featured On Ezine Articles

    1. Quoted from Wikipeda http://en.wikipedia.org/wiki/Gluten
    4/4/2008 7:18:54 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [2]
     Wednesday, April 02, 2008

    For the last three days my Beautiful Wife and I have been vacationing in Yosemite National Park. If you haven't been to Yosemite it is truly amazing. It is one of the most beautiful and breathe taking places in the country. This is a trip that we had planned for a few months and it was as fantastic as we hoped it would be. This was my second trip to Yosemite and my Beautiful Wife's first.

    Saturday was the first day of our visit to the park. We came through the south entrance. It is about a 25 mile drive from the south entrance to Yosemite Valley. Your first view of the valley is just before the tunnel, after going through the tunnel you are greeted with Tunnel View. This is an amazing view of the valley floor. You'll see El Capitan to your left, Bridalveil Falls to your right, and Half Dome smack dab in the center. I'm sure just about everyone has seen Ansel Adam’s "Clearing Winter Storm" photo of this view. This is the first place you’ll learn just how many tourists are there to see Yosemite. We parked the car and I hopped out like a giddy school boy. I quickly gathered my tripod and camera pack and walked over to the wall where the tourist congregate to photograph Tunnel View and start setting up my camera. If I haven’t mentioned it before I’m a hybrid photographer, which means that I use both film and digital cameras. So I’m standing at this beautiful vista, looking out as I set up, which takes about 5 minutes or so. I take out my light meter, get the reading, and set my shutter and aperture accordingly. In the time that it takes me to go through these steps several people have come up, taken their snapshot and ran back to their car and drove away. While I’m composing my shot and checking my settings, I had several people come up and ask me if I’d take their picture. I am always happy to oblige, but what cracked me up is that four out of five times they feel the need to point out to me which button trips the shutter.

    Well most of Saturday was spent taking photos of all the popular spots. Then something happened while I was taking some shots from Sentinel Bridge, I thought I had taken 9 or 10 shots but when I checked the film counter was blank. Apparently when I had reloaded the film I forgot to completely wind the camera. So all the shots I took, didn’t actually get recorded. Which I feel, ended up being a good thing because right then I decided that I needed to take photos that weren’t like everyone else’s. I started looking for My Yosemite and not the one I had seen and read about in books. Don’t get me wrong Ansel Adam’s photos of Yosemite are amazing, but I didn’t need to make a perfect copy of his photos. I needed to make photos that were mine, and in my style. I stopped being as concerned about the photos I was taking and started concentrating more on experiencing this beautiful place. One of the most unexpected experiences, which we don’t have any photos of, yet I doubt we’ll ever forget is of watching a coyote running across the meadow walkways.

    We were on the north side of the meadow on the Yosemite Falls side, and our car was parked over by Sentinel Bridge. I had just finished taking some photos of Yosemite Falls when we decided to head back to the car. As we started across the meadow footbridge, it started to rain large cold rain drops. We started to pickup our pace when I noticed a healthy sized coyote coming from the west up to the footbridge. My Beautiful Wife looked up and saw him just as a couple that was walking towards us about 75 yards away saw him. We both slowed down, and watched as the coyote looked at both of us to judge our speed and intent. He decided that we were no threat to him and he crossed the footbridge and ran in to a heavily wooded area to get out of the rain. It was such a beautiful and natural moment that we where stunned and in awe.

    Sunday was the day we almost made it to the valley floor. However the closer we got the more it snowed, so not having chains, we decided to turn around and decided to go back toward home. However we didn’t rush back, we took our time and pulled off and investigated some of the beautiful creeks on highway 41 that most people drive past at 40 mph. These little creeks and vistas are filled with natural beauty. Alder Creek has to be one of my favorites. I’ll post photos from Alder Creek on my photoblog as soon I get some film developed.

    Monday we went to both Bridalveil and Verner Falls. While they were both very different, their beauty is undeniable. I do have some recommendations, if it’s less than 40 degrees, you don’t have to hike all the way to the base of Bridalveil, because it will be very wet and cold. You're hands will freeze quickly and your teeth will chatter so hard, you may have to go to the dentist afterwards. However on a hot day, I’m sure it’ll be nice and cool and just what the doctor ordered. Verner Falls is something else. I do have to warn you that it’s a good hike. I don’t mean miles and miles kind of hike, I mean it’s a good hike uphill the entire way and at a fairly steep grade. Being that I had my 50 pound camera bag on my back, it was a lot more work than I expected. One of the beautiful moments of that hike was about half way up the trail to the footbridge, on the west side we saw a beautiful, powerful spring fall that simply won’t be there a month from now. To see such a rare sight on such a hard hike was very rewarding. It was a great trip and I can’t wait to go back to My Yosemite.

    Happy Trails :-D

    4/2/2008 2:32:45 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0]