Page: 2

Weigh In - March 21st 2014

This is now my third week back on program. I'm feeling much better this week. Tracking again has become more natural. I'm not having to look stuff up as much as I had been. I'm almost fully back to routine. However this week I haven't gone to the gym as much as normal. Monday night we went with some friends to Lexington to play some board games at a Meetup. That was a blast. I didn't end up having time to workout, shower and be ready in time to go to our event. Oh well. But I know you're wondering. How did you do?

Well good news. I lost 1.6 pounds this week. The bad news is I lost a point. I know sad right? But some more good news is Heather lost 2.2 pounds! Way to go my girl. But in other good news. Two of our close friends (Jason and Kelly) have decided to join us in our Weight Watchers journey. They're doing great. They're learning how to track. It's a real blessing to having friends on program as well. I'm glad that we can help them. In the past we've had our friends Catie and David on program with us too. I don't know how many times I've leaned on them for support. I can't thank them enough for supporting us. I only hope that we can provide as much support as we've been given by our friends.

My plans for next week is to ramp up working out more. I'm going to ensure that I make it to the gym every workout day next week. The rowing machine has become one of my favorite workout tools. I can manage to do about 10 minutes at 100 watts. I can feel my my upper body muscle getting worked good. Or as they say "I can feel the burn!" I also plan to try and reward myself more. In the past I've saved points for a end of the day snack. It always gave me something extra to look forward too. In the past we've bought a tray of brownies (roughly 5 points a piece). Tonight I'm either going to have some Arctic Zero Ice Cream (only 150 cal per pint!) or a medium Ice Coffee from McDonald's. Happy Friday! We'll see. Till next time onward and downward!

Pi Day 2014 - Weigh In

Just recently my wife (Heather) and I have started back on Weight Watchers. We previously had lost over 100 pounds together. Even with that much loss we still haven't reached our maintenance weight. We've decided to push forward and head toward our goal again. As of this post I'm now on my second week. Today was my second weigh-in back on program. I didn't lose anything or gain anything. But let me share with you what the last few weeks have been like.

I'll admit. I'm addicted to food. As most people are. It isn't easy sometimes to eat with moderation. Especially when life events happen. Birthday parties, holidays, etc. It can be a pain. It's easy to go off program. I know I have many times. But what I notice the most about coming back on program is the shock of the system. It amazes me how quick us humans can get adjusted to eating certain level of food everyday. When that level changes it's rough on us physically, mentally and even emotionally.

Over the last two weeks I've had to re-learn to say "NO" again. At first I had became bitter. I also got very territorial about my food. "MINE! You no can have!" What has helped is understanding the following: A) My body only needs so much fuel in order to run properly. B) I can't give into my emotions. If I'm upset food can't be an outlet. C) I can put off certain "extra food" to eat the things I really want or crave. No food is completely off limits. You just can't eat much of it. D) Last but not least. It's easy to form habits. It just takes practice and time. Here's a great article for those struggling to make new good habits. But after a few days of saying "NO" I start to feel better. My energy levels drop but then being to improve.

I've started going to the gym again. I've gone to the gym three days week for the last two weeks. I'm blessed with the health program at my new job. I can now workout for 45 minutes a day, three days a week. So on Mondays, Wednesdays and Fridays I workout. By the time I get home I've had may workout complete and have the whole evening to do whatever. It's great. Enough for now. I just wanted to share my experience. I hope to keep these weigh-in posts going. Hopefully I can do that. Happy Pi Day (3.14).

Why I Love The ISO Date Format

After working with different types of data for many years you gain appreciation for a few things. One of the odd things I've gain favor of is the ISO Date Format (YYYYMMDD). This simple concatenation of a four digit year (YYYY), 2 digit month (MM) and 2 digit day (DD) makes it very easy to query and work with. Not to mention this format is internationally recognized and compatible with gregorian and julian calendars. With or without built in programing/scripting language functions I can break this date format down into easy to use parts. Let me show you a few PHP snippets I've used in the past.

Example: Parsing ISO Date Format Using date() and strtotime() Functions $str_date = 20131231;
//strtotime() will convert it to Unix Time, date() returns part requested
$year = date("Y",strtotime($str_date)); //2013 - "Y"
$month = date("m"),strtotime($str_date)); //12 - "m"
$day = date("d"),strtotime($str_date)); //31 - "d"
echo $year.$month.$day; //20131231

Example: Parsing ISO Date Format Using substr() Function $str_date = 20131231;
//even without the use of date() and strtotime() functions, I can parse this date format into year, month, day using the substr() function
$year = substr($str_date,0,4); //2013
$month = substr($str_date,4,2); //12
$day = substr($str_date,6,2); //31
echo $year.$month.$day; //20131231

Where I think this date format really shines is in SQL queries. Because of the nature of the date format being an integer it makes it easy to find all the dates between a range of dates. For example say if I wanted all records where the date is between January 1st 2013 and October 21st 2013. My query would look something like the example below.

SELECT * FROM records WHERE mydate BETWEEN 20130101 AND 20131021;

What if I needed a quick and dirty way of querying for all records during one month (April 2013) or even a full year (2013). My queries could look something like the examples below.

SELECT * FROM records WHERE mydate LIKE '201304%'; #Full Year-Month
SELECT * FROM records WHERE mydate LIKE '2013%'; #Full Year

One last thing about this date format. How can we convert to it? Well Below are some examples in different languages. I hope this may have inspired you to take a look at this date format. I know it makes my life easier as a developer at times. In a future article I'll talk about the benefits of using Unix timestamps as well.

#php: date("Ymd"),strtotime("yourdatehere"));
#mysql: date_format(date(NOW(),'%Y%m%d'))

Starting Over

I've decided enough is enough. I'm tired of WordPress. I've decided to develop my own blog system. I've named my project SmallBlog. Right now it's basic. But you're looking at it and it works! It has a lot of the features I enjoyed about WordPress without all the issues. I haven't decided if I'm going to release my code open source or not. One of the things I don't like about WordPress is the fact everyone knows it's vulnerabilities. Because it is so popular it becomes a target of exploit. More to come!
Newer Articles