Author Archives: Rami Massoud

The Next Big Thing

Over the past couple of years, I’ve made some very significant changes in my life: I’ve lost over 90 pounds, significantly improved my health, upgraded my style, and made it through my first powerlifting competition in one piece. I’m very happy with the progress I’ve made, and the things I’ve achieved, but there was the question of: what next?

Well I’m happy to finally be able to publically announce the next major change: as of June, I’ll be moving to NYC to work at Vimeo as an Application Engineer!

vimeo_logo_white_on_blue

For months, I’ve felt the pull of the NYC tech scene. Between the meetups, hackathons and tech talks, there was so much to learn and do, but just out of my reach. So when I heard Vimeo – a company I always thought would be really cool to work for – was looking for PHP developers, I had to put my name in the hat. Plus getting to work in the IAC building in Manhattan didn’t hurt either, though the temptation to make every day a Food Tour adventure might.

iac

As excited as I am to be moving to a place as full of opportunity and adventure as NYC, I’ll most certainly miss being so close to so many of my friends and family. Thankfully I’ve gotten nothing but support and encouragement from everyone I’ve told, and I can only hope that they’ll use my move as an excuse to visit the city more often.

Now I just have to figure out how the hell I’m going to top this next year…

How To Destroy Your Web Server and Ruin Your Night

You could say I have a fairly healthy interest for the systems admin side of tech. I wouldn’t say I’m an expert, but I think I could get by as an entry to mid level admin. Though that certainly doesn’t stop me from doing some colossally stupid things with my personal server(s).

...

As of right now, I have two hosted VPSs, including the one that this blog runs on. This server is supposed to be my “production” server, so it’s as locked down as I can make it, with only the necessary services running. Beyond that, the next cardinal rule of managing a production environment is testing software updates somewhere else before you run them on the production machine(s). Even though I’m fully aware of this rule, and of the possible ramifications of not following it, I’m usually – read: always – too lazy to test updates on a mirrored environment first. Cue ominous music.

That feels about right

That feels about right

The Incident

Yesterday before I left for the gym, I decided to log into my server and run, just like I do every couple of weeks, probably the most dangerous command I have in my bash aliases.

alias update='sudo apt-get check && sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoclean'

A command that I’ve run hundreds of times without incident, until now. After running the command and clearing my terminal, I went through my typical cursory check of this site before heading out to the gym.

Pictured: Brief confusion, before panic sets in.

Pictured: Brief confusion, before panic sets in.

No. F$@KING. Way!

Debugging – Panic Style

I was so confused, I failed to realize I was getting the default apache page, when…you know…this is supposed to be an nginx only box… I checked the site config files and “restarted” nginx and php-fpm a couple of times before I realized apache was somehow installed and running. I shut down the apache process, thinking it was just conflicting with the nginx process, but what I didn’t realize was that nginx was somehow uninstalled from the system!

Crap! Crap! Crap! Crap! Crap!

More investigation revealed that not only had nginx been uninstalled, but so had php-fpm! No wonder restarting though the /etc/init.d/ executables did nothing. What exactly did I miss?!

mistake

That would explain it…

This is what happens when you do this crap in a hurry! But no big deal, the configs all seemed to be intact, just install everything again and we are back in business. Right?

~ $ install nginx-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
nginx-full : Depends: libgeoip1 (>= 1.4.8+dfsg) but 1.4.7~beta6+dfsg-1 is to be installed
Depends: libpcre3 (>= 8.10) but 8.02-1.1 is to be installed
Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
E: Broken packages

Wait…what? Why the hell are the nginx/php packages dependant on library versions that don’t exist or are uninstallable?!

Dreadful Realization

At that moment, I remembered something a friend told me a few days prior: Debian 7 was just released. Somehow I was trying to install packages in Debian 6, that had dependencies on libraries in Debian 7! But how?!

Now we add Dotdeb, a great resource for debian installs that provides bleeding edge packages for a stable and up to date LA(/E)MP stack. Update your /etc/apt/sources.list to include the repo:

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

Then add the GnuPG key:

wget http://www.dotdeb.org/dotdeb.gpg
apt-key add dotdeb.gpg

- Adventures With Nginx and PHP

Ohhhhhhh

Using Dotdeb is very simple:

1. Add the main repository to your sources.list

Depending on your distribution (Wheezy or Squeeze), add these two lines to your /etc/apt/sources.list file (you can also choose a mirror near you) :

deb http://packages.dotdeb.org wheezy all
deb-src http://packages.dotdeb.org wheezy all

or

deb http://packages.dotdeb.org squeeze all
deb-src http://packages.dotdeb.org squeeze all

2. Options

If you want to install :

  • PHP 5.4 on Debian 6.0 “Squeeze”, add these two lines too :
    deb http://packages.dotdeb.org squeeze-php54 all
    deb-src http://packages.dotdeb.org squeeze-php54 all

- Dotdeb Instructions

OHHHHHHHH

HOLY CRAP I NEVER SPECIFIED THE VERSION OF DEBIAN!

 Cleaning Up My Mess

It’s not such a big deal to screw up, as long as you can fix it, right? Well that’s what I’m going with here.

I followed Dotdeb’s (updated) instructions to specify the version of Debian I was using, and tried to install stuff again.

The following packages have unmet dependencies:
nginx-full : Depends: nginx-common (= 1.4.1-1~dotdeb.0) but 1.4.1-1~dotdeb.1 is to be installed

What a nightmare! Thankfully one that isn’t ridiculous to work through. After running

sudo apt-get autoremove

I was finally able to successfully reinstall all of the packages I accidentally removed

Woo hoo!

Woo hoo!

Word of Warning

While I was writing this post, and further investigating what happened, I discovered that there is something…strange with the Dotdeb PHP 5.4 packages. I would not recommend using them with Debian 6 (squeeze) just yet, especially if you want to install PHP extensions like mcrypt or suhosin.

If you end up with issues installing PHP extensions you’ll want to find out what PHP components you have installed that are 5.4, and remove them with apt. In a similar setup as mine, you’ll want to remove php5-fpm and php5-common to clean up all of the problematic components.

dpkg

After that, you should just be able to install PHP 5.3 along with whatever extensions you need!

Meals For The Lazy Lifter – Basic Meat & Veggies

Ain’t Nobody Got Time For That

I cannot begin to explain to the uninitiated how much my new health-conscious lifestyle eats into my free time (probably as much as I used to…eat). It is So. Very. Easy. to just get some takeout after the gym, or some crappy frozen meal you throw into the microwave for a few minutes. So easy, but you won’t get very far with that, at least I didn’t. If you want to keep track of what you are eating so you can actually lose the fat/weight, the easiest way to accomplish that is to prepare and weigh everything yourself.

fat

Post-workout nutrition can get…messy

The main problem with cooking your own meals, other than the skill typically required, is the time. On a good day I feel mind-warpingly lazy when I get home, much less after being in the gym for 2-3 hours. Compound that with the intermittent fasting protocol I’ve been following, when I get home at 9 I am in no mood to prepare a complicated dinner. Then you factor in my “cooking” skills and I am left eating dinner at 11, not exactly my ideal night.

no time

What she said

So what is a ravenous, health conscious, big lifter to do? Stick to the basics!

Planning Is Your Salvation

Same as with your workouts, if you want to get through this while keeping your sanity intact, you will have to plan and prepare! I have found picking a day, and preparing a week’s worth of food is usually the best strategy. That way you can eat fresh food, and not have to spend an insane amount of time on preparation. The question now is what the hell to buy and prepare. If it wasn’t obvious from the title: a crap-ton of meat and vegetables!

meat & veggies

No time to screw around here!

What you are seeing in that picture is almost eight pounds of beef tenderloin, along with ten pounds of mixed vegetables. Something that for me, will last about a week. What I don’t have a picture of is the industrial sized package of boneless chicken breast to balance out my main food groups. However you accomplish it, get yourself a healthy amount of fatty meat (beef, lamb, pork, or a mix), and a bunch lean meat (chicken, turkey, bison). Once you’ve taken a decent chunk out of the local fauna, it’s time to set your sights on vegetables! You have tons of options, dependant on your preferences, not just on what to get, but also on where. When the season is right, I’ll go to the local farmer’s market and load up on a wide variety of veggies. If that’s not an option, whatever doesn’t look like crap at the grocery will do.

Preparation!

To get all of this raw material processed, you’re going to need a giant bowl, giant pan, two cutting boards (one for veggies, one for meat), ditto on knives, and a ton of space. Take care of the vegetables first, thoroughly washing them, then cutting them into decent size chunks to throw into the bowl. Easy right? SUPER EASY!

Now on to…butchering the rest of this meal

Depending on your cuts of meat, this might go differently for you. I really like the tenderloin since you can just cut it into steaks of whatever thickness your heart desires. The general plan here is to just cut up the slab of meat into more manageable portions. What “manageable” means is up to you, I tried to shoot for 16 oz steaks.

fresh steaks

Can you taste those sweet, sweet gains?!

The chicken is even easier; just take the chicken cutlets and cut them in half, removing what little gristle they make it out of processing with.

chicken

Chicken breast, the staple of weightlifters everywhere!

At this point, you should have a giant bowl of vegetables, and two heaping piles of meat. If you don’t…well, you should probably have locked up the dogs before you started this project. Whatever the state of your supplies, it is time to power on through to the seasoning part of this masterpiece. Some of you may want to experiment with smaller samples to get the seasoning right, which is probably smart. For the non-lameasses, like myself, just go into the spice cabinet and grab whatever herbs and spices smell good. With your seasonings of choice by your side, lay out one of the types of meat evenly in the giant pan you got earlier. Once the meat is laid out, spice to your heart’s content. I usually just coat all of the meat on one side with each of the herbs and spices, then add the super secret ingredient: tons of olive oil!

spiced chicken

Picture: Way more than 11 herbs and spices

If you have a basting brush lying around, use that to make sure all the pieces are well coated with the seasoning and olive oil.

portioned steak

Talk about easy access!

Final step in the prep work is portioning. Bust out the Ziploc bags and food scale, and start bagging the meat and veggies into single meal portions by weight. I went with one pound of meat per Ziploc bag, and same with the vegetables. It also helps to write the exact weight on the bag for easy entry into your food tracker.

Good Old Fashioned Barbecue!

There are, of course, plenty of ways to cook up the meal. Personally, I greatly prefer cooking all of my meals on the grill. Mostly because there is little to no cleanup afterward.

Cleanse it with fire!

If you’re still following my lead: while the grill is heating up, go ahead and grab a bag-o-meat and a bag-o-veggies out of the refrigerator. There is still a little more to do with the vegetables to get them barbecue ready, so grab some of those tasty herbs and spices again, along with the olive oil and aluminum foil. Cut a healthy length of aluminum foil, and dump the vegetables out into it.

vegetables

Now season them to taste – which for me was in a very similar fashion to the meat – and dump in some olive oil. Then roll up the foil, and crease the edges to make it into a semi-sealed pocket for the veggies to ghetto stir fry in.

sealed vegetables

Mmm way better than a burrito right?

Hopefully the grill is nice and toasty by now, somewhere around 500 degrees fahrenheit preferably. If it’s ready, throw your speed-meal on the flames, and let the magic start. I’ll leave the details of the actual barbecuing to personal preference, just try to make sure you cook stuff enough that it probably won’t kill you.

barbecuing

If you weren’t hungry before (HA! Yeah right…) the smell will definitely fix that.

The Fun Part

Now that the work is behind you, time to sit back and enjoy the delicious fruits of your labor. Feel free to add some side dishes to spice things up. Sometimes I’ll cook up a half dozen eggs to go with my meal, or a few cups of rice, all dependant on my mood and what macros seem lacking that day.

Finished meal

Crap, now I’m hungry all over again!

Most importantly: make sure to take advantage all of that free time you just made for yourself! Which if you’re like me, means you get to go to sleep early! (WOO HOO)

Albany Strength USAPL Powerlifting Meet

Over the weekend, I had the pleasure of doing something I never thought I would: competing in an honest-to-goodness powerlifting meet!

albany_strength

Background

For the uninitiated, a powerlifting meet typically consists of three main lifts: barbell squat, barbell bench press, and barbell deadlift. The competitors are divided into various weight classes, and each is given three (one rep) attempts at each exercise to move as much weight as possible. Winners are picked in each weight class based on the total of the heaviest successful attempt in each lift.

The Results

Since it’s what most will want to know, might as well go over it first: how did I end up doing?

The Squat

squat

I was very happy with my performance in the squat. To kick things off, I started out with a reasonably easy 345 pound opener.

I continued on with a moderate 15 pound jump to 360 pounds for a second attempt.

With another conservative 15 pound jump, I finished strong with a conservative 375 pound final attempt. I felt like I had room for an additional five or ten pounds, but the easy final let me walk away from the squat with a new personal best, and a confidence boost to carry through the rest of the competition.

The Bench

Ah the dreaded bench press, by far my weakest lift. I was off to a good start with an easy looking 225 pound opener, then bumped up to what was supposed to be an easy 235 pound second attempt. Unfortunately my trouble with pause benching caught up to me, and I missed both the second and third attempts at 235.

The Deadlift

deadlift

Even though deadlift is by far my favorite, and strongest lift, I would be lying to myself if I said that my poor showing at the bench press didn’t rattle my confidence. No one likes to get up in front of a large group of people, only to fail. Making matters worse, a faulty bar I had the misfortune of using in the warm up room made me question my double-overhand grip. A grip – for reference – that I’ve easily rack pulled over 600 pounds with.

Setbacks aside, I powered on through. I was wearing a shirt that read “No Excuses” after all, I couldn’t let myself get psyched out. I opened with an easy, and battle tested, 440 pounds. The bar went up so so easily that I was actually partially stunned after it was over; wondering if they miss-loaded the weights.

Now I was back in the game, even if I still was too nervous to go back to my standard grip, I was definitely having fun again. I continued on with a new personal best for my second attempt, 470 pounds.

My plan going into the competition was to go conservative, and to make sure I had a solid first competition experience by making most, if not all, of my attempts in all the lifts. So for the final deadlift, even though I felt invincible, I put in a moderate 485 for my final attempt. That would have allowed me to beat my pre-competition personal best by 20 pounds, not something to scoff at! Thankfully for me, my good friend and training partner vehemently disagreed. Considering how easy 470 went up, he thought I would be an idiot for hitting anything less than 500 pounds as a final attempt. A goal that I have been chasing after for almost a year, something I thought I was still months of training away from.

Apparently not. Not only did I manage to successfully deadlift 500 pounds, it felt easy. Talk about the perfect end to my first powerlifting meet!

Totals

In the end I totaled with a respectable 1100 pounds, a result I am quite pleased with for my first competition. I may not have won my weight class (or even placed), but I managed to set two new personal records, and that is definitely something I can be proud about.

Reflecting Back

My biggest fear entering this competition was how I would react to lifting in front of an audience, a concept that was incredibly foreign to me. Especially considering I only recently began to workout with other people. I believed that my tendency to get distracted during my workout, even mid lift occasionally, would severely impact my performance.

This was a concern I was regularly told to not worry about, that when I got up to the platform the adrenaline would be pumping so hard I’d be barely able to see straight; much less worry about any of the spectators. Regardless of everyone’s reassurances, I was still incredibly worried, right up until my name was called for On Deck on my opening squat attempt.

Stepping onto the lifting platform was a surreal experience. My friends who had previously competed were not exaggerating in the slightest about what happens when you do. As soon as “bar loaded” was called, everything seemed to wink out of existence. Everything except me, the weight, and the person giving the commands. The absolute focus on the task at hand was a new, and incredible, experience. As strange as it may sound, each attempt seemed almost like a dream. One that I would wake up from in the warm up room, barely remembering that I was just in front of a crowd of people.

Overall this competition was an incredible, and exhilarating experience, something I definitely plan on doing again. Though next time, not only I will feel perfectly comfortable inviting everyone I know to come and watch, but will be competing to win, instead of to just set new personal bests.

Take Your Workout Seriously

Reinventing The Wheel

Over the past ten years I have had a very on-again, off-again relationship with working out. As a complete novice - lacking knowledge, experience, and proper guidance - I fell into the trap of the “build your own program” abomination, instead of doing my homework and finding one that was battle tested. Before I learned how to workout effectively, I would spend my time running on the treadmill and using the plethora of machines my gym had available. For years, my go-to “program” looked much like this:

  • 10 Minutes of cardio for a warm-up (either treadmill or elliptical)
  • 40 Minutes of weight training
    • Monday – Chest and triceps
    • Tuesday – Back and biceps
    • Wednesday – Legs
    • Thursday – Shoulders
  • 10-20 Minutes of cardio
bad_idea


Something like that…

I would spend 5 days a week at the gym (Friday consisting of some form of cardio for an hour) every week for months at a time. Within the bounds of the muscle groups for the day, I would wander around the gym and perform two or three exercises per group. After a while, the lack of results would finally catch up to me, and I would give up. Sure the weights on the various exercises would go up for a while, but I couldn’t see any change in my physique or how I felt day-to-day, leading to ever increasing frustration. This is an example of what happens when you don’t do your homework on a workout routine. I think Martin Berkhan’s post about Fuckarounditis sums up what I was doing better than I can:

  • Fuckarounditis is a behavioral disorder characterized by a mediocre physique and complete lack of progress, despite significant amounts of time spent in the gym
  • Fuckarounditis most commonly manifests itself as an intense preoccupation with crunches, curls, cable movements, belts, gloves, balance boards, Swiss Balls and Tyler Durden. Fear of squats and deadlifts is another distinguishing trait. Physical exertion is either completely lacking or misapplied (towards questionable or unproductive training practices).

Martin Berkhan: Fuckarounditis

Back To Basics

About two years ago, when I finally couldn’t stand being unfit anymore, I took a much more serious and involved look into the fitness world. Taking a step back and reevaluating everything I knew about working out, I started reading everything I could find on how to get in shape. Once I got past the fitness magazines, and their marketing which is poorly disguised as bullshit advice, a trend emerged: if you want to be fit, you have to do compound barbell exercises.

Barbells, and the primary exercises we use them to do, are far superior to any other training tools that have ever been devised. Properly performed, full-range-of-motion barbell exercises are essentially the fundamental expression of human skeletal and muscular anatomy under a load. The exercise is controlled by and the result of each trainee’s particular movement patterns, minutely fine-tuned by each individual limb length, muscular attachment position, strength level, flexibility, and neuromuscular efficiency. Balance between all the muscles involved in a movement is inherent in the exercise, since all the muscles involved contribute their anatomically determined share of the work.

- Mark Rippetoe: Starting Strength 3rd Edition

This isn’t the first time I’ve referenced this passage from Rippetoe’s book, and it certainly won’t be the last. When I first started working out in middle school, I was terrified of barbell training, especially squats. I thought I was guaranteed to get injured, and that my joints would get destroyed. Starting Strength, and resources like it, helped me to overcome my concerns by laying out the benefits of barbell training, and dispelling the common myths about it. Not to mention the detailed information on correct form so you don’t do something stupid, and actually hurt yourself.

Starting a program based around compound barbell movements changed my life, and taught me what fitness was really about. Since I started, I have seen tremendous results. Results that have made me a life long advocate, and kept me motivated to keep going back to the gym, finally breaking the cycle that I spent so long stuck in.

Keep in mind though, barbell exercises aren’t magic, a proper training program to make the best use of them is crucial for success. Tons of programs exist out there that have been created by some very smart people who have had decades to perfect them, so for the sake of all that is good in the world: use one!

Why So Serious?

Considering my experiences, the thought of people starting with a “lackadaisical” workout that’s meant to naturally “evolve” is very irksome. Who would ever stick with a workout, or have desire to suffer through another session at the gym if there is little-to-no payout? I know I couldn’t.

I try to go to the gym once or twice a week. I spend 25 minutes there. I run for a mile, do some curls and then finish off with a dumbbell bench press. It’s an admittedly ridiculous routine that does very little for my overall fitness. But I don’t care.

I don’t care because I’ve been down this road before. I decide I’m going to start working out again and I take myself very seriously. I become a workout-planning god. I research routines, buy supplements, construct a schedule and pick a start date. Then I go to the gym every day.

By the end of week two I invariably give up.

My current workout routine seems lackadaisical, and it is lackadaisical. But intentionally so. That’s because it’s designed to naturally evolve.

Stop Taking Yourself So Seriously

Beyond my own experiences, I have seen many of my friends and coworkers take this approach to developing a workout plan, and it has always ended in failure and further discouragement. Burning out doesn’t come from taking yourself too seriously, it comes from not getting results. There is a simple truth that applies in all facets of life: nothing kills motivation faster than a lack of progress.

You can guarantee for all but the most out of shape individuals, screwing around on an elliptical or doing curls for 30 minutes a few times a week will not get any reasonable results. Meanwhile, the person who began a barbell training programs has seen the bar weight go up week after week, and can’t wait until their next workout!

Bro Magic

Hypothetically let’s imagine I’m serious about working out. Because of this, I need a very serious role-model to copy. I settle on Arnold Schwarzenegger. I read his Wikipedia page, I watch Pumping Iron and I take away something like the following:

On Mondays and Fridays Arnold did squats, dead lifts and bench presses.

Then on Wednesdays Arnold did squats, bent rows and power cleans.

Arnold also took creatine 3 days a week to boost his muscle mass.

Looking at this, what’s the most immediate, clearly accessible thing to do to get me closer to becoming Arnold? The creatine of course! So I drive on over to GNC, buy a big bucket of creatine and come home satisfied. I’m at least 30% of the way to becoming the next governor of California, right? Wrong!

Stop Taking Yourself So Seriously

fp

That blurb is a wonderful example of another major issue that plagues most people when it comes to working out, and getting into shape: the idea that supplements are a magic bullet for fitness. Sure, the tone here suggests that the statement about creatine is probably in jest, but it seems to be a sentiment that many share in earnest. Sure a select few supplements like creatine can assist in getting the most out of a well structured strength training routine, but is in no way going to magically transform you into an elite lifter.

…in regards to studies assessing 1-3 rep bench press strength in trained young men, that 7 studies (Four of which are online) totaling 70 persons using creatine and 73 persons in placebo resulted in a 6.85kg increase in strength relative to placebo; benefits of which peaked at 8 weeks. This meta-analysis also quantified a significant increase in squat strength (9.76kg)…

Examine.com: Creatine – Exercise and Performance

supplements

I won’t go into this topic too much, as discussing supplementation would turn into a very long tangent. The short version is that supplements, depending on how much disposable income you want to devote to them, have their place in being an overall healthy person, but only as icing on the cake. Supplements can assist a person to eek out a few more percentage points from the overall health and/or strength picture, but no matter how much “pre-workout nitro-booster animal pump ignition rage” you shovel into your face, it won’t magically turn a lifelong couch potato into the next Mister Universe.

1.1. Sources in the Diet

Creatine can be found in meat products, such as:

  • Steak or Beef with minimal visible connective tissue, about 5g of creatine per 1.1kg of uncooked or a range of 2.15-2.5g/lb
  • Chicken at around 3.4g/kg uncooked
  • Rabbit at around 3.4g/kg uncooked
  • Cardiac tissue (ox heart) at around 2.5g/kg Pig heart is lower at 1.5g/kg

Examine.com: Creatine – Sources In Diet

Information like this is what makes Examine.com an amazing resource, instead of rushing to GNC to buy some (overpriced) creatine, you just increase the amount of meat in your diet. A much tastier option that will help you boost your protein intake, along with numerous other vitamins and minerals. Examine can also help the Average Joe a great deal to cut through the bullshit hype machine that is the supplement industry, and concentrate on supplementing things that have been shown to actually work. Don’t forget the option to just eat well, and not bother worrying about any of this until you’ve burned through your “newbie gains,” and actually start struggling in whatever program you are working through.

Long Story Short

Being fit doesn’t require a huge research effort, but it does require some homework and planning. Just going to the gym and randomly doing whatever exercise that catches your attention will likely get you nowhere fast.

A simple truth that applies in all facets of life: nothing kills motivation faster than a lack of progress.

If you want to stay motivated to be fit: get results. If you want to get results: follow a well vetted barbell training program and eat well. Oh and of course: take your workout seriously, and don’t screw around at the gym!

Performance Optimization WordPress Plugins by W3 EDGE