Monday, February 6, 2017

Hash function, hash table lecture notes study

Feb. 6, 2017

3 lecture notes to study 

Spent more than 2 hours to study the lecture notes - Lecture 6 about Rabin-Karp algorithm from MIT, and also lecture 7, resize of hashtable. 

Will come back to write down some notes and also share something about the algorithm.


Hash functions

Consider a function h(k) that maps the universe U of keys (specific to the hash table, keys could be integers, strings, etc. depending on the hash table) to some index 0 to m. 
We call this function a hash function. 

A good hash function

. satisfies ( approximately) the assumption of simple uniform hashing: each key is equally likely to hash to any of the m slots. The hash function shouldn't bias towards particular slots

. does not hash similar keys to the same slot (e.g. compiler's symbol table shouldn't hash variables i and j to the same slot since they are used in conjunction a lot)

. is quick to calculate, should have O(1) run time

. is deterministic. h(k) should always return the same value for a given k

Example 1: Division method 

prime number vs should ok be a power of 2 

h(k) = k mod m 

if m = 2 p, then the h(k) only looks at the p lower bits of k, completely ignoring the rest of bits in k. A good choice for m with the division method is a prime number ( why are composite numbers bad?). 

Example 2: Multiplication method


h(k) = floor(m(k A mod 1))

Collisions

Chaining - 

load factor alpha

If there are n keys in a hash table with m slots, we can the load factor alpha for the hash table to be n/m. 
Under the assumption of simple uniform hashing, the length of each linked list in the hash table is alpha. 

Open addressing collisions 


Linear probing 

Linear probing resolves collisions by simply checking the next slot, i.e. if a collision occurred in slot j, the next slot to check would be slot j + 1. More formally, linear probing uses the hash function 

  h(k, i) = (h'(k) + i ) mod m. 

Quadratic probing resolves collisions in a similar fashion: 

h(k, i) = h'(k) + c1 i + c2 i2) mod m

for some constants c1, c2. Instead of linearly traversing through the hash table slots in the case of collisions, quadratic probing introduces more spacing between the slots we try in case of a collision, which reduces the clustering effect seen in linear probing. 

Double hashing resolves collisions by using another hashing function to determine which slot to try next. 



Lecture 6 notes 

Rabin-Karp algorithm

probe sequence  

Performance of Open Addressing

linear probing 
quadratic probing 
double hashing 

simple uniform hashing assumption (SUHA)
a hash function mapped to any slot from 0 to m -1 with equal probability 

uniform hashing assumption (UHA) 
a random permutation of the slots 0 to m-1 

load balance alpha, p = 1 - alpha probability that the first probe will find an empty slot under UHA. 

Universal hashing  

Rolling hash 

Hash table

Learn a few keywords:

probe sequence  

Performance of Open Addressing

linear probing 
quadratic probing 
double hashing 

simple uniform hashing assumption (SUHA)
a hash function mapped to any slot from 0 to m -1 with equal probability 

uniform hashing assumption (UHA) 
a random permutation of the slots 0 to m-1 

load balance alpha, p = 1 - alpha probability that the first probe will find an empty slot under UHA. 

Universal hashing  


Rabin-Karp algorithm

Feb. 6, 2017

Introduction
Julia usually does some sports workout after intensive study. This time she chose to study Rabin-Karp algorithm, play with Rolling Hashing algorithm.

She needs some break from the code review Leetcode 49. Julia also traces the top performer's review, here is the one review Rabin-Karp algorithm.

Study

Read Rabin-Karp algorithm wiki article, some keywords from the article:

hash collisions
linear congruential generator 

modular arithmetic

prime

Rabin fingerprint

rolling hash - moving average 

Rabin-Karp rolling hash - read twice, very good talk about time complexity analysis 

Read the article - write down some words: 


Actionable items:
review string algorithm - hidden message.

Rabin-karp algorithm implementation is here in C#.

Sunday, February 5, 2017

Strategy and tactical/ technical development - tennis sports coaching

Feb. 5, 2017

Introduction
Julia learns tennis sports and rebuilds her character a lot through last 5 years sports activitities. So far, she has played over 300+ hours tennis, and also she is very famous to play with every one, she does not choose to stay in elite group, she just takes herself out of comfortable zone, and then meets people and play her sport while enjoying outdoor activities. She learns Canada as a country through her tennis sports, she talks to people, she starts to think and analyze, compare to United States as well.

She now is a Canadian citizen starting from 2015 and tries very hard to integrate her activities to the country, and learn the society. She knows the value of her time and also appreciates that she learns from her most favorite friends over 80 years old, over 70 years old, over 60 years old, encourage them to play with her. She enjoys to play with new players, and enjoys the running and chasing the tennis ball. She keeps out-of-breath and back-to-normal back and forth, and she builds up the strength, believe that hard work beats talent. She is just a sports woman who knows that it is never too late to fall in love with sports, enjoys your own strong muscle and strength to make a living, it does not matter how hard for her to run for the ball, sometimes she just goes for it.

But tennis sports is also very highly-skilled sports, you learn more and then you are more popular on the court. That is something Julia likes most, her power to grow her skills on the court.

Strategy and tactical/ technial development, the top coach gives out a talk around 45 minutes.

Study

47 minutes lecture of tennis strategy and tactical/ technical development. Video is here.

Quality on-court coaching - tennis sports study

February 5, 2017

Introduction

Julia spent a lot of time on tennis sports training starting from 2012, but she always looks for great coaches and their videos. She prefers to take courses by herself. One course a time.

Share her most favorite on-court coaching, a few minutes, tennis player safarova. 

But Julia also likes to spend one hour lesson from tennis icoach, she could relax and enjoy the weekend. 

One time in Burnaby central park tennis courts, Julia played double game with an a gentleman, and then she thought that her partner ran slow in the match and wondered if she should push him a little bitter, but she hold the thought. But she was told that her double partner is over 82 years old. Julia just learned that life is such amazing thing, when you are patient, even people over 82 years old likes to work for you. Bravo!

Julia just learns to play sports, and play with all age groups.

So much fun to play, but Julia really likes to coach new player as well when she has chance. She have to take lessons first.

Video study lesson

1 hour lecture, Julia enjoyed so much. 

This is from the 2015 LTA National Coaches’ Conference covering the responsibilities of a coach, development phases and the importance of training loads when working with junior players. This is an on-court presentation with a focus on how to make the exercises relative to the goals, age and standard of the players, how to set long term and short term goals and the significance of having a daily plan with each player to reflect the needs of the player. The presentation includes practical examples of drills and how to communicate with different ages.

Saturday, February 4, 2017

Customer review - a blog writer learning experience

February 4, 2017

Introduction
Julia got a few comments in 2016, she never knew that she had to learn how to treat her customer nicely until Feb. 3, 2017. She got a comment about the very well-written blog, after 6 months, she read it again and amazed that she can learn something from her blog as well. The customer reminds her to stop and enjoy her own document, she comes back to learn the counting inversions algorithm again.

She writes blog and she welcome people to read and make comments. Since the blog has too many items, even herself has some difficulty to recall what she has written before. Every time she reviews statistics, she reads the blog posts people views, she has to rush to fix it to make it more readable, understandable. She is growing more ideas to make the blog full-fledged (she first time uses this word :-)).

Here are some blogs she got comments up to Feb. 4, 2017.

1. Feb. 3, 2017, Count inversions
2. January 13, 2017, Award budget cut.
3. Sept. 14, 2016, Bonetrousle - HackerRank world code sprint #6
4. August 6, 2016, Productivity Tips for the busy tech professional - pluralsight.com
5. April, 2016, HackerRank: Bear and Steady Gene algorithm (IV)

Workout

Share all blogs she got comment to Google+, therefore, people are more happy to read the blogs and get more involved as well.

Leetcode 49: group anagrams

Feb. 4, 2016

Introduction

New habit
Julia spent some time to read question on code review first thing in Saturday morning, and then she read about Leetcode 49: group anagram. After a few minutes, she did a few things in steps, first think about solution by herself, a little nervous, and then read the discussion. She quickly decided to practice the algorithm in Saturday morning, no hackerrank contest, and she could not get up at 8:00am to catch Leetcode 1.5 hour contest. 

Anagrams
Share some facts about anagrams. Julia did a lot of research on anagram recently, she answered the time complexity code review recently on algorithm Hackerrank sherlock anagrams, but no one gave her up-vote. She worked on the algorithm over a week, and spent over 10 hours to think, asked a review also. She tried twice but no one had responded to her, she knows that she need to open a new question and invite her friends JS1 to come to help. 

Leetcode vs Hackerrank
Also, Julia checked her previous Leetcode practice but she never did practice this algorithm before. She had difficulty continuously completed most of Leetcode algorithms, a few of her Chinese friends advised her to work on leetcode, after 12 months practice, she chose to work with Hackerrank starting from April 2016, her new favorite platform to practice, and also later to play Hackerrank contests, she had more fun and sense of achievements.

So, Julia did practice the algorithm using C#, and gave her answer for code review. Hopefully, this time she can get her answer to be chosen as the answer in her first time. Wishful thinking, this day may never come. Julia will open a new question based on her answer and then ask JS1's help to review the code.  

Code review sportsmanship
Most of important, she understood how code review works in 48 hours time frame. People will answer the question first, and then, a person like Julia will rush to help, because Janos is the moderator of code review, he just did make a lot of good review, Julia likes to make it complete and thorough. That is part of sportmanship Julia learned recently on code review. Haha, Julia is full of sportsmanship in her talk. She also learns from her favorite double tennis player ranking No.1 in Feb. 2017 - Bethany Mattek-Sands, she chose high-ranking player to partner with her, single player ranking Safarova is around 55.

Code review

Julia likes to conduct some study on this algorithm, study other people's solutions first, and then prepare to make the C# code best of her understanding, ask a code review on stackoverflow.com as well. 

She has weakness on work against test cases, and need to catch up more on C# as a language. So many things she likes to do in the weekend, but she needs to write some code, and get some research done on Leetcode 49 first. 

Code review link is here on stackexchange.com. She needs to walk away little bitter since the discussion is hot out there for a while (12:05pm February 5, 2017). 


Thursday, February 2, 2017

One blog a time

Feb. 2, 2017

Introduction
Julia came cross the quora article, and then she found a lot of blogs to read.

One blog a time

John L Miller, one blog a time.

28 posts are here.

Actionable Items:

After a few days of study with the author's post, Julia decides to write posts on quora as well. The platform on quora gave better user friendly things like upvote, and also stay with a lot of other people more closely.

Julia has worked on her English writing on blogger over 18 months, it should be ok to write posts on quora. Google blogger shows better in google search than quora.

Julia also needs to learn and discuss things about relationship. How to help the younger generation to go through the highly competitive world? she also needs to learn to build good relationship as an aunt, sister, and other roles in her life.


Wednesday, February 1, 2017

Udacity - Design of Computer Programs, Programming Principles

Feb. 1, 2017

Plan to study the course: 

Udacity: Design of Computer Programs, Programming Principles




Udacity - algorithm - social network analysis

Feb. 1, 2017

Plan to take the course, 15 minutes a time. Test how good I can to follow the lecture. 

Udacity

intro to algorithms

Social network analysis

Course overview is here. 

Lesson 7: Spy Control Setup - game of Nim 

Julia also worked on Hackerank - game of Nim recently. Here is the blog. 


Feb. 12, 2017

Duncan Watts - Microsoft principal researcher. 

Lili Cheng - The sociable researcher in Microsoft. 

Keynote: Building a Social-Search Engine From Scratch, one hour video. 

A small talk about being a good neighbor

Feb. 1, 2016

Introduction
It was a big shock when I was asked about SOLID principles but I could not name the principle in full details in 2015. From 2010 to 2015, I did not have a single research or study to look into the topic, and also I did not write a very good code to demo SOLID principles either.

I learn the importance to get prepared, most of important is to find time to do it. And also I need to find good courses to take. So, I shared today my study.

Study

Do some research. Pay attention to your neighbors. As bible said, Mar 12:31, love your neighbor as yourself. Julia studied some neighbors in the ranking board. She ranked top 6% month, and her neighbor is top 4% of the week. Only 3 days he scored over 300 reputation.



Julia just found out that someone on code review site made great performance in 3 days, score 300 reputation to answer 6 algorithm questions.

Julia knew that it is very difficult to gain reputation by answering the questions, so far she only gained 2 points in 2 months.

Hesham attia  -  3 days answer 6 algorithms questions - score over 300 reputation, top 4% of the week.

Look up on linkedin.com, a google engineer probably is here.



Additional Honors & Awards


1st place, Google+ API Hackathon, Egypt, 2012
11th place, Egyptian National Collegiate Programming Contest, Egypt, 2010
8th place, 13th ACM Arab and North Africa Regional Contest, Lebanon, 2010
Honorable mention, ACM World Finals, Sweden, 2009
1st place, 11th ACM Arab and North Africa Regional Contest, Egypt, 2008

-  look at those courses and see if there is something to learn

Stanford Online Course: Introduction to AI
Udacity: Algorithms, Crunching Social Networks
Udacity: Programming Languages, Building a Web Browser
Udacity: Design of Computer Programs, Programming Principles
edX: BerkeleyX, Artificial Intelligence

Peter Norvig - Python developer - something new ---
programing principles

1. Coursera - algorithm specification

2. Udacity

intro to algorithms

Social network analysis

Algorithm 1:
One of the algorithm is on codechef, Julia will work on the practice very soon. It is called Matched Bracket Challenge.
So, she started to look into what it takes to get the idea.

Algorithm 2:

Basic implementation of an array-based Queue

Selected solution as the answer, Julia likes the code review. Hopefully she learned the way to conduct the code review. 



Jianmin Chen got her profile setup on codechef.com.

Read a story written by an Amazon developer.

Actionable Items:
Study how to answer questions on codereview.com, learn from the player Hesham attia. Start from something small, less time, maybe an idea. Train myself to review things carefully, more often, get involved with community, write comment, give some short code review.  

Monday, January 30, 2017

Code Review - Leetcode 210 - Course Schedule II

January 30, 2017

Review Leetcode 210 - course schedule II.

Here is the practice on January 30, 2017.

Last practice is here.

Code review is here.

Actionable items:

Jianmin Chen got her profile setup on codechef.com.

Read a story written by an Amazon developer.

Code review - Hackerank Queen's Attack II

January 30, 2017

Queen's Attack II

Julia learned the hard way, she spent 3 hours in the contest and then worked out a solution. She wrote directions array and define 8 directions. But, she did not push her through to avoid any redundant code, spent time on intermediate results. Near 3 hours, she put together the C# code here in the contest.

She reviewed the statistics, people can finish the algorithm in less than 20 minutes.
The idea is to enumerate each direction by going through the array, and encapsulate all directions’ info inside the array, open for extension but close for change. All direction information update are limited to the two arrays only.

Avoid writing if statement for each direction.

Write again in less than 20 minutes, C# code.

Write again with two changes, C# code.
1. use implicit type local variable var
2. use HashSet<Tuple<int,int>> instead of HashSet<string>

Code review on stackexchange.com is here. 

Actionable Items:

Always spend extra 30 minutes to one hour, share the practice with the community on code review on stackexchange.com. Therefore, Julia has time to share her thoughts how she learns through her experience first, and then collect feedback. 

Most of important, Julia has to learn to work closely with the community, and be open in 2017. Do not be a  lone worker. It is your job to get involved with multiple communities. Find those communities first. Learn from WTA double ranking top 1 - Bethany.  Julia recently wrote a blog about Safrova's coach Rob Steckly, and watched her video about her coach's coaching style.

Bethany Mattek-Sands - be aggressive, and have fun - Safarova

Usually in tennis sports, double player is more open compared to the single player. Because the double players have to learn how to work with each other. Here is the dance she likes the two double champions most, they learn to work with each other, be aggressive and be happy, no matter the results. 

Julia also learns how good they are sharing how they work together. Here are 4 minutes talk.

Julia likes the marketing skills and styles, top 1 ranking WTA double player in January 2017, Bethany Mattek-Sands, she watched her practice in Beijing in Oct. 2016.



Sunday, January 29, 2017

User experience study

January 29, 2017

Introduction

Julia did some design when she starts to think for customers, in a lighting manufacturer industry, she also learns that people are from different background, do not take for granted that every one knows physics (wattage, voltage, resistance) very well. She keeps improving of her knowledge as a good user experience designer for a small commercial website day by day.

She came cross the facebook user experience manager linkedin profile through a study, and then she decides to have a first study how user experience works in the facebook. Just go over those people's linkedin profiles, and find some articles to read, and discussion topics.

The idea to conduct a study is from the review of her own blog and she found something interesting.

To make thing nice and clean, less is more, do not make it too busy, she learned from the work. Try to go over the website daily, and figure out CSS issues, talked about CSS and continuously study and write code using CSS and html, Julia also learned how to train herself thinking like a good designer.

One of her favorite websites is tennis No. 1, just retired player Ana, Julia studied the website again and again. That is her favorite one.

Study
Will come back to write down what she learns.

Pluralsight.com - SOLID Principles of Object Oriented Design

January 29, 2017

Go over the lecture video - Pluralsight.com - SOLID Principles of Object Oriented Design. Try to put together demo code used in the lecture notes, and post it here.

Actionable Items:

Hack Google interview from MIT, read some course info.

Hackerrank world codesprint 9 - comparison study

January 29, 2017

Introduction

It is a long break Julia took in weekends, and she chose to do some study and practice on Hackerrank. Compared to her first 4 years experience from 2011 to 2015 to attend church small group activities in each weekend, she tried to build up a good habit to do some independent study on Hackerrank, programming competition.

She learned a tremendous team work through the church small group activities, through meeting preparation, lectures, small discussion, group activities. She learned the importance to help new comers to have a good study of bible each time.

Related to hackerrank contests, Julia also learned through the study, and track how other players work with hackerank. People with a lot of competition experience all come to take part in the world codesprint and make the event so helpful. So, she studied players, and then found out where she should go in order to improve her strength in coding and some other research.

She chose to do some study after hackerrank world codesprint 9. Because it was so different, the contest started from Friday instead of Saturday, Julia had to go out to play some tennis sports in Saturday day time, she only ended up with around 6 hours to play the contest. She missed the bronze medal and then she spent time to do study of players.

She decided to take some time to study the player one at a time. The facebook is really a great company and Julia also had chances to attend a few of tech events in Vancouver before. So, she likes to take some time to read the article about news feed through a post on linkedin profile.


Study

Study a hackerrank player - a facebook engineer, first study the performance of contest. At least, Julia still covered some basics in her performance compared to a top engineer and a past top researcher. She understands the basics very well. Julia should spend some time to do some research in last advanced algorithm, the player - Gregory Hornby made 10 points out of maximum score 100.

Spend a few minutes to read a graph, picture tells the number:



Julia enjoyed the reading of linkedin profile. She noticed that a few things are in good writing in the profile.

Study industry, study the scholar website, link is here.

Plan to read about the article - who controls your facebook news feed?

very well-written article - it takes more than 20 minutes to read.
The research of news feed by facebook - It has responded by developing a sort of checks-and-balances system in which every news feed tweak must undergo a battery of tests among different types of audiences, and be judged on a variety of different metrics.

Actionable Items

1. Spend 30 minutes to setup scholar web content for myself - Jianmin Chen, Florida Atlantic University.

No matter how small progress she makes, it all starts from somewhere, humble beginning. All it takes is the time, effort, care, and some determination and a little of love. Research is a fun experience.

Jianmin Chen's scholar.com web page. First time Julia spent less than 10 minutes to setup. The link is here.

2. More facebook articles to read.
Facebook's unethical Experiement

3. A video "Beware online 'filter bubbles"

4. Facebook UX research - Ph.D., the manager.




A comparison study - how to get more advance skills through practice?

January 29, 2017

Once a while, Julia will push herself calm down to go through lecture notes through pluralsight.com. And this Sunday she has to sit down and listen the lecture notes about encapusulation and SOLID on pluralsight.com. It will take 3 - 5 hours for the lecture. Sometimes, she does some workout using her medicine balls and do some stretches and enjoy some cooking time as well. 

Meanwhile, she is also doing some study about a senior google employee - how others take time to practice, on hackerearth and then Julia knows that it takes time and some determination to further improve her practice. 

A small and quick study after hackerrank world codesprint 9  contest. 

Practice on Hackerearth

Comparison to Shanghai Google senior developer - cuiaoxiang

Hackerearth profile is here.

Hackerrank profile is here.

75 problems solved on Hackerearth.

Number tells everything. Julia only practiced 2 algorithms on hackerearth.com. It takes time to practice 75 algorithms. Comparison on world codesprint 9 is here.

Hackerearth activities study is here.

Hackerank world codesprint 9 - comparison study

January 29, 2017

Introduction
In order to improve performance at contest, Julia likes to do some research on performance study. It is well-known to work on one algorithm a time. Make a small change a time, even starting from a habit, to play Hackerrank world codesprint every time, even Julia did not get a bronze medal this time, she learned a few things from other google employees as hackerrank players as well.

She did compare herself to a few of google employees, and how she should start to build some small habit, make some change in her lifestyle, or as a hackerrank player, learn something valuable one a time.

Study

Study 1: 
Julia did some research to compare one google employee, who scored just 0.65 above her, ranking is 1000 in advance, a bronze medal. Here is the comparison:


Some thoughts about practice:

Julia, you have to work on some research and study on those medium above algorithms, try to work on any one of them, even it is the advanced level. Try to make some sense of algorithm, and be able to score a few points. 

Bring yourself out of the comfortable zone, and work on the unfamiliar area - think, read, study, and look for any clue to help yourself. Play like a competition. 

0.65 point makes big difference. A bronze medal is a great encouragement in competitive world. 

Study 2: 

Compared to another google employee with bronze medal, same score: 60. Julia, work on the contest as early as possible. It makes some sense in ranking. 

Study 3: 

Compare to a silver medal player - a google employee. The score comparison is 89.30 to 60:


Julia, check the submission success rate, and then determine which one to work on first. 

Study 4:

Comparison to Shanghai Google senior developer - cuiaoxiang

Hackerearth profile is here.

Hackerrank profile is here.

75 problems solved on Hackerearth.

Number tells everything. Julia only practiced 2 algorithms on hackerearth.com. It takes time to practice 75 algorithms. Comparison on world codesprint 9 is here.

Hackerearth activities study is here.

Study 5:
Top player, facebook hackercup finalist in 2016.

Player profile on Linkedin -  link is here.

Study 6:

Linkedin In profile is here.

Hackerrank profile is here.

Work on 3 algorithms, and each of them score around 10 - a small work makes big difference - experience helps.

Julia compared her performance to the player who worked for Microsoft, Google and now for facebook, comparison is here.

Encouraging thoughts:

Julia stopped her worries after the practice, specially after more than one hour comparison study. She also learned that other best engineers are also working on the same problem set, and also tried to get some points through each of medium above algorithms as well. It is not easy for all of us.

Compared to other players in top companies, Julia did not have enough competition practices, nor does she has a solid practice,  through hackerearth.com log, through past GPA, past research experience.




Hackerrank world codesprint 9

January 29, 2017

Contest Summary 


Julia worked on first 4 algorithms.

Started around 4:30pm on second day of contest, Julia managed to complete the first 3 algorithm, scored 60, rank 2076 out of 6866, at 1am, January 29, 2017. Julia tried to work on 5 algorithms in 2 hours from 11:00pm to 1am, try to score 10 out of possible score - an array of {50, 60, 70, 90, 100}, one medium, one hard, one advanced, 2 expert algorithms, and tried to make any point to push the ranking forward, but she did not have enough time to study, do some research on those algorithms.

Journal of Contest


Grading Students
Time: 5:25pm - 5:33pm

Weighted Uniform Strings
Time: 5:39pm - 6:48pm
C# code is here.

Queen's Attack II
Time: 7:24pm - 10:35pm
She spent over 2 hours to work on Queen's Attack II, and also she learned a few lessons through the practice. A very good workout! She tried a few times, scored 20, 24, and then scored maximum score 30.

First submission, failed a few test cases, score 20.4 (maximum 30), C# code is here.
Second submission, failed a few test cases, score 24.51, C# code is here.
Third submission, passed all test cases, score 30, C# code is here.

Use online text comparison tool, compare the difference between two versions.
Code comparison is here, left side is third version, right side with bugs.
The idea used in the third version is to avoid redundant checking directions, therefore only one copy for each check, less time to do testing to remove bugs.

Kingdom Division
Time: 11:00pm - 1:00am
She spent more than 2 hours to play with the algorithm starting from 11:00 pm in January 28, 2017. She did have some simple idea to work on. For example, find all cities with only one connected city, and then form a group with those two cities.

Actionable Items


Need to think about how to improve the performance on the first medium algorithm - queen'a attack II, work on writing readable code, follow DRY principle, therefore, time can be cut in less than one hour for the algorithm. Close to 3 hours, including a 20 minutes dinner.

Study some players and get confidence back to work on medium above algorithms. 


Follow up after contest


January 30, 2017

Queen's Attack II

Julia learned the hard way, she did write directions array and define 8 directions. But, she did not push her through to avoid any redundant code, spent time on intermediate results. Near 3 hours, she put together the C# code here in the contest.

She reviewed the statistics, people can finish the algorithm in less than 20 minutes.

The idea is to enumerate each direction by going through the array, and encapsulate all directions’ info inside the array, open for extension but close for change. All direction information update are limited to the two arrays only.

Avoid writing if statement for each direction.

Write again in less than 20 minutes, C# code.

Write again with two changes, C# code.
1. use implicit type local variable var
2. use HashSet<Tuple<int,int>> instead of HashSet<string>


Thursday, January 26, 2017

Code review by user: Simon Forsberg

January 26, 2017



Simon Forsberg

1. Study 23 program challenges, link is here.

2. Study 53 algorithms, link is here.

3. Study 23 interview questions, link is here.

Code Review: by user Bazhang

January 26, 2017


Work on 20 algorithms review by Bazhange, here is the link.


Wednesday, January 25, 2017

A small study of code review on stackexchange.com

January 25, 2017

Introduction
Julia likes to review what she did on code review - stackexchange.com up to January 25, 2017.

Show her profile with some statistics.

Julia likes to memorize her profile with 7%. (Julia counted the top ranking: 42 of the month) Just display the image here to document her journey, inspire others to involve with tech community as well.

14 algorithms 

Julia asked 14 questions, and she likes to write something for each algorithm to entertain herself - Good work, hard work, and continue!

Write down 3 mistakes, 3 good stories to share, and 3 things to work on improvements.

Will be back to write here... stay tuned!


Case studies

Julia had top 7% performance this month. So, she did some research top users, and then, she found two users - she likes to find out something interesting. Let us take a look at picture first.


fer-rum 4 answers are here. 

Read moderator - Simon Forsberg's twitters.

You are being watched! - Comments of Interest


Simon Forsberg

1. Study 23 program challenges, link is here.

2. Study 53 algorithms, link is here.

3. Study 23 interview questions, link is here.

A guide to Code Review for Stack Overflow users



Udacity free course - technical interview by pramp

January 25, 2017

Introduction
Julia went to a meetup in the city of Vancouver in Dec. 3 2016, she met a UBC undergraduate student. And also she was told that the interview course on Udacity is very good. So, Julia likes to take the course and learn something at the beginning of 2017.

Course Study

Technical interviewing:
1. Interview introduction
2. Clarifying the Question
3. Confirming inputs
4. Test cases
5. Brainstorming 
6. Runtime Analysis
7. Coding 
8. Debugging
9. Interview Wrap-up 
10. Time for Live practice
11. Next Steps

7 Steps: 
- Clarifying the Question
- Generating Inputs & Outputs
- Generating Test Cases
- Brainstorming 
- Runtime Analysis
- Coding
- Debugging 

1. Interviewer is there to help you. He/ she is on your side.  Being able to take feedback showing your team work skills. 

Positive mindset, do not give up!




Monday, January 23, 2017

Code review - A coffee maker

January 23, 2017

Julia likes to choose something to study, she plans to spend 30 minutes on the coffee maker code example - pluralsight.com course encapsulation and SOLID.

And also she likes to review the questions on stackexchange.com:

Designing a coffee machine



Study C# questions answer by Ebrown, link is here.

  1.    C# Rental Program
Actionable Items:

1. Plan to take free course on Udacity.com - technical interview by pramp.com

2. Study the example using decorator on wiki, and then post C# code here. Learn one pattern a time. (Feb. 8, 2017)