Monday, January 18, 2021

Learning Environment

 Learn in a relaxed environment. The best recall occurs when brainwave patterns show a relaxed state.

Learn in a multi-sensory environment by involving visual, auditory and kinesthetic activities.

Use color! This stimulates the right brain and helps recall.

Make sure you take breaks every hour.

Try to relate what you are learning to a bigger picture.

Reinforce what you have learned through practice and review.


Saturday, January 16, 2021

Remove whitespace from file names in Unix/Mac

 Go to the folder where the files are located and run:

for f in *; do mv "$f" `echo $f | tr ' ' '_'`; done

Thursday, January 14, 2021

Upload File to S3

 require 'aws-sdk-s3'  # v2: require 'aws-sdk'


ACCESS_KEY_ID = ""

SECRET_ACCESS_KEY = ""

REGION_ID = "us-east-1"

BUCKET_NAME = "bucket-name"


def uploadS3

  credentials = Aws::Credentials.new(

                                     ACCESS_KEY_ID,

                                     SECRET_ACCESS_KEY

                                     )

  s3 = Aws::S3::Client.new(

                          region: REGION_ID,

                          credentials: credentials

                          )

                          

  #Upload export/file1.zip, export/file2.zip

  for file_name in ['file1.zip', 'file2.zip']

    name = File.join('export', file_name)


    # Upload

    File.open(name, 'rb') do |file|

      puts "start uploading #{file_name} to s3"

      resp = s3.put_object(bucket: BUCKET_NAME, acl: "public-read", key: file_name, body: file)

      puts resp

    end

    puts "File should be available at https://#{BUCKET_NAME}.s3.amazonaws.com/#{file_name}"

  end

end

Thursday, January 07, 2021

Law of Success

  1. Fall in love with the process.
  2. Do it every single day.
  3. Celebrate your commitment.
  4. Track your metrics and data.
  5. Master your craft.

Tommy Baker. “The 1% Rule: How to Fall in Love with the Process and Achieve Your Wildest Dreams.” 

Wednesday, January 06, 2021

Live Coding 175 Session Recordings Now Available

We have now over 175+ live coding recordings for Leetcode live coding sessions. That is over 200 hours of discussions on coding problems. We are a group of developers preparing for FANG interviews. We meet everyday and work collaboratively on solving one medium Leetcode problem via Zoom.

This is NOT a study group. We flip the classroom. You study whatever resources you find useful before the meeting. We only focus on PRACTICE and FEEDBACK during the Zoom calls. We share tips and the peer to peer learning has worked really well so far.

I started the daily live coding sessions on July 25th, 2020. I have learned in just two months as much as I have learned in one year when I was studying and practicing by myself. Members requested me to record the sessions so they can watch any sessions that they miss.

We don't rush into coding. We analyze the problem, create a model of the problem and use the model to answer questions. We then brainstorm alternate approaches to solve the problem starting with brute-force and eventually code the optimal solution by the end of the session.

This is not passive learning like watching videos. The paid courses ask you to pause the video and think. But no one teaches how to think and ask questions to solve problem from scratch. We code the solution to problems from scratch.

Our group hates memorizing and we focus on gaining deep understanding of the concepts. Join Leetcode Live Coding Telegram group: https://t.me/joinchat/VOy5LhxpFvgV4aJKeMBIRg

You will also get access to the Zoom cloud recordings. You will develop insights on how to approach coding problems and you don't have to memorize anything. You will learn how visualizing the key aspects of well known algorithms can make it easier to understand the algorithms at a deeper level. 

Tuesday, January 05, 2021

Topic Wise or Random Practice ?

 Topic wise practice if fine when you are learning the basics of data structures and algorithms. You basically can be operating in either Learning Mode or Practice Mode. When you are in learning mode, it's ok to practice by topic otherwise you should not be practicing by topic. Because, you have to develop the ability to recognize what data structure and algorithm to use just like a real interview.

Leetcode Live Coding Thread Discussion Link

 https://leetcode.com/discuss/general-discussion/1002477/Leetcode-Live-Coding