Monday, September 23, 2019

1202. Smallest String With Swaps

I wrote the C# solution for the algorithm 1202. Smallest string with swaps. It is such a good learning experience, but I should cut the time to less than 30 minutes. One of ideas is to write again tomorrow if I have time.

Here is the post.

I spent 30 minutes in weekly contest 155 on the algorithm first, and I continued to spend over an hour to complete the code on Sept. 23, 2019. I made a lot of errors, but I like the experience to solve the problem using union find algorithm. My plan is to be able to solve it in less than 30 minutes in total in short future.
Here are highlights.
  1. Understand union find algorithm, disjoint set, write findParent, union two APIs;
  2. Do not mix parent[i] with findParent(int[] parent, int node), the latter one has path compression functionality. Do not call parent[i] directly, call findParent;
  3. SortedSet is not applied, since same char can have multiple occurrences in one disjoint set;
  4. Each disjoint set should be sorted first as a char array, and then push to Queue;
  5. I ran into stack overflow bug, so I modified union function, replace parent[i] with findParent(int[] parent, int node);
  6. Design variable disjointSets using Dictionary<int, List>; SortedSet is not working for duplicated chars in string test case, for example: "abcmdem", m has two occurrences.
  7. Design sortedStrings using Dictionary<int, Queue>; Queue is chosen since it is easy to iterate for each disjiont set.
The following code passes online judge, but I may have to review the code to simplify the code.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace unionFind
{
    class Program
    {
        static void Main(string[] args)
        {
            RunTestcase1();
            //RunTestcase2(); 
        }

        public static void RunTestcase1()
        {
            var pairs = new List<IList<int>>(); 

            pairs.Add((new int[]{0, 3}).ToList()); 
            pairs.Add((new int[]{1, 2}).ToList()); 

            var result = SmallestStringWithSwaps("dcab", pairs); 
            Debug.Assert(result.CompareTo("bacd") == 0);
        }

        public static void RunTestcase2()
        {
            var pairs = new List<IList<int>>();

            pairs.Add((new int[] { 0, 3 }).ToList());
            pairs.Add((new int[] { 1, 2 }).ToList());
            pairs.Add((new int[] { 0, 2 }).ToList());

            var result = SmallestStringWithSwaps("dcab", pairs);
            Debug.Assert(result.CompareTo("abcd") == 0);
        }

        /// <summary>
        /// Leetcode 1202 - small string 
        /// </summary>
        /// <param name="s"></param>
        /// <param name="pairs"></param>
        /// <returns></returns>
        public static string SmallestStringWithSwaps(string s, IList<IList<int>> pairs)
        {
            var length = s.Length;
            var parent = new int[length];

            for (int i = 0; i < length; i++)
            {
                parent[i] = i;
            }

            foreach (var pair in pairs)
            {
                var first = pair[0];
                var second = pair[1];

                if (findParent(parent, first) != findParent(parent, second))
                {
                    // union two set; 
                    union(parent, parent[first], parent[second]);
                }
            }

            // allow duplicate char in string 
            var disjointSets = new Dictionary<int, List<char>>();

            for (int i = 0; i < length; i++)
            {
                var key = findParent(parent, i);
                if (!disjointSets.ContainsKey(key))
                {
                    disjointSets.Add(key, new List<char>());
                }

                disjointSets[key].Add(s[i]); 
            }

            // sorting 
            var sortedStrings = new Dictionary<int, Queue<char>>();
            foreach (var pair in disjointSets)
            {
                var list = pair.Value;
                var array = list.ToArray(); 
                Array.Sort(array);
                var queue = new Queue<char>(); 
                foreach(var item in array)
                    queue.Enqueue(item); 

                sortedStrings.Add(pair.Key, queue);
            }

            var sb = new StringBuilder();
            for (int i = 0; i < length; i++)
            {
                var key = findParent(parent, i);
                var value = sortedStrings[key].Dequeue();

                sb.Append(value);                
            }

            return sb.ToString(); 
        }

        /// <summary>
        /// path compression
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="node"></param>
        /// <returns></returns>
        private static int findParent(int[] parent, int node)
        {
            return node == parent[node] ? node : parent[node] = findParent(parent, parent[node]);
        }

       /// <summary>
        /// Simplify API
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="first"></param>
        /// <param name="second"></param>
        private static void union(int[] parent, int first, int second)
        {
            var firstParent = findParent(parent, first);
            var secondParent = findParent(parent, second);
            if(firstParent == secondParent)
                return;

            parent[firstParent] = secondParent;             
        }
    }
}


Sunday, September 22, 2019

Naomi Osaka- BNP Paribas Open 2018

Here is the video.


Tennis Fitness warm up and workout with woman tennis players

Here is 7 minutes fitness training for tennis players.


Bianca Andreescu

Here is the link. I like to learn how to do fitness training by myself.


13 Awesome Fitness Quotes to Keep You Motivated

Here is the article. I start to work on fitness and see if I build a good habit to stay fit.


Netflix's Company Culture Is Not For Everybody And That's Exactly How It Should Be

Here is the article.

Hard work is not enough. Extremely hard work.

Professional sports.


#647: HARD WORK IS IRRELEVANT

Here is the podcast.

Patty McCord helped create a workplace at Netflix that runs more like a professional sports team than a family. If you're not up to scratch, you're off the team. Is this the future of work?

Money makes the world go around, faster and faster every day. On NPR's Planet Money, you'll meet high rollers, brainy economists and regular folks -- all trying to make sense of our rapidly changing global economy.

THE LOSER’S GAME - Journal paper 1975 by Charles D. Ellis

In plain language, the manager who intends to deliver net returns 20 per cent better than the market must earn a gross return before fees and transactions costs (liquidity tolls) that is more than 40 per cent better than the market. If this sounds absurd, the same equation can be solved to show that the active manager must beat the market gross by 22 percent just to come out even with the market net.

In other words, for the institutional investor to perform as well as, but no better than, the S&P 500, he must be sufficiently astute and skillful to "outdo" the market by 22 per cent. But how can institutional investors hope to outperform the market by such a magnitude when in effect, they are the market today? Which managers are so well staffed and organized in their operations, or so prescient in their investment policies that they can honestly expect to beat the other professionals by so much on a sustained basis?

Extraordinary Tennis for the Ordinary Tennis Player - playing strategy

Dr. Simon Ramo of TRW

Simon Ramo identified the crucial difference between a Winner's Game and a Loser's Game in his excellent book on playing strategy, Extraordinary Tennis for the Ordinary Tennis Player. Over a period of many years, he observed that tennis was not one game but two. One game of tennis is played by professionals and a very few gifted amateurs; the other is played by all the rest of us.

Jonathan Rosenberg Advisor at Alphabet

Here is the linkin.com profile with activities.

Indexing Hero Charles Ellis

Here is the article I like to read.


For those not familiar with Charles Ellis, he is a native of Boston who earned an undergraduate degree from Yale University, an MBA from Harvard Business School, and a PhD from New York University. He also earned a CFA charter in 1969. Since that time, he has authored 14 books and more than 100 articles.

Should I work on an algorithm every day every hour?

I asked the question and then wrote an answer quickly. I like to go back to Quora.com and join the community, and share some ideas. It is hard for me to find a good coach to tell me what to do next, specially as a member of community who went to Amazon onsite three times, Facebook onsite once. How to plan and advance problem solving skills? 
Here is the answer I wrote: 
It is my weekend research topic. I found out that from August 21 to Sept 22, I only solved 2 new algorithms on http://Leetcode.com. Do I have a plan how many algorithms to solve every week/ every month? How should I manage myself to advance my problem solving skill as a software programmer?
Keep myself busy
It is hard for me to push myself to be a super productive person. Once a while, I will read too difficult content related to technical problems, but I did not learn a thing after one hour or two learning.
Sometimes I find out that I should solve a problem at work using less than 30 minutes, I spend more time to work on and if I take some risk then it will save 80% of time.
I like to squeeze myself to push to limit, using minimum time to come out a practical solution to solve a problem, finish a project. Do not spread out the work all day, all week.
Every day every hour
I do think if every day every hour if I try to reach out an algorithm to work on a few times, I will find out that instantly I have problems to work on. I need to rush myself to fix so many issues. Reading skills, steps to understand the problem, and how to explain the problem in better way, and steps to solve the problems if I have time, my crafting skills in C# and English to document my learning process.
The algorithm is such a start button to reset myself. Allow myself to go back to be humble, restore my best attitude to appreciate what I have as a software programmer, be super productive again. Ready to meet new task, new project, and new technology every day.
The idea is similar to tennis professional player, work on fitness, work inside gym instead of playing tennis on the court all the time. It helps to prevent injuries, and also work on basics of agility, muscle memory and all other skills related to problem solving.

I came out the idea to ask the question after I read the post How many practice problems did you do before successfully getting a job at Google/Facebook/Amazon/Microsoft? .

Charley Ellis and Burton Malkiel: "The Elements of Investing" | Talks at Google

Here is the link of one hour video.

I like to take some notes from the video. I need to learn some basics first. I just started my personal finance research in Nov. 2018, this November I will have one personal finance anniversary.


Simply Wall St Company Analysis Model

Here is the github page I like to read. It will take some time for me to figure out how to understand the article, how well the article is written. I will give it a try once a while.

One thing I like to do is to invest time and effort on stock analysis, one day I can easily understand the market, and then I can understand Mr. Market, and then I will see a lot of investment opportunities as well.

I will write down my study process of the article as well.


A Look At The Intrinsic Value Of Ross Stores Inc (NASDAQ:ROST)

Sept. 22, 2019

Introduction


It was my favorite store. I ended up spending too much on clothings. I spent one time to purchase five coats from US ROSS store in birmingham city cross border back from 2010 to 2015. I have to stop and start to look into ROSS as a stock, what is intrinsic value, when to get into to make money back from expenses.

Intrinsic value


I have to push myself to read the article, understand the formula how to calculate intrinsic value. I have to figure out why ROSS is super performance stock last 20 years.

Here is the article.


How I understand the intrinsic value? 


I just read the article quickly, I actually have no idea how to understand the detail calculation. There are two steps. Get all the terms in the article first, make sure that I understand each term;  next step is to put them in the context of ROSS stock.

The order of showing in the article:

future cash flows
today's value
discounting
the discounted cash flows (DCF) model
the basic for discounted cash flow - simply wall St analysis model

2-stage growth model
higher growth rate
perpetual stable growth rate
next five years of cash flows
the consensus of the analysts

5-year cash flow forecast

Gordon growth formula

terminal value
present value of terminal value

intrinsic value based on future cash flows


Retail therapy for a 50s years old

Sept. 22, 2019

Introduction


It is a totally different understanding of money, rich and wealth. I am 53 years old, in less than one month I will turn 53 years old. I am facing so many challenging in my personal finance, I do not save enough for me to fall back on, if I lose my full time job, I do not have income stream. My condo in Boca Raton, Florida has one bedroom empty this month.

Retail therapy


I just talked to my roommate who bought a $250 Canadian dollar rain boots, just over 30 years old. I told her that if she purchase a pair with $40.00 dollars. She can purchase $200 dollars stocks, after 10  years, the stock goes up 10 times more. For example, Apple stock in 2008 is less than $10 dollars, now it is over $200 dollars.

I can quickly find the blog I purchased over $5000 dollars clothing from 1998 to 2002. I spent over $2700 dollars on ROSS back from 1998 to 2002. I checked ROSS stock goes up mostly compared to other ones.

Actionable Items


I have to examine my emotion and thought process to purchase in ROSS starting from 1996 to 2015. I understood that I did not learn the basics of frugal, and importance of minimalism and stock and investment.

I will spend some time to do research on ROSS stock. It may be a good idea to purchase ROSS stock continuously like shopping trips I had before.

Naomi Osaka best moments pt2

Here is the link.

It is 11 minutes break. I like to catch up some fun moments and learn the style of Naomi Osaka to deal with interviews.




Find a name for my headache early in the morning

Sept. 22, 2019

Introduction


It is my personal health research. I need to find out what my headache is. I need to come out a solution to fix my headache issue recently.


I need to find a name for the headache


Starting from three months ago, I like to lose 10 lbs, I exercise, and also I also try to control my portions of diet. So I introduce the idea to experience of starving once a while.

In two moths, I lost 10 lbs and got back to 182 lb. But one day I went to bed around 1:00 am, but I woke up around 2 am with headache, I extracted three teeth early in 2019, but my jaw of right side and my eye and my forehead was so pain in the morning.

I need to continue to do some research, and then figure out the issue.

I checked the blood, no inflammation. I had six time headaches at least, two times before I went to walk-in-clinics, I took three times each time one ibuprofene pills purchased from Costco.

Life is so tough to mess up so many goals. I do not want to mess up my health, that is a serious challenging project to manage.

Go to bed early. Never stay too late. Try to go to bed before 11:00 PM.

Naomi Osaka best moments

Here is the video I like to watch.

14 minutes is a good break for me. Since I spent over one hour to read quora.com posts shared by Dean Jackson.


Should I work on an algorithm every day every hour?

Sept. 22, 2019


Introduction


It is my personal finance research. I found out that from August 21 to Sept 22, I only solved less than 2 new algorithms on Leetcode.com. Do I have a plan how many algorithms to solve every week/ every month? How should I manage myself to advance my problem solving skill?

Keep myself busy


It is hard for me to push myself to be a super productive person. Once a while, I will read too difficult content related to technical problems, but I did not learn a thing after one hour or two learning.

Sometimes I find out that I should solve a problem at work using less than 30 minutes, I spend more time to work and 80% of time I am not efficient to do things.

I like to squeeze myself to push to limit, using minimum time to come out a practical solution to solve a problem, finish a project. Do not spread out the work all day, all week.

Every day every hour


I do think if every day every hour I try to reach out an algorithm to work on, I will find out that I need to work on my reading skills, challenge my comprehensive cognitive skills, and also push myself to continue to research on crafting skills.

The algorithm is just a start to reset myself. Allow myself to be super productive. Ready to meet new task, new project, and new technology every day.

I am not sure if this idea makes sense at all. Let me try to write down first, and then figure out later. Stay tuned.

How many practice problems did you do before successfully getting a job at Google/Facebook/Amazon/Microsoft? - Dean Jackson

Here is the answer from Dean Jackson.

I coded there for three years. I then moved to a program manager role to do some things I wanted to see done… and didn’t code for almost two years. I then interviewed with Facebook as an engineer, and spent a month studying around 20 hours a week.
With that time, I did three things:
  1. Read “Cracking the Coding Interview”.
  2. Read a ton on Wikipedia about data structures.
  3. Solved questions on a whiteboard with a marker.
So the answer here is “a lot of time”. But both times I spent the time, it paid off, so I can’t argue with the results.

My naive thoughts on this topic


I also noticed the issues I have with my practice and my performance on onsite interviews. I spent much more time to study and practice algorithm and data structure compared to the content above. 

It is easy for me to get lost on counting how many hours I spent on coding on algorithm and data structure. 

It is hard for me to build habit to code every day. 

After two onsites in August, I worked on those interview algorithms, and also asked those algorithms on interviewing.io. 

But very good coding habit is to code every day, every hour. It is to push myself to train myself, take hard choice, work on something new, move myself outside comfortable zone. 

I do believe that it helps me to calm down very quickly. Stay humble. Otherwise, I may end up not efficient at work as well, in my personal business as well. 

Problem solving skills need to be worked on more often. 

My mark is 421 solved on leetcode.com today. 

Should I purchase Facebook stock 30 shares? | Sept 22, 2019 | $185/ share in 2019 | A beginner

Sept 22, 2019


Introduction


It is my short research project. I learned my mistakes, back in 2012, Amazon stock was around $80.00 dollars, I spent over $1,000 dollars to purchase clothing instead of purchase of Amazon stock. The fact is that Amazon stock is ten times more in 2019, over $1800/ share. The blog is here. I went to Facebook onsite this August, but I could not get the offer. Maybe, I should start to purchase Facebook stock.

30 shares of Facebook stocks


Facebook stock is $189 US dollars. I only have savings in US dollars to purchase 30 shares of Facebook stocks.

10 benefits of holding 30 shares of Facebooks


I like to celebrate my onsite interview in August 2019. How do I do that? I am a frugal person, and try to adopt minimalism life style. And also I like to work on my weight control, fitness program.

I do not own any stock from Microsoft, Amazon, Google and Facebook. I did purchase Microsoft stock and paid for $66.00 dollar in 2001, and then sold it as loss around $20s price. Here is the blog.

Or should I purchase VGT ETF instead? 30 shares of ETF.

Follow up 

August 3, 2021
I am considering purchase of Facebook stock again. 





Why is attrition so high at big tech companies like Amazon, Google, Facebook, Dropbox etc.? - Dean jackson

Here is the answer from Dean Jackson.

Attrition at both Google and Facebook is among the lowest I’ve seen across twenty years spent in a half-dozen different industries; the interview bar is set high enough that if you get hired, you’re generally in good shape, and the perks/pay are designed to keep you happy. People certainly do leave and move around, but less than other companies.
But because of it’s size and growth rate, Amazon’s traditionally cast a wider net with their interviews. I believe it’s easier to get into the interview, for one; they’ll take more shots that aren’t going to make it.
Also, Amazon isn’t aiming for zero attrition after people are hired; they know interviews are flawed, so they give more folks a chance to get through the door, it seems. To balance the books on a choice like that, at Amazon, your stock doesn’t vest immediately… so it’s a lower-cost chance for the company.

My naive thoughts

I had three onsite interviews with Amazon, from 2016, 2018 and 2019. The online code screen, phone screen and onsite. I had onsite in 2019 with Facebook as well.

I am always pushing myself to learn new skills. I try to write down what I learn, measure what I improve, come out ideas to work on a small project to learn one algorithm very well, like graph algorithm find all paths.

I am analyzing as well. If I cannot pass Amazon onsite interview, then I have a small chance to pass Facebook onsite interview.

I passed Microsoft online code screen this May, but I did not get onsite interview invitation. But I got Facebook phone screen invitation afterwards. This tells me the signal, there is culture difference and there is something different here.

Hard work beats talent. I have to work hard, solve more problems on leetcode.com, advance my weekly contest ranking. I should start to learn system design daily, weekly and monthly. Focus on basics, and also catch up all other areas.

I have to learn how to build wealth and grow rich. Stay healthy, work on my fitness. Stay connected to so many talent people in the world.

Do not isolate myself and stay in sandbox of my coding blog.

How to write executable code in coding interview? How to stay focus and try to break my own code? How to come out optimal solution, go to time complexity first, and next work on space complexity, and then come out ideas to write code in 45 minutes for the extended algorithm.

Work hard, and do not be afraid to miss something important in my life, next 12 months.




How can senior people (10+ years experience) get programming jobs in companies like Google, Facebook etc.? - Dean jackson

Here is the answer.

I like to write down some highlights:

Facebook (more than Google) also seems to dig for a third category for engineers:
  • Can you communicate well, do you work well solo and in groups, and would you be a decent human being to be stuck with in an airport? Are you a leader who can drive things on your own, and/or drive things organically across teams or even full organizations?
Finally, there are honestly some bonus-point things that might help, and might not, depending on recruiter and whatnot:
  • PM signal: do you have business sense? Can you make solid business decisions?
  • TL signal: Have you ever done any teaching or mentoring, or been in a leadership role?
  • Coworker wins: volunteerism/community service, etc.

Actionable Items


I should work hard on PM signal and TL signal.

What do software engineers who earn 350k+ per year do differently? - Dean Jackson

Here is the answer. I like to read again the answer, I do believe that it is so popular post with over thousand upvotes.

First of all, it is roughly 10 times of my salary at work. If I can help a business working on 8 million Canadian dollar revenue, this principle engineer is working on 80 million dollar project at least. Let us assume that it is 100 million dollar project. 

Since I only help to generate the revenue, the software is not a final product. So it should count as 10% of revenue. So 350K+ per year engineer works on a project 10 million dollar project and he is responsible to help the project success.


Read Quora - Dean Jackson

Sept. 22, 2019

Introduction


It is my research habit. After August 20, 2019 onsite interview with Facebook, I started to work on so many small projects to look into my weakness, why I fail, what I should learn from the experience. I did send out my first LinkedIn mail (only 5 are available), after I sent out on August 30, I got reply back today.

Reading


My task is to read all posts shared on Quora.com. I like to ask a good question and then I can get answer for the community who has Facebook phone screen for a few years, finally has one onsite interview experience. What is next to work on?

Here is the posts I like to read.

I understand that there are a lot of content for me to read and think about, debate about. I read some of posts, and write down my thoughts in forms of blogs. And then I will continue to read and see if I can finish all of the posts.

I also like to give out my overall recommendations.


Saturday, September 21, 2019

Weekly contest 155

Sept. 21, 2019

Introduction


I was too busy to play weekly contest, so I skipped weekly contest from 137 to 155. Today I came back to play weekly contest 155.

Performance report


I did write the first algorithm, second algorithm and third algorithm. I checked second algorithm, only less than 20% submissions are successful, I tried to improve time efficiency of algorithm, but I could not come out working ideas such as using binary search algorithm. I did write third algorithm using union find, and then I ran out of time to go over all disjoint set, and then sort each disjoint set characters, and then put together a string based on index of string.

Here is my ranking.


First algorithm C# code is here,  I just wrote a post on Leetcode discuss quickly.

Second algorithm C# code written in the contest is here. I need to work on the code and make it work, I like to study the ideas from other people, and then figure out how to  make it work fast.
Third algorithm C# code written in the contest is here. I also like to continue to write and make it work.

Actionable Items


Life is tough as a programmer. I understand that it is so important for me to work on crafting skills.

I checked top 10 player and their code, so I understand that I have to be humble, and work hard and push myself to advance my ranking. Those players are really hard working.



The Unspoken Reality Behind the Harvard Gates | Alex Chang | TEDxSHSID

Here is the video over 1 million view.


Burton Malkiel | Talks at Google

Here is the link of Google talk.


Burton G Malkiel. 2004 Interview on his book A Random Walk Down Wallstreet

Here is 42 minutes interview. I like to listen and see what I can learn from the sharing.


The Monkey On Wall Street - Watch BEFORE You Invest

Here is eight minutes video. I found it entertaining. I like to read some study notes next.


A Random Walk Down Wall Street - study notes

Sept. 21, 2019

Introduction


It is better for me to read the study notes compared to watch the video. I like to read and also I have to push myself to learn some basics first. One of ideas is to read as many pages as I can.

Study notes


Here is the study notes written by a finance professor. Here is the link of study notes.

Chapter 7. Technical analysis and the random walk theory

Page 14
Using technical analysis for market timing is especially dangerously. Because there is a long-term uptrend in the stock market, it can be very risky to be in cash. A study by Seybun found that 95% of the significant market gains over the 30 year period from the mid-1960s through the mid-1990s came on 90 of the roughly 7500 trading days. If you happened to miss those 90 days, just over 1 percent of the total, the generous long-run stock market returns of the period would have been wiped out. The point is that market timers risk missing the infrequent large sprints that are the big contributors to performance.

A RANDOM WALK DOWN WALL STREET SUMMARY (BY BURTON MALKIEL

Here is the link.


THE UNIVERSITY OF BERKSHIRE HATHAWAY (BUFFETT & MUNGER ADVICE)

Here is the link.

Warren Buffett and Charlie Munger share their wisdom on how to invest in stocks each year on the annual shareholder meeting of Berkshire Hathaway. Their investing strategies have made Berkshire the 6th most valuable company in the world. Can we learn something from these gurus?


A Glimpse Into A Harvard Business School Case Study Class

Here is the video. I spent 30 minutes to learn the case study method.

Good Luck, Hard Work, And Good Intuition (w/ Leon G. Cooperman) | Grant Williams | Real Vision™

Here is the interview less than 10 minutes.


Watch CNBC's full interview with Leon Cooperman on his top stock picks and negative interest rates

Here is the article.


Leon G. Cooperman - wiki article

Here is the wiki article. I like to write down five things I learn.


Ideas to spend Saturday - Sept. 21, 2019

Sept. 21, 2019

Introduction


It is 10:46 AM in the morning. I like to make plans for the whole day.

My tentative schedule


I like to play some tennis, outdoor activities. I also like to take care of closing my NYCB account in Boca Raton branch, I need to get a letter notarized by TD bank.

I like to watch some videos to learn a few things.

One thing is to consider to play Leetcode weekly contest from 7:30 PM - 9:00 PM.



Friday, September 20, 2019

Ginni Rometty - IBM CEO

Here is the wiki article. I like to read and then take some notes.

'Bloomberg Technology' Full Show (9/18/2019), Facebook and Private Data, IBM CEO, Trump v. Calif.

Here is the video.

Facebook portal and privacy - Kurt Wagner - Bloomberg technology

19:00
It is so good to listen IBM CEO Ginni Rometty to explain technologies.


Getting Rich - Taking responsibility (16 of 16)

Taking responsibility. The rich believe they are the architects of their lives. They don't make excuses, they don't rationalize failures and they don't blame anyone but themselves for their circumstances in life.

Getting Rich - Staying healthy (15 of 16)

Staying healthy. "You can't make money from a hospital bed," is how one millionaire put it to me during my research. The rich exercise every day and they moderate their consumption of junk food and alcohol. A whopping 82 percent of the rich in my study said they had no health issues.

Getting Rich - Finishing what you start (14 of 16)

Finishing what you start. The rich don't quit. They stick to something until they succeed, go bankrupt or die. About 80 percent were focused on achieving some goal and 55 percent spent one year or more on one singular goal. They do not leave projects uncompleted before starting other projects.

Getting Rich - Giving first and getting later (13 of 16)

Giving first and getting later. In order to get, you must first give. You must give value to others to help build your brand.

Getting Rich - Staying open-minded (12 of 16)

Staying open-minded. You can't learn anything if you are closed-off to the world. Being open to new ideas, new ways of doing things and the opinions of others is critical to learning and growth.

Getting Rich - Community (11 of 16)

Community. No one succeeds on their own. The rich build teams. They find apostles for their cause – individuals devoted to them and who share their vision and purpose.

Getting Rich - Controlling your thoughts, emotions and words (10 of 16)

Controlling your thoughts, emotions and words. Over three-quarters, or 81 percent, of the rich made a habit of controlling their thoughts, emotions and the words they used.

Getting Rich - Being optimistic and enthusiastic (9 of 16)

Being optimistic and enthusiastic. Almost three-quarters, or 71 percent, of the self-made millionaires in my study were positive about life. They believed in themselves. Their optimism affected those around them and they became magnets for other success-minded people. This helped them in creating teams that would eventually help lead them to success.

Getting Rich - Taking calculated risks (8 of 16)

Taking calculated risks. Success requires calculated risk, which require you do your homework in order to gain working knowledge in some area and then take action on that knowledge. It might be real estate, investing in some private business, starting your own business, etc. Roughly half, 51 percent, of the self-made millionaires in my study invested their savings in a start-up or private businesses or they made investments in specific areas such as real estate.

Actionable Items



It is so hard for me to learn to invest on stock market again. I did it this year in April after a few months personal finance research. 

I learn the data based on index and how much growth last 100 years. I believe that I should trust capitalism, and then learn as early as possible to invest USA economy. 


Getting Rich - Being patient (7 of 16)

Being patient. An overwhelming majority, 80 percent, of the rich in my study did not become rich until age 50. It takes a long time to create wealth. You have to learn to be patient.

Getting Rich - Creating multiple streams of income (6 of 16)

Creating multiple streams of income. About 65 percent of the millionaires in my study had at least three streams of income. This creates a hedge against failure and poverty. When one stream suffers, the others come to the rescue.

Getting Rich - Dream-setting (5 of 16)

Developing a niche. Those in my study who had a unique expertise in a particular area were paid the most by their company or were able to charge more to customers or clients than their competition. You can develop your niche on the side, in the mornings, at night or over the weekend through self-study or by taking classes.

Getting Rich - Persistence (4 of 16)

Persistence. The rich know that the persistent eventually get lucky.

Getting Rich - Dream-setting

Dream-setting. Building goals around each one of your dreams makes it possible for you to realize each dream. You climb the ladder of success one rung at a time. Every dream realized is a rung on the ladder. Of the self-made millionaires in my study, 80 percent pursued some dream or vision.


Getting Rich - Rich relationships

Rich relationships. Forging relationships with other success-minded people is critical to success. These people open closed doors.

From the article, Tom Corley,
Being rich, or becoming financially independent, boils down to a two-step process:
  1. Accumulate wealth
  2. Keep the wealth you've accumulated

In my book "Change Your Habits, Change Your Life," I share some of the stories about what self-made millionaires did, first, to get rich and then to make their money work for them.

Getting Rich - Daily growth

Daily growth. You must make a daily habit of acquiring knowledge. You must also, on a daily basis, hone your skills, perfecting them until you become an expert.

From the article, Tom Corley,
Being rich, or becoming financially independent, boils down to a two-step process:
  1. Accumulate wealth
  2. Keep the wealth you've accumulated

In my book "Change Your Habits, Change Your Life," I share some of the stories about what self-made millionaires did, first, to get rich and then to make their money work for them.

Case study: Buy and hold Apple stock

Here is the article. 


Real World Example of Buy and Hold

An example of a buy-and-hold strategy that would have worked quite well is the purchase of Apple (AAPL) stock. If an investor had bought 100 shares at its closing price of $18 per share in January 2008 and held onto the stock until January 2019, the stock climbed to $157 per share. That’s a return of nearly 900% in just over 10 years.
Those arguing against using a long-term strategy claim that investors forsake gains by riding out volatility rather than locking in gains and miss out on timing the market. There are some professionals who regularly succeed with short-term trading strategies, but the risks can be higher. Investment success is also realized by loyalty, commitment to ownership and the simple pursuit of standing pat or not moving from a chosen position.

I’ve helped more than 400 millennials fix their finances—and these are their 6 biggest money mistakes

Here is the article.

The Biggest Financial Mistake Women Make

Here is the article.




Top 10 most common financial mistakes - 8 Not investing

Here is the article.


8: Not Investing

If you do not get your money working for you in the markets or through other income-producing investments, you cannot stop working - ever. Making monthly contributions to designated retirement accounts is essential for a comfortable retirement. Take advantage of tax-deferred retirement accounts and/or your employer-sponsored plan. Understand the time your investments will have to grow and how much risk you can tolerate. Consult a qualified financial advisor to match this with your goals if possible.

My sharing


I did my personal finance research starting Nov. 2018, and I found out that I did not invest $8000 US dollars and let is put in Scotia bank over 6 years. Here is the blog.

I did find out that I had over $50,000 Canadian dollars, and the interest I earned in 2018 is less than $100.00 dollars.


Actionable Items

Feb. 21, 2020
I should make a portfolio using the asset $8,000 US dollars for 6 years. One of ideas is to check 5 yrs return, and invest them on US index fund.

Top 10 Most Common Financial Mistakes

Here is the article.


Thursday, September 19, 2019

Case study: count island and then count the shape


Transcript is the following:

Case study: Find all paths

Transcript is the following


MBA Campus Deep Dives

I like to spend time to watch those videos one by one.

Here is the link.


Poets&Quants Deep Dive Into The Rotman Experience

Here is the link.


Mentally Strong People: The 13 Things They Avoid - No 13

13. Expect Immediate Results. Whether it’s a workout plan, a nutritional regimen, or starting a business, mentally strong people are “in it for the long haul”. They know better than to expect immediate results. They apply their energy and time in measured doses and they celebrate each milestone and increment of success on the way. They have “staying power.” And they understand that genuine changes take time. Do you have mental strength? Are there elements on this list you need more of? With thanks to Amy Morin, I would like to reinforce my own abilities further in each of these areas today. How about you?

Actionable Items


What I like to do is to read the above paragraph, and then I like to write down my understanding as well.

Mentally Strong People: The 13 Things They Avoid - No 12

12. Feel the World Owes Them Anything. Particularly in the current economy, executives and employees at every level are gaining the realization that the world does not owe them a salary, a benefits package and a comfortable life, regardless of their preparation and schooling. Mentally strong people enter the world prepared to work and succeed on their merits, at every stage of the game.

Actionable Items


What I like to do is to read the above paragraph, and then I like to write down my understanding as well.

Mentally Strong People: The 13 Things They Avoid - No 11

11. Fear Alone Time. Mentally strong people enjoy and even treasure the time they spend alone. They use their downtime to reflect, to plan, and to be productive. Most importantly, they don’t depend on others to shore up their happiness and moods. They can be happy with others, and they can also be happy alone.

Actionable Items


What I like to do is to read the above paragraph, and then I like to write down my understanding as well.

Mentally Strong People: The 13 Things They Avoid - No 10

10. Give Up After Failure. Every failure is a chance to improve. Even the greatest entrepreneurs are willing to admit that their early efforts invariably brought many failures. Mentally strong people are willing to fail again and again, if necessary, as long as the learning experience from every “failure” can bring them closer to their ultimate goals.

Actionable Items


What I like to do is to read the above paragraph, and then I like to write down my understanding as well.

Mentally Strong People: The 13 Things They Avoid - No 9

9. Resent Other People’s Success. It takes strength of character to feel genuine joy and excitement for other people’s success. Mentally strong people have this ability. They don’t become jealous or resentful when others succeed (although they may take close notes on what the individual did well). They are willing to work hard for their own chances at success, without relying on shortcuts.

Actionable Items


What I like to do is to read the above paragraph, and then I like to write down my understanding as well.

Mentally Strong People: The 13 Things They Avoid - No 8

8. Make the Same Mistakes Over and Over. We all know the definition of insanity, right? It’s when we take the same actions again and again while hoping for a different and better outcome than we’ve gotten before. A mentally strong person accepts full responsibility for past behavior and is willing to learn from mistakes. Research shows that the ability to be self-reflective in an accurate and productive way is one of the greatest strengths of spectacularly successful executives and entrepreneurs.

Actionable Items


What I like to do is to read the above paragraph, and then I like to write down my understanding as well.

Mentally Strong People: The 13 Things They Avoid - No 7

7. Dwell on the Past. There is strength in acknowledging the past and especially in acknowledging the things learned from past experiences—but a mentally strong person is able to avoid miring their mental energy in past disappointments or in fantasies of the “glory days” gone by. They invest the majority of their energy in creating an optimal present and future.

Actionable Items


What I like to do is to read the above paragraph, and then I like to write down my understanding as well.