Saturday, September 30, 2017

University codesprint #3: The Snake vs the Wind

Sept. 30, 2017

Introduction

It is 2:40 PM. I plan to spend 20 minutes to read the algorithm problem statement.

Algorithm practice 



University codesprint 3: Erupting Volcanoes

Sept. 30, 2017

Introduction


It is 2:31 PM. I plan to work on the university codesprint next 10 hours. The erupting volcanoes is the algorithm to calculate the maximum value in the range of rectangle.


Anastasija Sevastova - tennis professional player

Sept. 30, 2017

Introduction



It is challenge to do some research about the player, I knew her since she beat Sharapova in fourth of U.S. Open 2017 fourth round. Today China open Sharapova revenged and beat her to play first round against her.

Study hard


The player information can be found here, and the author is tennis writer, I started to follow Steve Tignor on twitter.



Thursday, September 28, 2017

Thanksgiving campaign No. 1

Sept. 28, 2017

Introduction


I plan to do some campaign for Canada thanksgiving holiday, to express my great holiday spirit. First activity is to ask a question on code review website. I miss those people who helped me from Nov. 2016 to March 2017, I like to go back to be one member of community.

It is so nice to experience the code review again tonight. I just posted the algorithm in less than 10 minutes ago around 10:30 PM, the best programmer already edited my post to fix style issues, grammar errors, clarify the problem statement by going over the content. The user profile is 200 Success, who is the moderator.

I miss the people to review my code, help me to become a better competitive programmer starting from Nov. 2016. After 6 months break, I finally decide to go back to routine to ask questions on code review website.


Thanksgiving activities


This past year is the tough for me physically, first time in my life I feel the uncomfortable on my right knee. I experience some short memory loss compared to strong memory before, for instance, I forget a friend's name if I have not met him last 6 months. I feel different specially I have to handle a deep pocket of my big tooth left side jaw, and I feel that aging is a university and I have to work hard to catch up learning how to deal with those new challenges.

I like to ask myself what I should do to stay connected to those people helping me grow as a software programmer. Those people help me, touch my heart to make my algorithm practice so interesting and also so rewarding. One of them is JS1 who shared the great advice for my coding solution.

Here is the snapshot to show how good the work is, I learn to improve my English writing so efficiently:


Here is my code review algorithm Find the smallest substring that contains some given subset of characters. Twitter link is here. 

Follow up


Oct. 25, 2017

code review C# code is here.

Code review "LINQ and string.Split do it yourself practice"

Sept. 28, 2017

Introduction



It is time to review the algorithm again. I posted the question more than 5 month ago, the link is here.


Algorithm Practice


I had a mock interview and the peer chose to use C++ language. I did some research how to translate those four lines of C# code to C++ language.


I just could not believe that one day I can write a product using C# advanced feature like LINQ, write regular expression and groupby clause and where clause. I am so excited to set a small goal for my next project.

Time complexity analysis

Sept. 28, 2017

Introduction


It was busy day on Sept. 27, and I had a mock interview at 10:00 pm on recursive function. My issue is how to analyze the time complexity.

Algorithm Practice


C# practice is here.

If all keys in the dictionary are put into a tree, and all the nodes will be visited once using depth first search. So the time complexity should be the size of the tree. Recursive function is used, so no need to extra space to store all the nodes.





Wednesday, September 27, 2017

Canada thanksgiving day - Oct. 9 , 2017

Sept. 27, 2017

Introduction


Thanksgiving day is coming very soon. I used to spend thanksgiving in November since I stayed in United States from 1996 to 2010. This thanksgiving day I will spend time in China and have vacation in the city of Beijing, and a trip to one of mountains called Yellow Mountain, a trip to my home town - city of Yichun, and visit of the city of Shenzhen and Shanghai.

Am I ready for thanksgiving?


This month I attended the techfest in the city of Vancouver, I spent 20 dollars and got a drink, and met a few tech companies and learned a few things. So many thanks to the hard working people in Vancouver area, I learned so many things through the generosity of those employers.

Give thanks to those companies help me grow my talent? Stackoverflow, Amazon, Google, Microsoft, Vision Critical, Global Relay, Copperleaf, Viser Inc., Pramp, Refdash, Hackerrank, MP Lighting.  

Give thanks to friends all over the world, visit me in the city of Vancouver.


C# tutorial (II)

Introduction



I start from the first page of A tour of C# today. I spent one hour to study the book again, and then I did some research on the argument in the page 1. Here is the statement:

To ensure that C# programs and libraries can evolve over time in a compatible manner, much emphasis has been placed on versioning in C#’s design. Many programming languages pay little attention to this issue, and, as a result, programs written in those languages break more often than necessary when newer versions of dependent libraries are introduced. Aspects of C#’s design that were directly influenced by versioning considerations include the separate virtual and overridemodifiers, the rules for method overload resolution, and support for explicit interface member declarations.

C# tutorial 


I google using keyword "versioning in C#'s design", and I read a few articles. 

Stackoverflow link is here by Eric Lipert, and read one blog called Not every IEnumerable is Object

Next, I like to google what language lacks of versioning in C#'s design, Java? Or C++? I am very interested to find out.

Will come back with more. 

Tuesday, September 26, 2017

My best friend knee pain

Sept. 26, 2017

Introduction



It is the first time in my life I start to feel something uncomfortable with my right knee. I have enjoyed hundreds of hours tennis sports, but I have to spend time to study "tennis knee".

Life is my best teacher, and my knee pain is becoming my best friend. Come and go, I never know. I try to put something between with hiking, tennis sports, long hours walk.

I need the wisdom and I miss the fun to run around the tennis court. Every time I like to go outside and enjoy the outdoor, my knee pain may let me down in past few months.


Do not count wrong doings (II)

Sept. 26, 2017

Introduction


I wrote my first blog called "Do not count wrong doings" a few months ago. The link is here. And today I like to spend 10 minutes to write how I learn to make a dough after 150 lb wheat flour experience.


Hundreds of baking


Today it is the first time I was so patient to allow myself to learn how to make a dough using two cups wheat flour. I spent 20 minutes to read, and one of my research topic tonight is "how long the rise dough should last", I watched some videos and also read some articles as well.

I started to prepare a dough around 8:00 PM, I checked after 45 minutes, it is not ready, and then I did research to compare wheat flour with bleached flour. Before I started mock interview around 10:00 PM, it was not fully rise.  After I finished my mock interview around 11:47 PM, almost  three hours the dough was fully rise.

I baked great bread like a commercial wheat flour break first time, and tasted so good.

I bake so many times and so often. But it is my knee pain recently to teach me how I should do a fully research before I make a dough, be super patient and give myself learning opportunity, read more and get better understanding.

I learn and enjoy the teaching from the video and the article, the links will be added later.

Tennis champ Sloane Stephen study

Sept. 26, 2017

Introduction


It is fun to study the tennis champion of US open 2017 Sloane Stephan. I have 30 minutes to dedicate the study of the tennis player, now it is 9:17 PM, and I will have to work on mock interview starting from 9:55 PM. Let me have a good time to get educated and also entertained.

Sloane Stephen tennis star


First, let me catch a video lasting 4 minutes, called "Tennis Champ Sloane Stephens on Winning US Open". The video link is here.

Second and always, I like to watch one of her practice videos. So I can learn more her as a player, how hard she works in the practice. 14 minutes video called "Teenage Sloane Stephens on Trans World Sport" in 2013 when she was 20 years old.

Plan to study The Legacy Agency (TLA) sports marketing John Tobias. The video link is here.





Monday, September 25, 2017

Leetcode 76: Find smallest substring

Sept. 25, 2017

Introduction


It is the classical algorithm similar to Leetcode 76. I already practiced more than two times, and I stumbled on the algorithm again. The mock interview started from 10:00 PM, and I started first to work on the algorithm, first 12 minutes I spent the time to explain the idea to solve the problem, and then I spent 18 minutes to write the code and thought out loud.

I found a secret. When I am too busy at work, I need somehow to remind myself, what is most important thing to work on.

It is true that most important is to train myself with basics, and learn how to work with the peer in more efficient way.

By going over mock interview, I have chance to educate myself, get more advice, and then I can start to apply to my current job. One mock interview a time, I figure out my weakness every time.

Last mock interview I found the issue of my understanding C# Array, and I spent 4 hours to work on Csharp 2000 things. I wrote a blog and then found "Csharp 2000 things" website, and I really enjoy learning from the short snippet.

Algorithm Practice 


C# code is here. I did not finish code in 30 minutes. I need to work on the left pointer while loop.

After Mock practice



C# code is here, with unique array "xyz" and string "xxxyz", the maximum substring is "xyz".  But failed on several issues.

Line 75, 76, if the visit char is not in the hashmap, the code will have run-time exception.
Line 89, the while loop condition to check if left pointer should move should be changed, one case is that the char is not in the hashmap, or if it is in the hashmap and also its value is negative.

Continue to update C# code, next version is here. The fix is on line 106,
   map[str[left]] ++;  // once the substring is found, and then left pointer should be moved to right, increment the hashmap on the char's count.

Continue to update C# code, the fourth version is here. The run time exception bug is fixed.

Continue to update C# code, the fifth version is here. The feature is added to remove the char not in the array when left pointer is handled.

Last two practices


Review last two practices, the link is here.


Actionable Item


It is so interesting to learn from my experience. It takes me over 3 years to learn the string search algorithm using sliding window. I still remembered that in January 2015, I spent a week every day after the work, wrote a lot of code on papers and tried to figure out the algorithm. At the end of the week, I decide to become a blogger to write blogs every day to track my progress.

I failed in 30 minutes to solve the problem, and failed in a week, and then failed after a few months, I wrote a blog in June 2015, the link is here.

Plan to study the algorithm "Length of the longest substring without repeating characters" on geeksforgeeks.org.


Train my eye to catch common bugs


Those three bugs in my first writing are common ones. The first one is related to hashmap, the dictionary to store unique characters. We need to check if the key is existing in the dictionary first. The second one is to discuss two options for the character, either in the dictionary or not in the dictionary. The third one is to maintain the dictionary value by checking increment and decrement correctly.

Nothing is new in terms of bug type. All I have to do is to review the code while I am doing whiteboard testing, think out loud, and ask myself what possible bugs are in the code.


Unstoppable: My Life So Far - Maria Sharapova With Charlie Rose

Sept. 25, 2017


I watched the video to sacrifice my sleep time. Now it is 12:12 Am, I am in the middle of 20 minutes interview video. I could not believe that the conversation is so intense about how Sharapova shares her success and her great insights. 

Unstoppable: My Life So Far - Maria Sharapova With Charlie Rose. 21 minutes video is here.

Sunday, September 24, 2017

Quora research a weekend

Sept. 24, 2017

Introduction



I spent the weekend to work on quora.com and try to figure out how to work with Quora better. So I asked a few questions, and also wrote a few answers. I like to show my work and show some statistics for one weekend work.

I did sacrifice and chose not to work on mock interview, not to take pluralsight courses, not play any contest. What I did is to play with quora, and see if I can reach out more people in short time to produce something and meet new people through the internet world.

Progress report 


First, I like to show the graph with some statistics.


I got 6.3k answer views. I got those in less than 3 days. People are spending more time on Quora and get more connected. I am kind of thinking to do more research and then I just do it, with so many blogs I wrote it is not time consuming to put together something to share with people.

I tried to answer a most popular question first, I got 620 views.

How can I improve my programming skills?
Here is my answer.

Next I answered one of question about Hackerrank.

Most surprising one is this one, I got 3K views.

How often should a programmer practice mock interviews, I asked the question and also gave out the answer. My answer link is here.

Everything starts from one email last Thursday from refdash.com invitation email to share my experience, answer one question called "What is your review of Refdash.com".

Unstoppable Sharapova

Sept. 24, 2017

Interview with BBC


Plan to watch 22 minutes video interview of Sharapova called: "Unstoppable Sharapova". The link is here. Now it is 11:07 PM, I will spend 20 minutes to go over the interview.

Now it is 11:26 PM. I am planning to watch the second time, and take a few lines of notes.

21:41/ 22:31
Question: Before your suspension, you think about retiring at 30 of birthday.
Answer: I think that understanding of motivation I still have, and really the discipline I can give. ? All myself I have. (12:56) And also it is understanding of body of 30 years old woman can do. The tennis sports is ... (22:04) But if you treat it ..  (22:08) training, so many ways to train, avoid long distance running and weight lifting.

Interview with USA famous journalist


Unstoppable: My Life So Far - Maria Sharapova With Charlie Rose. 21 minutes video is here.

Think Like a Fox

Sept. 24, 2017

Introduction


It is Sunday light and I was busy working with vacation planning in the city of Beijing. I like to do some research. Think like a fox, I have three things to work on. Now it is 10:43 PM, I like to relax and have some research.

One is Chinese version, the Chinese article posted on the faccebook. Here is the link.

The 22 minutes video of commencement talk of Yale by the psychology professor, the link is here.

The speeches English transcript is here.

The professor profile is here, wiki page is here.

More research:

The one hour speech "Emotional intelligence and daily practice" on youtube more than 302K views, plan to watch this video and get some good ideas. The link is here.









University Codesprint #3

Sept. 24, 2017

Introduction


It is getting busy at work and also prepare to have a 2-weeks vacation starting from Oct. 4, 2017. I have to do some research on Asp.net framework, and also need to catch up C# programming, prepare to do some analysis of sales. So I do not have time to practice more algorithm for next contest.

It is coming. My next contest is university codesprint this coming Saturday. I like to prepare and play the contest.

It is easy to set a goal to work hard on hackerrank contest. After I won my first gold medal, I find that it takes a lot of sacrifice to attend the contest. I need to focus on the contest, spend enough hours to work on the contest.


Preparation talk


How to prepare for my next contest? I like to do some research and get prepared early.



Saturday, September 23, 2017

.Net framework study

Sept. 23, 2017

Plan to take some courses related to .NET on pluralsight.com.  I need to work on migration of Asp.net web server and database server.


Binary search practice

Sept. 22, 2017

Introduction


I had a mocking at 10:00 pm and then I was told to write the program to find a number using binary search. I failed 5 out of 6 test cases, index out of range, and then I was told to comment out the code of binary search function, and then nail down the bug related to implicit typing "var" on line 47.


Algorithm practice 


My binary search practice is here.


Coding with style 


I spent almost 40 minutes to chat with the peer about coding. I really like the conversation between two programmers. I advised the peer to write self-documented code, in other words, do not write variable name l, h which l stands for low and h stands for high. Express the intent, define a meaningful explanation variable. And also I advised the peer to do whiteboard testing, and showed him an example, run the code line by line and execute the code with the result calculated by myself.


Write simple and clean code


The peer asked me how I can have so much time to play hackerrank contest, ask code review algorithm questions, and then write blogs.

I shared a few things:

1. The blog I did code review for myself, the triangle algorithm.

2. Edit distance dynamic programming post on quora.com. The link is here.

Thoughts after mocking


I think that writing coding blog is easier compared to write code at work. To ask a question on code review website is also easy compared to solve problems at work. I think that the experience of writing blogs is very rewarding experience, my blog is becoming my best reading library.

Thursday, September 21, 2017

Recurrence practice

Sept. 21, 2017

Introduction


It was good practice to go over the algorithm using recurrence formula. The basic algebra is applied to solve the problem, but there is something missing and I need to clarify it later on.


Algorithm practice 


Here is my C# practice.

I still remembered that more than 3 months ago the first time I worked on the algorithm, I was kind of nervous for a few hours. The first 30 minutes to interview the peer using the algorithm also brought the stress for me.

Strangely, the feeling of stress is gone. Now I am getting used to work on the recurrence, simple algebra. I understand that it is important to keep training and practice daily, therefore I can build muscle for great thinking and analysis one day.


Actionable Item


Go over lecture notes by Jessica Su, the link is here.

Mathematics proof

Sept. 21, 2017

Introduction



Life is much easy as a programmer once I learn how to write clean code for humans, learn simple things like TED principle, how to break giant expression to write simple code. One thing I have to learn is to make algorithm as simple as possible, go back to my favorite topic - reasoning and analysis, my favorite exercise is to prove something based on axioms.

Today 10:00 pm I had chance to share my proof to the peer how to argue the array is still not descending after the change. The reasoning was very well welcomed by the peer, I got 5 as a reward, top points as an interviewer.

I learned the lesson first time in my life through my real experience. I was told to prove that binary search is most efficient way to solve the search algorithm from 1 to n. I learned the lesson so today I asked the peer the question how to prove his assumption. He could not do it, I showed him in quick 5 minutes talk.

I know that one day I will need some advanced mathematics skills to handle some task. Today it is the first time I showed the proof to a peer. I miss the fun to prove so many mathematics when I was young.

Algorithm practice proof 



Supposing that there is an sorted array with distinct integer, denoted as array, how to prove that new array based on array[i] - i is not descending.

My argument is simple, since the array is sorted in ascending order, we have array[i + 1] > array[i] for any i >= 0. Based on the fact that array has distinct integer, it is not possible that array[i + 1] == arr[i]. So my next argument is that the increment is at least 1, in other words, array[i + 1] - array[i] >= 1 for any i >=0. Next step, ascending distinct array {0, 1, 2, ..., n-1} has increment 1. So array[i] - i >= 0.

I was challenged by the peer what kind of interview I prepare for. I just laughed and answered his question. I learned from the real life lesson, I have to give out mathematics proof to show my real interest and talent.

Counter example


Two ascending sorted array, the difference can not be assumed to be non-descending order. The first ascending array is Array[i] = i, second ascending array is secondArray[i] = 2 * i, the new array Array[i] - secondArray[i] = - i, which is descending.

Actionable Item 



Write down my proof that binary search O(logn) is most efficient solution.

My second answer on quora.com - dynamic programming

Sept. 21, 2017

Introduction


I am nervous to post the answer on quora.com, because people can vote down/ up and it is most popular website among programmers. Sometimes I need a safe sandbox to practice my thinking and come back later to make frequent visits, and make the content more readable and have some value.

But I answered one of questions, my favorite topic "Dynamic programming".

Here is the answer: How can I get good at dynamic programming?

Quora is my new school

Sept. 21, 2017

Introduction


Surprisingly today I got an email to share my experience from refdash.com on quora.com. I understood that it is very important for me to show appreciation to all the people to help me grow my career. I did post an answer, and also set up a blog on quora.com and wrote a first post based on my previous blog. The fact is that my blog called "Mocking interview facts and tips" only has 130 views since August 2017, I like to find out if there are more readers on quora.com.

My new school 


Wednesday, September 20, 2017

Leetcode 171: Missing Ranges

Sept. 20, 2017

Plan to work on the algorithm called "Missing Ranges". The leetcode discussion link is here.

Problem statement:

Given a sorted integer array where the range of elements are [lowerupper] inclusive, return its missing ranges.
For example, given [0, 1, 3, 50, 75]lower = 0 and upper = 99, return ["2", "4->49", "51->74", "76->99"].

Understanding C# Array class

Sept. 20, 2017

Introduction


I had a mocking interview at 10:00 pm, and I like to write Array.IndexOf but I need to search Google for the help. I asked myself why it is not array.IndexOf() instead of calling an abstract class Array.IndexOf assuming that array is an object of Array class.

Here is my C# practice. I has a few issues to use Array.IndexOf instead of using hashmap to save the index.

Understanding C# Array


I like to read a few articles to get more educated on C# Array.

Read c# Array -
Read 10 minutes - C# Arrays Tutorial
https://msdn.microsoft.com/en-us/library/aa288453(v=vs.71).aspx

20 minutes reading:
http://www.c-sharpcorner.com/article/working-with-arrays-in-C-Sharp/

Study stackoverflow posts related to C# Array -

More reading:
https://www.codeproject.com/Articles/6118/All-about-abstract-classes



Csharp 2000 things



Work on C# 2000 things, the following image is highlighted by search keyword: Array


Plan to spend 10 minutes for each item related to Array, some of them are Julia's favorites.

#136, Sorting an Array of Values Based on an Array

Julia's ranking: 10 out of 10

#135, Implementing IComparable to Allow Sorting a Custom Type

9 out 10

#137, Sorting an Array Using an Independent Comparer method

9 out 10


Actionable Items



Plan to work on medium level algorithm called "Non-overlapping intervals". The link is here.


Follow up 


June 8, 2018

I spent over 20 minutes to look into more carefully about C# Array abstract class. It is true that Array.IndexOf is a static method, so that the call of the function should look like Array.IndexOf, instead of str.IndexOf. Compared to API SetValue as public  function, it will be called differently.

My second question is why IndexOf API is static but SetValue is non-static. Maybe we can read Array C# class source and then figure out why.

Leetcode 57: Insert Interval

Sept. 20, 2017

Introduction



It is definitely a good learning process to help the peer work out the optimal solution to solve intervals. I had a mock interview 10:00 PM, and I had to spend over 30 minutes to help the peer to work on an interval algorithm. The difficult part is to explain the idea to use linear algorithm to solve the problem. Also, I gave the hint to show how to get the overlap quickly using Math.Max of beginning of two intervals and Math.Min of ending of two intervals, and then I gave the hint to move to next interval if the ending value is the smaller one.

I gave out the code review about a double for loop, and explained to the peer, in order to get linear time complexity, the while loop should be used instead of using double for loop.

So after the mocking interview, I like to review interval algorithms in Leetcode.

Plan to work on hard level algorithm called Insert Interval. The link is here.

Tuesday, September 19, 2017

To be a good tester

Sept. 19, 2017

Introduction


Thing happened so quickly and I could not figure out what was going on. This past Monday I installed a few apps on my new refurbished Samsung phone, somehow, the mobile got hot the whole day and I could not get the mobile charged to full the whole day. I went home and charged the Samsung 6S to 80% battery, and left the phone on the table. Next Morning I tried to open the mobile phone around 8:00 am, the phone had 0% percent battery.

Samsung phone battery issue  


To be a software programmer and try to be a good tester, I like the challenge to figure out what the issue is. Is Samsung phone's battery bad? Or I just picked up some bad behavior to download apps not good for the phone. 

A lot of area I carefully go over. Now it is 11:53 PM, the Samsung 6S phone has 24% battery, I will let it sit until tomorrow morning and see what percentage is left. I uninstalled all apps related to maps. 



Sunday, September 17, 2017

Case study of getting better on driving

Sept. 17, 2017


Introduction



I like to drive highway and enjoy high speed driving. Today I should drive to Road 3 in Richmond from my home to meet friend visiting from Seattle, friends long back from Florida, I ended up driving 91 to Nelson exit, and then turned back to drive local highway and spent extra 20 minutes to get to the restaurant.

Here is my route in a diagram:


Analysis of Driving skills


It is the important to build a good habit, stay intelligent. I drove over 22 times to go to USA cross board last 7 years, but last 2 - 3 years I stopped driving on shopping trip instead of working more on coding blogs.

I need to do some research how to build skills smart on driving. The mistake to take wrong route on the highway reminds me how gentle I should take it, and then later I need to study the reasons, I need to catch up with some learning.

Figure out things to help me to be a good driver.

A few ideas to work on:
1. Read highway 91 or 99 wiki pages.

2. Figure out how Samsung Google map driving direction on my Samsung mobile phone came out ads when I need to get detail route while driving from road 7 to road 8.

3. Understanding Road vs Ave vs St. Directions of Road is north to south.

4. Learn to read map and thing to help to memorize the map and figure out easy mistakes to work with Google directions. Start from basics, reading some articles:

Five tips and tricks to help you better navigate google maps, here is the article.


Facts to Review 


9/18/2017

What I did is to purchase $1.00 dollar internet service, and then start to use Google map drive directions on Sept. 17, 2017. The phone was connected to the charger all the time, and then the phone got hot.

What I should do is to download the map of Vancouver area, with size around 160 MB. And then open the download map, use offline map to help drive direction. No need to connect the phone charger. Keep the phone cool as normal standby status does.

Have my idea of route first, only use the drive direction from Google map as an alternative. Understand the basics to exit early, go to No. 3 road first.

tennis coach Annacone study

Sept. 17, 2017


Introduction


I am looking for great advice for my career. I certainly have got a lot of good advice from last 6 month through over 90 mocking interview peers. But I am still looking for the tennis coaching, and observe best coach teaching. Today I will study Roger Federer's coach Annacone. I decided to study tennis player Madison, and then spent 5 minutes to study Madison twitter account, and then I came cross the book twitter of Annacone.


Study of 30 minutes


Now it is 10:19 pm. I will search google and find 3 of very good study material to entertain myself next 30 minutes.

It is 10:51 pm. I am watching 3 minutes teaching video from the coach Annacone, great teaching. The video is here called "Playsight tennis tips with Paul Annacone: Approach Shots".

It is 11:06 pm, I am in the middle of 22 minutes of teaching video called "Tennis Channel Academy - Paul Annocone (former coach of Sampras & Federer). The video link is here.

Action Items


I miss those long hours to play doubles in the city of Burnaby central park last few years. But this year I do not play so much matches. I really enjoy the learning of double tennis through the favorite video teaching. It is 11:43 pm, I am watching second time the video of following teaching, and catch up some research for my Google map and directions common mistakes.

Here it is. Tennis channel academy Tim Blenkiron, here is the link.





Madison Keys tennis player study

Sept. 17, 2017

Introduction


I was advised a few times on Burnaby city tennis courts to study woman professional tennis players, and see how they plays. Tennis sports is such a quick pace sports, I have to catch up a lot of study in order to learn and know players. Today I like to spend 20 minutes to study a player Madison keys, basically my study is to focus on how the player thinks and how to solve problems.

Study of a tennis player


The most favorite study is to watch the interview of Madison Key after Rolan-Carros 2016. Eight minutes video is here. She is a young player, only 22 years old, prize money is around 7 million dollars.

9/19/2017 8:30 PM
Madison Keys press conference (SF) - Australian Open 2015, 20 years old Madison shared her thinking about success, motivation to work hard and showed her great manner to handle the tough questions. The video of 11 minutes is here.

Most of my favorite time is to watch her practice. The four minutes is here.

9:07 PM
2017 US open: Madison keys QFs Press Conference, 9 minutes interview is here.
Nervous and how to handle it? 1:00 - 1:27, 27 seconds
Coach helped her - an example, 1:30 - 2:00, 30 seconds
Low moments, dark moments, 3:00 - 3:30, 30 seconds
Americans in QF? talked about opposite first, then go to the topic. Starting from 5:20
Talk about fear. Start from 6:06 PM.
It is not you make people happy, you win matches. It is because you are truly like to be out there. 6:50 - 6:57.
Opportunity as an individual? Take this tournament one match a time, one game a time. I am definitely not getting  ahead myself that way. I am really proud of myself to get here the first place. Starting from 8:00 - 8: 30

10:11 PM
Madison took the interview when she was 16 years old.

US Open Wild Card Exclusive Video: Womens Champion Madison Keys Press Conference. 10 minutes interview is here.

3:16 - go in and prepare like any other match. Do not make it a big deal, otherwise you come in and completely nervous. You will be over thinking, so (3:24) I have to go in and treat it as any other match.

How to Make Your Business Even Better While You're on Vacation

Sept. 17, 2017

Introduction

It is a good research topic for me to do some research called "How to make your business even better while you's on vacation". I read the Chinese version from here first, now it is 9:00 pm. I like to read English version of the article, and bring up 2 or 3 things to look into.

Saturday, September 16, 2017

Leetcode 33: Search in Rotated Sorted Array

Sept. 16, 2017

Introduction


It is the wonderful learning opportunity for me to practice the algorithm again last night at 10:00 pm. I chose to write the idea I thought about and read about, but I had not written it before. The experience told me that binary search basically is also like a depth first search, the most important is to work on base case.

The more detail is like this, I spent first 15 minutes to exchange ideas with the peer, and then only 13 minutes left, I need to write some code, and I chose to write a binary search combining normal binary search in sorted array and shift array binary search. My argument is that the normal one is just special case of shifted array binary search. The iterative solution is hard to avoid duplicate logic and coding. I just could not believe that I made it the first writing without any bug or grammar error.


Leetcode 33 is a medium algorithm, I wrote down the algorithm in less than 13 minutes, and most important thing I did is to move base case "middle value" (line 29 - 32) to the first thing inside the while loop, moved those 4 lines out of if block from line 36 to 46.

Tip to share 


I got the complaint about my practice of binary search tree. The peer told me that the most important part is to work on middle value in the binary search tree. Focus on middle value, do not consider start value at all.

Algorithm practice 


C# code practice is here


Thursday, September 14, 2017

July 18, 2017 algorithm review

Sept. 14, 2017


Introduction


It is two months ago, I did spend 3 to 4 hours to review my own practice before 8:00 pm. I went over around 30 algorithms, print one by one on the paper, and then read one by one. I really learned from the preparation, and I like to open a folder on my own github, and list all those algorithms I chose to study on July 18, 2017.

It is so interested to know that once I am busy with the study, the nervousness is kind of going away. I did very good one on preparation, and I had great performance later on the evening to complete code in limited time.

Algorithms


Algorithm 1. In order successor
Algorithm 2. Flatten the dictionary
Algorithm 3: HTree
Algorithm 4: Reverse words
Algorithm 5. Find distance binary tree
Algorithm 6. Leetcode 23 Merge K Sorted List
Algorithm 7: Leetcode 37 Sudoku
Algorithm 8: Leetcode 49 Group anagrams
Algorithm 9: Leetcode54 SpiralMatrix
Algorithm 10: Leetcode 72 Edit distance
Algorithm 11: Leetcode 114 Flatten Binary Tee to Linked List
Algorithm 12: Leetcode 212 Word Search II
Algorithm 13: Leetcode 295 Find median for path stream
Algorithm 14: Leetcode 295 median of stream
Algorithm 15. Leetcode 300 Longest Increasing Subsequence
Algorithm 16. Leetcode 416 Partition equal subset sum
Algorithm 17: Leetcode 516 Longest palindrome subsequence
Algorithm 18: Leetcode 605 Can place flowers
Algorithm 19: Binary tree two path same value
Algorithm 20: Leetcode 239 Sliding window maximum
Algorithm 21: Leetcode 57   Insert interval
Algorithm 22: Leetcode 10   Regular expression matching
Algorithm 23: Leetcode 547 Find Circle
Algorithm 24: Leetcode 130 Surrouned region
Algorithm 25: Maze Project
Algorithm 26: Short Job First using Icomparer
Algorithm 27: Leetcode 554 Brick wall



Mathematics for computer science

Sept. 14, 2017


Introduction



I reviewed a lot of computer science books and then found an excellent book to read. I am very good at reading mathematics and also like to learn how to think about more using mathematics, help me to be a competitive programmer.

Actually the revised version is over 1000 pages. But it is still my favorite book. I have to find time to read the book. The book is available on mit.edu website, the link is https://courses.csail.mit.edu/6.042/spring17/mcs.pdf. I also save it on my github and here is the link.


Tuesday, September 12, 2017

Apps for language tests

Sept. 12, 2017

Introduction


Plan to do some research how to improve my English. I did some research and downloaded some android apps today. Here is my favorite article called "15 Android Apps For IELTS, TOEFL & GRE Preparation".

It is a good idea to continue to work on my English, specially work on the vocabulary. It is important to add some pressure to daily life, such as memorizing 20 new words a day, difficult level of GRE/ GMAT words.

In order to be a top performance player in C# programmer, I start to try new ideas how to improve my performance.





Catalan number (II)

Sept. 12, 2017

Introduction


It is the classical algorithm to calculate the catalan number. My last practice is documented here. It is very challenge to work with the peer and I ran into the index out of range error in my first writing, and then I modified the code, and argued that first row and first column should exclude from the double for loop, and discuss first row and first column separately.

I need to work on the algorithm problem solving, need to look into the feedback.

Algorithm practice 


C# practice code is here which passes all test cases. 


From the above feedback, I did not communicate very well this time. Need to figure out how to clarify of my answers and line of reasoning. 


Follow up 


January 17, 2018

It is the first time I know how to review my own past practice. Missing the analysis of the algorithm writing is a big issue for me now, production ready code should be written with some analysis and time complexity and space complexity. I have to write down the algorithm, and constraints, and the requirement, what problem to solve. And also my analysis of the problem, solve it on a simple example, go over the example to explain to the peer first. And make sure that the peer understands the problem.

From the transcript of the practice, I did not write any analysis of the algorithm. That is not good practice at all.

The peer did complain and I should have let peer know the algorithm and how to solve it first using a simple example. 

2,000 things you should know about C#

Sept. 12, 2017


2,000 things you should know about C#, the link is https://csharp.2000things.com. Plan to work on 2,000 things as quick as possible. 

I did some reading on C# tutorial, and then I came cross this blog and it should be very helpful for me to learn C# in quick pace. I like to read the code and learn  a concept in the same time.



Monday, September 11, 2017

Leetcode 72: Edit Distance

Sept. 11, 2017


Introduction



It is one of classical algorithms related to recursive function and also memoization. I have practiced a few times and I am still learning the algorithm. My last practice is documented here, and all past practices are available through the search by Leetcode 72.

It was such great experience to be interviewed using the algorithm again. This is my third algorithm practice, my last practice was more than one month ago. I still remembered the mistake I had and the advice I got from the peer.

Algorithm practice 


Here is my C# code written in 30 minutes. I had a mocking experience starting from 10:00 pm.

I knew that I have to work hard to be an interviewer in order to get unlimited credit. I just started my new round of mocking practice. I could not memorize the algorithms, there are a lot of new issues coming out on this algorithm. I failed to do analysis of brute force solution, it should be 2(max(str1.Length, str2.Length)), because every time there is at most 2 choices. I was given the hint and then I took the hint to go from n * m to power of 2 analysis. In other words, the time complexity is lowered from polynomial time to quadratic time.

Assume that the worst case happens. In other words, the comparison of two chars are not equal, so one of them has to be deleted. There are two choices to do deletion, the minimum value of two choices will be recorded. For example, two strings are "abc" and "edfg". The total choices are at most 27. In mathematical term, the upper bound is 2= 512. The dynamic programming using memoization will lower time complexity using jagged array memo[3][4], time complexity 3 * 4 = 12.

I also was told to make correction on the first line of the function, line 8. The checking is for the case of both strings are null or empty. Not at least one of them. I wrote || by the mistake.


Related to a simple life choice



9/12/2016

It is always good idea to write down the practice experience, what did I actually learn from the mocking? This time, 30 minutes coding passes all test cases, with one of corrections from the peer. But I was surprised to know that I need to grasp the basic algorithm analysis, as I shared my knowledge of Monte Carlo algorithm to a young graduate from a linguistic major, I have to explain the algorithm to myself. The most important is to know how to analyze instead of guessing.


If I have two choices to calculate distance, how should I make a decision? I have to go for the minimum one from the two choices. If I have a series of choices to make, then the combinations of choices will be 2n. To summarize, Leetcode 72 is the algorithm for me to teach myself how to understand the brute force solution with polynomial time complexity, know how to solve the problem first, and then apply dynamic programming, lower the time complexity to m * n using memoization, dynamic programming using bottom up solution.

It is interesting to know the memoization design, the best choice I know is to use jagged array, memo[][], the size of jagged array is str1.Length * str2.Length, that is how many intermediate result we have to hold. Assume that each of them is calculated to use a few simple steps which are O(1) time complexity. 

Sunday, September 10, 2017

Course study - Advanced Software Development in Full-Stack JavaScript

Sept. 10, 2017

Introduction


It is very challenge for me to get out of my comfortable zone and start to learn new technologies, I was so busy last 2 - 3 months to review the code I wrote at work, and then I like to plan to develop something more complicated.

I started to work on algorithm and data structure foundation from 2015, and I made some progress and tried to get better through mocking interviews.

Course study 


The course is listed on codefellows.org, the outline of the course is clearly documented in the following link.

Learn to be a mentor to help young girls get involved in STEM

Sept. 20, 2017

Introduction


It is the great time to spend 20 minutes to read the article titled "Meet Three Awesome woman helping young girls get involved in STEM". The article link is here.

Be a mentor 


Plan to study the linkedin profile: Nicole Kelner and go over the article "A young woman's etiquette guide to coding".

Plan to study the codeFollows institute, the link is here

Saturday, September 9, 2017

What if I am the product manager of Samsung 6S mobile phone?

Sept. 9, 2017

Introduction



It takes hours to study how Samsung S6 are designed to fit so big population. I spent time to watch Netflix TV shows called "Quantico", meanwhile I plan to go over the features of my new cellular phone, since I hiked 8 hours labor day long weekend in Golden ear canyon loop with other ten people, I soaked my old phone in the water.

Need to go over the articles one by one. What if I am the product manager of Samsung S6? What are those features I need to explore this time?

I plan to try some apps for Samsung S6 phone.

One feature a time 


9/9/2017 10:35 pm - Gboard - the Google Keyboard. The article is here to read.

I really like the Gboard, search is most important feature when I write on wechat to get connected to my friends. Good job, Julia! Well done!

9/9/2017 11:09 pm - Go over those apps and try one more. The link is here.
11:17 pm camera apps - the link is here.

9/19/2017 8:00 am - the phone has zero battery, last night the phone was charged to 80% battery near 8:00 pm. The phone was sitting on the table and no usage at all.

Need to look into possible issues.

Battery issue - the article is here.



A short research - ping identity

Sept. 9, 2017

Introduction



It is not easy to consider carefully what to adopt with so many technologies. It was the first time in last seven years I started to experience github.com personal developer version starting this August 2017.

I had a strong belief last 2 years that the work I can do is strongly tied to how strong I can be in data structure and algorithm foundation. Every other challenge is to depend on how quickly I can google and pick up the skill set if I need, learn through pluralsight.com courses and ask help on codereview.stackexchange.com.

I like to study a local company called ping identity instead of taking another mocking interview. I was busy with the financial work and work on the property safety issue related to rental property in the city of palm beach, the hurricane Erma. Last seven years, I enjoyed the living in the city of Vancouver, but I used to stay in Florida near Atlantic ocean.

30 minutes research 


I did security wireless network research over two years back from 2001 to 2006 my dissertation research. I am kind of remembering taking "Introduction to Cryptography" and exchanged ideas with the classmate how she likes to get the job later.

I need to figure out how to conduct a short research and enough help to understand the industry and people with skills.



Leetcode 532 K-diff pairs in an array (III)

Sept. 8, 2017

It is so big surprise to watch how the peer performed the algorithm, I had a mocking interview on 10:00 pm. So, here is the C++ code to study. The peer is top 30% ranking on codeforces.com,  Contest rating: 2023 (max. candidate master, 2123). 




Leetcode 532 K-diff pairs in an array (II)

Sept. 8, 2017

Based on the mocking practice, I spent around 20 - 30 minutes to work out the solution to pass Leetcode online judge.

Here is the C# code.


Leetcode 532 K-diff pairs (I)

Sept. 7, 2017

It is the easy algorithm but it is very interesting to solve the problem through mocking practice.

Here is C# code I wrote.

Through the mocking practice, I did work on a test case and then demonstrated that the solution is working fine.


Past practice


Here is the practice on April 29, 2017.

Wednesday, September 6, 2017

C# courses on pluralsight.com

Sept. 6, 2017

Plan to take courses related to C# on pluralsight.com. It is always better to spend time to learn first, and then figure out how to shorten time to develop the software. Believe that a more educated C# programmer knows how to write quality code with less bug and more readable code.

C# courses' link is here.

What great .NET developer ought to know

Sept. 6, 2017

Plan to read the article "What great .NET developer ought to know".

Booking reading: C# tutorial

Sept. 6, 2017

#CSharpTutorial #BookReading #AdvancedTopics 


Introduction


It is never too late to read a C# tutorial. Today I spent over one hour to read C# tutorial, and then I read the first time about C# reference types. There are four types which are class types, interface types, array types, and delegate types.

I like to spend 30 minutes a time, a few times to read the book. Meanwhile, I like to use C# tutorial to help me do some research on language itself, and find some interesting and quality material to read to enhance my C# knowledge. The material I am looking for should not focus on the theory, better practical, work on small coding examples.

C# tutorial 


A few things I like to do:
1. Plan to spend 30 minutes a time to read the tutorial.
2. Write down new concepts here.
3. Try to go over the tutorial in September.

9/11/2017

Read page 1 and look into the declaration "C# is a simple, modern, object-oriented, and type-safe programming language."

Plan to look into the keyword: type-safe programming language C# -

15 minutes read:

"Learn C# tutorials", the article link is here.

9/12/2017

Read page 1 arguments:

"The type-safe design of the language makes it impossible to read from uninitialized variables, to index arrays beyond their bounds, or to perform unchecked type casts."

Questions:

- uninitialized variables - how the design make default initialization in C#
- index arrays beyond their bounds -
- unchecked type cast - what is the unchecked type cast?

Look into type-safe design of C#, name three of them.

Each common mistake plan to read 5 minutes.
Buggy C# code: The 10 most common mistakes that C# developers make -

C5 Generic Collection Library for C# and LCI - the github link is here.
Read page 1 argument:

"C# Has a Unified Type System. All C# types, including primitive types such as int and double, inherit from a single root object type. Thus, all types share a set of common operations, and values of any type can be stored, transported, and operated upon in a consistent manner. Furthermore, C# supports both user-defined reference types and value types, allowing dynamic allocation of objects as well as in-line storage of lightweight structures.".

I did Google on this, and then surprisingly I came cross the search result: #950 – C# Has a Unified Type System, I immediately decided to learn from the series of Csharp 2000 things.

Plan to go over 2000 things 30 minutes a time. Write down my favorite learning here.

2,000 things you should know about C#, the link is here.

Follow up


May 21, 2018

What I did is to review the blog, and then I also make the blog more readable. I added a few labels for easy to access. I specially like to document how I approach my goal to advance my C# skills.

Reading a book takes time. I like to use C# tutorial book to guide me to find interesting research topic. 

Feb. 20, 2024
I decided to read C# tutorial again. I searched my blog using keyword: C# tutorial, and then I found the book to read. 

Monte Carlo algorithm

Sept 6, 2017

Introduction


It is the exciting time to share my knowledge about the Monte Carlo algorithm and how to apply to the daily life. The summer is the great time to hang out with a friend and then walk around the blocks, chatting is kind of art and science. I like to use the algorithm to help a young graduate to understand how to find the best boyfriend, theoretically how to do it.

For example, you will meet 10 candidates in next 12 months, at the end of 12 months, recall who is the best one in the last 12 months. And then, whenever someone shows up and beats the best one in last 12 months, it is a good idea to look into more.

Monte Carlo Algorithm


It is better to read the algorithm through wiki article first. Plan to read 10 - 20 minutes. Write down things I learn through the reading.



Binary search

Sept. 6, 2017

Introduction


It is so interesting to write a binary search algorithm. First 5 writing I found out the issue every time, edge cases like middle value expression to avoid overflow, less and equal case. This time I found out a new issue, verbose code. How can I solve the issue?


Algorithm practice


C# practice is here.

Leetcode 37: Sudoku solver

Sept. 6, 2017


Introduction



It is so enjoyable to write sudoku solver as a depth first solution and also walk through each step called "thinking out loud". The conversation after the mocking this evening starting from 10:00 pm until 11:30 pm is also rewarding experience, I try to contribute my two cents for a young person to prepare for an important trial. Although I have written sudoku solver solution over 5 times last 3 months, I still found that this time I wrote a different style.


Algorithm practice 


Here is my C# practice. No bug in the first writing, only fix two compiler errors, pass all test cases the first time.

I forgot that I need to visit current node instead of using two loops to scan the matrix to find the first empty element. After 1 - 2 minutes, I noticed the issue, and then I corrected my thought process and continue to write from line 25.

I wrote line 38 and thought out loud saying that it is kind of stupid to write '1', '2' to '9', actually I am thinking that it is better to split from string "123456789" instead of declaring a char array.

After the mocking interview 


I spent over 20 minutes to share my past 80 interviews with the peer, what I have learned through the mocking practice, specially how I learn to write sudoku algorithm through more than three practices.

One thing I like to say is that if you take it slow, you have a lot of time to write code in 30 minutes mocking interview; but if you write in a rush, then you end up with issues. I am getting more comfortable to stay on one node at a time.

The fact is that in my solution there is no need to write a double for loop at all. Avoid scan from top to down by row, left to right by column to find the first empty element all the time.

The peer gave me the feedback saying that I did very good to explain the algorithm by going over the example to find options 1, 2, 4, 7 ( see line 117 - line 124).

Monday, September 4, 2017

I'm proud. I did my best

Sept. 4, 2017

Introduction

It is the big lesson I have to learn as a tennis fan. I have to learn how Sharapova handled her loss in the fourth round of US open 2017. I like to write down some notes from the interview.

9 minutes 32 second videos, "I'm proud. I did my best", the video is here.


Am I biased?

Sept. 4, 2017


Introduction


It is the eighth year I am in the city of Vancouver, through all kinds of events I know most of software companies in downtown of Vancouver, I went to open house and other activities, I have been to  Vision Critical, BuildDirect, Microsoft, Amazon, Unbounce, the name goes on. But today it is the first time I spent over 30 minutes to do a research on autotrader.ca through linkedin. The only reason I had my research for the long weekend is that I saw one of my friends to wear Vancouver Sun Run T-shirt with company logo - Autotrader.ca.

So, my research of 20 minutes is that am I biased on the research of local industry?


Research on Linkedin


I have to admit that Linkedin is a really great place to do some research on career movement, how people advance their career, share their interest related to the technology, how they get their great strength from formal/ informal education.

A list of people I look into for my small research this long weekend is here, those people I had met in Florida, New York area, some of them I have not yet met.

I did a lot of study on tennis players this morning. Specially I watched the interview "I'm proud. I did my best" after Sharapova stopped on her fourth round in US open 2017. But it is also very interesting to know how my linkedin circle people move around and I try to figure out something.

Two people I knew moved to Google recently, tracy and ying.

First, I have to spend 10  minutes to study the website http://www.autotrader.ca/.

Plan to study product management of the company, study one profile here.

Plan to study technologies used for the website, study one of managers' profile here.


Actionable Items


I do not plan to do the research on autotrader.ca this morning, I was thinking to work on sponsor application paper work instead, and I actually did spend over one hours to study tennis players for top 8 players, and also did study the algorithm Leetcode 230 for one hour. All those activites ended around 11:00 am.




Sunday, September 3, 2017

My first android phone

Sept 3, 2017

I have to plan to get a new mobile phone for my coming china trip starting from Oct. 4, 2017. My first android phone was not able to start after the hiking trip, and I need a unlocked phone to travel in China.

I have the phone with me last 2 years. I bought the Nexus 5 used phone from crystal mall in Burnaby, and it is refurbished one. The phone's camera stopped working from January 2017 and it stopped to boot up starting from Sept. 3 after soaking with water. I used to have iphone 4S, and then I got complained about mobile website design issue, I usually used the simulated mobile device underneath google browser. I need to get to know various mobile devices at work, I got an iphone 6 for testing at work starting February 2017, and also it was good experience to experience Android device.

I found one, and I like to choose a used one. Bet on bestbuy.ca and its partner JP mobiles.
Samsung phone on bestbuy.ca, Samsung Galaxy S6 32GB smartphone - Sapphire Black - Unlocked - Certified Pre-owned - online only. Here is the link. The price is around $394.95.

Research and Study


It is the first time I brought up a discussion how to do shopping research with a graduate from university of Victoria linguistic major, I was amazed how my friend did good research and what good conversation we had on the search of products, comparison with different products over 30 minutes.

I was always teased by a friend that "we are getting old, young people are taking over". It is true that I have great time to learn and see how my friend with linguistic major demonstrated her thought process. One thing I like to say that the education she got is great. She learns most critical skills, analyze and learning abilities.

Be a outlier


I did some study on the course: be an outlier, the main idea is to be slack financially, one of ideas is to buy used ones. In order to practice those rules learned from the course, I like to apply my mobile phone purchase in a week.


Funny Story


I did some study this morning 9/4/2017 10:30 am labor day long weekend on autotrader.ca on linkedin, and then I was surprised that the samsung phone on bestbuy.ca I did research shows up. And I did study tennis player Sharapova on facebook.com, the walmart phone I did study also showed up. Unbelievable advertisement, I was followed everywhere.


Follow up

9/8/2017
I got the phone, and started to read the tips to use the phone.

The article is here about a few tips.

Darren Cahill as a tennis coach

Sept. 3, 2017


Plan to do some research on the coach. Watch the video a few times, write down some notes about a top coach and how he thinks as a coach. The 3 minutes video is here.

How to manage different styles?

Adapt as a coach.

Being an interviewer: Find largest smaller binary search tree key

September 3, 2017

Introduction


It is the great learning experience to watch a 2nd undergraduate student to perform the algorithm. The peer did very well on the analysis, but the execution of the algorithm is kind of weak. I need to step in and ask a good question about the iterative solution.

Evaluation 


This is the first time I show my evaluation as an interviewer. It is such a great activity that I meet a new person and also help the peer to learn an algorithm.

I still remembered that back to 2006 I applied the instructor job in united states, I was afraid to write and speak out, and I did send out over 20 applications.

Now it is so natural to watch how an undergraduate learns the algorithm through various channels outside the university. And I am glad to be part of the process.

I like to learn an algorithm similar to Leetcode 230: Kth smallest element in BST. Also I like to build experience around the algorithm with great reward experience to be part of mocking interview.

Here is the review I got after the mocking interview:


Actionable Item



After the mocking interview, I felt that the peer is not very competitive player. But I learned through his analysis, his calmness and his idea to continue to search right node for bigger value in order to get largest one is very clear and correct. 

I felt pressured that second year undergraduate student will master the algorithm in such a quick pace, how I should do in order to compete? Just be their friends. 

Next time I should copy the peer's code, and analyze the code later. 

Leetcode 54: Spiral Matrix

Sept. 3, 2017


Introduction


It is the classical medium level algorithm to write spiral matrix in one dimensional array. I have practiced more than 3 times. The key idea is to go over the four iterations from top row, last column, last row and first column, edge cases are one row or one column. last row and first column is optional because they are handled only if there are more than one row or more than two columns.

Compared to the practice in March of 2016, I am so happy to see that I can write more readable code.

Algorithm practice 


C# code is here

Feedback 



Summer 2017

Sept. 3, 2017

Introduction



It is the early morning, after 8 hours hiking, I went to bed early and ended up to get up around 3:30am, now it is 5:30am, I decided to write a blog called "A programmer is seasonal?". I am trying to do a small research how the summer activities enriches a programmer's life living in the city of Vancouver, I may be able to perform better as a software programmer.

I decided to go out hiking last Saturday once I got the invitation. I had a busy week, I started to use github account to track my source code progress, I also evaluated the ransom virus and build a working environment on a new hard disk since the virus encrypted all files in my old computer.

Source control 



One thing I did and also very helpful is that I print out the code I rewrote, code review and put them on paper. So, it was so good to read the code on those papers when I found out a few pages code lost in the shuffle of version control, server and local hard disk. I just found out so many weakest points to review my working procedures. I can be better and powered with so many tools.

Try to address a few issues based on facts:

1. It is easy to catch up the technologies these days. I just started to use github version control less than one month ago. There are so many advanced features of github, it is also exciting to learn some advanced features.

3. I have more activities to go out with friends in the summer last few weekends. I had a trip to Vancouver island, hiking with friends, friends from California visited the city of Vancouver. Those activities makes a programmer more happy.

4. One more research in summer is what if I decide to lose 10 or 20 lbs. What should I change?

5. Now it is US open tennis 2 weeks. I learned a lot from those players, do those player help me to understand better the competition in the market about talent, what should I do to take advantage of it? I want to be strong and more competitive programmer.



Actionable Items


Need to figure out how to make this small blog more organized, readable. Figure out 2 or 3 ideas to work on.




Golden ear canyon loop hiking

Sept. 3, 2017


It is the long day Sept. 2, 2017. I took 8 hours hiking with group of 10 people in Willingdon church small group. The trail link is here.

We started from the parking lot of trail from 10:00 am, and finished the end of trail around 6:00 pm. I could not believe that I handled the hiking very well even though I could not handle the steep upward trail under sun very well.

It is the beautiful day and let us present great picture to show that a coding blog can also be well presented with beautiful scenic view. Wish a good programmer can benefit from the outdoor activities and enjoy the friendship and some sports.

I went to bed around 10:00 pm and woke up 3:30 am in Sept. 3, 2017, and now it is 5:30 am, I am planning to book a mocking interview at 10:00 am, and then thought about how to relax my legs to relieve the stress caused by long hours walk.