Monday, November 7, 2016

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.

Thursday, October 20, 2016

Fraudulent Activity Notification - OpenBracket Code Sprint - HackerRank

Oct. 20, 2016

Julia spent over 8+ hours to work on this algorithm, and finally, at the end of day, she knew that she had to read problem statement again and figured out a new idea. She found the solution and scored 40 of 40.

But, Julia likes to write down her journey, and reminds herself to be smart, be able to find optimal solution in first time.

Here is the problem statement:

https://www.hackerrank.com/contests/openbracket/challenges/fraudulent-activity-notifications

And then, her submissions:

1. First submission:
pass 2 test cases, 5 test cases - runtime error
https://gist.github.com/jianminchen/ed96f667ca20d4ce6e5da61315e17cd5

Over 3 hours work,
1. timeout issue - use binary search to replace linear search, and see if the timeout issue can be solved.
2. Add position/ remove position - try to implement O(1) insertion O(1) deletion algorithm
code has flaws, insert position (p1) / remove position (p2),
p1 >= p2 or p1 < p2.
3. Look into C# bulk copy, Array.Copy, not sure if Array.Copy can be O(1) instead of O(n), using bulk copy, look up stack overflow a few times.

2. Find bugs, and continue to write new code.

https://gist.github.com/jianminchen/3beb1b21d99a62eb607f9f3b40a61bee

add new function called binarySearchAdd

function customizedArrayCopy (line 181 - line 190) - try to fix bugs
discuss different cases - 90 lines of code, hard to write without a bug, and so many cases,
think about cyclomatic complexity, or execution path, how many execution path with this design.

Julia spent hours on this function customizedArrayCopy, and it is hard to spot error/ fix error
on this function.

(Oct. 26, 2016, customizedArrayCopy function - If two case (line 267 - line 288), else, there are
3 nested statement: if/else if/else (line 289 - line 342); so, in total, 5 cases, line 252 - line 346;
This function is breaking SRP - single responsibility principle. The function spanning almost 96 lines
of code, Julia has to take more than 6 hours to write/ debug/ reason. This is not the code for
HackerRank contest!)

..., continuously submitted 9 times, score 0.

9th submission:
https://gist.github.com/jianminchen/0b7fe2b10b324e710066128682992c74

10th submission:  score 40 out of 40, using bucket sort.
https://gist.github.com/jianminchen/5e85135f68bc9be02be7f7390647ae00

Timeline analysis:

7:45am             - start to read problem statement
9:00am - first submission, pass 2 test cases, but timeout on other 5 test cases,
       Binary search can improve time complexity from O(n) to O(logn)
Work on binary search algorithm

10:11am   reviewed binary search function code
10:24am   found bugs related to Add position vs Remove position
10:40am look up Java AddRange, C# bulk copy

...  (Julia likes to play with Array.Copy, and other things - logic thinking if/ else. But to be a competitive programmer, Julia has to learn to sharpen her thoughts, work on optimal solution instead.)

12:00 - 9:30pm - work on the coding, try to write bug-free code, mess with ideas using Array.Copy, naively thinking about bulk copy - Time Complexity O(1)

9:30pm - gave up all the solutions, read problem statement and find a new idea:
9:30pm - 10:07 write a bucket sort algorithm, without too much effort, succeed.

Time complexity:

O(N^2) -> O(NlogN) -> O(N), N is the number of days.

Previous work on distribution sort, bucket sort:

1. Leetcode 164: Maximum Gap - a Distribution sort (bucket, counting, radix) algorithm
http://juliachencoding.blogspot.ca/2015/06/leetcode-maximum-gap-no-164.html

2. Radix Sort - a distribution sort
http://juliachencoding.blogspot.ca/2016/05/radix-sort-distribution-sort.html

3. Leetcode 164: Maximum Gap - a Distribution sort (bucket, counting, radix) algorithm
http://juliachencoding.blogspot.ca/2015/06/leetcode-distribution-sort-algorithm.html

Encouraging ending notes:
Can you give out a summary for the practice?

Answer:
10th submission:  score 40 out of 40, using bucket sort.
https://gist.github.com/jianminchen/5e85135f68bc9be02be7f7390647ae00

line 141 and line 142:
int SIZE = 201; int[] dPriorDays = new int[SIZE]; Just use space to trade off time, reduce time complexity from two loops on n - number of days to one loop on n (2*10^5), and one loop on SIZE (201) which is also constant tim O(1). Basic facts:
n^2 will be around 4*10^10, it will be around 40 billion. The time complexity is shortened to 1 of 1000. Things to work on:
Spend 2 hours to read this mentoring business in IT business -
http://www.theeffectiveengineer.com/blog/secret-to-growing-software-engineering-career

http://www.theeffectiveengineer.com/blog/five-key-skills-of-successful-programmers


Tech events in 2016

Oct. 20, 2016

Introduction


Julia loves to attend tech events and meet people in the city of Vancouver and also in the city of Seattle in 2016. So far in 2016, she has attended more than 6 tech events. Two hosted by Microsoft, SQL server in Seattle (March 31, Microsoft Database Systems Engineering Open House), Vancouver Tech Woman in Vancouver (Sept.); Two hosted by Amazon (May 3, Amazon web service talk; June 23, RDS talk); One by Arista Network; One by Tableau, algorithm/ data structure interview workshop.

Seattle two day vacation - tech event trip

Such a beautiful season with tour of Seattle, so many good memories and good laughs with friends.

Microsoft:
In March of 2016, she took 2 days vacation and drove to the city of Seattle to attend Microsoft SQL server tech event, and visited her FAU classmates in Seattle.

And then, she visited the headquarter of Amazon, near union lake.

Tech events are fun
She had such great time to watch the video and learned a few things on Oct. 19, 2016

Grace Hopper Celebration of Women in Computing

https://www.facebook.com/gracehoppercelebration/



Entertainment episodes in tech event:

1. Episode 1

Personal coding blog is such an entertainment topic in tech event:

A senior principle programmer (A) and Julia's conversation:

A's Questions: Who can tell quicksort best performance or worst performance?

Julia:
I can tell, the worst of quicksort is linear. Because I just wrote a blog about quicksort.

A's question: where is the blog? Show me on my cellular phone?

Julia:

"Julia coding blog" search Google.com
"quick sort" search blog

2. Episode 2

A senior principle programmer (A) and Julia's conversation:

A's question: why do you write she instead of I?

Julia:
It is more close to reader, instead of I, I, I, too self-center; I choose to write as she likes; it is a style. More picky, close to reader instead using "I".

A's question: where is the code? Show me your code.

Julia:

...


2010 - 2015 five years


Julia attended more than 5 social events in the city of Vancouver (from 2010 to 2015) hosted by facebook. And almost every time, she asked around how to improve algorithm problem solving, being competitive on algorithm problem solving.

She learned a lot, but she wanted to be a competitive programmer.

After 5 years full time job as a software programmer, she knows how weak her thinking muscle on algorithm. So, she decided to change, journal her practice through her personal coding blog in the city of Vancouver.

2015 - Now


She decided to take some risk, and take algorithm problem solving as a highest priority in her life; she works on goals she has more control, like HackerRank contest performance improvement.

Writing is most challenging for her, so she started to write more through her coding blog, and also log her practice very honestly.

Best learning is by doing, not just reading other people's work; Best learning is also a sharing, willing to take some risk to make mistakes, share the pain, struggling to make a little progress every time, and get connected to more people, motivate others to work hard as well.

Share my favorite quote about practice - when to stop?

Tuesday, October 18, 2016

geometric plane sweep algorithms - a small research

Oct. 18, 2016

Plan to spend 2+ hour to work on the algorithm called:

https://web.stanford.edu/class/cs97si/09-computational-geometry.pdf

"For example, instead of presenting sorting algorithms and balanced search trees separately, I prefer to discuss applications that integrate them such as geometric plane sweep algorithms. I believe this problem oriented exposition is helpful for using the tools later on, as well as for moving towards open-ended exploration in an area."

Teaching statement from 
http://www.cc.gatech.edu/~rpeng/teachingstatement.pdf

10/20/2016
3:30am - 5:00am, (work with jet lag)
read 30 minutes about balanced search tree:
https://en.wikipedia.org/wiki/Self-balancing_binary_search_tree

and then,  associated array
https://en.wikipedia.org/wiki/Associative_array


Union find tutorial

Oct. 18, 2016

Plan to spend 2+ hours to work on the union find tutorial.  

Union find
http://contest.cs.cmu.edu/295/tutorials/union-find.txt

Previous study on union-find algorithms:

1. http://juliachencoding.blogspot.ca/2016/07/union-find-algorithm-undirected-graph.html

2. http://juliachencoding.blogspot.ca/2016/07/hackerrank-world-codesprint-4-roads-in.html


or search "union find" through "search this blog" feature.


Min cost flow tutorial

Oct. 18, 2016

Plan to spend 2+ hours to work on this tutorial, write down C# code. Highlight some learning experience to encourage others. 

Min cost flow
http://contest.cs.cmu.edu/295/tutorials/min-cost-flow.txt

segment tree tutorial

Oct. 18, 2016


10 - 20 minutes to go over once, segment tree is Julia's favorite to learn.

http://contest.cs.cmu.edu/295/tutorials/seg_tree.cc

Actionable Item:

Julia, please write a C# version of code, add some test cases. Make this tutorial more helpful.

C# version:
https://gist.github.com/jianminchen/010f9ec15514f54e7cf3cca0549e22bb

Nov. 29, 2016

https://www.hackerearth.com/practice/notes/segment-tree-and-lazy-propagation/


Best algorithm professor - Best coaching for Julia's HackerRank contest

Oct. 18, 2016

Julia chose to study the algorithm - work hard on her performance on the contest. Here is the blog to share the detail of her experience:

http://juliachencoding.blogspot.ca/2016/10/hackerrank-openbracket-codesprint.html

So, she likes to focus on study - best professor on algorithm research:

http://www.cs.cmu.edu/~sleator/

Julia's favorite blogs:
1. http://www.cs.cmu.edu/afs/cs/academic/class/15451-s15/schedule.html


Topcoder's tutorial for competitive programming

Oct. 18, 2016

Plan to spend 10+ hours on this topcode's tutorial. 

The following blog shows how Julia chose to work on this tutorial. 
http://juliachencoding.blogspot.ca/2016/10/hackerrank-openbracket-codesprint.html

Competition programming courses:
http://contest.cs.cmu.edu/295/


There are a number of excellent tutorials on the algorithms and techniques needed to solve these kinds of contest programs on Topcoder's Data Science Tutorials web site.

https://www.topcoder.com/community/data-science/data-science-tutorials/

Write down some notes here to share with others.