A two (+12) hours tour to Amazon Fulfillment Center, VA

I’ve reserved this tour about a year ago. I always have a fascination for visiting giant factory like facilities. I think I’ve got this when I witnessed my father as a chief contractor for a giant textile mills in Pagla, Narayanganj.

Initially I planned to visit this with my family until, at very late, I came to know that visitor must be at least 6 years old. My daughter is just little more than 5 years early for that. So, I invited 3 of my other friends and among them 2 could make it in this short notice.

We started on 15th’s very early morning even before we saw the sunlight. It’s more than 6 hours of drive from Brooklyn. We reached there about 30 minutes ahead of scheduled time.

The area closed to the facility is so beautiful. The roads are so clean and solid and natures are really soothing. From the outside we could tell how giant this facility is. Though there were a few signs posted about tour guests parking, it was difficult to locate exact place as several roads were closed and there were no detour signs. So we had to make several back and forth before we found a staff and ask for assistance who removed one of the blocker to the  way to actual tourist parking lot.

When we entered the facility we’ve been welcomed by a few of organizers and we were given badges. Then they took us a to classroom where they’ve given us instructions how the tour will be conducted and also gave us wireless headphones. This was extremely helpful as the whole place is too noisy and we could barely hear anything unless we put the headphone on. The noise basically coming from conveyer belts that were throughout the facility.

Then we’ve taken to different areas of the facility including the inbound area where they process all incoming shipments from FBA sellers, MODs where they store all items in smaller quantity, packing area, labeling and sorting area etc.

I remember, when I saw a packer was very quickly taking boxes for putting items in it I wondered whether he decides those himself that fast or the software tells what size of box required. It’s actually the later. As soon he starts processing order, required size of shipping box is displayed on the screen.

Then we’ve been taken to the places where shipping labels are affixed. I thought it’s a manually process until I saw it. After a box is kept on the belt, a shipping label is automatically attached at a later step (identified by order barcode that’s affixed by the packer). However, we saw this process is very error prone and there were 2-3 people who fixes those things manually.

It was very clear that lots of technological magics happen there at all times. However, the importance of manual labor is nevertheless. I was really amazed to see the size of the facility. They also mentioned the combined size of 3 floors is equivalent to 28 football fields.

However, during my short stay there, I’ve got an impression that work condition may be very hard there! I tried to pay attention to a number of people and they looked tired and not happy! I found it aligned when I saw at least two people were sleeping in their car at parking lot. I found only one person, other than the organizers, gave us a positive vibe by giving us smile though many of them noticed us. It may also mean they were very too busy and/or their job needs undivided attention! To get a better understand on this, I asked the tour guide how often the workers are allowed to take rest. She replied it’s only twice in their 10 hours shift including their cafeteria time (lunch/dinner/breakfast)! Thanks my load; my job is much easier. Coincidentally it reminded me an article that I read recently about how Amazon pushes its engineers beyond their boundaries.

The tour ended with thank you gift that included a 8oz bottle of water and a mini USB car charger, which model interestingly I didn’t find on amazon.com.

Very sadly, we were not allowed to take pictures which actually lost 50% value of the tour, though I respect the fact that it’s their own facility and they have rights to impose any policies. But how something can be a tour if you can’t take a photos?

Overall, unlike my friends, I somewhat enjoyed my tour. I believe the tour can be better in several way including reducing the number of people in each tour so that people can take a closer look. I also want to thank you Amazon to let us visit their facility.

I, however, do not suggest anyone else to take such a long drive for the tour. It’s definitely not worthy. Visit a nearby facility.

Prevent “whenever” creating separate cron job on each deployment

I am using whenever gem for handling cron job in a Ruby on Rails application. It’s fantastic because of it’s very easy DSL to create tasks and schedule it. It will do all the dirty works to update crontab and run your task periodically as per your definition.

However, I ran into one problem that upon each deploy, whenever was creating a separate item in crontab. So when I’ve tried to check cron jobs (crontab -e), I see there are so many tasks.

It was doing this because I didn’t have :application param set in my capistrano settings (deploy.rb). Whenever depends on this name to match the existing names and update it. So all you need is to set application to your deploy.rb file.

set :application, 'your-fancy-app'

That should solve the problem. However, you need to manually cleanup current cronjob as it won’t update the current mess.

Life is beautiful

Last month I quit from my job at NewsCred so that I can enjoy some kinda unlimited time with my daughter before I join in next job. To many people it may sound crazy (actually it is) as life is expensive in New York. However, I’ve been preparing for this over last 6 months and I think I’ve taken the best decision ever. This time with her is so beautiful and unforgettable that no money can buy it ever.



Standing on her own feet

The moment when I think I got the whole world

The moment when I think I got the whole world






On the beach









Walking on the beach


Showing new teeth and how she enjoyed orio cookies



How it feels to be a dad?

Let me start with a confession: During the last stage of pregnancy of my wife, I came to know how my religion, Islam, honors mothers. Since that moment, I became very jealous of my wife. I seriously started thinking if I could, ever, be a mother. Clearly, there seemed nothing to be precious than becoming a mother in Islam.

This feeling got little intense after our baby was born. People were asking me about my feelings. Though, unlike many, I found it completely not surprising to change her diaper, clean her, feed her, I was very embarrassed to say that I actually don’t feel anything special about her. When, almost everyone around me started asking it and I replied same, I started thinking two things:

1) I may not have enough emotion to feel it.
2) Probably, there is not much thing to feel by a father (getting more jealous).

However, #1 isn’t true. I know myself. In many cases, I’m strong in expressing emotion but I know what I got. So, I ended up thinking #2 may be correct.

After about 2.5 months age of baby I flew to Bangladesh leaving mother & baby behind. When I was in Bangladesh, friends and family was asking if I’m missing the baby. At this point, my answer changed slightly. Most of the cases it was ‘little’ or ‘not much’. Clearly, they didn’t like the answer. They probably expected me to say “I can’t live without her”.

However, things started changing very fast in a week of my travel. I was watching baby over Skype playing with her mom. She (Naisa) became very responsive. She now plays, smiles, makes some noise when she is asked/showed, tries to stand up, hold fingers and direct that to her mouth etc. I started realizing my feelings fast. So, when my wife said she also wants to visit Bangladesh, I made it happen very quickly.

When baby came to Bangladesh (25 days since I saw her last time) she is little bigger but lot charming and playful. She can even hold her feeder (though can’t keep it aligned) and understands that she needs to put the nipple inside her mouth. She does hell lot of other things that just amazing and tough to express in writing.

Now, honestly, it’s very tough just even to stay far without watching her. Relatives, specially cousins, are literally in competition to keep her. They’re sometime angry on me as I frequently become their biggest another competitor showing excuses like feeding her, cleaning her etc.

Photo Credit: Jobaer Shuman

She now makes some weird noises when I keep her on my shoulder and tap her back. However, to me these noises are most beautiful sounds I’ve ever heard.

So all these things change two things

1) I got my emotions right; it just took little while to show up 😛

2) It’s not that bad to be a dad. Happiness with her is gender-agnostic. And fatherhood is the only thing that completes a man. 

 Enjoying every moment with Naisa!


Gotcha with ng-model inside ng-if

It’s been written clearly in the angular.js official document but still it confused us in an instance. If you’re reading the documentation of ng-if, pay extra attention to the following paragraph

The scope created within ngIf inherits from its parent scope using prototypal inheritance. An important implication of this is if ngModel is used within ngIf to bind to a javascript primitive defined in the parent scope. In this case any modifications made to the variable within the child scope will override (hide) the value in the parent scope.

We had a template structure as follows

<div class="container">
  <div ng-if="metadata">
     <h4>Add Category</h4>
     <input type="text" ng-model="categoryValue" />
     <button ng-click="addCategory">Add</button>

In our scope, we properly add title property and addCategory method. Whenever, we click the ‘Add’ button it goes to correct method. However, inside our addCategory method value of $scope.categoryValue is always undefined.

It took us a while to figure out the issue. However, when we figured it completely made sense. The issue is simple and very straightforward.

The block where we’ve used ng-if, a child scope (parent is the scope we had title property, addCategory method) is being created. When we click the addCategory button, being prototypal inheritance, it finds the method inside the child scope. Obviously, the method isn’t there because we didn’t define the method in this scope. So the lookup goes up to the parent. The method is there. So addCategory method is invoked from the parent scope and categoryValue is undefined.

In the child scope, when we’ve used categoryValue, the value will be looked up in the current scope, parent scope and any other ancestor scopes. It’s nowhere! But when we write something there a property in the local scope (child scope that created for ng-if) is created and the value is saved there. So our illustration is like



Inside the addCategory method, it is looking for categoryValue but unfortunately it is defined that scope’s child scope. Lookup is always upward, never downward.


There are a number of solutions to this problem.

1) Replace ng-if with ng-show.

2) If you require to have ng-if, pass the model’s along with method invocation.

<button ng-click="addCategory(categoryValue)">Add</button>

So now the value of categoryValue from current scope will always be passed to the method during invocation and the method just have to accept that as an argument to get the value. Rather than finding the value in the scope, it should just use the passed argument.

WordPress debugging in phpStorm

While working with WordPress after a while, the first problem I encountered is that I can’t debug it easily as I could do it directly from PyCharm (for python/django), RubyMine (for ruby/rails). So, I wanted to figure out how to do it in phpStorm for WordPress. I found it is quite easy to get it done with a few easy to follow steps.

phpStorm 8 (currently available in EAP) has support for WordPress development. Follow the official doc to configure phpStorm for WordPress.

Enable Remote Debugging using xdebug

Check the official document on how to install xdebug extension for PHP and enable it. Once the extension is installed, you need to enable it and also enable remote debugging.


The above is my configuration. However, you may need to change the path of xdebug.so based on your extensions path.

Once installed, restart your web server. To make sure xdebug is activated, run

php -v

This should output something like:

$ php -v
PHP 5.5.10 (cli) (built: Apr 10 2014 17:49:22)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans

Notice that Xdebug 2.2.4 is activated. You can also see this using phpinfo().

Configuring phpStorm

As we’ve installed Xdebug, let’s link it with phpStorm. Open phpStorm’s preference and

Screenshot 2014-08-07 21.08.55

Select version from PHP language level and interpreter where you’ve just configured the xdebug. If it’s not listed, click on the Screenshot 2014-08-07 23.01.03 button.

Screenshot 2014-08-07 21.09.54

Give your interpreter a name. For PHP home, click the Screenshot 2014-08-07 23.01.03 button next to the field and locate your php interpreter. If you don’t know where it is go to your shell and run the following command to get the location.

which php

It should detect that Xdebug is installed in this interpreter. Press Ok buttons.

Now, you need to tell phpStorm to listen for the Debug connections. In the toolbar, you will notice the button shown in the following screenshot. Click there and phpStorm will start listening for debugger connections.

Screenshot 2014-08-07 21.11.45

Triggering the debugger

We’re in the last part of our configuration. Everything is done except triggering the xdebug. There are several ways of triggering the debugger. Easiest way is probably using browser extensions. Install extension for your browser as listed below. I will show for Chrome.





After installing the extension, you’ll notice a new button at the right side of your address bar.

Screenshot 2014-08-07 23.07.44

Click on it and choose Debug option.

That’s all*. Now set a breakpoint in your IDE and the execution will be paused there when you refresh your page.

Screenshot 2014-08-07 23.12.23

You can now step into different levels, evaluate expressions on current context, see all scope variables and so on. Your WordPress development will never be painful like earlier. Follow this link to learn more about debug toolbar.

Screenshot 2014-08-07 23.14.34 * First time, you will receive a prompt in your IDE to accept the incoming connection.


Exploring NY – part 2

This is continuation of last post where I’m trying to write my random experiences in New York.

Boishaki Utshob (Bangla New Year) Celebration

Pohela Boishak 1421

Pohela Boishak 1421

This was my first Bangla New Year celebration outside of Bangladesh though I rarely joined mass gathering in this day. In addition to girls, usually boys also take some preparations for celebrating this day. However, as usual, I hate preparations; specially with clothing :P. On the day (April 14, 2014) My wife & her friends (with their family), sister-in-law and her friend and me all headed for Jackson Heights where, I heard, most of the Bengali people join on this day.

We didn’t get the parking around, even a few blocks away, the main gather spot. So we decided to head for the NTV Bhaban (NYC office of a Bangladesh TV channel) where cultural programs happens. We really enjoyed the time there from live songs, Bangladeshi (and/or Indian) foods like Fushka, Chotpoti, Pitha, Jhalmuri etc.

Highland Park, Brooklyn

Highland Park, Brooklyn

Highland Park, Brooklyn

It was my another lone cycle exploring. I, initially, planned to go to Forest Park. On the way to Forest Park, I found this park and thought it’s worth exploring. Above the ground level, it has nice bike lane surrounding a lake (though seemed restricted to public).

Randall’s Island Park

Raita at Randall’s Island Park

Over a weekend we, friends and family, went to Randall’s Island park without any plan. I don’t remember the name of the place we initially planned to go but ended up going to this park and, most importantly, we never regret that :). The weather and the lights were stunning but again, unfortunately, my camera wasn’t with me. However, that didn’t stop us enjoying the beauty of the island and the park itself. Then we all sat and relaxed on the sport field. The kid, Raita, of our friend enjoyed the moment too.

To be continued…

Exploring NY – part 1

It’s been more than 3 months since I came to New York. As I joined my workplace within 2 days after coming here and being my wife unable to move easily and frequently due to her pregnancy, I didn’t get enough chances to go out; specially far. However, my explorer mind kept pushing me to go and look nearby.

My $99 bike from Walmart

My $99 bike from Walmart

The first great thing I did was that I bought was a bicycle from Walmart. Though I had plan to buy little expensive bike (something lightweight with aluminum frame), I ended up buying a cheap bike as everyone was warning that the area I live in is little risky and theft prune for expensive bikes(, and, unfortunately, they are right as someone already tried to steal this bike :(). Though I said cheap; it’s a very good bike and looks great. No one ever thinks that this is so cheap. Everyone I asked to guess the price; they ended up guessing about $300-$400 but actual price is $99 (I assembled it myself). My bike was my companion for all of my not-so-lone adventures.

Gateway Drive

My first lone adventure was Spring Park (not sure if name is correct), north of Belt Pkwy and opposite of Gateway Center. At that time snows were just started to go away but it was still cold resulting almost no people in the park. It was me, my bike and another mom with her child playing alone.

Spring Park, Gateway Dr.

Spring Park, Gateway Dr.

However, the cleanliness and the softness of the park just overwhelmed me. I was just thinking, how beautiful this will be when everything becomes green here. I didn’t feel alone there though no human being was with me. I was feeling just natural. I passed sometime there sitting on the bench, taking a few pictures, pumping my bike, watching birds flying, seeing the high lands on the other side, cars moving so fast outside of the park.

Seeing the highland on the other side, I was thinking the beach is nearby and attempted to go there. As I didn’t notice the bike lane that time I couldn’t go there using those high speed routes which is not legal. I kept that adventure for next time and decided to study the routes in detail before of that. However, I discovered the bike routes to beach in the same day evening when one of friend drove car through Belt Pkwy.

Time Square

Time Square

Times Square

I visited Time Square in 42nd Street with my wife and a her friend’s family. Though I liked the brightness and colorful moments there; I was just unable to figure out whether do people come here to see these ads in televisions or something else (other than eve of new year)?

The Hudson River

I love Friday in New York. There are many reasons. It’s a jummah day. It’s a last workday before weekend. On friday our office provides catered lunch which is, almost, always great :). Finally, friday evening my wife comes to my workplace and, after work, we go somewhere and return home late. So far I remember, Hudson River was the first place we conquered together. At that time our office was in W 24th Street.

The Hudson River

The Hudson River

It wasn’t far from our work. We walked together to the bank of The Hudson River from our office. I must mention one name of my co-worker here. It’s Brian Schmitz. Brian and I often run after the work. Being new, he introduces me to the different things while we run. One day he showed me the route to river bank, which I followed that go to there with my wife.

Some interesting things happened where we were there. For the first time in my life, I’ve seen a gay couple there and they were kissing each other. While we were there, my brother called me from Australia and he also told us an interesting fact about Hudson River that I wasn’t aware of earlier. Few years back a plane had to make emergency landing on the river after it’s engines blew. If you want to know more, you can see on wiki. Also this animation shows what happened that time.

Being a sunny day, which were rare in February 2014, we enjoyed the evening very much. Unfortunately, I didn’t take my camera with me on that day. So I’ve used my iPhone 4 to take some pictures.

to be continued ….

A new journey begins

Another big change in life is taking place. I’ve landed New York airport (JFK) a few hours ago to start my new life in the USA. After receiving my immigration visa at January 2014; I flew on February 8, 2014 leaving my crying parents along with brothers, sisters, nephews, niches, friends.

The upside (whether only or among many) of this migration is that I never knew that I’m loved by so many people. I wish I can respect all the love and care I’ve got so far and I wish I can settle myself (along with my wife) here in spite of being extremely home-seek.