Archive

Archive for June, 2009

Perl on XKCD

June 26th, 2009 2 comments

A quick and dirty post featuring XKCD comics that involve Perl:

Saving the day with Regular Expressions

The universe is hacked together with Perl!

The universe is hacked together with Perl!

Mess with Perl!! It’s USEFUL!

Mess with Perl!! It's USEFUL!

If you are unfamiliar with XKCD, you should really head over there to kill some time… you won’t regret it. Also, be sure to stop by the XKCD store and pick up a Regex Cheat Skirt for yourself, or your girlfriend.

Categories: Uncategorized Tags:

Could whole grains be the problem?

June 17th, 2009 3 comments
Whole Grains - Are they reall that wholesome?

Whole Grains - Are they reall that wholesome?

I’ve been reading up on whole grains the last couple of days. I happened upon The Real Truth About those “Healthy Whole Grains” by Scott Kustes over at Fitness Spotlight. The post suggests that those wholesome whole grains aren’t actually all that great for us. Despite the opinions of this post going counter to popular belief, a chord was struck within me, and I had to investigate the matter further.

The gist of what is wrong with whole grains according to Scott Kustes and the articles he cites, as understood by a very non-biology sort of person (they couldn’t even make me take Bio 10) is:

The plants that we call whole grains contain a hormones called lectins that act as a self defense mechanism for the plant. These lectins have the ability to latch on to vitamins and minerals, preventing the body from absorbing their goodness. They also seem to be able to block certain receptors, which also prevents the body from taking full advantage of the foods being consumed.

There is a correlation between lectins in the body, and leptin resistance. Leptin is a good hormone in the body that lets us know when we are hungry or full. Leptin resistance is a precursor to insulin resistance, which is a precursor to diabetes and obesity. The causality between lectins in wheat and leptin resistance is not scientifically proven. There is, however, sufficient evidence to investigate their correlation.

If this theory is correct, grains, specially wheat, messes with our ability to properly monitor our level of hunger, and our ability to absorb the goodness in the foods we eat. That is some seriously bad effects for something we consider to be wholesome!

One of the comments on Scott Kustes’ above mentioned post caught my attention. Kat Eden wholeheartedly agrees with the sentiment of the post, and the conviction behind her comment led me to her blog. The personal trainer and coach from Australia supports a new holistic approach to nutrition that she calls New Nutrition. Even though the programmer in me is cringing at the use of “New” in the name, I love what Kat has to say and her nutrition philosophy. Her approach incorporates additional factors in nutrition including hormones (this is HUGE one), sleep and our evolutionary relationship with the change of seasons.

Kat Eden proposes The Grain Challenge, in which she challenges us to cut out all grains for 2 weeks, evaluate how you feel, and slowly reintroduce grains, re-evaluate how you feel, and judge for yourself as to whether whole grains are really the bees knees as touted by conventional nutrition philosophies.

I decided that I would take on this challenge almost immediately. I found these posts on Sunday night, and on Monday morning I was routing around the kitchen to put together an omelet and fresh fruit for breakfast instead of my usual Shreddies with skim milk. I don’t know if this New Nutrition approach is correct, but what I now understand about lectins, leptins and their possible interactions having an effect on our weight and overall health makes sense to me. So I’m doing it: The Grain Challenge. I’ll be blogging about my experiences with grain elimination in the hopes the my readers might benefit from my experiences.

My motivation for taking on The Grain Challenge comes from a long lived frustration. Frustration from being sick and tired of being sick and tired. For quite sometime, in the order of years, have felt tired most of the time, and had been very prone to illness in the last 3-4 years. I have also been struggling to lose weight over the past year. I am about 20 pounds overweight, and have bee focused on loosing that weight, to no avail. I have in no means been a saint, but I have put in honest effort in keeping my eating clean, and my fitness level up, and have been rewarded with nothing but a 3 lbs gain over the year.

My evaluation factors are:

  • My energy level – Will I find my long lost “get up and go”
  • How I feel – Will I feel healthier and less prone to illness?
  • Weight loss – Will I shed any of this excess weight with the elimination of grains?
  • My skin – My sensitive, acne -prone skin is a good monitor of how healthy I am

I havn’t eaten any grains for 3 days. It is still to early to properly evaluate, but I do feel that my energy level is up since the weekend. I’ll be blogging again about my experiences with The Grain Challenge in the days and weeks to come.

A little GM math

June 10th, 2009 No comments

I cannot get this out of my mind! I wrote last week about the bankruptcy of GM and my hopes that the governments taking over the greater portion of the massive corporation would bring back the electric car. From the recent advertisement being played in high rotation on television, I’m guessing that’s not part of the plan. “Stronger brands” is a part of the plan. Great, marketing mumbo-jumbo for us all to enjoy:

All that aside, I can’t get over the numbers: $39.5 BILLION! $30B from the American government and $9.5B from the Canadian government is going to GM. That is a ridiculous amount of money! In a very anti-capitalist move, these governments are taking over a crippled business that is $172 Billion in debt. Why? Why is it so important that GM be saved? They made poor business decisions that led them to this mess, why should the government be bailing them out?

The employees? GM employs 243,000 people. That is a lot of people! GM employees more people than all of the people who lost their jobs in Ontario since October 2008 (234,000). If all of these people lost their jobs on the same day, tough times would certainly fall for many, concentrated in particular regions of the Canada and the US. Times are already hard, GM going under would definitely make times much harder.

But, imagine this: $39.5 Billion divided by 243,000 is $162,551 per GM employee. What if all of that money was not to go to saving a dying relic from another time, but it went to programs, grants and loans for education, re-training and small businesses. What if it went to the individual employees that stand to lose their jobs, in ways that encourage these individuals to get creative, better themselves, and find something productive to do. What potentials could these individuals realize if they were given such opportunities?

It saddens me to realize, we will likely never know.

Categories: Random Thoughts Tags:

New release of the Kiva Widget

June 8th, 2009 No comments

Just a quick note to let you know that I just released an update to the Kiva WordPress Widget. Some of you may have noticed missing images. JL, helped me figure out what was going on with his contribution of the line:

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

Thank you very much JL!!

Kiva is moving their images around, and the widget wasn’t handling it. I have incorporated JL’s suggestion and released the update of the WordPress Plugin. In addition, I added a cache check to fix up all of the missing images that may be out there right now.

Get the Kiva WordPress Widget Version 2.1 here.

A Brief History of Perl

June 5th, 2009 2 comments

Perl is older than dirt. Well, actually, that’s not true at all. Perl is older than Linux though. Perl 1.0 was released in 1987, 4 years prior to the release of the first Linux distribution. The creator of Perl, Larry Wall, got a graduate degree in Linguistics from UC Berkeley, and had grand plans to find an unwritten language with his wife Gloria, and invent a writing scheme for it. These plans fell through, to the great advantage of computer science field!

Back in the day, Larry Wall programmed on Unix with the usual suspects, C, sed, awk, shell. He grew frustrated with the options available to him. So he set out to write his own language that took the best from what is avaialble, and left the rest behind. The creation of the first Perl interpreter took the better part of 1987. Wall released the first version on December 17th 1987. Through out the late 80′s and early 90′s Wall released improved versions of Perl untile 1994, when he released Perl 5, that included a complete overhaul on the Perl interpreter. Perl 5 is the version that most current Perl programemrs are accustomed to. It has had several sub-versions released through out the 90′s and the current decade. The current version is 5.10.0.

The Perl community has been eagerly waiting for the next major release of Perl for what feels like forever, but it’s actually only been 9 years. Work on Perl 6 began in 2000. We are still waiting on a proper release of Perl 6. Larry Wall and his team aren’t rushing it. They want to build a worthy successor to Perl 5, and they are taking their time in order to make sure they are doing it right.  Perl 6 has many differences from Perl 5, here is a select few:

  • Optional data typing system – You won’t have specify your types, just as with Perl 5, but in Perl 6, you will have the option to specify your data types
  • Formal subroutine parameter list – The days of ‘shift’ and @_ will end in Perl 6, as C/Java style subroutines will be the way in Perl 6
  • Consistency with arrays and hashes – Where in Perl 5 we declare an array as @myarray, and reference an element in an array as $myarray[0], Perl 6 will maintain the @ symbol for both the declaration and the reference. To access and array element in Perl 6 will be done by: @myarray[0]. The same goes for hashes. $myhash{‘item1′} will become %myhash{‘item1′}
  • Formal object-oriented programming – For those of you stickler who say Perl 5 isn’t object-oriented enough, Perl 6 introduces more formalized object orientation with the use of the world ‘Class’ and everything!

Perl 6 will not be back compatible with Perl 5, though there is supposed to be some sort of compatibility mode included.

Perl stands for Practical Extraction and Report Language, though this  acronym was created as an after thought. Larry Wall wanted a short word for the name of the programming language, one that had positive connotations. He settled on Pearl, but laster found out that there was a real-time focused programming language called PEARL, so he changed the spelling, and it has been called Perl ever since.