Thursday, October 29, 2020

Coronavirus 2020: What makes a software programmer better one in 2020?

 I am not so good as a software programmer in 2020. I can tell from my weight. It went up to 200 lb. I have to start to learn how to read my emotion and stress level. Stay connected, stay social, and more it is to play sports and stay healthy and fit as well. 


What really make a good programmer? Recently I have chance to review my practice on Leetcode dynamic programming solution. I came cross my writing in 2019, and then I did some work after that. I can tell from my writing in 2019. It is not yet a good programmer. I need to pay more attention to those following factors:


1. Speed. Time to work on a working solution

2. Make it simple. Write a simple test case, and do thorough case study. Simplify the process and learning. 

3. Practice more solution shared by other players, read C# discussion posts and practice as well. Make sure that I can learn from the small community. 


I should write down what I learn from Amazon code screen, Microsoft phone screen, Facebook phone screen and onsite, Google coming phone screen, Alida phone introduction. 

Here is the link I work on last few days. 


MCFE stock: My shareholder experience - less than two weeks from Oct. 22 to Oct. 29, 2020

 It is my job to set stop loss so that I can survive market volatility. I ended up selling MCFE with loss $200 dollars. 

It is my short term history in my USA retirement account. 


I will work on lessons learned:

  1. I should have sold it early, or stop loss at $50 dollars. 
  2. I limit my stock purchase less than $6000 dollars, since I know that it is hard to beat the market. 
  3. Stop big loss is tough job for me to learn. 
  4. I had $200 gains from $19,100 to $19,300, gains are small ones, but loss is quick and less than two days on MCFE, $280 dollars in less than two days. 
  5. I should not keep position $1800 dollars on MCFE, it will be much better to hold MSFT $1800. 
  6. I need to learn lessons - keep learning. 

Technical problem of Ameritrade.com

Ameritrade.com showed wrong market price for me to sell, I double checked twice, it is $16.80, not $15.90, so I decided to sell on market price with $1680.00. But final price is $15.90. 

To play stock market, I like to learn more about business. It helps me to understand US business and stay frugal to survive hardship. 

3% rebound in less than one hour


Buy high and sell low - panic 

It is hard for me to learn as a stock investor. I was panic and then ended up with $200 dollar loss. 

Follow up 9:43 AM
What I should do is to expect that there is a big drop at 7:00 AM. I should sell all 100 shares, wait for the drop, and bought back at price $16.00 dollars, and sell it at $16.50. And so on. 


Wednesday, October 28, 2020

PPL stock: TFSA Users: $10,000 in This 8.83% Dividend Stock Pays $883/Year

 Here is the article. 

Pembina has a forward dividend yield of 8.83%, which translates to an annual payout of $883 on a $10,000 investment. While dividends may seem insignificant in the short term, they can generate substantial wealth over long periods.

Pembina is a top pick for your TFSA

Any dividends, capital gains, or interests earned in your TFSA are exempt from Canada Revenue Agency (CRA) taxes. This makes dividend-paying companies such as Pembina good buys for your TFSA portfolio.

Similar to energy peers, Pembina has underperformed broader markets and is down 41% year to date. It is a midstream oil and gas company, which means it does produce oil but also stores and transports the commodity.

With a monthly dividend of $0.21 per share, Pembina pays invertors annual dividends of $2.52. The company has been paying a monthly dividend since 1998 and raised payouts or eight consecutive years. However, due to a fall in crude oil and natural gas prices in 2020, Pembina’s net income fell 62% year over year in the last two quarters. This meant the company’s payout ratio stands at an unsustainable 132%.

Alternatively, Pembina’s revenue is relatively stable and is derived from long-term contracts. During the Q2 earnings call, Pembina claimed its accounts receivable was 97%, which suggests it has an investment-grade balance sheet. Further, its EBITDA and adjusted cash flow were higher in the first six months of 2020 compared with the prior-year period. If oil prices recover in early 2021, Pembina’s earnings growth will drive stock prices higher.

Focus on improving liquidity

Pembina expects EBITDA for 2020 in the range of $3.25 billion and $3.55 billion, which is in line with its previous guidance. The company continues to focus on improving liquidity by terming out $850 million of debt drawn on its credit facility and establishing a new $800 million revolving credit facility.

Pembina’s liquidity position at the end of Q2 stood at $2.8 billion with no debt maturities for the balance of 2020 and $600 million of maturities distributed throughout 2021. In the first quarter, the company deferred $4.5 billion of capital projects and remains on track to reduce capital investments by $1.1 billion in 2020. This will be marginally offset by project delays that will result in cost overruns of $100 million this year.

Analysts covering Pembina stock have a 12-month average target price of $39.73, which indicates an upside potential of 40% from the current trading price of $28.26. After accounting for its dividend, Pembina might generate returns of close to 50% in the next year.

Tuesday, October 27, 2020

Value of coding: Pass online code screen

 Oct. 27, 2020

Introduction

It is hard for me to define the value of good coding skills. I definitely have a lot of room to improve in terms of debugging and troubleshoot. I also noticed that I will get nervous when things get tough and clock is ticking. 

Value of coding

It is hard for me to find time to write so many algorithm in short time period. What I can do is to stay consistent, and work continuously for another two to three months. I like to complete another 60 algorithms. 

When I am in trouble with failed test cases, I need to stay calm. I have so many ideas to try. Each idea will cost me at least a few minutes. I should focus on the analysis instead. 

Lessons I learn

  1. I should spend first 10 minutes to go over all those two algorithms first, so that I can figure out which is quick to write and what is challenge. 
  2. Switch back and forth between two algorithms. The goal is to pass assessment; so it is important to solve one and pass online judge, so that I have more confidence in the rest of time. 
  3. Avoid get stuck on the first algorithm. 
  4. I should think about how to train myself better in my practice. Solve more algorithms which are calculation intensive. 
  5. Always go to 1Acre website to look up recently trend, what is concern for those players. What I should look out and what to prepare. Hard working is so important. 



ENB.TO stock: 5 year investment plan - near 100% return

 Following in Buffett’s footsteps, Suncor is a better bet than AC in the pandemic. A safer investment than Suncor is the pipeline operator Enbridge (TSX:ENB)(NYSE:ENB). It doesn’t have exposure to oil prices, which makes it more stable. It has exposure to natural gas and renewable energy. Its assets are pipelines, which again have a longer life and a higher return on investment.

Enbridge’s “toll-like” business model ensures regular cash inflow. The more pipelines it builds, the more cash it earns and increases its dividends every year. This high capacity doesn’t lead to cash burning in the event of weak demand.

In a normal scenario, Enbridge would continue to pay the current dividend without increasing it, and its stock would return to the pre-pandemic level in five years. It will give you over $46,000 ($21,325 in dividends and $25,000 in capital appreciation) income on $50,000 investment.

The post Why Buffett Holds Suncor Energy (TSX:SU) and Not Air Canada (TSX:AC) appeared first on The Motley Fool Canada.

SU.TO stock: Warren buffett invested extra shares

Buffett retained its holdings in Suncor Energy (TSX:SU)(NYSE:SU). He purchased additional five million shares of the oil giant. 

The one thing Buffett likes about Suncor is its long-lived assets — oilfields, which have an average life of 26 years. Suncor has an upper hand with stable cash flows and high dividends. It has been paying dividends since 1992 and steadily increasing them since 2008.

Although many analysts say that oil companies’ heydays are over and renewable energy will replace oil, that won’t happen for the next two decades. Till that time, it will continue to pay dividends.

Suncor has cut dividends by 55%, but investors have penalized the stock for it. The stock is down 30% from the date dividend cuts were announced, thereby increasing its dividend yield above 5%.

The oil demand will return when people start traveling again and factories start production in full swing. In the best-case scenario, Suncor would continue to pay the current dividend per share, and its stock would return to the pre-pandemic level in five years. It will give you $62,725 ($12,725 in dividends and $50,000 in capital appreciation) income on a $50,000 investment.

In the worst-case scenario, Suncor would acquire smaller oil companies or get acquired by a bigger fish. In both cases, investors would stand to win.

BMO stock: 5% dividend stock - 25% upside

 BMO is a play for its wealth management exposure and the potential for upside from an economic recovery. One of Canada’s Big Five bankers, BMO pays a rich 5% dividend yield. Investors expecting shares to get knocked down by election froth should keep some cash on hand and get ready to build a position on a selloff. Down 16% year over year, BMO is already a snip, though, and could bounce back in 2021.

Holding BMO and Pembina in a portfolio can add a bit of backbone to that long-range wealth creation plan. Either name could satisfy a recovery rally strategy. With the potential for sudden upside next year, a BMO-Pembina tag team could see a steep share price recovery. BMO could see 25% upside, while the midstreamer has a high target estimated at almost double the current share price.

PPL stock: 8.99% dividend - Down 3.6% over the last five days - Oct. 27, 2020

 

Buying stocks in a volatile market?

Oil stocks and shares in the Big Five are key asset types to look at in the next couple of weeks. Names such as BMO (TSX:BMO)(NYSE:BMO) and Pembina Pipeline (TSX:PPL) could see increased volatility around the election. Each of these names is a dividend-paying stock of high quality. Pembina is particularly notable for its 8.9% dividend yield and impressive market share.

Down 3.6% over the last five days at the time of writing, Pembina could see further choppiness in the coming weeks. As a midstreamer, though, Pembina is apt for long-term oil and gas investing with a pipeline infrastructure focus. Having lost around 40% of its market value in 12 months, this is a quality stock selling at bargain basement prices.

CVE purchased HSE: Cenovus to buy Husky Energy for $3.8B, designed to 'weather the current environment'

 Here is the article. 

The aim of the all-stock, $3.8-billion deal between the two Calgary-based businesses is to create a company that's stronger, more resilient and operating with "significantly reduced" risk to market volatility.

The combined Cenovus-Husky company will be the third-largest Canadian oil and natural gas producer, based on total company production, Cenovus says. (Reuters)


Combining the companies will create annual savings of $1.2 billion, largely achieved within the first year and independent of commodity prices, the companies said.

That's likely bad news for Calgary office workers as about $400 million of the savings are expected to come from "workforce optimization," along with savings from IT and procurement, said Pourbaix during a separate conference call with analysts.


Monday, October 26, 2020

INTC stock: $46/ share, 4% losses on Oct. 26, 2020

 On surface, the quarter was good. Coming into the quarter, Intel had five straight quarters of sizable beats versus consensus, especially on the revenue front. Here in Q3, revenues beat expectations. And earnings were in line. But obviously, markets do not care just about the headlines. That said, the quarter was led by strong consumer notebook demand and continued cloud growth, and the company generated $18.3 billion in revenue and delivered $1.11 in EPS. While CPUs are foundational to Intel's business, the company is also adding a range of other processing engines or XPUs to its portfolio. It has also made great strides in graphics and is now scaling its graphics architecture from integrated to discrete levels of performance. However, the concern is things are behind the competition.

So, what is the problem? The market was really displeased with the data centric revenues. Data-centric revenue was $8.5 billion, down 10% year over year on COVID-related weakness. PC-centric revenue was $9.8 billion, up 1% year over year on the strong aforementioned notebook PC demand in consumer and education segments and on increased supply. Gross margin for the quarter was 55%, two points below expectations due to lower data center ASPs, driven by mix shift from enterprise and government to cloud and lower PC client ASPs on increased demand for consumer and education PCs. That is a major problem.

Sunday, October 25, 2020

Value Investor’s Dream Market?

 Here is the link. 

One extraordinary characteristic of this pandemic period has been stock market performance. A recent Wall Street Journal headline captures it perfectly: “Turbocharged stocks blast off.” In its third-quarter market’s review, the Journal points out that “more stocks skyrocketed at least 400% in the first three quarters of the year than in any comparable period since 2000.” This is not a tide that is lifting all boats, anything but. The overwhelming majority of the winners are tech or biotech-related. Whether value’s short-lived outperformance will continue is of particular interest to this week’s guest. She is Sarah Ketterer, Chief Executive Officer of Causeway Capital Management. The combination of its deep value and international focus has proven to be challenging in this era of high performing tech and U.S. centric stocks, but Ketterer and her colleagues now call this a value investor’s dream market as more high quality, financially strong companies sell at “shockingly” cheap valuations. Ketterer will discuss which ones, in particular, have caught her eye.

Stocks:

Italian bank - UNCRY

GE

Airline -

And more ...



System design: AWS well architected paper, the 5 pillars

 Here is the link. 

It is shared by Linkedin friend working for AT & T. 


Serverless Application Lens AWS Well-Architected Framework

 Here is the link. 


Eviction crisis: Wealthy Homeowners Are ‘Bargain-Hunting’ As Millions Face Eviction | MSNBC

 Here is the link. 

Evictions - 12 million evictions by December, 2020

Washington Post economics correspondent Heather Long describes the “unprecedented” housing inequality in America, including an estimated 12 million evictions over the next few months.

Buy a big home - wealthy people, extra room for home office

But 12 million people will be evicted instead.

Looming eviction crisis in America

 Here is the link. 

As the COVID-19 pandemic causes unemployment to skyrocket, nearly 28 million people are worried about being evicted in the coming months.


America's Looming Eviction Crisis

 Here is the link. 

10 million people lost their homes in the wake of the 2008 crash. What we're about to experience will be much worse. Thanks to a combination of COVID, the cult of capitalism, and America's horrific pandemic response, 28 million renters are facing eviction. And that's not even counting those who own their homes. We're in for a housing crisis of unprecedented magnitude.


4:44/ 11:29

110 million American renters

20% face eviction


Out of work and facing an eviction

 Here is the link. 

W9 form

$11,752 court fee and rulings 

2,300 dollars to pay for it. 

Eviction note - follow laws here for the change 

Leetcode discuss: 1631. Path With Minimum Effort

Here is the link on youtube.com. 



Here is my Leetcode discuss post.

First practice - C# copy idea and copy code to learn quickly

Oct. 25, 2020
Introduction
It is the third algorithm in weekly contest 212. I started the contest late and only had 10 minutes left, I thought about the problem and it was hard. I could not find a working idea.

After the contest
I just quickly went over the discussion post, and then I like to study the code and then figure out the following:

  1. Start from top left node in the matrix, define C# Tuple<int, int,int>(int Height, int row, int col);
  2. Try to start from top left node to visit all nodes in the matrix, but choose the order to get minimum distance. How to do that? Design a minimum heap.
  3. Define a minimum heap with distance, and always remove the minimum node from the heap, and then visit it's unvisited neighbors, and add all those neighbors to the heap.
  4. Make sure that visit all nodes in the order based on minimum distance until bottom right node is reached.
  5. Define a node with distance based on consideration of previous node's distance in minimum heap process and current one.

Case study
I think that the code is pretty standard minimum heap practice once I understand the idea and learn how to reason it.

I need to look into C# SortedSet default comparer for this Tuple<int, int, int>. It is surprising that the code can be simplified using short hand expression, and no need to write any code related to IComparer as well. I did look up Google.

It is much better to work on a small case study, then I can quickly understand the algorithm and how to design it next time.

Example:
Matrix
1, 2, 3
3, 8, 2
5, 3, 5
Using A, B, C, D, E to mark those first five nodes in matrix.
1A, 2B, 3C
3D, 8E, 2
5, 3, 5
Add A node in matrix into minimum heap, (0,0,0), remove minimum one in the heap, and then visit A's neighbor nodes B and D, and then add B and D into minimum heap.
Next step is to remove minimum node in the heap, which is B. The distance is 1, and add C and E into the heap.

Step by step
Let me work on a more simple example,
Example:
Matrix
1, 2
3, 8
Add A, B, C, D marks to simplify the explanation.
1A, 2B
3C, 8D
1A is added to minimum heap, the minimum effort is 0;
remove 1A from minimum heap, and visit two neighbors, 2B and 3C.
1A -> 2B has minimum effort 1, and 1A to 3C has minimum effort 2.

Add 2B and 3C to minimum heap. The smallest one is 2B.

Next is to remove 3B from minimum heap, visit 2B's neighbor 8D, so 8D has minimum effort 6. Add (6, 1, 1) to minimum heap.

Next is to remove 3C from minimum heap, visit 3C's neighbor 8D, so 8D has minimum effort 5. Add (5, 1, 1) to minimum heap.

The tip is to mark visit only after the node is popped from minimum heap. In our simple example case, 8D has chance to be added into minimum heap more than once, first one is with height 6, second one is with height 5.

Since minimum heap is sorted, the path from 1A->3C->8D is removed from minimum heap first before 1A->2B->8D, the answer is 5 not 6.

In summary, the first tip is enforce order using minimum heap, and the second tip is to mark visit after the node is removed from minimum heap, so one node 8D has two chance to be considered and added to minimum heap. It is kind of clever. But it took me over 30 minutes to figure out, I had to debug the code using Visual studo first, and then figure out step by step.

Go over again, the minimum heap step by step:

  1. 1A, (0, 0, 0)
  2. remove 1A from heap, add 2B and 3C, sort them.
    (1, 0, 1)
    (2, 1, 0)
  3. remove 2B from minimum heap, add 8D into minimum heap.
    (2, 1, 0)
    (6, 1, 1)
  4. remove 3C from minimum heap, add 8D into minimum heap.
    (6, 1, 1)
    (5, 1, 1)
    sort them
    (5, 1, 1)
    (6, 1, 1)
    Remove 8D from minimum heap, which is bottom right, minimum effort is 5, not 6. The path is from 1A -> 3C -> 8D.

I do believe if I can read this short case study, then I can write the code in the contest or phone screen in 10 minutes. But I have to go over step by step to understand competition of two 8D entries in minimum heap in order to get minimum effort.

public class Solution {
        // (0,1),(1,0),(0,-1), (-1,0) four directions, simplified version
        private int[] directions = new int[] { 0, 1, 0, -1, 0 };
    
        /// Oct. 25, 2020
        /// study code: 
        public int MinimumEffortPath(int[][] heights)
        {
            int r = heights.Length;
            int c = heights[0].Length;
            bool[,] visited = new bool[r,c];
            
            // declare Tuple data type
            // https://docs.microsoft.com/en-us/dotnet/csharp/tour-of-csharp/types
            // new Tuple<int,int,int>( int H, int X, int Y) -> short hand -> (int H, int X, int Y)
            // default comparer ? 
            var sorted = new SortedSet<(int H, int X, int Y)>();
            
            sorted.Add((0, 0, 0)); 
            while (sorted.Count > 0)
            {
                // find smallest one in Height, if the same, then compare X, then compare Y
                // ask why? What is strategy? Find smallest one - greedy 
                // 
                var cur = sorted.Min;
                
                if (cur.X == r - 1 && cur.Y == c - 1)
                {
                    return cur.H;
                }
                
                visited[cur.X, cur.Y] = true;
                
                // Look up C# SortedSet source code - Remove API
                // very complicated - red black tree - find node and remove node
                // https://referencesource.microsoft.com/#system/compmod/system/collections/generic/sortedset.cs
                sorted.Remove(cur);
                
                for (int d = 0; d < 4; d++)
                {
                    int nx = cur.X + directions[d];
                    int ny = cur.Y + directions[d + 1];
                    
                    if(nx < 0 || nx == r || ny < 0 || ny == c || visited[nx,ny]) 
                    {
						continue;
                    }
                   
                    // all nodes in smallest path - smallest distance should be maximum one
                    var next = Math.Max(cur.H, Math.Abs(heights[cur.X][cur.Y] - heights[nx][ny]));
                    
                    sorted.Add((next,nx,ny));
                }
            }

            return 0;
        }
}

After mock interview
10/25/2020 3:58 PM 

I could not make it work in my mock interview as an interviewer, then I debugged the code using visual studio, and learned the detail the competition case in minimum heap. 

I recorded another video. 

Saturday, October 24, 2020

My business school - my MBA - How Robinhood Makes Money

 Here is the link. 

Robinhood, an investing app valued at over $5 billion, says it's trying to "democratize America's financial system" by making investing accessible to the little guy with free trades. It's an eye-popping valuation for a financial company with opaque metrics and plenty of competition. The young company had its share of missteps as well, prompting questions of whether or not it can handle primetime. Robinhood has faced criticism for business practices that allow it to offer free trading. It also botched the rollout of a checking and savings account feature in late 2018, garnering concern from regulators. But the company's incredible growth and popularity with younger investors – more than 6 million users by the end of 2018 – means it could be a major player in banking moving forward. » Subscribe to CNBC: http://cnb.cx/SubscribeCNBC


My business school - My MBA : How Venmo Makes Money

 Here is the link. 

Venmo has revolutionized the way pay each other back. From sending roommates the rent check to reimbursing friends for dinner, people ‘Venmo’ each other all the time. But have you ever wondered how this fun, emoji laden payments app actually makes money? Well, for years, it hasn’t. But now Venmo is on the cusp of profitability for its parent company, Paypal. Concerns remain about privacy for users and security for their money. And many on Wall Street are still waiting to see whether this millennial digital payments phenomenon is just flash in the pan or if it’s really here to stay. Bill Ready, Paypal's COO and the man who brought the once no name app to mainstream fame invited CNBC to Venmo's New York offices to get a look inside how the payment app works. NOTE: On April 24, 2019 (a day after this video was published), PayPal revealed for the first time that Venmo has 40 million users. In the video above, CNBC cited eMarketer, which had estimated 27.4 million Venmo users as of April 2018.. In its first-quarter 2019 earnings report, PayPal said it now has a total 277 million total customer accounts — including 22 million merchant accounts. Total payments volume for Venmo grew 73 percent year over year to $21 billion in the first quarter, the company said. The company said Venmo is still on pace to do $100 billion in payment volume this year.



Small business owner: Things I learned from dentist office - two visits

 Oct. 24, 2020

Introduction

I was in financial struggle, and I had four big teeth extracted, three of them was extracted in January 2019, but I could not afford to have any implant. Each one will cost me $4500 in the city of Vancouver. I recently visited twice since my dental insurance will expire in October. I had $1000 dollar budget to spend to get service. 

Small dentist office near rupert/ kingsway

I visited dentist office for a few years starting from 2010, and then I moved to dentist office in metro town. But I figured out that I lost three big teeth, and I learned lessons to be educated. I never can learn things so hard to have three teeth infected all the time. I experienced the bone loss, gum surgery, infection. I should extract one tooth early to save neighbor tooth. 

Small dentist office

The dentist does so many things for various customers. He can do normal cleaning, and any other dental jobs if needed. The office used square a few years ago. I just learned that the box is called square. My friend Rick bought Square stock and made 100% return this year. I was naive to bet on hotel, airline stock etc. 




Business school - My MBA: How Square Makes Money

 Here is the link. 

Square began in 2010 after the invention of a small credit card reader that plugged into iPhones. About 10 years later, the company has grown into a $26 billion fintech behemoth under Jack Dorsey's leadership. Square profits off a lot more than card swipes at your favorite trendy coffee shop. The company provides a wide range of software products for sellers that helps simplify everything from payroll to making appointments with customers. Square offers small business loans as well, often in sums smaller than traditional banks are willing to lend to neighborhood stores, restaurants and coffee shops. On the consumer side, Square launched Cash App, originally called Square Cash, in 2013. Since then, the app has seen enormous growth, jumping from 7 million to 15 million users in 2018 alone. Square credits its success to a mission of economic empowerment for everyone from a small business owner to a major retailer. But critics say the company may have lost focus, be overvalued, and struggle to sustain growth if the U.S. faces an economic downturn. » Subscribe to CNBC: https://cnb.cx/SubscribeCNBC


50,000 readers/ payment volume 

2.75% + 0.15 

$15 billion/ year -Jack Dorsey -, CEO, Square & Twitter 


America In Crisis: Economic Turning Point | NBC News

 Here is the link. 

NBC’s Stephanie Ruhle, CNBC’s Wilfred Frost, and Telemundo’s Jose Diaz Balart anchor an hour of coverage tied to the economic crisis that’s hitting millions of Americans because of the pandemic. They’ll be joined by newsmakers and real Americans feeling the impact personally.

Unemployed fighting to stay afloat as extended COVID-19 benefits remain in limbo

 Here is the link. 

Some argue the weekly $600 unemployment payment was too much, keeping people from going back to work. Meanwhile, with some industries unable to return to work, people try to make ends meet.

13339 102A AVENUE 313, Surrey, British Columbia V3T0C5

 $308,000

I still remember that I went to see new model home over 10 years ago. The price was around $130,000 dollars. I just could not believe that I chose not to purchase one, get mortgage. Now the price is still double, coronavirus crisis will affect millions people's job, and million people will be evicted as renters. 

I like to wait and see what is next. Market should go down more. 

Property Summary for 13339 102A AVENUE

Type
 
Single Family
Sub-Type
 
Strata
Building Type
 
Apartment
Title
 
Strata
MLS® Number
 
R2511398
Year Built
 
2009
Stories
 
1
Basement
 
None
Neighborhood
 
Surrey City Center
Postal Code
 
V3T0C5