Winter 2019 Road Trip: Part 1

December 2019 was the best month of my life. I did almost 2100 miles in 10 days with my awesome wife and two kids. This is the first leg of this dream road trip.

San Diego is kids heaven. You have Disneyland, Universal Studios, Legoland and the Zoo. But after arriving there, I couldn’t stop myself from visiting The San Diego zoo. I am not a huge fan of the Zoo, may be the aging factor, but I decided to visit it since it’s a very famous for its diversity of fauna. 

The weather was warm even in the end of December, I think around 50 degrees farenheit. There are busses and tours roaming around everywhere. If you go on the weekend there will be a lot of people but this was winter holiday season so everyone was here. You will see a young, old, families, college students, school students and so on. America has been doing an awesome job in creating awareness for animal protection so you will see some kids raising money to protect a species on earth.

San Diego was the first stop of our two weeks long family road trip. We booked hotels for just two days because our plan was flexible. We decided that if kids every get cranky, start driving towards home 🙂

San Diego Zoo

Let’s get back to the zoo. There are many reasons you will fall in love with the zoo. It can be the double decker bus ride that gives you a tour of the zoo. It can be the cable car that shows you its vastness. It can be the joy on the face of your kid when they see the Penguins in real life or when they enter into the aquarium or it can be the bridge that gives you access to the tiger trail. You will be fascinated by the 99 acres vast land that looks like a mini jungle but it has animals from everywhere. San Diego Zoo is also featured in the movie Madagascar so the kids might be able to connect to that as well.

This is one of the unique places on earth where you can see pandas that I had only seen in the movies. There is also a fossil area where they have preserved fossils of the world’s oldest species. They have many restaurants, so its ok if you didn’t bring food. But I would suggest start early if you want to walk the complete zoo in one day.

Legoland

The third day, of our road trip, we travelled to Carlsbad to visit Legoland. It’s an outdoor theme park that’s designed around the concept of Lego, a corporate that forces people of all ages into buying pieces of plastic that are so addictive to play with for people of all ages. For example this:

I liked the huge dinosaur on the entrance but there are some things I didn’t like about being in Legoland. For example these challenges where you pay some money and hit some stuff to get a stuffed toy. If I need that I will go to Santa Cruz, not Legoland. Kids love it but I don’t. There are water rides inside that has nothing to do with legos. There is a theater that plays Lego related movies that make sense but there is also a roller coaster, why do we need it in Legoland? All in all the rides here are super lame that are not worth $100 per day. 

Finally there was an area where you can play with legos and that’s what I like. Legoland with legos. All in all, this park is lame, if you wanna play with legos, there is not much to do here. You can have rides anywhere on earth. Legoland discovery is a much better idea.

Next part of our trip is in vegas that we will come to it later.

Joined Reddit as Software Engineer

O yeah, I joined Reddit. Based on all the offers I had at that time Reddit seemed to be the right sized company. I am currently working on Ads. Feel free to bug me if you wanna know about that. Here is what people usually do when they leave a company so I am also doing it.

Relocating to America from Pakistan on H1B

I got a job offer from Yelp around April 2017. That means I had to relocate to San Francisco Bay Area. Today marks my 7th month since my first in the US and so far it’s been a roller coaster ride. It was my second relocation after we relocated to Thailand from our homeland Pakistan. The reason to write this blog post is to help my country mates who will arrive in the US on H1B visa.

I relocated with my wife and son. With H1B, you can usually arrive 10 days before your petition start date so I arrived in states on September 22nd, 2017. Thanks to Yelp for giving me a healthy relocation bonus that helped be getting settled but there were still a few challenges those I would love to list:

Temporary housing challenge

The difference between my first relocation and this one was that we were not provided with temporary housing instead we got a relocation bonus so we either had to stay in a hotel or Airbnb for the first few weeks. Since I am lucky to have a wife who loves to cook and feed us home cooked food everyday, I preferred airbnb with a kitchen and never regretted that decision. We took an airbnb for almost 10 days in San Francisco considering it will give us enough time to get permanent housing but we were wrong, terribly wrong :). That led us to get another airbnb that we took for 15 days in Oakland, CA. To tell you the truth, Oakland time was a bit difficult because it was in downtown that gets a bit sketchy and noisy in the night. We found housing by then but the move in date was November 15th so we had to find another apartment for a month. Thanks to airbnb that helped us again to get a 1Bedroom apartment in San Francisco near Dolores park. On November 15th, after almost 7 weeks of my first entry to the US, I got a permanent house in East Bay and loving it so far. One important thing to note is that you can’t get a house without Social Security number so apply for one as soon as you can.

Food Challenge

This challenge didn’t hit us that badly. Apparently, most of the Americans love IndoPak food so it’s easy to find a Halal food restaurant in almost every block of San Francisco(although the food quality varies a lot). Secondly, there were various grocery shops where you can easily find Halal Meat, Pakistani masalas and almost every type of dessert. It’s even easier in Eastbay where there is an Indian or Pakistani grocery store in almost every market.

Healthcare Challenge

American health care system took us sometime to completely understand. The countries where we live, having a healthcare plan before going to the hospital is not required. But here in the US, you have to have a healthcare plan if you don’t want to cost yourself thousands of dollars in case of emergency. Fortunately Yelp provides us with pretty good health care options that made the things a lot easier. Must check these things with your employer before signing a contract. Usually there are two types of plan PPO (where you have to pay some amount out of your own pocket and you can consult any doctor within the insurance company’s network) and HMO(where you have to choose a primary care physician(PCP) and you cannot consult any other physician without the recommendation from your PCP). PPO usually costs you more than HMO so I would recommend study about these two options before arriving to the US.

Tax challenge

I lived in Pakistan most of my life where tax percentage was between 7 to 10 percent. In Thailand, it was around 15% but here in the US, it’s much more than that(make sure to check your bracket before accepting an offer). Secondly, please note that if you are married, your tax rate will almost be 10% lower than single dudes. But… you can’t change your status to married until you become a resident alien(that happens after 183 days of your first date of entry in states). So first 6 months will be tough in terms of taxation but after you file your first returns(between January to April every year) and get a refund, things will get easier.

Things to do after arriving to the US

There are a few things you need to do before you can enter in the system.
Get a Social Security number as soon as you can. Please note that there is no limit on number of days on this. I applied after 2 days of arrival and I got it within a week. You need Social Security number if you want to get a house, healthcare plan, life insurance, a bank account, internet connection even a mobile phone plan.
Get a bank account as soon as you can. I have a Wells Fargo one and it’s good so far. You usually need a proof of employment, an identity or any other debit/credit card for any other bank in the world.
Start looking for housing as soon as you land here. Bay area is a bit expensive. In Eastbay you can expect $2000 to $2800 rent for 1Bedroom apartment and $2600 to $3400

All in all great experience so far. Highly recommended area for relocating.

Special thanks to my friend and mentor Zaki Shaheen for all the support he gave us.

Sails JS security [DRAFT]

This is a checklist I am creating for myself to secure different areas of a SailsJS application I am developing these days.

For API security: https://github.com/lucj/sails-oauth2-api

For user authentication and thirdparty login: PassportJS

CSRF:

This was really important as sails by default allows CRUD operations with both GET and POST so to avoid CSRF I added the following path to the routs.js

I will keep adding more stuff so please feel free to comment if you think I missing something.

Sails JS + AngularJS error: CSRF mismatch

I was trying to build signup functionality with AngularJS frontend and sailsjs backend rest API. I created a simple angular post request but it was giving me following error in the browser:

CSRF mismatch

so I added the following lines to the top of post request:

Now it’s working like a charm. Please feel free to comment if you like this solution or have a better solution.