Saturday, June 9, 2018

Beauty of Seattle ( 10 of 10 series) | Seattle onsite interview | Amazon | Public transite | Lake Washington | My experience in 2018

June 9, 2018

Introduction


The floating bridge is kind of welcome scene I saw on the plane to Seattle airport. I like to post a few pictures, and then I like to spend 20 minutes to read about the floating bridge here.


Beautiful Lake Washington

June 5 2018

Here is the picture I took on the plane to Seattle. Lake Washington is under me since I traveled through the air.






Farewell to Seattle 

June 7, 2018

Seattle downtown skyline, my favorite view on light rail line. 



Beauty of Seattle ( 9 of 10 series) | Visit a friend in Seattle | Fred Hutch | Amazon onsite interview trip in Seattle | FAU alumni

June 9, 2018

Introduction


It is time to visit a Florida Atlantic university friend who works for cancer research center near union lake. Last time we met together in Florida is over 12 years ago.

I like to find a friend and then I know that there will be some stories of good time and friendship. We call it Christian fellowship.




There are three Nobel price winners in the research institute.





Beauty of Seattle ( 8 of 10 series)

June 9, 2018

Introduction


I am always the person to work on the counting beans task in the Canada. I like the work and also find the topic which is excellent one to talk and it will be good topic to make a blog.


Beauty of Seattle ( 7 of 10 series)

June 10, 2018

Introduction


I like to write a small research topic about 10 good things about Amazon since headquarter is in downtown. I like to be creative and I do not think there are some people to write on this topic.

Let me chip in


I always like to show my great respect on creative, leadership. This is the first time I decided to hire a private coach and immediately started three weeks drill in order to prepare for the best employer in 2018.

I walked on 6 th ave from university street to union lake on June 7, it is such a good walk and I felt that the whole city is so clean and very good place for people to walk around.

I guess that downtown campus gives people more chance to meet and therefore people can have more chance to get together for food, more open to society. It is special fitting for customer obsession leadership.

People enjoy to get close to amazon employees. I really like the crowd and hear their talk in nearby whole food store. The conversation of next table is best one I never hear in my life.

Also it is fit for frugality leadership principle. The life style to use public transit, shared economy concept will be much easily adopted by those young people working for Amazon.

Another thing I like is to look around and find interesting thing to do in the lunch time. One thing I think and like is to stay healthy. One of tips is to meet over hundreds of people daily, and therefore my brain can process enough information about culture, fashion, good sense of healthy lifestyle.

I never know that it is so much fun to see over 20 dogs in a day, and see how they are so happy to stay close to people whole day.

Beauty of Seattle ( 6 of 10 series)

June 9, 2018

Introduction


It is time to write something about the city of Seattle. I like to find a song for my series. Here is the song called "Heartbeat".

Time to go out 


Continue on June 6, 2018

8:01 PM
I told my coach through wechat that I need to find some food.

I decided to go out for a dinner and I like to walk to the beach and enjoy the great view of downtown skyline.








Beauty of Seattle ( 5 of 10 series) | Amazon onsite interview | Interview day | Amazon building | No 1 building

June 9, 2018


Introduction


The blog is dedicated to the date June 6, 2018 in the city of Seattle.

June 6, 2018


It is the good idea to talk about a day starting from her sleep in a city. I like the hotel I stayed and great time to spend on algorithms. The view is so great. And I chose to go to bed around 12:00 PM, the morning I woke up at 3:30 AM, and then woke up at 4:30 AM, at 5:30 AM, and then 6:30 AM.  I decided to get up to start a new day.






7:50 AM 
20 minutes breakfast
Breakfast was such great time to have two plates of food. Good time to prepare a day.



9:45 AM - most sweet moment in my life......


10:00 AM - 12:00 AM best time to work on something
12:00 - 1:00 PM lunch time 
1:00 PM - 4:00 PM best time to work on something continuously

I like the design of lighting and those yellow shades make so colorful of the big hall.

After 4:00 PM - time to watch thousands leaving the building ......

It is the first time I had chance to stay in the downtown of Seattle. I never knew that the trip can be so fantastic. After the whole day work on June 6, 2018, I sat inside the people flowing out around 4:30 PM. I never saw so many young and energetic people in one day leaving the office, and also I saw a lot of dogs.


I liked the walk around the headquarter of Amazon, the first walk around the campus. After 30 minutes watching people and people with their lovely dogs leaving for the day of work inside No. 1 building.



I was so exhausted and got back to the hotel around 6 PM since I did not have good sleep.

6:40 PM

My coached followed up with me questions. I did chat and enjoyed the friendship after one day hard work. I talked about the feelings of urban city and the excited feelings.




Beauty of Seattle ( 4 of 10 series) | Amazon onsite | Seattel | Crown plaza place | Steak dinner | Best experience in life

June 9, 2018

Introduction


I like to write a blog about my steak dinner alone, and also I tried to figure out the stack algorithm my coach gave to me to work on. I took the algorithm with my nap in the afternoon first, and then I messed around the ideas through my dinner in a hotel called Crown plaza place.

Here is my first dinner in the city of Seattle downtown. I just warmed up my brain using this hard medium level algorithm. It is very good chance for me to learn how to find the pattern to pick up stack to apply problem solving. Out of order and need to be simplified.

June 5, 2018

Steak dinner



It took me only eight minutes to finish whole thing with a cup of water. I just could not believe how expensive the steak is. I took the link light rail to the hotel, costing 3 dollars; but the dinner costed more than 45 US dollars. That is most expensive algorithm I paid to learn in my adult history called Leetcode 456: pattern 132, since it is one of my assignments from my coach, I tried to save time to study the algorithms.





Get to know Amazon's urban campus in Seattle, here is the link.

Since I have a coach to help me three weeks, I start to listen some music to cheer up. Here is my favorite song this week called Heart Beat by Enrique Iglesias, Nicole Scherzinger.

Beauty of Seattle ( 3 of 10 series) | Seattle | Amazon onsite | Lunch | WholeFood court | Gourmet food | Streetview of Seattle | 2018 | Cofidence is the best

June 9, 2018

Introduction 


It is easy to write the third blog talking about people I came cross when I walked around 6th avenue. I like to see the way people interact, and the way they hang out for a lunch.

I like to document my lunch on June 7 in the whole food and $8.00 dollars lunch I got. The worker told me that I can pick whatever I like and do not ask me to pay extra. I instantly understood that Whole food is owned by Amazon. So generous lunch and I think that made a best lunch in my life.

I turned left and turned right, I heard people talking about technology, and AWS. I could not believe that I was one of them sitting and enjoy the lunch as well.

One picture a time


I like to post a few pictures here in the whole food store and also my lunch, beef, quinoa, avocado, chili pepper.


This is my first lunch in the whole food store next to No. 1 building in 2018. 





I wish that I do not break lunch privacy and stay anonymity on the internet. But I just like the way people getting together and exchange ideas through lunch. How relax they were and they must have work together very closely on a few projects already.


Beauty of Seattle ( 2 of 10 series)

June 9, 2018

Introduction


I noticed that I am too ambitious and opened 10 blogs with no idea how to fill them. After I browse my pictures and videos, I decided to continue to do some research and study of City of Seattle, and also amazon headquarter.

I already visited headquarter No. 1 building, and I experienced the most important format of meetings I could have in my life. I know that I may still make mistakes and then I may miss the chance this time. But I still like to get into the research and study more about Amazon.

Amazon video 


It is good to watch the video 45 minutes called Jeff Bezors Talks Amazon, Blue Origin, Family, and Wealth.

keywords:

"kind takes more effort than smart" - childhood story
self-interest critical

Beauty of Seattle ( 1 of 10 series) | Amazon onsite | 2018 | Software engineer interview | Seattle - 2 day hotel stay

June 9, 2018

Introduction


It is the best of time of the year to travel, and I like to document 10 blogs about beauty of Seattle. I like the city, and this time I had so many good memories about the city, people and vibrant exciting things happening in the city.

As a blogger, I know that the algorithm is not too long the pain. I had some emotional up-and-down, my coach comforted me a little bit.

With three friends to discuss one algorithm with me, I suddenly know that my job is not beating the bushes, and try to make myself a super talent person on algorithm this weekend.

My job is to document the beauty of a programmer life. How do I enjoy the success of 3 day trip? That is most important for a programmer to stay satisfied and always stay positive, living one day a time. Stay in current, stay grounded.

Beauty of Seattle


I have been to the city of Seattle a few times before. But this time I like to experience a luxury trip. I took the airplane to travel, and I chose to take link light rail to my hotel, which only cost three US dollars.


Seattle skyline from interstate I-5


Visit Amazon headquarter in the city of Seattle on June 7, 2018. Most of important is to catch up some reading about doppler building. Here is the link.

My coach gave me another session

June 9, 2018

Introduction


To advance algorithm and data structure, I like to work with friends and learn to work with the best. I woke up early in the morning around 5:46 AM on June 8, 2018. I sent a wechat message to my coach saying that I was thinking about one algorithm and like to chat with him. He replied to me in a minute.

So I had a chat with my coach at 8:00 AM and talked about 60 minutes. We did talk about stack, minimum heap, and argued a few thing about it is not wise to delete a node in minimum heap which may not be the root node.

Sometimes, I like to have something and then could not keep the cool. I drove to work still thinking about the algorithm from preprocessing O(1) to selection sort O(k).

Talk to coach and good time to communicate


I observe that the coach will stop a few minutes and think about, and then say using stack; and then he stopped for one more minute and then I noticed that he also needs time to think.

Hard level algorithm


I remember one time my mock interviewer told me that the hard level algorithm is biased. It will not be fair for the person who does not work on the algorithm, or for my case I have not reviewed it last 3 weeks. So that is the reason people tend to move away a little bit on that.

Follow up

June 19, 2018


This morning another algorithm expert just quickly gave the good solution using dequeue, and explained to me how to handle the moving data structure like sliding window keep ascending order. Pruning is to remove those outside of ascending order since it can be minimum at all. Repeat three keywords for the algorithm, slide window and ascending order, pruning those impossible minimum nodes as quick as possible.

I worked on the algorithm before, I just could not recall the algorithm right away. Also the friend is very open to minimum heap idea, and he said that it can be customized and fit for the need. I really like his attitude and he will be definitely a good engineer.

Follow up 


June 12, 2018


Leetcode 239 Sliding Window maximum

My submission history:


using dequeue

My C# practice over 12 months ago

C# code using LinkedList class is here.


using SortedSet

11 months 2 weeks ago, C# code is here.

Inheritance - C# 2000 things to learn

June 9, 2018

Introduction


I like to have 30 minutes workout to work on inheritance through C# 2000 things to learn. I will write down something here.

Inheritance is a very good topic to work on. But if I only have 15 minutes to work on, it may be a good choice to invest time to learn something.

Quick and easy way to learn thing.

There are 11 search results on this page: https://csharp.2000things.com/index/

Let us give it 3 minutes for one thing. 33 minutes work out.


Ask myself why Array.IndexOf is static function

June 9, 2018

Introduction


I choose a small research topic to work on. C# array class Array.IndexOf is static function, Array.SetValue is not. How to explain it?

Will come back to work on this small research topic. My goal is to get to know more abstract class design in object-oriented programming.

I just read my own blog about learning C# array. The link is here. And also here is the link I posted the question on stackoverflow.com.




Thursday, June 7, 2018

Good morning! Visit a friend for a breakfast | Seattle onsite interview | City walk

June 7, 2018

Introduction

It is very beautiful day and I will rush to check out the hotel, and take a morning walk cross downtown Seattle and meet a friend have a breakfast.

Destination:
1100 Fairview Ave North
Seattle

Fred Hutchinson
Cancer Research Center

30 minutes walk

Wednesday, June 6, 2018

Ownership story - VI

June 6, 2018

Introduction

It is my job to write down some of my work experience and then I need to follow S.T.A.R. Structure.

Situtation

I worked on a few startups from 1998 to 2001 and 2006 to 2007. I had difficult time to develop my skills as a software engineer. I had so many issues to fit for most challenging jobs.

Task

Learn by doing, try again, fail again; fail better


Action

I did try all kinds of things to develop my skills, I also got tremendous help from my advisors and fellow classmates.

Result

I have to learn one thing a time. I also have to learn to take the action to prepare for the basic skills to make a living. I learn all kinds of skills to help people, serve people, and also I need to change to a new place.

"Go and go to a place no one knows you. You start all over again. You have to brand yourself again. "




Ownership stories - IV

June 6, 2018

Introduction


I have to write some stories about my computer science PH.D. study from 2001 to 2010, I spent so many years to work on research, NSF grant project, book chapters, conference papers, and also worked on a few other projects in-between.

Situation


I have some issues to fully develop strong confidence on research and also have some issues to determine my long term goal.

Task 


I need to settle down some issues I had and also I need to prepare for my future career.

Action


I wrote book chapters, and worked on research supported by NSF. I took some math graduate courses. I actively learned to help the community to get together.

Result


I certainly found something to work on continuously. But nothing is so critical and I have to go to Canada and start all over again in 2010.

Ownership - story III

June 6, 2016

Introduction


It is the task for me to integrate my experience with S.T.A.R structure. I like to write 20 Hackerrank contest experience. Why did I start to work on it? What have |I found through those practice? What is the result?

Situation


I worked on my current job 5 years. I make things work but I know that the problem solving skills are not that good. Let us make it a situation. Actually there are a lot facts to tell that. I could not handle the stress of changing, constantly requirement update etc.

Task


I need to improve my problem solving skills. I like to know where I am in terms of coding skills, and overall challenging problems may have in software industry.

Action


I started to play hackerrank contest in 2016. I played over 20 contests afterwards, I got 7 bronze medal, two silver, one gold.

After that, I played again a few more times, I found that it is hard to get medal if I do not spend a lot of hours to work on.

Result


I understand that my weakness. I know how super talent players and their performance. I tried to solve the hard level and advance level algorithm but I learned a lot of lessons.

One weekend I only have a few hours to relax, all other time I play contest continuously.

System design: Music stream online store

|June 5, 2018

Introduction


It is the first time I know that I can make difference by preparing early and also preparing with best resource I can get. I already know the power of coach to work on the algorithm and data structure, but I did not start to work on system design until last two weeks.

How can I make it in such a short time? I know that I should not read too many contents and end up by just reading and ending up fruitless. I like to form best possible partnership with one of my friends. I have strong algorithm and data structure, I can offer the free coaching and also very good mentoring as well.

So I finally got myself to have a coach, system design is just to learn from the old friend, ask questions, and read more content.

One more practice


I asked help to work on grokking system design. My coach told me that the content is kind of out-of-date. So we two jumped on carerrcup website, and worked together a few design together. I just watched how the coach approached the design.

Here is the webpage to get the questions asked. Design a music streaming service like Pandora.

Here is the design given by my coach.






Tuesday, June 5, 2018

Leetcode 122: Best time to buy and sell stock II

June 5, 2018

Introduction


One of best things to do is to follow my coach. I spent 10 minutes to review the algorithm called Leetcode 122  Best time to buy and sell stock II. I| wrote a blog for this review.

Algorithm


Here is the gist I created for the algorithm.

I have a mock interview to work with a young graduate with five years work experience as a recruiter, she took some coding boot camp.

The interviewee did very good. I tried to explain to her that the code she wrote is not very readable, too complicated and can be simplified.

I let her advance to next round.



A trip to USA

June 5, 2018

Introduction


I felt so excited to visit United States again in less than 3 months. I felt total different since I never imagine that I may have small odds to get back and enjoy some time as a software developer.

I play all kinds of small tricks, but none of them works. I share one story here.

I used to stay in Florida over 14 years, I have a good friend who supported me over 10 years. First thing he surprised is that I decided to choose Julia instead of using Jane in 2010 when I started my first job in the city of Vancouver. He talked me every year using Jane last 10 years in Florida, USA, how come I can change it to Julia in a day? He asked me who is Julia?

I like to have a brand new life in the name of Julia. That is in 2010. Now it is in 2018.


Travel to USA


One trip to USA the city of Seattle makes such big difference. I know that sometimes the world is so connected that people may be open to new things as I do every day. I try to meet one programmer every day on mock interviewing platform. Last night I was so busy and still tried to meet a new person. Guess who I met. Best talent programmer who stayed anonymous, work on the three algorithms in a row with me, he used to work for Zenefits, and also in the city of Vancouver.


Can a programmer make it? 


Sometimes I understand that it is important for me to give up something and continue to pursuit my interest as a software developer. I like to meet people and also talk about the algorithm and data structure. I can write code, write blog, play as a mock interviewer, give people support to help them develop their career.

Can I be a super talent programmer as well? Do I see the hope when I get stuck on one algorithm, one approach? Can I find ways to hack the problem and quickly settle down a solution?

Let us see


I like to see how the world can bring to me as a software programmer, I like the challenge and the business world makes me feel so relax and excited.



Leetcode 98: Validate binary search tree

June 5, 2018

Introduction


It is my most favorite algorithm to apply recursive solution. To simplify the solution, we can pass the maximum value and minimum value for each node; The rule of maximum and minimum will also take care of the binary search tree property, the root value is bigger than left node and smaller than right now.

Algorithm


I just quickly read the recursive solution. I put together a gist for the solution I like here.

Time spent: 9:00 PM - 9:10 PM



Leetcode 23: Merge K sorted list

June 5, 2018

Introduction

I had a coach last 3 weeks and we discussed how to make the thing work out. One of my ideas is to go over some Leetcode algorithm together last minutes for me to warm up. Because my coach thought that it will not work. He thinks that it usually takes two hours to work on something, a few minutes will not work. I think that it is like gambling, guessing what will be asked.

Instead I asked my coach to give me 10 algorithms to work on for last night before the big show. I worked on Leetcode 23: merge K sorted list. It is hard level, I am glad to see that my coach selected a heap solution for me to practice.

I have worked on the heap solution more than 30 times on mock interview platform. I just quickly go over the discussion 10 minutes.

Statistics:  8:20 pm - 8:40 pm

How can I be successful?

|June 5, 2018

Introduction


It is most challenge job to prepare something last minute. I cannot push myself too hard. I just chose one of algorithms my coach selected for me, Leetcode 456, and then I enjoyed the time to hack the algorithm.


How to analyze the algorithm?


I read the algorithm and then try to figure out the best way to analyze the algorithm. I read the story about the search is out of order, s1 < s3 < s2. It just tells us that we have to think about different ways.

Best time complexity is O(n). We have to maintain maximum possible s3 value. Can you image that? I tried to analyze the brute force solution, and preprocess the array to maintain the value of each index right side maximum or minimum value. But it does not work.

We have to simplify the problem?

We like to handle s2 and s3 before s1, and also we like to keep the track of maximum s3 value. Every iteration the current visited element has to play s1 role first, see if it can play s1 < s3; otherwise, it will be considered to be candidate of maximum s3.

I am writing a novel here. Just because I spent more than two hours to try to reason the solution while I am sitting in a hotel, in a steak dinner.

Here is the discussion panel which has everything I try to put together a story here for Leetcode 456: 132 pattern.

Statistics:

Time spent: 2:30 PM - 2:50 PM
6:00 PM - 8:20 PM




Monday, June 4, 2018

Leetcode 399: Evaluate Division - from my coach

June 4, 2018

Introduction


It is the last session of my training. I sent the algorithm I am interested to my coach, and he told me the graph algorithm is Leetcode 399: Evaluate division.

Last lesson 


The coach gave me his analysis about the graph using this algorithm. I did not fully follow his idea.

Here is the transcript.


Leetcode algorithm

June 4, 2018

Introduction

I got the list to work on from my coach. I like to work on the algorithm.

Hi Jianmin,

I just took a look at those problems on leetcode. Here I recommend some problems you should take a look.



Best wishes!

Say goodbye to my coach

June 4, 2018

Introduction


It is hard for me to work on algorithm back to alone, and try to find another best algorithm player along the mock interview practice. I did find very good friend to practice with through blogging. I could not believe that power of marketing of each blog, I can easily get all the important information at my finger, and find a strong algorithm player to bounce ideas and work together to reach a new target.

Say goodbye!


I did write an email to say goodbye to my coach.

hi, 

  I wrote a blog to put all coaching session together, and like to share with you. 

  Here is the blog link.

  I also spent a lot of time to think about the coach I like and guess what you look like, my favorite tennis player Dimitrov's coach. I wrote blogs to share with you, but I was too busy to send too many emails. 

  Here is the coach's advice. 

 "Trust your instinct. You already practice all patterns. Figure out ways to solve the problem, make mistake and let it go." The coach talked about how to mentor the player mentally. I think that you are kind of the style, on dynamic programming solution coaching. 

  Here is blog I wrote to send to you. 

  One more coach I like and I thought about is Rob Kentlay. 

  The coach is my favorite.   

  Daniel is my favorite coach, and you must look like him. 

Leetcode 85: Maximal Rectangle - from my coach

June 4, 2018

Introduction


I talked to my coach that I had some difficulty to come out dynamic programming solution idea in the first five minutes on my last practice with the peer. My coach told me to check algorithm Leetcode 85: Maximal Rectangle.

careless whisper

June 4, 2018

Introduction


I had mock interview this morning with my coach, 8:00 AM. This is our goodbye meeting. I talked to my coach that the dynamic programming solution is hard to come out in the first five minutes. I just named this algorithm as careless whisper. I did hear the word coming out my mouth when I discussed with the peer yesterday, using dynamic programming.

Algorithm is called to find maximum flower. Given a matrix with cells three options: empty, wall, flower, find maximum flowers cell.

Let us say that two dimension grid contains empty cell (S) or flower (F) or wall (W). A person standing in a cell can see north, south, east and west. But all flowers behind wall are invisible. Find the cell with maximum visibility.

S   F   S  F
W S   F  S
F  W  S  F
S  F   F  W
S  F   W S

output: 3


Algorithm practice


Here is my C# algorithm.

I do not have time to put those four functions into one function, avoid code duplication. 

Follow up

June 20, 2018
The friend just shared with me the discussion panel on this algorithm. 
Discussion of maximum visible is here. 

Follow up 

March 5, 2019

I asked the algorithm in mock interview on interviewing.io. I learned from the interviewee that the algorithm can be simplified by checking left/ upper two directions only.



March 6, 2019

I spent time to work on the example again. It cannot be simplified. 

Sunday, June 3, 2018

Leetcode 493: Reverse pairs

June 3, 2018

Introduction


It is hard level algorithm called Reverse pairs. My peer asked me to solve the algorithm.

Mock interview


Here is the transcript.

Booking reading: Microservices from design to deployment NGINX

June 3, 2018

Introduction


I like to read the book 30 minutes a time in next few days. Here is the book titled "Microservices from design to deployment NGINX".


Count how many palindromic substring - from my coach

June 3, 2018

Introduction


It is my ninth mock interview with my coach. He gave me the dynamic programming solution to work on. It can be described "Given a string, you task is to count how many palindromic substring in this string."

I tried to get help from my coach, I like to see how he developed the solution using dynamic programming. Actually I found out that I missed the target.

Target


What is time complexity to solve the problem. The brute force solution will take time complexity O(n^3). The algorithm can be solved using dynamic programming with time complexity O(n^2).

All we have to do is to get dp[i, j] for any i, j from 0 to n where n is the length of string.

And then I can use O(n^2) to calculate the count of palindromic substring using O(n^2).

Flatten a list - from my coach

June 3, 2018

Introduction


It is the algorithm my coach gave to me on mock interview June 1, 8:00 AM. I like the conversation we had and then I had some conversation with the coach. My idea is that there are so many ways to solve the problem.

After I solved the algorithm, the coach asked me to write the solution of preorder traversal of tree using iterative solution. And then he told me that the solution to write iterative way for flatten a list is the same idea.

The coach helped me to clear up the confusion of preorder traversal. The order is always defined from the root node's position.

Mock interview 


Here is mock interview transcript.

Here is the code I wrote for preorder traversal iterative solution.


Follow up 


June 3, 2018


Ownership story II

June 3, 2018

Introduction


It is ownership leadership principle. I learn the lesson how to be owners.

I need to write two stories today.

Story II

Ownership

----------------------------------
Situation:

I do not have people to work with in terms of software developer. I am the only developer.

I am too busy to work on so many projects. I do not know what is most important in the long run. 

Task

I need to find ways to improve my soft skills, and also write code every day.

Action

I worked on the same 30 algorithms last 12 months with 300 mock interviews on mock interview platform.

Here is detail:


I spent one hour to work on algorithms every day; and I followed up more coding and study after each mock interview. 

Result

I learn so many things through various peers. After each mock interview, I push myself to write code for one algorithm. I have done this 300 times. That makes me a super powerful programmer. 

I never have favorite algorithms. Now I have 30 algorithms. I learn to master all of them, even hard level ones. 

Ownership story I

June 3, 2018

Introduction

It is hard for me to learn leadership alone. I had a conversation with my friend, he kept telling me to follow S.T.A.R structure. I like to write two stories and share with him. Now it is 12:15 AM. I just finished the story.

Ownership

Leaders are owners.

Ownership

----------------------------------
Situation:

No one gives me technical code review at work

Task

I need to improve my code quality

Action

I asked 40 questions on code review stackexchange.com from Nov. 2016 to Now

Result

I found out that I need to work on C#, clean code, coding style, OO design applied in C#; after last 12 months to work on feedback, I can write much better code

Here is the story one. 

Saturday, June 2, 2018

What I wish I had know before scaling Uber to 1000 services

June 2, 2018

Plan to watch 40 minutes video. The link is here.

What is microservice architecture?

June 2, 2018

Introduction


It is my research topic today "What is microservice architecture?". I had a coach to coach me one hour how to understand Netflix microservice video and pdf file, and then I like to print out something and make sure that I can understand basic terms.

Microservice architecture


I like to print out this article and read the article. At least I ask three questions and see if I can learn from the reading.

It is hard to quickly understand a new way to do software and I have to learn from the person who has strong industry experience.

Here is the article.


Netflix's Viewing Data - System design study

June 2, 2018

Introduction


I plan to spend 20 - 30 minutes to read the article and then I like to have some discussion with my coach about this article and learn how to understand system design article.

Taking notes first


Being a good student, I need to learn how to read the article carefully. Take some notes first. I like to do something small, and also start from there.

Here is the article link.

Netflix Microservices Talk


Please watch the video 48 minutes called Microservices at Netflix Scale: Principles, Tradeoffs & Lessons learned. R. Meshenberg

Pdf link is here.


Friday, June 1, 2018

Scaling time series data storage - one hour coaching

June 1, 2018

Introduction


It is my idea to get help from my Canadian coach to help me understand the article called "Scaling time series data storage". We spent one hour together to go over the article, I asked a few questions. Since I found out that there are too many new concepts in the article, I need some coaching from the friend.

System design


I like to write down some notes about this one hour coaching. First time I have luxury to enjoy best coach in the world, who helps me to understand the article word by word.

The coach told me that he spent at least half year to understand Cassadra and related technology.




Thursday, May 31, 2018

Personality challenge

May 31, 2018

Introduction


I like to talk about software programmer personality as today's short research topic. I met a friend Tony today on tennis court, he knew me over 8 years. We talked about how he trained his daughter to be a professional tennis player. She is 14 years old.


My personality


I was given a lesson how to be a coach. Give room to the person. Let her grow and then figure out things by herself. Do not overdo.

I like to confess that I was too shy to make a mistake 8 years, one year ago.  I definitely improve a lot after I play hundreds of hours tennis. I learn from tennis sports.

I definitely get better after I had conversation with tennis coach.

Tennis workout

May 31, 2018

Introduction


It is time for me to go to tennis court and enjoy outdoor sports. I went out and had a good time on tennis court. I need to relax myself and work on some sports training.

My friend showed me how good his daughter is on tennis. His daughter is champion of 2018 ROGERS JUNIOR OUTDOOR NATIONAL CHAMPIONSHIPS. He showed me the website with her ranking point 9.

How to train a tennis player professional?


We chatted more about how to train the kid from age 5 to age 14, and how to train her to be a professional player.

I have known the tennis dad over 8 years. I saw how dad trains his daughter since she was less than 7 years old.






Sleepless in Bejing and early bird in Vancouver

May 31, 2018


Introduction


How can two people meet with such busy work and life? A young graduate will sacrifice sleep and meet 11:00 PM to 1:00 AM in Beijing, and an early bird in Vancouver will get up before 7:30 AM and prepare to be coached for three weeks drill. I think that the blog should definitely be called "Sleepless in Beijng and helps early bird in Vancouver".

It is such great experience to have a series of mock interviews from May 12 to May 31, 2018. We have met over 8 times in total connecting from Beijing to Vancouver. I could not believe that it is such an enjoyable thing to do. I will write down a few things I learn through the series of mock interviews.


Good partnership


I know that a good coach will work with different players. I enjoy the time to work with my coach. I start to know his personality and also very good hard working stories now. My coach is cool as the youngest tennis coach Daniel Vallverdu  who coaches ten 10 ATP player Dimitrov.

I always follow tennis professional players, one of favorites, Safarova, and think about getting a coach like Rob Steckley. My research topic is similar to surviving after 30. One practice I am done!



First blog:

Introduction to get help from a coach is written in a blog called special three weeks drill.


836 minutes working together


It is definitely a big number, 836 minutes, close to 14 hours. There are eight mock interviews in total up to May 29, 2018.


First interview ( 71 minutes)

Detail see my blog called first mock interview from my coach.


Second interview (108 minutes)

Minimum cost using dynamic programming - mock interview

The transcript is here written in mock interview. And the code is written after the contest.

Find least number of perfect square, the blog is here.



Third interview (101 minutes)

Next large element in the array, the blog is here.

Height of tree, the blog is here.


Fourth interview (114 minutes)

The mock interview is documented here. The algorithm is called ....


Fifth interview (124)

find string s2 containg s1 permutation, the blog is here.


Sixth interview (105 minutes)

Suggest a char with maximum occurrence at the position with the given prefix. The blog is here.

breadth first search algorithm - processed by layers. The blog is here.


Seventh interview (96 minutes)

union find algorithm is documented here.


Eighth interview (116 minutes)

Leetcode 91 Decode ways is documented here.

Isomorphic strings is documented here.

Extra algorithms discussed:


1. Second mock interview

My past practice on dynamic programming is here. Manhantan 2 booking woman is the algorithm to apply dynamic programming.

2. Ask code review for my mock interview performance on trapping rain water.

3. Discussion about hard level algorithm maximum disjoint subtree product




Get lost in a depth first search, DP, tree algorithm again

May 31, 2018

Introduction


It is my favorite thing to do if I have luxury to spend a few hours. I like to learn the algorithm again called Maximum disjoint subtree product.

I read my own blog written after the contest in May, 2017. I read the code I wrote in the contest, and I like to make any point above zero. I wrote more than one hour and three hundreds of lines code, but I still scored zero. The hard working spirit really touchs my heart again.

I do have to get a coach and learn better way to think in terms of depth first search, dynamic programming and tree.



Algorithm study


Here is the code I spent time to play with. I need to get some help from my coach. I like to learn how he solves a hard level algorithm.

Getting smart after 12 months

May 30, 2018

What I like to do is to solve a subproblem first. Assuming that there is an array, we need to find two disjoint subarray with the maximum product. I like to define two dynamic programming solutions, and then I solve the problem first.

Here is C# solution I write. Time complexity is O(N), N is size of the array.


Leetcode 205: Isomorphic Strings

May 31, 2018

Introduction


It is one of my mock interview algorithm given by my coach. I wrote a C# solution. I got hint to use array instead of using hashset.


Follow up 


July 20, 2018

I ran the code against Leetcode online judge using Leetcode 205. There is index out of range error for test case: "13", "42"

Need to fix the issue. The C# code is here to pass online judge. 

Cassadra Netflix case study

May 31, 2018

Introduction


I like to spend 30 minutes to study Cassadra Netflix.

Learning is so surprising. Originally I plan to read grokking system design lecture notes, and then try to memorize the solution.

But surprising my friend offered me coaching and then I had chance to go over complicated web architecture by first hand sharing. I was asked to read Cassadra Netflix after May 30, 2018 one hour coaching.

To be a good student and be coachable, I find that I am so enjoying to read Cassadra database and totally forget the time.


Scaling Time Series Data Storage — Part I


Reading is getting hard.

https://docs.datastax.com/en/cassandra/2.1/cassandra/dml/dml_manage_ondisk_c.html

write down new terms I need to learn:

Log-structured Merge Tree vs B-Tree

Read-before-write

statement: Cassandra never re-writes or re-reads existing data, and never overwrites the rows in place.

hard disks (HDD)
solid-state disks (SSD)

Tuesday, May 29, 2018

Being an interviewee : Insert intervals

May 29, 2018

Introduction


It is the interval algorithm but it is not easy for me to come out elegant idea to write simple code. I had some ideas, but before I came out the idea, I already wrote the code. The interviewer told me stop, and told me that I should make it simple.


Ideas 


Here is the transcript of the mock interview.

Hints pouring down 


I like the interviewer. He just quickly coached me through mock interview. I like to exaggerate how he did. He poured down hints one by one. I really like young talent Chinese graduate student, how hard he works, and he is willing to coach me. He did 3 times mock interviews with me, and this is the third time. I like his good collabration skills. I do believe that the future will be better with those young gradautes.

A few hints are given by the interviewer and the interviewer helped me to get the optimal solution and also very clean implementation:

1. About inserted interval, it can be replaced by current visited element
2. inserted interval can be replaced by the merge interval of two overlapped intervals.
3. Write simple code, I wrote the code to check next interval and logic is too complicated for the interviewer to follow. It may work, but the interviewer told me that it is better to discuss with the interviewer first.
4. The interviewer told me that it is better to ask hints, instead working on complicated solution. I do not totally agree on this.
5. If I am too busy to work on the code by myself, the interviewer may not have chance to work with me.

Follow up 


I wrote C# code and also I found a bug. Actually if I check my coding style and I should find the bug. Those two lines of code with variables insertedStart, insertedEnd, the scope should stay inside for loop. Now they are moved to line 60 and line 61.


Leetcode 94: Binary Tree Inorder Traversal

May 29, 2018

Introduction


I could not believe that I finally can write working solution using recursive solution today. It is quick and fast. I still remembered that I did choose to write a recursive solution, instead I wrote an iterative solution with some bugs on important meeting. This past 12 months I definitely have done some good training. I CAN write a recursive function very easily on binary tree.

I like to submit as many algorithms as possible on Leetcode.com.

Recursive solution


Here is my recursive solution.

Iterative solution


I like to go over the algorithm with tag stack. I wrote an iterative solution using stack, and it is good workout for me to master stack algorithm one more time.




Leetcode 91: Decode ways

May 29, 2018

Introduction


It is my eighth mock interview from my coach starting from 8:00 AM to 9:40AM on May 29, 2018. He asked me to work on Leetcode 91: Decode ways.


Mock interview


Here is code I wrote in the mock interview.

Follow up


I wrote the C# code and then tried to pass online judge. I made a mistake to put 0 which should be '0' on line 80.


Coach's advice


Please consider to define the array using extra one space. Let the first element of the array be empty, therefore in your solution line 80 index >= 1 can be removed.


Follow up 


May 2, 2019

I chose one of online mock interview on Leetcode.com and had chance to practice the algorithm one more time.

I spent 30 minutes to write and used debugger to help me to fix a few bugs in order to pass online judge.

Here are highlights:

91 Decode ways
I came cross three bugs and I had to use debugger to help me to figure out
1. mix char with integer, s[i] - '0' is to convert to integer
2. all results are zero, forget to increment one for the start
3. apply step 1 for all instances, miss a few place
4. missing edge case, tenth digit should exclude 0, 3 to 9. 0 is not considered by mistake.
5. missing edge case, 00 is not valid

And the code written is here to look up.




Monday, May 28, 2018

Deliver results

May 28, 2018

Introduction


It is one of Amazon leadership principles. I like to learn from the Amazon leadership.


Hava backbone: Disagree and commit

May 28, 2018

Introduction


It is one of Amazon leadership principles. I like to spend at least 30 minutes to study the principle first.


Dive deep

May 28, 2018

Introduction


Dive deep is one of Amazon leadership principles. I like to learn the principle and plan to spend 30 minutes at least.

Earn trust

May 28, 2018

Introduction

Earn trust is one of leadership principle. I like to spend 30 minutes to write a blog for this principle.

Frugality

May 28, 2018

Introduction


I like to write a blog for frugality principle. I think that frugality is hard to practice, it takes a lot of wisdom and determination. I like to apply the frugality principle to my daily job.


Bias for action

May 28, 2018

Introduction


I like to write a blog for Bias for action principle. I will start to work on it 10 minutes first.