Tuesday, May 11, 2021

How to get headless chromium to launch from a pipeline using ubi8 image

My goal was to be able to run unit tests from a pipeline for the Angular's "Tour of Heroes" tutorial application which use Karma Jasmine framework. In this case the pipeline was built using Tekton to deploy to a Red Hat OpenShift cluster. 

Step 1: Change Karma Browser Configuration to use Headless Chromium

Launching the unit tests locally was not an issue because I had Chrome installed locally, but in order to get this to work in a pipeline we need to switch to a Headless browser configuration. This can be accomplished by updating karma.conf.js as follows. This configuration prunes all interactivity, not all of these settings are necessary, but these will work both locally and from the pipeline task:

   reporters: ['progress'],

    port: 9876,

    colors: true,

    logLevel: config.LOG_INFO,

    autoWatch: false,

    browserNoActivityTimeout: 30000,

    browsers: ['ChromiumHeadlessNoSandbox'],

    customLaunchers: {

      ChromiumHeadlessNoSandbox: {

          base: 'ChromiumHeadless',

          flags: ['--no-sandbox', '--headless', '--disable-gpu', '--disable-translate', '--disable-extensions', '--remote-debugging-port=9223']

      }

    },    

    singleRun: true,

    restartOnFileChange: false


Step 2: Add Puppeteer to the project

With these changes the local tests were running headless successfully, however they were still failing because they still need a browser binary downloaded. Our pipeline was using the ubi8/nodejs-12 image to run npm tasks. All of the npm tasks (e.g. install, lint, build) were running successfully, except for the test task. One easy solution would have been to install chromium into a modified image using a Dockerfile with ubi8/nodejs-12 as the base. Unfortunately the chrome download url was not whitelisted from the pipeline server and could not go that route. 

This led us to using puppeteer. Puppeteer is a node library which allows you to test using headless chromium. One of the features that we needed is that it downloads the chromium binary.

Step 2.1: Add puppeteer as a dev dependency

Puppeteer can be easily added as a development dependency by adding it to package.json within devDependencies section:

   "puppeteer": "^9.1.0",

Step 2.2: Export download host for puppeteer

This may not be an issue locally, but in case npm install gets stuck downloading puppeteer, this can be addressed by adding this download host environment variable prior to running npm install (ensure this is added to the pipeline task as well):


      export PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors 


Step 2.3: Update karma configuration to use puppeteer

Update karma.conf.js with the following changes:

  • Require puppeteer
  • Export the path to the Chromium executable
  • Wait for chromium to launch (i.e. to ensure it is downloaded if applicable)

 const puppeteer = require('puppeteer');

  process.env.CHROMIUM_BIN = puppeteer.executablePath();

  (async () => {

    const browser = await puppeteer.launch({

      args: ['--no-sandbox', '--disable-setuid-sandbox'],

    });

  })();

Step 3: Add required Linux libraries to ubi8 image

At this point npm test should execute successfully with puppeteer and headless chromium. However tests were failing in our pipeline due to missing Linux libraries in the ubi8 required to run chromium:

06 05 2021 20:58:47.098:ERROR [launcher]: Cannot start ChromiumHeadless /workspace/source/node_modules/puppeteer/.local-chromium/linux-869685/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

To troubleshoot this error the following commands were instrumental:

Command #1 (from troubleshooting puppeteer)

This command will help troubleshoot which libraries are missing in one shot versus adding one library at a time and getting a different error. You can get the path to local-chromium by echoing the output of puppeteer.executablePath() - it should be very similar to the one below except for the linux version number:

ldd /workspace/source/node_modules/puppeteer/.local-chromium/linux-869685/chrome-linux/chrome | grep not

Command #2 (from troubleshooting puppeteer)

The second command that was helpful was to run yum whatprovides on each missing library from the Dockerfile building the custom image. The only caveat is that in a few cases what provides resolved to the i686 library and that did not provide the missing library instead I had to switch to the x86_64 library version.

yum what provides libnss3.so

Magic Dockerfile

The hardest part of this task was to arrive to the correct Dockerfile. After iterating through the commands above, we arrived to the right dockerfile what allowed Puppeteer running headless chromium successfully:

FROM registry.access.redhat.com/ubi8/nodejs-12:latest

USER root

RUN yum install -y alsa-lib.x86_64 atk.x86_64 cups-libs.x86_64 gtk3.x86_64 \

    libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 \

    libXext.x86_64 libXi.x86_64 libXrandr.x86_64 libXScrnSaver.x86_64 \

    libXtst.x86_64 pango.x86_64 xorg-x11-fonts-Type1 libdrm-2.4.101-1.el8.x86_64 \

    mesa-libgbm-20.1.4-1.el8.x86_64 libxshmfence-1.3-2.el8.x86_64 nss.i686 \

    && yum update -y && yum clean all 

USER 1001

Hopefully this guides saves some time for others trying to get this to work on a ubi8 image!



Thursday, May 16, 2019

Spring Integration demo for exposing a SOAP Web Service which consumes another Web Service

Even in 2019, we often still need to develop SOAP based web services due to the need to integrate with legacy applications still using them. It was hard to find code samples that use Spring Integration with Java DSL using Spring Boot to expose/consume SOAP based web services. I put together an example which uses all of the above:
  1. initial branch shows an initial implementation of a web service exposed using spring-ws, Spring Boot and Java DSL. This was loosely based on the "Producing a SOAP web service" getting started guide.
  2. inboundgateway branch takes the initial branch and converts it to using Spring Integration classes (i.e. MarshallingWebServiceInboundGateway and MessageChannel). Credit to tomask79's spring boot web service integration repo which was one of few sample codes I found to expose a SOAP service using Spring Integration with Java DSL. In particular this commit will show you how easy it is to go from Spring-WS to a Spring Integration implementation.
  3. outboundgateway branch introduces a MarshallingWebServiceOutboundGateway to call into another SOAP web service to get order details. It also introduces the use of @EnableIntegrationGraphController annotation to build a visualization of the flow using spring-flow-si

The visualization tool output is fairly impressive:


However, I'm not convinced Spring Integration is the best fit for this particular use case, i.e. integration flows primarily between web services and some JMS services. Here are some of the things I did not like:
  1. Code flow becomes hard to follow. Flows are connected primarily via channels. I introduced a ChannelNames class with constants to make it easier to follow the flow, but even with this, I had to find usages of the constant and then navigate to those classes.
  2. The request/response web service methods had to be decoupled into a "request" (request channel) and "response" (reply channel) method. I posted this question in StackOverflow and even though this method could be combined using a MessageGateway, it is not the ideal way of implementing this with Spring Integration. Even with the diagram above, you cannot tell that orderInboundGateway is a 2-way flow, instead it appears a one-way flow.
Don't get me wrong, I liked several aspects of Spring Integration and I would find it useful for other scenarios, but it seems for this one, the complexity introduced outweighs some of the benefits. 

Please chime in the comments if you've successfully implemented similar scenarios with Spring Integration!

Saturday, December 03, 2016

Can running help heal Plantar Fasciitis?

PF stands for Plantar Fasciitis, but in my opinion it should just be called "Pain in the Foot" because that's really what it is, just an annoying pain in the foot that won't go away for months. I hope you never have it, but if you do, here are some helpful tips and suggestions to help you heal and get better soon!

How did I get it?

It is relatively easy to self diagnose plantar fasciitis. If after reading common symptoms, you feel like "that's exactly what I have!", then you most likely have plantar fasciitis: "stabbing pain (in the foot) that usually occurs with your very first steps in the morning. Once your foot limbers up, the pain of plantar fasciitis normally decreases, but it may return after long periods of standing or after getting up from a seated position."

For me one of my burning questions was how did I get it? and how do I prevent from making it worse and prevent from getting it again after healing? I'm not exactly sure how I got it, but I know it got noticeably worse after returning from a 2 week vacation. I am a frequent runner. I run 4-6 days a week and I try very hard to not go over 3 days without running. In this last vacation I went 7 days without running. I think I had symptoms before my vacation, I just did not realize that it was plantar fasciitis because I never had it before. Upon returning from vacation as I attempted to get back to my normal running routine, it was pretty evident I had plantar fasciitis. I only had it on my right foot, but I've heard is possible to get it on both feet at the same time (ouch!).

What I tried?

The first thing I tried based on the fact that running is a common cause of plantar fasciitis was to stop running for a few days. That didn't help, and in fact it seemed to make it worse. When I told a runner friend about my problem, he told me he had it before and that I needed to do stretching exercises to strengthen my fascia. I think I tried almost everything that was suggested to me. From my experience the first step is to get the pain under control, then focus on what will heal you in the long term. Here is a summary of the things I tried and that helped me the most:

  • Icing
    • This was one of the recommendations from my orthopedist and also from a fellow runner that went through this. Icing helps specially with relief. I learned that you don't necessarily have to do it right after running, you can do it at the end of the day, but you should do it at least 5 to 20 minutes per day.
  • Ibuprofen
    • Pain killers are a must for relief. Usually 1-2 per day was enough for me, but the goal is gradually wean off from taking them, so that you know the pain is going away because you're healing. Keeping a log can help you track improvement (e.g. level of discomfort and whether you took pain killers that day).
  • Heel cups
    • I was a bit skeptic about this, but a runner friend recommended it as well as my orthopedist. I was specifically recommended these ones by Dr. Scholl's Pain Relief Orthotics for Heel. You can find them at Target and most pharmacy stores and easily identify them by the "Plantar Fasciitis" label on them. I ended up buying 2-3 pairs and just putting them on the shoes I wore the most. My friend recommended me using them on my running shoes as well, which I tried, but abandoned after a few days as it felt awkward while running.
  • Peppermint oil
    • This was probably the most unconventional thing I tried from "typical" PF remedies. Specifically I tried Doterra oils. They have a product call Deepblue which is special for muscular pain relief, but the most effective for relief for me was a mix of their peppermint oil with lavender oil (one drop of each mixed with fractionated coconut oil).
  • Stretching exercises.
    • This helped me heal the most, although not immediately. The stretch exercise I would recommend the most is stretching your calf by leaning towards a wall or post. This is an exercise you should be doing as a runner anyway, both before and after running, but you can also do this throughout the day. The other 2 exercises I recommend are shown on this picture: pulling your toes towards you and picking up a towel with your toes.

  • Foot Rolling exercises
    • I first tried a foot massage roller, however I wouldn't recommend buying one unless you already have one. Instead what worked best for me was putting a bottle of water on the freezer, and then use that for rolling your foot. This way you kill two birds with one stone: you are effectively icing while rolling your foot at the same time!
  • Night splint
    • I was hesitant to try this, but my orthopedist recommended it. What the night splint helps with is to keep your feet from stretching over night which is what triggers the morning pain. The night splint keeps your foot at a 90 degree angle which is extremely hard to maintain consciously once you fall asleep. Using the splint can be very uncomfortable at first, but you will gradually get used to it. The Futuro Night Plantar Fasciitis is what I used.
  • Reduce pace/long distance running
    • This should be an obvious one, but "your mileage may vary" on this one. For me this meant going from a 9 min/mi pace to about 10 min/mi and from 30+ miles/week to 20+ miles/week. The great news is that I didn't have to stop running altogether and in fact going multiple days without running seemed to make things worse. This also meant that I had to compromise from running my fifth consecutive Pittsburgh Full Marathon. I could have probably done it, but did not want to risk getting worse and opted for running the Half Marathon instead, which ended up being a wise decision.
  • See a doctor (specially if you are not getting better)
    • When I reached out to my primary doctor he sent me a list of exercises to try first and asked me to visit him if I didn't get better. Since I wasn't getting better I decided to see an orthopedist in my area. The orthopedist did an x-ray to rule out I did not have a bone fracture, which I didn't. Other than that, there was not much value in seeing the doctor. He did not even asked how I got it. I had to volunteer the fact that I was a runner and even then he did not ask how much/frequent I ran. His estimate is that it would take me 2 months to heal, he was off by 3 months, but I did follow on a couple of his recommendations (night splint and icing/stretching more frequently), which eventually helped.
  • Try changing running shoes
    • After not getting better, I tried this suggestion and went into a running store for a shoe fitting, which I had never done before. This turned out to be a great suggestion. If you've read some of my earlier posts you'll find out that I'm a big proponent of minimalist running shoes. For the past few years I've been running with the same model of running shoes: Nike Free 3.0 (different generations of the 3.0 model), which are almost zero drop minimalist shoes from Nike. I tried multiple shoes and the ones that fit the best by far were the Mizuno Wave Rider 18. These shoes have a much ticker sole that I would have ever considered, but they have much better support and really liked how they feel when running and still use them even after healing.
  • (Lots of) Patience and keeping a log
    • Be (very) patient. There are days in which you feel you're doing better and then for no obvious reason you start feeling worse again. That's what bothered me the most about this. I could take a couple days of rest and not feel any better. I also went for a few long runs an felt great. Sometimes there was no obvious correlation into how I felt and what I tried. I think keeping a daily log would have helped. In this log you should track how you felt that day, whether you took pain killers how much you ran and any activities (other than running) you performed. There could be a lot of variation from day to day, but the goal is to feel better each week while still doing some activity and reducing the amount of pain killers you take.

How can you tell you're getting better?

Another burning question was how to tell I was actually getting better and whether I would ever get back to "normal". Healing completely takes time, in most cases months. In my case it was about 6 months before I could say I was back to normal. But by month 4, I could say I was mostly healed, i.e. the pain and discomfort was mostly gone, but I could still occasionally feel discomfort and mild pain which was concerning as I was afraid to get worse again. Keeping a running log certainly helps. In my case I use the Nike Running app. During my healing months (Jan-Apr) I was still able to get around 100 miles on average, which is pretty good, but I had to compromise on pace. My average pace gradually improved getting back to normal by April:

  • Jan: 9'59", Feb: 9'54", Mar: 9'24", Apr: 9'01", May: 9'03"




The pain was not completely gone by April. I still remember feeling some discomfort in June when walking barefoot. But by July/August I don't remember having any bad days. For me the ultimate proof that I was healed was to be able to run a marathon again without any pain, which I was able to do on August 28th in Mexico City!




Can running really heal plantar fasciitis? 

Running by itself won't heal you, but it can definitely help heal as long as your don't over do it (by running too much or too fast) and I have empirical evidence to support this. The key to healing PF is by strengthening the fascia. Stretching exercises will help the most with this. This is what is most contradictory about PF. Resting is typically needed to heal muscle injuries. With PF resting too much can actually make the pain worse and resting on its own won't help you heal. Running can be a way to strengthen the fascia, as long as you don't over do it and do it properly (i.e. with a good running form, appropriate running shoes, etc.). Because healing can usually take months, you need to be VERY patient. Do not feel discouraged if you are not improving immediately. The pain and discomfort will eventually go away. Learn to listen to your body and you will gradually learn what can help you the most!


Thursday, June 09, 2016

How to replace Nissan Leaf rear wiper blade

This information pertains to the 2013 Nissan Leaf, however I believe this applies also to at least model years 2011-2015 since the part number has not changed. Part number for the wiper blade is: 287903NF0A, online price ranges from $12-$15.

Surprisingly, I could not find a video or detailed guide on how to do this, the closest most relevant thread I found was this.

I took some pictures that hopefully guide others on how to replace the blade, but it is extremely easy.

First snap out at by pulling the blade away at a approximate 90 degree angle, if it doesn't feel like it's coming out, just pull harder.





















This picture shows how the blade aligns:



Here is another alignment picture as I was snapping the new one back in:


You snap by pushing it hard back in, again approximately 90 degree angle and watching for the proper alignment.

Sunday, January 24, 2016

Electric Car (EV) Charging Stations in Pittsburgh and surrounding areas

This blog lists my review of the best EV charging locations* (a.k.a as EVSEs) in Pittsburgh, PA and surroundings. This is not a comprehensive list of stations. If you are looking for a more comprehensive list of stations, the top authority, in my experience, is plugshare (also available as iOS and Android mobile applications). Plugshare beats the other popular option: chargepoint by far, in terms of being up to date, providing helpful (e.g. picture, location, number and type of chargers) and accurate information as well as user reviews/comments. Plugshare lets EV owners "check into" a location (to let other users the charger is being used), as well as sharing private chargers.

* To get some terminology out of the way: the proper name for a EV charger or EV charging station is an EVSE: "Electric Vehicle Supply Equipment". The charger is actually on board your electric vehicle, and hence called the "on-board charger".

Dowtown Pittsburgh (including North Shore)

1. Grant Street Transportation Center - Red Garage

  • Pros:
    • VIP Parking. The chargers are located immediately after entering the lot.
    • There are FOUR (4) Level 2 chargers and they are free to use (with your paid parking)! From the times I've parked there I've only seen 2 cars using them at most. Each charger has its own parking spot. 
    • At the time of this writing (Jan 2016), this station had a PlugShare of 10.
  • Cons:
    • Parking is expensive, $16 for a 6+ hrs on a weekday. However this is typical for parking downtown. Also as a downtown commuter, this parking rarely gets full.
    • You MUST enter the RED garage. There is an adjacent BLUE garage that is almost identical but they are not connected. The blue garage does not have any chargers at the time of this writing.

2. Carnegie Science Center

  • Pros:
    • Provides VIP Parking (directly across from the parking booth). Even when the lot is full and cars are sent to their adjacent lot, ask the attendant if the charger is available and they will let you in. 
    • It's free (included in the cost of the parking): $3 for Carnegie Museums Members, $5 for non-members and $7 for commuter parking.
  • Cons:
    • There is only ONE charger.
    • Even at $7 is the best deal for commuter parking with charging included downtown, however there is no guarantee it will be available for you.
    • Only convenient if you are visiting the museum.

3. Convention Center


  • Pros:
    • Free (included with the cost of parking).
    • Convenient location for downtown destinations.
  • Cons:
    • Parking is expensive (~$20 on a weekday)
    • Only 2 stations and they will usually be taken on weekdays, so you cannot rely on them being available on business hours. 
    • They are generally available on weekends.

Others worth mentioning:
  1. First Avenue Garage
    • This is likely the least expensive commuter parking ($12 for 4hr+) downtown with a free charge included. Although the garage is at one end of downtown, it is right next to the T station.
  2. USX Tower Garage
    • Charger is NOT free (and somewhat expensive). Parking is also very expensive. I believe there is only one charger here, hence the low Plugshare score (4.6), based on the comments many users have not been able to charge because it was already taken.
  3. Station Square Garage
    • Similar to the USX Tower charger, this would be very convenient except it is not free and there is only one charger.

East (Oakland, Monroeville)

1. Carnegie Mellon University Electric Garage


    • Pros:
      • 8 Level 2 charging stations + 1 Tesla HPWC.
      • FREE to charge and FREE to park (up to 4 hours).
      • Convenient location (Oakland - in between Carnegie Mellon and University of Pittsburgh)
      • Open to the public, not just Carnegie Mellon University staff/students
    • Cons:
      • Before 2015 the Electric Garage parking spots were available to the public. This means that you could park here after you were done charging or if there were no charging spots available. The parking spots (not next to the chargers) in the lot now require a parking permit which is available only to CMU students/staff. It is still pretty convenient if you only need to park for 4 hrs or less while charging.
      • In spite of having 8 stations, CMU students/staff love EV cars, so it is very common to find all chargers taken on regular business hours.

2. Bakery Square

    • Pros:
      • 4 ChargePoint Stations. This means you can check via the ChargePoint app if the stations are in use.
      • FREE (included in the cost of parking). This parking lot, as I remember is not very expensive and I believe it is free during evenings and weekends.
    • Cons:
      • This is the parking lot for Google Pittsburgh, so even though they have 4 stations the 4 stations may be in use on regular business hours.

3. Carnegie Museum of Natural History

  • Pros:
    • FREE (included with parking). Parking is relatively expensive, i.e. within average for the Oakland area.
    • VIP parking, located very close to Museum back entrance.
    • Convenient location.
  • Cons:
    • Only one station available.
    • Very close to the Electric Garage, so I would park at the Garage unless all stations were taken.

4. Pittsburgh Zoo

  • Pros:
    • FREE!
    • VIP Parking! Even on a crowded day, if the station is available, you can get a parking spot very close to the Zoo entrance.
  • Cons:
    • Only one station available

Others worth mentioning:
  1. Giant Eagle Monroeville
    • The Monroeville area seems kind of low in terms of charging stations. However if you need to head this is a good place to charge (2 stations available). Other options include UPMC East and car dealers (you should normally ask for their permission to charge).

North Area (Wexford, Warrendale, etc)

  • Pros:
    • 2 Level 2 (GE) stations available
    • FREE!
  • Cons:
    • The stations are not marked as reserved for EVs, instead they are reachable within the 4 adjacent parking spots to the charger. However on a busy day (e.g. Saturday morning) you may find all 8 parking spots next to the 2 stations taken because they are pretty close to the entrance. From my experience if I'm really in need of a charge I just need to drive around 5-10 minutes for one of the spots to free up.


  • Pros:
    • 2 Level 2 (Eaton) stations available.
    • FREE
  • Cons:
    • The Eaton stations are not compatible with Nissan Leaf 2013 and newer. This is because Giant Eagle has neglected to upgrade the firmware version on the station, they have had a sign indicating they are working on getting the system updated since 2014. You can still charge but you will need to push the reset button on the stations multiple times (can vary between 3-10 times) until it eventually will start charging.
    • Located by the Pharmacy side, i.e. not VIP parking.
Others worth mentioning:
  1. Cranberry TESLA SuperCharger
    • They have 6 super chargers. These are obviously for TESLA cars only. If you own a TESLA these are the only SuperChargers in the area. They are conveniently located near the intersection of 76 and 79, so if you are traveling by Pittsburgh this is the place to stop. They are behind a Residence Inn, next to a Quaker Steak Lube. There is a Starbucks next door as well.
  2. Eaton Warrendale
    • They have one the few CHAdeMOs (DC quick chargers) in the area. This is outside the Eaton office in Warrendale, PA, but according to the PlugShare user comments, they are open to the public and free of charge. They also have 2 Level 2 (J17772) stations. I believe they are in the ChargePoint network so you will need a ChargePoint account to use it (also free).

West (Robinson Township, Airport area)

1. The Mall of Robinson
  • Pros:
    • 4 Level 2 (Eaton) chargers with dedicated parking spots! They have 4, so it's unlikely they will be all used. This is by the way, the only mall in the area with EV chargers (Ross Park Mall should follow their lead). 
    • FREE
    • VIP parking, located next to the Food Court entrance.
  • Cons:
    • None really, except that it's a very valid excuse for my wife to spend more time at the mall =)

2. Market District Settler's Ridge

  • Pros:
    • 2 Level 2 chargers.
    • FREE
    • Unlike to the Wexford location, based on a comment on Plugshare dated Oct 2014, it appears Giant Eagle has upgraded the firmware on these units: "At long last they have fixed one of the two stations here to work with the 6.6kw on board chargers on 2013 and newer Leafs.". Subsequent comments indicate both of them have been fixed.
    • Cons:
      • These chargers are close to the LA Fitness and Cinemark theatre, so it's likely these chargers may be used by non Giant Eagle customers (also based on Plugshare comments).
    Other worth mentioning:
    1. Sunoco Pittsburgh Airport
      • This has a CHAdeMo (quick charger) in the area along with 2 Level 2 chargers. Starting in 2016 they now charge via the Greenlots app ($2/hr) for Level 2 and ($10/hr) for quick charger, which is not cheap at all. I will only consider charging here in case of emergency.
    2. Pittsburgh Airport
      • The chargers at the Airport are a joke. They are 110v outlets available only on the short term parking, so they are not practical at all unless you are staying several hours at the short term parking.

    South (South Hills, Washington, PA)

    1. Tanger Outlets at Washington, PA
    • Pros:
      • 4 Level 2 chargers
      • FREE
      • VIP Parking. This I would also consider as a con, since I was expecting ICE drivers to not respect these parking spots on heavy shopping days, but I can vouch from personal experience that these spots were not ICEd even on Black Friday (2015).
    • Cons:
      • None really, other than too convenient for shoppers =)
    Others worth mentioning:

    I will try to keep this list updated, feel free to share about other stations as they become available in your comments below!


    Saturday, November 21, 2015

    My experience running the 2015 New York City Marathon

    Getting in

    Getting into the NYC Marathon is hard. You can qualify by time if you are a very fast runner; you can join through a charity if you commit to raise a minimum goal for them (e.g. the goal for Team For Kids is $2,620); you can join through an international travel partner if you live outside the US; or join via sweepstakes. In my case I joined via sweepstakes. This was my second time participating in the sweepstakes. The fee for joining the sweepstakes was $11. There used to be a option in which if you joined the sweepstakes multiple years in a row you were guaranteed entry on the third year, that is no longer an option. I was very fortunate since supposedly only 11% of the people joining the sweepstakes got in 2015. This is the most expensive race I've ran, the entry fee was $255 in 2015.

    Expo

    I booked a hotel near Times Square months ahead. I was able to get enough points through a credit card offer, otherwise I would've paid between $200-$400 per night. I arrived to NYC on Saturday. The expo (Javits Center) is within walking distance from Times Square. This was the last day of the expo and they close early that day (5pm). I got in around 4:30pm. The vendors' portion of the expo closed exactly at 5pm. I assume the bib distribution remains open for a bit longer, but do not know for sure, this is one of my biggest fears when running out of town: not getting to the expo on time to pick your bib.

    Getting to the start line

    Getting to the start line is a challenge. There are 2 transportation options offered: a direct bus taken from the NY Metropolitan Library or a ferry taken from the Whitehall Ferry Terminal. I chose the ferry option because I would have to depart an hour earlier if I picked the bus. However there is no strict enforcement on the times assigned so in most cases you can switch at the last minute (at least that is what a fellow runner shared, he was able to take the bus instead of the ferry with no questions asked).



    My assigned time for the Ferry was at 8:15am (my start time was 10:40am). I thought I had plenty of time. I left my hotel around 7:30am. I took the yellow line near Times Square and arrived outside the terminal around 8am. There was already a line, I was outside terminal for over 20 minutes and another 15 inside the terminal. Once I hopped on the Ferry it was about a 30 minute ride. I strongly recommend walking outside to take a look at the Statue of Liberty. It was very windy, but it's a great photo opportunity, don't miss it!



    Once we got off the ferry, we had to wait in line for another 15-20 to hop on a bus. I got on the bus around 9:25am. I thought I still have over an hour, plenty of time. The bus ride took about 30 minutes, so I got off around 10am. The line in security was very short, I was finally inside the village around 10:05am. I was dropped on the green side of the village and after asking for information I learned that I needed to be inside my corral by 10:15am or else I would need to wait for the subsequent start at 11am. I ran to my Orange corral and made it just in time!

    Brooklyn-Queens

    You start off on the Verrazano bridge, this is the bridge that takes you from New Staton intro Brooklyn. It's the iconic picture that you see in most pictures for the NYC Marathon. It was long and steep, but it was also very crowded, so you can't really go fast in the first mile. There were also several clothes, gloves, hats lying around specially on the sides in spite of the many cloth donation containers available throughout the start area.



    After the bridge you get into Brooklyn. The first few miles were packed even though there are parallel running groups that do not converge fully until around mile 8. From mile 2 through mile 13 you are within Brooklyn. There were water stations pretty much every single mile. At the time I was running, garbage was not being picked up and there were also no trash cans within sight, so every station was like a minefield of paper cups and consequently it was hard not to slow down through the stations.

    What makes this Marathon unique in the world is the amount of people cheering, it's non stop! Most big city Marathon have large crowd support, but I'm pretty sure NYC beats most. Except for the bridges where people were not allowed, cheering was non stop, very impressive!

    Queens-Bronx

    Shortly after passing the half marathon marker you will be in Queens. Mile 14 goes around Queens, then came mile 15 which for me personally was the toughest part of the course, and I wasn't expecting it. Mile 15 goes entirely through a bridge, Queensboro Bridge, even though it does not show in the elevation chart, for me it felt like we were just going uphill, maybe it was because we were in the lower floor of the bridge and the fact that it is a mile long bridge, it felt like we were in there forever. Also there is no cheering in the bridge. The scenery on the first half of the bridge is great, you can seen One World Trade Center and the United Nations building. It is a great photo spot.



    Once you are off the bridge, you are in Manhattan. The next 3 miles (16-19) take you through Manhattan heading North towards the Bronx on 1st Avenue. This is also mostly uphill so there is no much break after the bridge. However the crowd was nonstop along these miles. It is also a pretty wide avenue so that gives you more room to breath and to speed if you have the energy.

    Mile 19 takes you into the Bronx, but only briefly for about a mile (mile 20). Mile 21 takes you back to Manhattan. Right around 130th street I saw a group of people cheering loudly for one of the runners, they even ran about a block with the runner. I thought that was a very special cheering group from what appeared to be the runner's family and close friends. Then I noticed other runners taking pictures with the runner. Once I approached her, even though I was not entirely sure, I thought that must be Alicia Keys. I had read that she was running the Marathon. I later confirmed it was indeed her! She finished around 5:50.

    Finish

    Right after mile 22 you get into Central Park, but then you get into mile 23 which I knew from the elevation charts, it was going to be one of the toughest ones, and indeed it was. The last 2 miles were tough, but the crowd support literally carries you through the finish line. I finished at 4:51. This was my 6th Marathon and it was my second worst time. The only other worse time was my first Marathon (4:58). Even though I was not expecting to do this bad, I'll take it anytime, it was a priceless experience! I would love to be back if I get another chance in the future!

    Sunday, March 30, 2014

    Why would anybody want to run an ultramarathon?

    This Saturday I ran my first Ultramarathon, the Lt. JC Stone 50K Ultramarathon. I did it mostly out of curiosity. I had ran 2 marathons before and I wanted to see if I could run a longer distance. I chose the JC Stone ultra because it is one of the shorter distances for an ultramarathon (50K) and because it is 6 laps around the North Park lake in Wexford, PA, a course I'm very familiar with. This was a very low ceremonial race compared to your typical city marathon. The park is not closed to the public, so you run along with walkers, runners and bikers that regularly visit the park. Other than the bibs, it was very hard to tell apart the 85 runners in the race. There were 77 finishers this year. It was incredibly difficult for me, specially the last 2 laps.

    Most people think running a Marathon is crazy, running anything longer is insane. The reaction I got from some friends is that I was nuts. Why would anybody want to run such a distance? That got me thinking... and my answer to them is: because I can. Because I am blessed with 2 healthy legs. Why wouldn't I? More importantly... why wouldn't you? It is definitely a daunting and challenging task. I could say it took me over 3 years of training. I had been running 5k and 10k races for years. However I had not run anything longer than 10K until less than 3 years ago. I ran my first half marathon in 2011, followed by first marathon in 2012 and my second in 2013. It does take training, dedication, persistence and a lot of will, but I'm convinced that if you have 2 healthy legs, you can do it too.

    The 1st place Ben, finished in 3:17 and arrived almost a full lap before the 2nd place. Hats off to them! I do think they are in a gifted group of elite runners that has a unique talent that not anybody can develop. But when it comes to ordinary people, average runners like you and me, I am convinced that you can do it too. This race had a very unique set of runners, probably more so than any other race I have been to. To give you a sample of such average runners I'd like to share, what in my record book are the winners of this race:

    3rd Place: Gerald with a finish time of 6:29. Gerald is only 71 years young! Enough said! Who wouldn't want to grow old like him? Of course, you may argue he has probably done this all his life. I do not know his background, but that is partially true, he actually finish this same race in 2013, 2012 and in 2011!

    2nd place: Anthony with a finish time of 5:59. Anthony is only 17 years old! He finished right behind me, I didn't even see him closing in, otherwise I would have gladly conceded my finishing spot. You may argue that's easy for him because he is young and full life. But consider the irony in this, unless he is turning 18 by May 4th he is not allowed to participate in the Pittsburgh Marathon or most any other city Marathon! The minimum required age to participate is 18, how ironic. Congrats Anthony on a great race!

    1st place: Tom with a finish time of 6:49. Tom proves my point that anybody can run this distance. Tom did not even run with what one would call "proper" running clothes. He was wearing a cotton shirt, regular shorts and his shoes don't even look like running shoes to me. I saw him running around the park, but I did not see his bib and I had no idea he was running this race. He also gets bonus points for being overweight. I have been overweight most of my life. I once got injured when I tried to run 10K while I was "severely obese" based on my BMI. I gave up running that distance for about 5 years and my advice to anyone with BMI over 30 points would be to stick to shorter distances (e.g. 5K). I have no idea what Tom's BMI is, but he has prove that I was completely wrong. Being overweight may be a deterrent to run long distances, but it's clearly possible to do it. Kudos to Tom for finishing this race!







    Wednesday, February 19, 2014

    Where to donate used cooking oil in Pittsburgh

    UPDATE 01/2016: GTech Strategies/ReFuel Pgh no longer has drop off bins at either of the locations below, including WholeFoods Market. Fossil Free Fuel takes donations, but I'm trying to confirm from them if they accept used cooking oil. I will post more when I hear back from them.

    There are 2 collection bins provided by ReFuel Pgh. One is located in Whole Foods Market on Shadyside. I have been taking my used oil to this bin for the past 2+ years. However I recently (Feb 2014) stopped by and the bin was no longer located outside the store. I had to ask 3 employees and the 3rd one was the only one that knew that it had been relocated near the garage, i.e. on the Starbucks Cofee side, but on the end next to railroad.


    The second bin which I just recently learned about is in South Oakland, by the Dan Marino field which is in the corner of Dawson St & Frazier St. You'll see a red fence with a sign that reads "Frazier Farms":

    My wife takes the credit for collecting the oil, I'm just in charge of dropping it off. You can put it in any clean plastic (e.g. gallon of milk, water bottle) container. You just need to let it cool off after cooking and put it in the container and then just drop it off once you fill up your container. GTECH turns this into an alternative diesel that funds education programs: