Perl One Liner search and replace

June 11, 2008 – 1:35 pm

I wanted to add this so I don’t have to scour the web every time I need it:

perl -p -i -e 's/oldstring/newstring/g' *

This will replace all occurrences of oldstring with newstring in all of the files in your current directory. Being able to do this quickly and easily is absolutely awesome, but what if you want to do this recursively across the current directory and all directories below that? I’m sure that there are plenty of ways to do this, the one below is the method that seems the easiest:

perl -p -i -e 's/oldstring/newstring/g' `find ./ -name *.html`

If you wanted to be more precise you could replace find with grep and only perform the search and replace on files that you know already contain oldstring, like this:

perl -p -i -e 's/oldstring/newstring/g' `grep -ril oldstring *`


Where are the workouts? At RunningAhead.com

June 9, 2008 – 4:15 pm

As of June 1st I’ve started using RunningAhead. This is far and away the best running oriented site I have found. It is completely free and currently houses no ads or up sells. The creator accepts donations through PayPal and operates the site as a side project.

I plan to use this site to record all of my biking, swimming, and running in one place. It treats the other exercising items as cross training items, which is exactly what I want. My log is even public.

Here is current feature list pulled from the site:

  • Charts/graphs
    • Beautiful color graphs
    • Create your own custom charts
    • Graph types:
      • Stacked bar graphs
      • Scatter graphs (xy plots)
      • Line graphs
  • Searches
    • Data specific searches that allows you to list runs based on:
      • Course
      • Shoe
      • Race distance
    • Create custom searches based on arbitrary criteria
  • Tracks a wide range of data points, including:
    • Basics: date, time of day, distance, run time, etc.
    • Shoe: shoe mileage, cost
    • Course: terrain type
    • Health: Weight, rest/average/maximum heart rate
    • Environment: weather, temperature
    • Intervals: tracks individual interval data
    • Race: overall and group placements
  • Cross training: cycling, swimming, spinning, elliptical, weight lifting, etc.
  • Course maps
    • Create, measure and save your routes using Google map
    • Share your maps with other runners
    • Link to your maps from your blog or website
    • Enable/disable mile markers
    • Automatic zoom to view entire map
    • Enable/disable auto centering
    • Create note markers
    • Multiple map sources, including elevation (contour) map
  • Monthly calendar view with weekly workout summaries and workout details,
  • Automatic PR generation from races
  • Share your log and pictured profile with other runners
  • Customizable data:
    • Define your own run types and colors
    • Define your own cross training and colors
    • Metric/English units
    • First day of the week
    • Date formating
  • Import/export your data from other running logs

Running Training Terms

June 3, 2008 – 8:59 pm

The following are a list of running training terms that I wanted to get all in one place for reference. The definitions vary depending where you look, however these should be reasonably standard. I am using during my training. Perhaps it will help others.

Long Run

A long run is any run of 17 miles or longer. The intention of a long run is to improve your endurance in preparation for the marathon. To gain the most from your long runs, you need to do them at the correct intensity. Long runs shouldn’t be slow jogs during which you just accumulate time on your feet. The most beneficial intensity range for long runs is to gradually increase from a slow early pace as you warm up, reaching 20% slower than your goal marathon race pace at five miles and accelerating to 10% below marathon pace during the last five miles of the run.

Medium-Long Run

A medium-long run is any run of 11 to 16 miles. Medium-long runs reinforce the physiological benefits of your long runs. To gain the greatest physiological benefits, the pace for these runs should be similar to the pace for long runs.

General Aerobic Run

General aerobic runs include any run of 10 miles or less that is done at a steady pace. These are your standard, moderate-effort, putting in the miles runs. The intention of your general aerobic runs is to enhance your overall aerobic conditioning through boosting your training volume; these runs improve your marathon readiness because many of the beneficial adaptations that improve endurance are related to the total volume of training.

Lactate Threshold Run or Tempo Run

Lactate threshold runs are tempo runs in which you run for at least 20 minutes at your lactate threshold pace. This coincides closely with your current 15K to half marathon race pace. Tempo runs provide a strong stimulus to improve your lactate threshold pace, which leads to similar improvements in your marathon race pace. The lactate threshold sessions are done after a 2 to 3 mile warm-up. Slower runners should run closer to their 15K race pace on tempo runs, whereas faster runners should run closer to their half marathon race pace.

VO2 max Runs

VO2 max runs are intervals of 600 meters to 2,000 meters duration, which are run at 95 to 100 percent of your current VO2 max pace. This coincides closely with your current 3K to 5K race pace. These sessions provide a strong stimulus to improve your VO2 max.

The optimal duration for VO2 max intervals is two to six minutes; only elite runners will cover more than 1600 meters in a 6-minute interval. The longer your repeats are in these workouts, the more days you’ll need after the workout for recovery. Though VO2 max work is an important part of your marathon preparation, it’s not as crucial in the marathon as it is in races such as 5K and 10K.

Speed Runs or Strides

Speed runs (or strides) are repetitions of 50 to 150 meters that improve leg speed and running form. These sessions are done after a thorough warm-up and often toward the end of a general aerobic run or a recovery run. Allow plenty of rest between repetitions so that you can run each one with good technique.

Speed runs help you in at least three ways:

  1. Improved leg speed - to run fast, you have to turn over.
  2. Improved flexibility and coordination - faster running puts your legs through a more complete range of motion; quicker leg turnover forces you to coordinate your movements to prevent tripping or stumbling
  3. Improved running economy - training your muscles to run fast and relaxed over a short distance should translate into faster, relaxed running at longer distances.

Recovery Runs

Recovery runs are relatively short runs done at a relaxed pace to enhance recovery for your next hard workout. These runs are not jogs, but they should be noticeably slower than your other workouts of the week. Aim for 1 - 1:30 minutes slower than your general aerobic run.

Marathon Pace Runs

Marathon pace runs are medium-long or long runs during which you run most of the miles at your goal marathon pace. These runs provide the precise physiological benefit of allowing you to practice the pace and form of race day. Start these runs comfortably, and then run the last portion at marathon race pace. For example, if the schedule calls for 16 miles with 12 miles at marathon race pace, gradually pick up the pace during the first four miles, and then run the last 12 miles at marathon goal pace.


Sources:

  1. RunningTimes - 18 weeks to your Best Marathon
  2. Tempo Runs
  3. Run Quick

Workout - 6/3/08

June 3, 2008 – 1:54 pm

Afternoon: Biked to YMCA. Swam ~40 minutes.

  • 500 warm up (semi hard)
  • 10 x 50’s on the 45 (med-fast)
  • warm down

Night: Ran 6 miles general aerobic in 47:33.

I had to stop for about 2 minutes to direct a non-English speaking guy to the bus station.  Overall time was probably around 45:33.  The pace was pretty standard.  The weather was humid and it had just rained.  I felt a bit weak from the race on Sunday.


Workout - 6/2/08

June 3, 2008 – 1:52 pm

Night: Lifted weights for the first time in months from about 8:15pm - 9:30pm. Afterwards went into the sauana for 2×10 minute blocks to get the legs to relax a bit from Monday’s race.

Lifting:

  • Pullups: 3 sets of 5 (overhand)
  • Leg Raises (calf): 3 sets of 15 with 40pds
  • Bench press free 2 weights: 3 sets of 15 (20pd dumbells)
  • Bicep Curls with bar: 3 sets of 15 (20pd, 25pd, 25pd)
  • Upside down situps with 8pd medicine ball: 3 sets of 25
  • Lat pull downs: 3 sets of 15 (26pd, 34pd, 34pd)