Tuesday, November 8, 2016

Resume screen - study of resume

Nov. 8, 2016

Resume screening
https://www.youtube.com/watch?v=ChWXDnzIB00

PBCES

P  - passion
B  - Brands - high GPA
C - creativity
E -
S - Screening - selective universities etc.

Work on resume screen tips through Google search:

1. Read article:
https://www.facebook.com/notes/facebook-engineering/get-that-job-at-facebook/10150964382448920/

2.
http://steve-yegge.blogspot.ca/2008/03/get-that-job-at-google.html

1. Study a data-structures and algorithms book

Julia's favorite advice:
to practice the art of recognizing that certain problem classes are best solved with certain algorithms and data structures

Mental Prep

Go in humble, open-minded, and focused. 

Don't try to change the subject and answer a different question. 
Don't try to divert the interviewer from asking you a question by telling war stories. 
Don't try to bluff your interviewer. 

You should focus on each problem they're giving you and make your best effort to answer it fully.

Even if you think you know the answer to the problem, ask some questions and talk about the approach you'll take a little before diving in.

Do not come across as arrogant, people will question whether they want to work with you.

The best way to appear arrogant is to question the validity of the interviewer's question – it really ticks them off, as I pointed out earlier on.

Treat every question as legitimate, even if you are frustrated that you don't know the answer.

Feel free to ask for help or hints if you're stuck.

Do not take too long before actually solving the problem, or some interviewers will give you a delay-of-game penalty.

Try to move and write quickly, since often the interviewers want to get through more than one question during the interview.

They will mark you down because they could not get a full picture of your skills.

The benefit of the doubt is rarely given in interviewing.

Operating System:
Doug Lea's Concurrent Programming in Java
(lots of other books on concurrency. I'd avoid the academic ones and focus on the practical stuff, since it's most likely to get asked in interviews.)




HackerRank - matrix rotation (Series 4 of 5)

Nov. 8, 2016

Plan to work on unfinished HackerRank algorithm related to array, try to score full score this time to celebrate new year 2017.

http://juliachencoding.blogspot.ca/2016/04/hackerrank-matrix-rotation-ii.html

Rotate array - HackerRank

problem statement:
https://www.hackerrank.com/challenges/matrix-rotation-algo

Write C# solution:

Review April, 2016 practice: 

another practice: (more than 1 hour, still having bugs, score 8.89/ wrong answer)
https://gist.github.com/jianminchen/57572227dafe939060f7cc81b193cd9b

Will come back very soon with the solution, hopefully score a hard algorithm perfectly. 

Dec. 6, 2016
Fix the bug on line 114, declare a new variable on line 114 actualSteps
C# solution - pass all test cases:
https://gist.github.com/jianminchen/6fabef7436097552e35633a549b0268a

There are over 100 C# solutions, Julia, let us have some fun; code review as many solutions as possible. 
Post C# solution here:

Monday, November 7, 2016

HackerRank NCR codesprint review

Nov. 7, 2016

Codesprint:
https://www.hackerrank.com/contests/ncr-codesprint/challenges


Julia was so motivated to spend 2 days in the weekend to work on the codesprint, she only did one shopping trip to Burnaby crystal mall, less than 2 hours. Rest of weekend, she worked on the problem solving.

Julia reviewed the article about HackerRank contest and how to play better:

https://goo.gl/IHeEoi

Her favorite note in the above blog, item 4:

Even if you are not world class competitive programmer, you still have a chance to get into top 50 or even higher. The minimum goal is to get into top100, which is like usually about top 2–3% of all competitors. Being in top100 is great and sounds really good. 

The major factor to achieve the goal is a combination of problem solving skills, online research, dedication and persistence. First read all the problems and start solving them one by one from the easiest one. First solve the ones you can tackle without any research or long thinking, just to mark them as done and get motivation to tackle harder ones.

Julia did some research on this NCR contest, in top 100, even around 100, some of them are ICPC contest winner, score range is around 200 out of 430. 

Julia's score is 62.76, 480 out of 2621. 

Facts:
1. Julia likes to work on those hard algorithms, last 3 of 8 algorithms. She thought that she could make 10 from each of them. But it was too late when she read the problem statement. She only had 3 hour left to 12:00am in the middle night of Sunday. 

Lessons learned: 

Do not work on ideas taking a lot of time to code; even prototype is questionable. Treat it as a contest, play to win, not play to learn

48 hours contest, a lot of algorithms - 8 of them, total time to work on is 16 hours, 8 hours a day. So, give each algorithm 2 hours a time. 

Spent 6-8 hours to score 6 out of 20 on spiral message. Simple mistake of understanding problem statement, and base test case: one line, one row failure. 

Should be more confident on hard algorithm - game of numbers. Less than 1 hour to score 15 of 50, but gave up bug fix. So close to perfect solution. 
So, if Julia has more experience to play HackerRank contest, she should try to make it at least 100 of 430. And also, she can spend less hours to work on the contest, and spend 1 - 2 hours a day on sport activities in the day time. 

Do not think about past contest - Warlmart codesprint, 24 hour contest, Julia spent time to bet on a hard problem (score: 100) until 4:00am, and scored 0 of 100. 





HackerRank NCR codesprint - super-valid bracket sequences (II - first submission)

Nov. 7, 2016

Problem statement:

https://www.hackerrank.com/contests/ncr-codesprint/challenges/super-valid-bracket-sequences

First submission: pass sample test case, score 0 of 40.

https://gist.github.com/jianminchen/c4cfa2a7a4ffeecaaeff725af17baaad


Julia spent time to understand the problem, and then, she did work on sample test case; and next, she likes to work on timeout, space complexity.

It is a dynamic programming solution.

HackerRank NCR codespring - super-valid bracket sequences (I - prototype)

Nov. 7, 2016

Problem statement:

https://www.hackerrank.com/contests/ncr-codesprint/challenges/super-valid-bracket-sequences

Julia spent over 2 hours to do some research, work on a simple problem using code, figure out the size T(n), and also came out the formula of recurrence.

Here is her code for prototype work:

https://gist.github.com/jianminchen/d27a0c1b5d7b366903b4c25408d25269

HackerRank NCR codesprint - Game of Numbers

Nov. 7, 2016

Problem statement:

https://www.hackerrank.com/contests/ncr-codesprint/challenges/game-of-numbers


Her first submission:  score 15 of 50
https://gist.github.com/jianminchen/ef96b59d7279f1b80473519434ab959f

In the 48 hour contest, second day evening around 9:00pm, she could not believe that she could make 15 of 50 so easy so quick.

Celebrated her work by showing her workout sheet.


Editorial Notes:

Julia did not know how she is so close to perfect solution; she only need to minimize the module size to 11 for her test case, start left = 1, end right = 11, instead of 21 she figured out in her workout sheet.

She did not notice that her work needs to be examined carefully. Hard problem can be completed in 10 - 30 minutes, Julia spent over 4 years to study applied mathematics in SJTU, she just did not practice a lot at all in last 6 years. She is very comfortable with discrete mathematics.



HackerRank NCR codesprint - Mega Tic-Tac-Toe

Nov. 7, 2016

Problem statement:
https://www.hackerrank.com/contests/ncr-codesprint/challenges/mega-tic-tac-toe

Submission using Dynamic Programming solution, score 30 out of 30.


https://gist.github.com/jianminchen/0055d61e696ef762310f1176734b2d60

HackerRank NCR codesprint - Spiral message - After the contest

Nov. 7, 2016

Problem statement


Previous blog about 15 submissions in the 48 hours contest.


After the contest, Julia downloaded all test cases, input/ output, she played with test cases, after more than 30 minutes, she finally figured out her major issue on the problem solving.

From the first 3 lines of problem statement:
The message originated as a single line of one or more space-separated words, but it was encoded into an  matrix as a clockwise spiral starting in the lower left-hand corner

Julia did not pay attention to the start point, lower left-hand corner. All her works are from up left-hand corner instead by a mistake

So, there are 4 corners:
up left-hand           up right-hand
lower left-hand      lower right-hand

Work on the sample test case: 
3 5
a##ar
a#aa#
xxwsr
The output of spiral message:
xaa##ar#rswx#aa

She did work on the coding in the contest, her output starting from 'a', not 'x'. In other words, sample test case's spiral message - her understanding and output: 
a##ar#rswxxa#aa


So, in the contest, Julia has to train herself to read problem statement more carefully. 

Ideas:
1. Write down all inputs
2. Make a check list
3. Make her own notes, do some research about the algorithm
For example:
1. a spiral message
2. clockwise
3. starting from lower left-hand corner
4. Not from general case - upper left-hand corner
5. ...


She started to work on the algorithm from 11:00am, Saturday, and then, in the evening, from 11:00pm - 1:00am, she came back to work on the algorithm, she read the problem statement again and again, but she did not notice the starting point - lower left-hand corner. 

Actionable Items:

Do not spend more than 1 hour to write code in the contest; go back to read the problem statement again and again; draw your own diagram - anti-clockwise. 

It is easy algorithm. Julia stumbled on easy algorithm so badly. 

C# code after contest - bug-free, clock-wise starting from lower left-hand corner


Year End review:
Review previous work on array manipulation:

1. Previous work on rotate of array

2. array rotation

3. array rotation (II)

4. array rotation (III)

HackerRank - Spiral Message - NCR codesprint

Nov. 7, 2016

Problem statement

Julia spent over 4 hours to work on the solution, she made 15 submissions in the contest.

No. 1: first submission - score 4.49 of 20 (pass 4 of 14 test cases)


submission #2: (Score is 0.82 (full score is 20), pass 2 cases of 14 test cases.)


Julia's analysis after contest about the submission:
Submission #2 issues:

1. Repetition: Code is no good in structure, repetition code.
2. Structure issue: Counting mixes with string construction. Counting code duplicates 4 time. line 96 - 100
3. Base case: base case is not handled properly, one row, one column; one row will be counted twice.
4. Missing info: String split using # is avoided, just use count directly. But the spiral message is not correct.
5. Extra variablesrow, col two variable can be avoided, using startX, startY, endX, endY to calculate.

No. 3 submission

code review after the contest:
  1. The while loop - 115 - 119, but line 118, 119 redundant, part of first two lines.
  2. Base case - one row, one column do not work - count twice
  3. Add debug code - stringBuilder to tracker the string output - it is helpful, but unfortunately in the contest, Julia did not catch the error - starting point.
  4. Missing start time/ end time for submission above function comment, need to track time spent.

line 49 - 59 test function: 

if the testing() function, the program does something like string.CompareTo("xaa##ar#rswx#aa") == 0 (line 209 - 210). and then, Julia would have found the start point should be lower left-hand instead of up left-hand in the contest.


No. 15. Julia's submission - score 6.7 of 20



Editorial Notes:

Think about the problem writing. Good problem writing gives out the important information, directly/ indirectly, more than once, twice.

There are 3 times to catch up spiral message starting point bug.
1. First, by following the diagrams closely.
2. Read the word by word
3. Sample test case spiral message result.

Base test case failed - bug, need to think about Math induction proof, starting from base case, and then, assuming N is correct, prove N+1 case based on N and base cases. Detail see book:
Page 15 - mathematical induction vs  programming technique of recursion

Design talk:
Spiral message - a matrix

start point matters,
choices: start from 4 corners.






Leetcode solution - a book

Nov. 7, 2016

Great solution book to study on Leetcode algorithms.

Read the pdf document:

The gitbook, the link is here.


https://jeantimex.gitbooks.io/solve-leetcode-problems/content/

https://discuss.leetcode.com/user/jeantimex

https://www.linkedin.com/in/suyong

https://discuss.leetcode.com/user/jeantimex

Follow up 


January 17, 2018

It is the first time I plan to spend time to study the solution one by one. The blog is the third popular post on my blog. I wonder a few times, and today I did look into a few solutions, such as Leetcode 10: regular expression matching, binary index tree, and I do find that the leetcode solutions are excellent, I should spend time to read those solutions in 2018.



Saturday, November 5, 2016

Fix things Twice with the 5 ways

Nov. 5, 2016

Fixing Things Twice with the 5 Whys
https://www.youtube.com/watch?v=GLenAuGqIA4

Ask 5 why: - Amazon culture - Ask 5 ways - Everyone can apply

Symptoms -> root problem -> underneath problem

why?
why?
why?
why?
why?

Action items:

More reading, do small research, 5 whys vs 1 why?

1. https://www.isixsigma.com/tools-templates/cause-effect/determine-root-cause-5-whys/

Tips (www.hqontario.ca/portals/0/documents/qi/rf-5-whys-tool-en.docx):
1. You don't want to list 5 different reasons; you want to go deep on 1 reason.
Caution:
If your last answer is something you can't control, go back up to the previous answer on 1 reason

Blog to read:
How to win the contest on HackerRank?
https://goo.gl/xxASFC

Notes from the above blog:
The best contest will be the a long one, so at least lasting 24 hours, because in this case there is a factor of effort and dedication one
can put into the contest. The second most important thing is to find a contest with very hard problems or ideally an approximate ones.

Goal: Get in top 50 or top 100 -

a combination of problem solving skills,
online research
dedication
persistence

pure mathematics structure and google it.

Read the blog and try to make some sense on one of them, get the idea how to improve:
http://chasethered.com/

Friday, November 4, 2016

Why Hire the Smartest Programmers - a small research

Nov. 4, 2016

Why Hire the Smartest Programmers

https://www.youtube.com/watch?v=hCg-2fOfTGI

Who they will work with? Work with smart people.

Case study:
Yale professor - assignment for each week,
student complained that it took 40 hours/ week to complete the assignment.

Students kept hours on the assignment.
4 hours vs 40 hours
Grade is objective, done by computer program, no human interaction.

No correlation between grades and hours spent on assignment.

Actionable Items:

Smart programmer makes 10 times difference. Look into this argument, different views.

Remote Code Tests

Nov. 4, 2016

Remote Code Tests

https://www.youtube.com/watch?v=n5lCnWuGkZ0

A good developer - free run, simple mistakes

Scheduling and Estimates

Nov. 4, 2016

Scheduling and Estimates (7 minutes video)
https://www.youtube.com/watch?v=-ahhbWHM6AU

Take some notes, and continue to do some research. 

Book: Becoming a Better Programmer

Nov. 4, 2016

Going Beyond Code to Become a Better Programmer - Interview with Pete Goodliffe
https://www.youtube.com/watch?v=vGmCc7AhKVo

Slideshow: 130+ pages
https://goo.gl/2tmjII

The only way to go fast is to go well.
Bob martin, speed kills, 97 things Every programmer should know

Learn to communicate effectively in speech and writing. Bjarne Stroustrup

More reading:

1. Book:  Code Craft: The Practice of Writing Excellent Code

https://www.amazon.ca/Code-Craft-Practice-Writing-Excellent/dp/1593271190

2. Beautiful Architecture - Leading Thinkers Reveal the Hidden Beauty in Software Design
http://shop.oreilly.com/product/9780596517984.do

A guide to Developer Mentoring

Nov. 14, 2016

A guide to Developer Mentoring - Interview with Rachel Ober
https://www.youtube.com/watch?v=FVUKPt7MJ3M


Read articles:

http://www.alleywatch.com/2014/01/how-to-nail-your-interview-and-land-a-lucrative-job-in-tech/


Product management - talks

Nov. 14, 2016

Plan to spend hours to go over the talks by a product manager. Learn something.

How to Onboard Software Engineeers - Interview with Kate Heddleston
https://www.youtube.com/watch?v=Bt40BOXfejk

Technical Onboarding, Training and Mentoring
https://kateheddleston.com/talk/ef464595-b113-4c1b-9c5b-cc1f3681055c


https://kateheddleston.com/talks

Read the blog:
https://kateheddleston.com/blog

Julia's favorite saying from Kate heddleston:

Skills follows confidence. Not confidence follows skills.

The reasoning is that you are confident and then you do more research on things to work on.

Light talk: 3 rules of management
1. Care about people you manage
2. Say things 3 times - New thing, 3rd time, finally he/she gets it.
3. Service position - engineer/ make a product
Suggestions: Avoid using "Don't ", tell them what to go

https://kateheddleston.com/talk/a9122d63-2ee2-403c-af21-7e08bf5b0678

Interview developers - Mistakes and how to fix them

Nov. 14, 2016

 Kerri Miller

We’re Bad at Interviewing Developers (and How to Fix It) - Interview with Kerri Miller

https://www.youtube.com/watch?v=IbIXhwVwuSc

Software lead

Nov. 4, 2016

Becoming the Leader Your Engineers Need - Interview with Oren Ellenbogen
https://www.youtube.com/watch?v=BBdOIEs_mY8

Software lead weekly:
http://softwareleadweekly.com/issues/206

Engineering Excellence talk

Nov. 14, 2016

From Talmudic Maxims to Engineering Excellence - Interview with Yitzchok Willroth

https://www.youtube.com/watch?v=I6nouViM4a4

Recommended books and practices:

1. Code complete
2. Implementation Patterns
3. Patterns of enterprise application architecture

5. Practical Object-oriented Design in Ruby

http://www.sandimetz.com/

Practices:
1. Coaching agile teams - Lyssa Adkins
2. Driving Technical Change - Terrence Ryan


Thursday, November 3, 2016

Make better software - a study of software company

Nov. 3, 2016

 Plan to spend 2+ hours to go over the videos by FogCreekSoftware through youtube:

1. Make better software: Recruiting
https://www.youtube.com/watch?v=gVte99aCL_4

Best talent only applies 7 jobs in life time at most!

2. What do programmers care about - Joel Spolsky, Stack overflow
https://www.youtube.com/watch?v=yLyALWAp8IM

What programmers are looking for?

Steak dinner did not work, starting from 90s, Microsoft gave interviewee this kind of steak dinner. After 10 years, it did not work, and then stop.

Do you have a question for me? (in the interview)
Can you see a schedule for your product?

One step away from development to publish, 5 steps should be programmed to one step, assume that you are a developer, a good developer.

"the joel test" - Google - 15 of tests

3. Make better software: Design
https://www.youtube.com/watch?v=iQrmz85N7gI

4. Make Better software: Team Members
https://www.youtube.com/watch?v=tF9F6R83aEc

5. A Conversation with Joel Spolsky
https://www.youtube.com/watch?v=NF8ZVB-v3IM


Editorial Notes:

Why Julia chose the company "Fog Creek Software" to study on Nov. 3, 2016?
Because she watched Edmond Lau's interview through FogCreekSoftware, see blog:

http://juliachencoding.blogspot.ca/2016/11/how-to-identify-efforts-that-make-big.html

Actionable Item:
1. Next series of videos to watch:
Think like a programmer
https://www.youtube.com/watch?v=YgzpqlF54lo&list=PLKQ5LYb497AZIZe9dBWy8GwLluVaMQVj0

2. System design: Youtube

http://blog.gainlo.co/index.php/2016/10/22/design-youtube-part/
CDN - content delivery network
 a globally distributed network of proxy servers


http://blog.gainlo.co/index.php/2016/11/04/design-youtube-part-ii/?utm_source=email&utm_campaign=email&utm_medium=email


Industry research - digital marketing

Nov. 3, 2016

  Spend more than 2 hours to do research on digital marketing - Cendyn One. Julia is working on web development and business analysis for a small of manufacture company in the city of Vancouver, and a lot of time she has to learn how to work with marketing and sales team. So, once a while, she starts to do her own research on marketing and sales as well.

  This is the first blog she writes about her research on digital marketing.

  Plan to put something together about the study.

  http://www.cendynone.com/

  Her favorite blogs to read:
1.  http://www.cendynone.com/blog/march-2016/what-does-removal-of-right-side-text-ads-on-google/

Article reading:
http://business.fau.edu/news-events/news-details/index.aspx?nid=460#.WBwbKPorKUk





How to identify efforts that make a big impact when building software products

Nov. 3, 2016

Spend time to watch the video:
How to Identify Efforts that Make a Big Impact When Building Software Products

https://www.youtube.com/watch?v=NZA6TkCP3yo

Topics in the talk:

1. Writing about engineering topic
2. Sit down and write 1000 words a day
3. Strategies in the book:

    Big impacts and values added  

    How it works -> Why it should work -> Ask questions about 70/80 hours/ week best strategies?

    Ask a few of questions:
    1. Decrease time to complete the task
    2. Can I come out agenda before the meeting -> avoid the meeting entirely
    3. Build a culture of the team -
    for example, address the performance as a feature, at the very beginning
    Process and tools
 
    Do something more than twice, think about automating it.

    Question: Push forward and iterate through vs doing too many things for a project
    Answer:
 
    2 high leverages: onboarding and new hire training
    2000 hours/ year for a full time, 40hrs/ week
    20 hours - one hour a day for a month - 1%
    How culture works?
    Justify the observation of first day, first a few days
    Small document, add on it - more tutorial, more documents, overtime, it builds up.

    Core structures - 10 on-boarding talks
    Best practice, quality standards

     Option #2: work on adjacent skills
     For example, front-end engineer, learn some project management skills

More videos:
1.     https://www.youtube.com/watch?v=BQVg-vxiKw8

2. "Make Better Software: The Training Series" Trailer
https://www.youtube.com/watch?v=Pj4PaXoURWc

Tuesday, November 1, 2016

Algorithm analysis - starts from a lecture note

Nov. 1, 2016

Warmup talk:
Julia took the advice and then started to read the book: Algorithm Design. She likes the structure of the book, and most interest topic - chapter 2 - Growth rates of common functions measured in nanoseconds. So, she googled and then found out her next strong interest: 
Talk about algorithm analysis 


Extended study "Growth rates of common functions measured in nanoseconds" through Google search:

Google search:
keyword:
Growth rates of common functions measured in nanoseconds

Growth rate - which one has best presentation?
This is the best one! (Spent 10 minutes to read, and then, memorize something on the presentation)

https://www.cs.princeton.edu/courses/archive/spr10/cos226/lectures/02-14Analysis-2x2.pdf

Write down favorite slides:

1. cost of basic operations
2. common order-of-growth hypotheses (page 35)

Sunday, October 30, 2016

Book reading: Programming Challenges - The programming Contest Training Manual

Oct. 30, 2016

Plan to read the book - Programming Challenges - The programming Contest Training Manual
By Steven S. Skiena
      Miguel A. Revilla

http://www.programming-challenges.com/pg.php?page=index

Read first 2 hours, write down some notes to encourage good behavior - Algorithm book reading is a great way to relax, help to write great code and speed up everything - coding/ design/ maintenance.

http://www3.cs.stonybrook.edu/~skiena/

Book Reading: The Algorithm Design Manual

Oct. 30, 2016

1. Warm up the talk: 
It is a mix of feelings when Julia spent last Saturday to work on HackerRank walmartLabs codesprint. She bet on the hard algorithm and tried to try her luck, she ended up over 10+ hours scoring 0 on the algorithm. She experienced bad behavior to write a bad function when she was tired; and then, she disciplined herself to write a good function. She tried to reduce second loop to n/2000 (line 139), n/100 to guess the timeout (3 seconds) range - O(n) or O(nlogn). Tried to exhaust all the tricks to work better with unknown test cases on HackerRank.com.

She felt some disappointment after the contest, because of bad performance, her gambling behavior - bet on the hard algorithm. She turned the experience to very positive one - did some research what to work on next.

The algorithm design manual

http://www.algorist.com/

Please write down the time spent on the book.

2. Side track to the good/ bad function illustration:

A bad function:
https://www.hackerrank.com/contests/walmart-codesprint-algo/challenges/fibonacci-sum-1/submissions/code/7561665

Here is the gist.

189 -233 failed 3 sample test cases
at least 3 things are not good:
code smells? different abstraction level mixes in one function.

A good function:
17th submission:  pass sample test cases - 3 test cases
https://gist.github.com/jianminchen/4245cb1d9c4a7c625ffe1d96f7e88bb5

function line 190 -217 fiboSmart2


3. Back to book reading: 

Study Notes: 
http://www3.cs.stonybrook.edu/~algorith/

http://www.algorist.com/


Page 14 - 1/ Introduction to Algorithm Design

Hunting for counter-examples techniques:

Think small
Think exhaustively
Hunt for the weakness
Go for a tie
Seek extremes

Page 15 - mathematical induction vs  programming technique of recursion

A saying "a computer scientist is a mathematician who only knows how to prove things by induction."

Algorithms are recursive or incremental

Insertion sort explanation using induction proof - go over the page again.

Chapter 2 - Algorithm Analysis

2.3 Growth Rates and Dominance Relations

Julia works on hackerRank contest - 3 seconds - time limit

Need to find a public link about Growth rates of common functions measured in nanoseconds

Similar to page 38:

2.3.1 Dominance relations:  (Page 39, 51/739)

Constant functions
Logarithmic functions
Linear functions
Superlinear functions
Quadratic functions
Cubic functions
Exponential functions
Factorial functions

Chapter 10 

How to design algorithm?
Do I really understand the problem?  (page 357 - 358)

Julia's notes for iteration through quickly:
Q1: input
Q2: output
Q3: small example to solve by hand first
Q4: optimal solution/ settle for close to optimal solution?
Q5: ask about a scalability question? 10 item, 1000 items, 1 million items?
Q6: ask about time spent, 1 second, 1 minute, 1 hour
Q7: Time to invest in implementation ( 1 day or more freedom )
Q8: problem classification: numerical/ graph algorithm/ geometric/ string/ set

Extended study "Growth rates of common functions measured in nanoseconds" through Google search:
Google search:
keyword:
Growth rates of common functions measured in nanoseconds

Growth rate - which one has best presentation?
This is the best one! (Spent 10 minutes to read, and then, memorize something on the presentation)

https://www.cs.princeton.edu/courses/archive/spr10/cos226/lectures/02-14Analysis-2x2.pdf


Follow up

March 9, 2018

It is so much fun to read the blog again. Google search result is kind of random. I clicked the link and lead to the blog.

What I did is to make the blog better, created a gist for one of the submission mentioned in the blog, and then add the link.

HackerRank - WarmartLabs Codesprint (Algorithms) - Interesting Fibonacci Sum (II)

Oct. 30, 2016

Work on segment tree idea to solve timeout issue. After the contest, Julia has more time to relax, and try different ideas to solve this hard algorithm on HackerRank.

Previous blog

Will come back to write C# code to try segment tree idea.

Read editorial notes.

Ashar Faudi - study a player - Topcoder SRM problem writer
Need to spend time to figure out this linear recurrence for programming contest .

https://www.linkedin.com/in/fushar

Study C# submissions:

1. C# submission

2. C# submission

Think about the strategies of HackerRank contests - should work on medium algorithm instead of hard one. Math part is not easy to figure out in less than 24 hours.

Spent 2+ hours to go over the submissions on this hard algorithm, get the data - who are those talents? What they are sharing? A special group with strong math or research abilities?

1. Competitive programmer talking about achievements.

2. People good at math - problem solving on the algorithm - a few of them are competitive programmers.

3. programming contest

4. Math Ph.D. graduate (better programmer compared to Julia)

https://www.hackerrank.com/hoek3000

5. Figure out something new in computer science master graduate study:

Advice for beginners

Oct. 30, 2016

Plan to work on this blog 2+ hours.

http://lbv-pc.blogspot.ca/p/advice-for-beginners.html

Recommended by the web page:
https://github.com/pin3da/Programming-contest


Book: The Algorithm Design Manual
http://www.algorist.com/



HackerRank - WarmartLabs Codesprint (Algorithms) - Interesting Fibonacci Sum

Oct. 30, 2016

Introduction


Julia changed the practice to attend the contest, she chose to take some risk; aim most difficult algorithm, last of 6 algorithm - Hard level. Total score is 100, she knew about Fibonacci algorithm very well, dynamic programming, memorization, bottom up; she also spent over 2 hours to read the problem statement, try to work on the mathematics part of the algorithm.

Until 4:00am, she gave up. She thought about last hour, if she can make this algorithm work, then, she can score 120, rank will be 120/ 2600; She could get into top 10%.

Problem Statement


Summary of practices


Worked on the algorithm from 11:am - 4:00am, near 15 hours, score 0 out of 100.

Submission 17 times. First work on memory issue, remove out-of-memory issue; and then, worked on timeout issue, could not get rid of range sum query O(n2) issue, n is O(n5).

1. First submission:
Fibonacci sum - first submission - line 183 - line 196 function fibo - array declaration on line 187 - 109 * 4 bytes = 4000MB.

If there is no memory limit, timeout issue, the algorithm will work. Cannot scale, timeout 2 issues.

2. 8th submission, out-of-memory, should be less than 512MB; but it is over 4GB for an array

3. 9th submission

4. 10th submission

5. 17th submission

Until last hour of 15 hours, Julia read discussion. "Segment Tree" may be the idea to avoid O(n2), range sum query classical problem.

Encouraging notes for Julia


Julia likes to celebrate her 15 hour effort to work on a hard algorithm problem on HackerRank; focus on the hard algorithm, therefore, she can figure out later what she should put her training next. 

Instead of working on medium/ advanced level algorithm, Julia likes to solve first hard algorithm first. This is the first time she did in 24 hours contest, push herself to the limit, try to solve one hard algorithm. She does not have time to read 3 medium algorithms problem statement in the codesprint. 

3 kinds of people, do not know what is happening, one is to make thing happen. Julia chose the last one. One day, She can solve hard problem on HackerRank contest. Make things happen. Fail fast, fail quick. Just do it.


Previous blogs about Fibonacci algorithm


I solved the algorithm called climbing stairs


Julia, remember the phrase: The hard makes it great! Enjoy the journey.

Tuesday, October 25, 2016

LinkedIn - the Week of Learning

Oct. 25, 2016

Plan to take some courses from Oct. 25 - Oct. 30, 2016.

https://www.linkedin.com/learning/me/skills

wechat public account:
1. http://chuansong.me/account/daiziguizhongren/old

2. What google looks for?
http://chuansong.me/n/1718041



Udacity - mobile web development

Oct. 25, 2016

Plan to take the course: Mobile web development on Udacity.

This will be the first course Julia takes on Udacity.

1. 10/25/2016  2 hours to watch the video

Study notes:
1. local storage vs session storage vs cookies
https://www.quora.com/What-is-the-difference-between-sessionstorage-localstorage-and-Cookies

2. Viewport - content - device-width, width, vmax, vmin, vh, vm,
articles:
https://webdesign.tutsplus.com/articles/7-css-units-you-might-not-know-about--cms-22573

http://caniuse.com/#feat=viewport-units


Editorial Notes:

How Julia found out the course to learn on Oct. 25, 2016?

1. Julia got the email from SegmentFault:

https://segmentfault.com/p/1210000007241346?utm_source=weekly&utm_medium=email&utm_campaign=email_weekly

She chose to read the article: how to get Google offer?

2. The experience of a Googler:
http://www.zhihu.com/question/24099873

And then, she read all the answers, and then, chose one of answers:
3.
https://www.google.com/about/careers/students/guide-to-technical-development.html

Chose one of courses she is most interested:
4. Udacity -> mobile web development
https://www.udacity.com/

Reading material:
1. http://www.w3schools.com/css/css_rwd_images.asp

2. W3.CSS tutorial
http://www.w3schools.com/w3css/default.asp

Nov. 1, 2016

Case study about Udacity nanodegree program:

1. http://blog.udacity.com/2015/03/student-spotlight-lei-zhu-aspiring-full-stack-developer.html?_ga=1.184431014.185090454.1477442789

2. http://blog.udacity.com/2015/06/how-udacity-student-kelly-landed-an-engineering-job-at-google.html?_ga=1.184015270.185090454.1477442789

Students - Guide to technical Development

Oct. 25, 2016

Students - Guide to Technical Development

Plan to work on this website at least 2 hours.

https://www.google.com/about/careers/students/guide-to-technical-development.html

Sunday, October 23, 2016

Mock interview experience summary in 2016

Oct. 23, 2016

Summary of mock interviews 


  From January to April 2016, Julia had 8 times experience to do mock interview, as an interviewer/ interviewee. Then, she stopped and moved on, she prefers to work on algorithm practice.

  Just after 6 months, she noticed that one of peers in the interviewer/ interviewee started to work for Apple, one of them started to work for VMWare; In other words, she has experience of interviewing senior people for Apple and VMWare now. One of them worked for Microsoft/ booking.com before, she had super performance and then Julia watched how she performed through the coding interview. Overall, the experience was so great at this moment. But, Julia has to work on the advice seriously since those interviewers are really talented people.

Mock interviews blogs


  Here are the blogs she documented her experience. So, she started to review the experience and see if she should continue to do some mock interviews, reexamine what she did.

First one

Second one

Third one

Fourth one


blog reading:

1. How to get google offer? An article on segmentFault.


2. The experience of a Googler


3. Google guide for technical development for students


4. Udacity -> mobile web development
https://www.udacity.com/


Google talk: the effective engineer

Oct. 23, 2016

Sunday night research:

Google talk:

http://www.theeffectiveengineer.com/blog/effective-engineer-talk-at-google

Book:
https://www.amazon.ca/Effective-Engineer-Engineering-Disproportionate-Meaningful/dp/0996128107/ref=sr_1_1?s=books&ie=UTF8&qid=1477279080&sr=1-1&keywords=the+effective+engineer

website:
http://www.theeffectiveengineer.com/blog/effective-engineer-talk-at-google

Blogs:
https://github.com/jianminchen/techlead

Learn Amazon culture through a guru's blog

Oct. 23, 2016

Spent more than 2 hours on this Sunday morning to read the blog of ex-amazon manager, and most of big impressions is to learn Amazon culture through those blogs:

1. Engineering culture:

http://coolshell.cn/articles/17497.html
(Notes about Amazon engineering culture:
1. After serious defects, write Correction of Errors document, ask 5 whys.
2. Annual survey: very detail.
)
Edmond Lau
http://www.slideshare.net/edmondlau/what-makes-a-great-engineering-culture
http://www.theeffectiveengineer.com/

Quora:
https://www.quora.com/What-makes-a-good-engineering-culture


2.
http://coolshell.cn/articles/9156.html

3. 程序算法与人生选择
http://coolshell.cn/articles/8790.html

4. 从Code Review 谈如何做技术
http://coolshell.cn/articles/11432.html


Also, Julia was encouraged by the author's code, detail see the blog:

http://juliachencoding.blogspot.ca/2016/08/leetcode-125-valid-palindrome-summary.html

from 10th practice: extract one more function after reviewing the code of the author.



Friday, October 21, 2016

The large-scale distributed denial of service attack (DDoS) - DDoS attack

Oct. 21, 2016

First thing in the morning at work, around 10:30am, check MP website news page, Julia noticed that social link twitter showing text content instead of icon, then, she found out twitter.com was down.
And then, she looked up internet and read the article:

10:30am
http://www.usatoday.com/story/tech/2016/10/21/cyber-attack-takes-down-east-coast-netflix-spotify-twitter/92507806/

http://www.wsj.com/articles/denial-of-service-web-attack-affects-amazon-twitter-others-1477056080

Follow up after the work, 9:00pm

http://www.usatoday.com/story/tech/2016/10/21/cyber-attack-takes-down-east-coast-netflix-spotify-twitter/92507806/

As a small business website designer/ architect/ developer/ coder / administrator, Julia likes to catch up skills to countermeasure the attacks, specially DDoS attack, SQL injection attack. She fixed the design issue in January 2015 to countermeasure SQL injection attacks, she learned the important lesson to countermeasure the attacks, and the important to put attacks and countermeasures in website design.

Counting special sub cubes - OpenBracket CodeSprint - HackerRank

Oct. 21, 2016

Problem statement:

https://www.hackerrank.com/contests/openbracket/challenges/counting-special-sub-cubes

Julia spent over 2 hours to read the problem statement and then had difficulty to make sense of the question on the second day of contest, but she could not understand the problem. Also, she spent over 30 minutes to go over all the discussion of the algorithm but did not find clue.

After the contest ends, Julia read the editorial notes. So, it is an ordinary dynamic programming algorithm.

So, plan to spend one hour to write some code.

Making Candies - OpenBracket CodeSprint - HackerRank

Oct. 21, 2016

 Spent over 2 hours to read the problem statement and thought about the idea to solve the solution, but Julia did not take time to write down any code for the algorithm from Oct. 15 to Oct. 16.

https://www.hackerrank.com/contests/openbracket/challenges/making-candies

Detail see the blog:

http://juliachencoding.blogspot.ca/2016/10/hackerrank-contest-pressure-and-how-to.html

After reviewing the editorial notes, on Oct. 17, just after the contest period (Oct. 15 - Oct. 16), Julia was big surprised that this algorithm is with difficult level: hard, required knowledge: binary search.

So, plan to spend one hour first to write down the code.