- Signup for VPS provider such as Linode
- Create a node
Monday, June 13, 2022
12 Factor App
Heroku, with its 12-factor application model, has changed the way we think about building, deploying, and hosting web applications.
The rise of containers, phoenix servers and continuous delivery has seen a move away from the usual approach to deploying web applications. Traditionally we have built an artifact and then installed that artifact into an application server. The result was long feedback loops for changes, increased build times and the not insignificant overhead of managing these application servers in production. Many of them are a pain to automate too. Most teams we work with favor bundling an embedded http server within your web application. There are plenty of options available: Jetty, SimpleWeb, Webbit and Owin Self-Host amongst others. Easier automation, easier deployment and a reduction in the amount of infrastructure you have to manage lead us to recommend embedded servers over application servers for future projects.
Cloud Native Apps
https://dev.to/syncsynchalt/safe-http3-experimentation-with-caddy-447f
https://requestmetrics.com/web-performance/http3-is-fast
Thursday, June 09, 2022
My notes
Secure Connection
- Establish secure connection from the workstation to the servers.
- Run deployment tasks
- Upload configuration files
- Log in
- Put the public key on the server
- Create a secure connection using the private key
- Avoid password based authentication
- Use SSH tunneling to reuse the connection for other services
SSH Keys
- Use ssh-keygen to make a new pair of SSH keys
- Create a virtual private server in the admin panel
- Copy the SSH keys using ssh-copy-id utility for providers that setup password-based authentication
Success Criteria
Remote Shell
- Install ssh-agent on Mac OS
- Connect to server from the client, use ssh command
- Define USER environment variable to specify hte user on the host
- Define HOST environment variable to specify the remote server's hostname or IP address
- The default configuration file used is ~/.ssh/config
- The default identity file (private key) is ~/.ssh/id_rsa
- The identity_file, login_name and port values can be specified per host in the configuration file (~/.ssh/config)
File Transfers
Steps
- Signup for hosting provider
- Create a node
- Provision a node
- Deploy code
- Maintain node
- Figure out which steps are done by the customer and which steps are done by the product.
- Establish secure
Wednesday, June 08, 2022
June 6, 2022 Tasks
Completed Tasks
- Deploy static blog for generating leads: https://www.deploygrid.live/
- Create the landing page and update the site: https://apigrid.dev/
Pending Tasks
- Create a demo of the product and ask for payment
- Search "company name sucks" to find the tradeoffs
- Breakdown the problem: What is the flow? Find the core problem.
- Solve one CORE problem
- Ask why five times and note down the answer for each why.
- Write an article and promote based on the answers for 8
- Build it fast
- Ship it
- Test the idea
- Tweak the initial idea
Tuesday, June 07, 2022
Deploy Grid Articles
- Brewfile
- DeMorgan's Law
- Jekyll + Tailwind
- Customizing DateTime format
- Cohesion
- Coupling
- 12 Factor Apps
- Naming methods by looking at Jira ticket description
- Avoid try and using the safe navigation operator
- Upgrading Puma, managing technical risk
- Procfile
- Foreman
- Install syntax highlighter in Jekyll
- Falcon server
- Using constants and moving all related constants to one file
- JSON Schema validator for request and response validation
- Breaking complex conditional into simpler methods to make the code expressive
- Traceability from requirements to code to database (all layers)
- Deploying the ToDo apps for different stacks (available as open source) using the deployment tool
Monday, June 06, 2022
The onegrid.run Commands
Grid CLI Commands
Compass
Who are the other players delivering the same functions?
Which player will win the inevitably win the IFR game in the long term?
What implications does this have on the business we are thinking of starting?
Saturday, May 28, 2022
Caddy Server Topics
Install Caddy Server
Caddy Server - Hello World
Caddy Server - API
Deploying Static Site using Caddy Server
Deploying Node.js app using Caddy Server
Deploying Zally using Caddy Server (Replace nginx and Apache with Caddy)
Caddy Server as Reverse Proxy for Micro Services
Using Caddy Server with a Rails app on EC2
Deploy a Dynamic Webapp on a Custom Domain using Caddy Server
Sunday, May 22, 2022
Bad Characteristics of the Developer Tool
Plays loud and horrible music on page load
Displays dropping snow flakes
Displays lot of banner ads
Loads lot of images very slowly
Broken images and links on the page
Has many distractions on the page
Loads a blank page on the screen
Loads flashing headlines on the page
Loads animated gifs
Overlay popup hides the page
Does not have any outcome
Links to unnecessary features
Lack of balance between design and content
Prompts installation of Java and flash to load applets and flash player
Not using web safe fonts
No button to click (no way to navigate)
Loading large images
Too much text
No whitespace
No clear user journey
Slow site speed
100% bounce rate
No one completes the entire flow
No SSL
Completed Tasks for Keyword Research of OpenAPI Developer Tool
- Search Google for "OpenAPI", check the results for relevance
- Search Amazon for "OpenAPI", check the results for relevance
- Search Google trends for "OpenAPI", worldwide and for the past 5 years.
Compare your keyword with: orchid care, improve memory, leadership skills, beekeeping and see if it falls within similar search volume. It falls within the profitable bandwidth.
Elevator Pitch for Zally
Zally is a linter for OpenAPI specifications.
- Capable of checking RESTful API design standards
- Gives early feedback for API designers
- Provides best practices and advices
Its standard configuration will check your APIs against the rules defined in Zalando's RESTful Guidelines, but anyone can use it out-of-the-box.
Web UI shows implemented rules and lints external files and inline API definitions.
Features
- Support for OpenAPI 3 and (Swagger) OpenAPI 2 specifications
- RESTful API, CLI and Web interface
- Rich Check configuration
- Ignore functionality (x-zally-ignore extension)
- Java/Kotlin API for new Checks + helper functions
Saturday, April 16, 2022
Monday, February 21, 2022
Installing mysql2 gem on Mac OS Monterey M1 chip
gem install mysql2 -- --srcdir=/usr/local/mysql/include
fatal error: Unable to locate credentials
Command:
$ aws s3 rm s3://YOUR_BUCKET/ --recursive --dryrun --exclude "*" --include "my-folder/*"
Run aws configure and provide the access key and secret key when prompted
Unsupported Python version detected: Python 2.7
Error:
Unsupported Python version detected: Python 2.7
To continue using this installer you must use Python 3.6 or later.
For more information see the following blog post: https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-python-2-7-in-aws-sdk-for-python-and-aws-cli-v1/
Change this command:
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
to
sudo /usr/bin/python3 ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Thursday, February 10, 2022
pyspark Installation
Install Latest Python
sudo apt update
sudo apt -y upgrade
python3 -V
Install Development Tools
sudo apt install -y build-essential libssl-dev libffi-dev python3-dev
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.10
Install PIP
sudo apt install -y python3-pip
Install pyspark
pip install pyspark
source ~/.profile
sudo apt install default-jdk scala git
Verify Spark Installation
pyspark
Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] on linux
Welcome to SPARK version 3.2.1
Using Python version 3.8.10 (default, Nov 26 2021 20:14:08)
Spark context Web UI available at http://dollar.lan:4040
Spark context available as 'sc' (master = local[*], app id = local-1644524108365).
SparkSession available as 'spark'.
>>> big_list = range(1000)
>>> rdd = sc.parallelize(big_list, 2)
>>> odds = rdd.filter(lambda x:x %2 != 0)
>>> odds.take(5)
[1, 3, 5, 7, 9]
Wednesday, December 01, 2021
Rails 7 Sample Project
1. gem install rails -v v7.0.0.alpha2
2. rails new blog --css tailwind
3. rails g scaffold post title
4. rails action_text:install5. rails db:create db:migrate
Monday, November 29, 2021
Share Folder in Mac with Multipass Ubuntu Instance
Share Folder
multipass mount local/folder/path multipass-instance-name
multipass mount /Users/bparanj/cloud gold
multipass info gold
Name: gold
State: Running
IPv4: 192.168.64.2
Release: Ubuntu 20.04.3 LTS
Image hash: 91740d72ffff (Ubuntu 20.04 LTS)
Load: 0.71 0.53 0.32
Disk usage: 2.6G out of 4.7G
Memory usage: 241.0M out of 981.3M
Mounts: /Users/bparanj/cloud => /Users/bparanj/cloud
UID map: 501:default
GID map: 20:default
Saturday, November 27, 2021
ssh into multipass instance
Launch Ubuntu instance:
multipass launch --name gold
Copy the IP address from:
multipass list
Log in to multipass instance:
sudo ssh -i /var/root/Library/Application\ Support/multipassd/ssh-keys/id_rsa ubuntu@192.168.64.2
Friday, November 19, 2021
An error occurred while installing ffi (1.12.2), and Bundler cannot continue.
bundle config build.ffi -- --with-cflags=-Wno-implicit-function-declaration
bundle
Tuesday, November 09, 2021
Postgresql Post Install Message
To migrate existing data from a previous major version of PostgreSQL run:
brew postgresql-upgrade-database
This formula has created a default database cluster with:
initdb --locale=C -E UTF-8 /opt/homebrew/var/postgres
For more details, read:
https://www.postgresql.org/docs/14/app-initdb.html
To restart postgresql after an upgrade:
brew services restart postgresql
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/postgresql/bin/postgres -D /opt/homebrew/var/postgres
sqlite3 install
After brew install, the output:
If you need to have sqlite first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/sqlite/bin:$PATH"' >> ~/.zshrc
For compilers to find sqlite you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/sqlite/lib"
export CPPFLAGS="-I/opt/homebrew/opt/sqlite/include"
For pkg-config to find sqlite you may need to set:
export PKG_CONFIG_PATH="/opt/homebrew/opt/sqlite/lib/pkgconfig"
Monday, November 08, 2021
Warning! PATH is not properly set up
Warning! PATH is not properly set up, /Users/n1576925/.rvm/gems/ruby-3.0.2/bin is not at first place.
Usually this is caused by shell initialization files. Search for PATH=... entries.
You can also re-add RVM to your profile by running: rvm get stable --auto-dotfiles
To fix it temporarily in this shell session run: rvm use ruby-3.0.2
To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
In MacOS Monterey, add the following to .bash_profile:
# RVM can encounter errors if it's not the last thing in .bash_profile
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to path for scripting (to manage Ruby versions)
export PATH="$GEM_HOME/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Tuesday, September 07, 2021
Rails on Docker Tips
1. Reduce size of the image
RUN apt-get clean && rm -f /var/lib/apt/lists/*_*
2. Combine update, install and clean:
RUN apt-get update -y \
&& apt-get install -y -q package-name \
&& apt-get clean \
&& rm -f /var/lib/apt/lists/*_*
3. Use a separate build stage
FROM base-image AS builder
COPY . /app
RUN apt-get install build-essential \
&& bundle install --deployment
FROM base-image
COPY --from=builder /app /app
4. Set the system locale
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
5. Create an unprivileged user
# After build
RUN adduser -s /bin/sh -u 1001 -G root \
-h /app -S -D rails \
&& chown -R rails /app
USER rails
6. Prefer exec form for CMD
CMD ["bundle", "exec", "rails", "s"]
7. Specify resource constraints in production
requests:
memory: "100Mi"
cpu: 0.5
limits:
memory: "200Mi"
cpu: 1.0
8. Log to STDOUT or an external agent
ENV RAILS_LOG_STDOUT=true
Friday, August 27, 2021
Dockerfile with caching for Rails 6.1
FROM ruby:2.7
LABEL maintainer="Brianna"
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update -yqq && apt-get install -yqq \
nodejs \
npm \
yarn
RUN node -v
COPY Gemfile* /usr/src/app/
WORKDIR /usr/src/app
RUN gem install bundler:'~> 2.1.4'
RUN gem install rails
RUN bundle install
RUN echo $PWD
COPY . /usr/src/app
RUN rails webpacker:install
CMD ["bin/rails", "s", "-b", "0.0.0.0"]
https://drive.google.com/file/d/1nuZE88MOmMqiM2DMbur1RWPJvjUQ0rSf/view?usp=sharing
Dockerfile for Rails 6.1
FROM ruby:2.7
RUN apt-get update -yqq
RUN apt-get install -yqq nodejs npm
RUN node -v
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update -y
RUN apt-get install yarn -y
RUN gem install bundler:'~> 2.1.4'
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN bundle install
RUN bin/rails webpacker:install
Saturday, August 21, 2021
speedtest from terminal in Ubuntu 20.04
sudo apt update
sudo apt install speedtest
sudo apt update
sudo apt-get install python3-pip
sudo pip3 install speedtest-cli
speedtest-cli
speedtest-cli --share
go: go.mod file not found in current directory or any parent directory; see 'go help modules'"
Run from the terminal:
go mod init example.com/m/v2
Copy the generated file before you build the go program in the Dockerfile:
FROM golang:alpine
WORKDIR /myapp
COPY welcome.go .
COPY go.mod .
RUN go build -o welcome .
ENTRYPOINT ["./welcome"]
Make the generation of go.mod as part of the docker container:
FROM golang:latest AS builder
WORKDIR /myapp
COPY welcome.go .
RUN go mod init example.com/m/v2
RUN go build -o welcome .
FROM scratch
WORKDIR /myapp
COPY --from=builder /myapp/welcome .
ENTRYPOINT ["./welcome"]
Finding the number of cores in Ubuntu 20.04
$ lscpu | egrep 'CPU\(s\)'
CPU(s): 4
On-line CPU(s) list: 0-3
NUMA node0 CPU(s): 0-3
$ cat /proc/cpuinfo | grep processor | wc -l
4
$ nproc
4
Monday, August 16, 2021
React and Libraries Book Notes
- yarn create react-app starter-project --template TypeScript
- yarn add -D typescript @types/node @types/react @types/react-dom @types/jest @typescript-eslint/scope-manager
- yarn add -D node-sass
- yarn add -D scss-loader typings-for-scss-modules-loader
- yarn add -D redux @reduxjs/toolkit react-redux @types/react-redux
- yarn add -D @material-ui/core @material-ui/icons
- Edit tsconfig.json:
Tuesday, August 10, 2021
Bala Paranj
Bala Paranj is focused on tackling the technical challenges to software development. He enjoys working on complex problems and applying design techniques to accelerate development and build elegant systems.
Monday, August 09, 2021
Brackets, Braces and Parentheses in Javascript
Brackets [] hold arrays.
Braces {} is used to create objects and group statements.
Parenthesis () is used to supply parameters, group expressions and execute functions.
Thursday, August 05, 2021
Ruby times and and upto in Javascript
Number.prototype.upto = function(t, cb) {
var i = this;
if(t < this) return +this;
while (i <= t) {
cb(i++);
}
return +this;
};
(1).upto(5, function(i){console.log(i);})
// Ruby = 5.times { |i| puts i }
// JS = (1).times(function(i){console.log(i);})
Number.prototype.times = function(cb) {
var i = -1;
while (++i < this) {
cb(i);
}
return +this;
}
(5).times(function(i){console.log(i);})
Thursday, July 29, 2021
Design Notes
Write tests that confirm what the code does without any knowledge of how the code does it. Test WHAT, not the HOW. Tests should not be tightly coupled to implementation details. Program to the interface not to the implementation.
Theme of Design Patterns book: The focus here is encapsulating the concept that varies, a theme of many design patterns.
Monday, May 31, 2021
Wednesday, March 24, 2021
linkedlist notes
CreateList(),createsandreturnsanew,emptylist.
• InsertListNode(L,p,n),addsnodenafternodepinlistL.Ifpisnull,then we insert n as the new head of the list. The function returns a pointer to n. We assume that the node n has already been created with some data that we want to add in the list. We will not get into the details on how nodes are actually created. Briefly, some memory must be allocated and initialized, so that the node contains the data we want and a pointer. InsertListNode then needs only change pointers. It must make the pointer of n point to the next node, or to null, if p was the last node of the list. It must also change the pointer of p to point to n, if p is not null.
• InsertInList(L, p, d), adds a node containing d after node p in list L. If p is null, then we insert the new node as the new head of the list. The function returns a pointer to the newly inserted node. The difference with InsertListNode is that InsertInList creates the node that will contain d, whereas InsertListNode takes an already created node and inserts it in the list. InsertListNode inserts nodes, whereas InsertInList inserts data contained in nodes it creates. That means that InsertInList can use InsertListNode to insert in the list the node it creates.
RemoveListNode(L, p, r), removes node r from the list and returns that node; p points to the node preceding r in the list, or null if r is the head. We will see that we need to know p in order to remove the item pointed by r efficiently. If r is not in the list, it returns null.
• RemoveFromList(L, d), removes the first node containing d from the list and returns the node. The difference with RemoveListNode is that it will search the list for the node containing d, find it, and remove it; d does not point to the node itself; it is the data contained inside the node. If there is no node containing d in the list, RemoveFromList returns null.
• GetNextListNode(L, p), returns the node following p in list L. If p is the last node in the list, then it returns null. If p is null, then it returns the first node of L, the head. The returned node is not removed from the list.
• SearchInList(L, d), searches the list L for the first node containing d. It returns the node, or null if no such node exists; the node is not removed from the list.
Difference between training, seminar, workshop, coaching, conference, symposium, webinar, course, lesson, class
training -the process of learning the skills you need to do a particular job or activity
workshop - training class or seminar in which the participants work individually and/or in groups to solve actual work related tasks to gain hands-on experience
webinar - an occasion when a group of people go on the internet at the same time to study and discuss something
seminar - formal presentation by one or more experts in which the attendees are encouraged to discuss the subject matter
coaching - extending traditional training methods to include focus on (1) an individual's needs and accomplishments, (2) close observation, and (3) impartial and non-judgmental feedback on performance
symposium - a meeting where experts discuss a particular subject
conference - a large meeting, often lasting a few days, where people who are interested in a particular subject come together to discuss ideas
course -a series of lessons about a particular subject
lesson - a period of time when a teacher teaches people
class - a period of time in which students are taught something
Monday, March 15, 2021
Icons
Process:
https://thenounproject.com/search/?q=process&i=363475
Constraint:
https://www.vectorstock.com/royalty-free-vector/constraint-icon-simple-element-vector-27077967
Invariant:
https://thenounproject.com/term/constant/239044/
Patterns of Reasoning:
https://thenounproject.com/term/pattern-lock/993151/
Insight:
https://www.pngitem.com/middle/wiwTw_data-insight-icon-png-transparent-png/
Crawl:
https://thumbs.dreamstime.com/z/crawling-man-icon-flat-design-gray-color-symbol-modern-ui-web-navigation-sign-illustration-element-crawling-man-icon-flat-design-114966254.jpg
Walk:
https://thenounproject.com/term/walk/709031
Run:
https://upload.wikimedia.org/wikipedia/commons/b/b0/Running_icon_-_Noun_Project_17825.svg
Analytical Reasoning:
https://s3.amazonaws.com/wj-cdn/uploads/aba2a20d6675bb1f8333eff5027c9760
Use the top image on the D section
Visual Model:
https://icons8.com/icon/55808/3d-model
Pricing Section:
book:
https://stock.adobe.com/search?k=%22book+icon%22&asset_id=190506160
course:
https://www.freeiconspng.com/img/15341
coaching:
https://www.123rf.com/photo_111338969_stock-vector-coaching-icon-coaching-symbol-design-from-human-resources-collection-.html
community:
https://thenounproject.com/search/?q=community&i=2522271
Problem Classification
https://thenounproject.com/search/?q=classification&i=1705417
Never Get Stuck
https://thenounproject.com/term/wall/1171258/
https://thenounproject.com/search/?q=maze&i=369013
Over 200 Problems
https://thenounproject.com/term/quantity/2463381/
No Memorization Required
https://thenounproject.com/search/?q=memorization&i=544757
https://thenounproject.com/term/wrong/539385/
Stand Out from the Crowd
https://thenounproject.com/search/?q=community&i=199749
Inductive and Deductive Reasoning
https://thenounproject.com/search/?q=reasoning&i=3239961
Practice:
https://s3-eu-central-1.amazonaws.com/glossika-blog/2019/05/use-deliberate-practice-to-learn-foreign-languages.png
Use the rightmost diagram. Remove all the texts in this diagram.
Theory
https://thumbs.dreamstime.com/z/atomic-theory-icon-filled-thin-line-outline-stroke-style-vector-illustration-two-colored-black-atomic-theory-atomic-180544804.jpg
Use the rightmost image.
Drills
https://thenounproject.com/search/?q=exercise&i=3507234
Analytical:
https://thenounproject.com/search/?q=deductive&i=79239
The Feynman Learning Technique
Learning occurs when you can explain the concepts and use it in a wide variety of situations. The more you know, the fewer blocks you will encounter, because most new things will connect to something you already understand.
The Feynman Technique turns information into knowledge that you can access easily without any memorization. There are four steps to this method. They are as follows:
- Pretend to teach a concept you want to learn about to a sixth grade student.
- Identify gaps in your explanation. Go back to the source material to better understand it.
- Organize and simplify.
- Share it.
Step 1: Pretend to Teach it to a Child
Take out a blank sheet of paper. At the top, write the topic you want to learn. Now write out everything you know about the subject as if you were teaching it to a child. They have just enough vocabulary to understand basic concepts and relationships. Force yourself to be as simple as possible.
We hide our lack of understanding by using complicated vocabulary and jargon. If you can’t define the words and terms you are using, you don’t really know the meaning of those words. Explanation must be at a sixth-grade reading level by using simple words and phrases.
When you write out an idea from start to finish in simple language that a child can understand, you force yourself to understand the concept at a deeper level and simplify relationships and connections between ideas. You can better explain the why behind your description of the what.
Some of the writing to teach will be easy. These are the areas where you have a clear understanding of the topic. But you will find many places where things are confusing to you.
Step 2: Identify Gaps in your Explanation
In the previous step you will identify areas where you struggle, you have gaps in your understanding in these areas. Gaps in your knowledge means you forget something important, aren’t able to explain it or simply have trouble thinking of how variables interact. Identifying gaps is a critical part of the learning process. Filling those gaps makes the learning stick.
Now that you know your gaps in understanding, go back to the source material. Supplement it with other sources. Look up definitions. Keep going until you can explain everything in basic terms.
Only when you can explain without jargon and in simple terms you demonstrate your understanding. If you need complicated terminology to explain, when someone asks you a question, you can only repeat what you’ve already said.
Simple terms can be rearranged and easily combined with other words to communicate your idea. When you can say something in multiple ways using different words, you understand it really well. Skipping the work needed to explain in a simple way leads to getting stuck when challenged.
Identifying the boundaries of your understanding is also a way of defining your circle of competence. When you know the topic and are honest about what you don’t know, you limit the mistakes you’re liable to make and increase your chance of success when applying knowledge.
Step 3. Organize and Simplify
Now you have a set of hand-crafted notes containing a simple explanation. Organize them into a story that you can tell from beginning to end. Read it out loud. If the explanation sounds confusing at any point, go back to the previous step of identifying the gaps in your explanation. Keep iterating until you have a clear story that you can tell others. You can use the Cornell notes taking template to organize your story. Download the template from: https://www.codingskill.net/assets/files/CornellNotesTemplate.pdf
If you follow this approach, over time you will end up with a lot of notes on different topics. When you revise your notes periodically, you will see just how much you retain.
Step 4: Share It
Share your understanding of the material with someone who knows little about the topic. A good test of your understanding is your ability to convey it to another person. You can read out directly what you’ve written. You can present it like a presentation. Make an attempt to share the material with at least one person who isn’t that familiar with it.
The questions you get and the feedback you receive are invaluable for further developing your understanding. Hearing the curiosity of your audience will likely stimulate your own curiosity and set you on a path for further learning.
The Feynman Technique is also a different way of thinking that makes you tear ideas apart and reconstruct them from the ground up. Feynman understood the difference between knowing something and knowing the name of something, when you truly know something, you can use that knowledge broadly. When you only know the name of something, you don’t know its meaning and lack understanding. You can’t take it apart and play with it or use it to make new connections and generate new insights. When you know something, the labels are not important, because it’s not necessary to keep it in the box it came in.
Feynman’s explanations on why questions are simple and powerful. We talk in fact-deficient, confusing generalities to hide our lack of understanding. Take things apart. Staying at the abstract level does not promote understanding. Take apart the final solution; see how it works. See the cleverness of the different pieces; see the interactions between them. Learn something about the working code, the way the algorithm is put together, the ingenuity of people devising the algorithms and data structures.
Learning doesn’t happen in isolation. We learn from books, people, ideas and getting exposed to different ideas. Improving requires questioning your knowledge and the knowledge of others.
You can see how I applied this technique to learn about Topological Sort in my PDF notes: https://www.codingskill.net/assets/files/toposort.pdf.
Read about interleaving as a study strategy: https://www.codingskill.net/assets/files/Interleaving.pdf.
Download Feynman learning technique template:
Book Content Outline
- Problem solving approaches/strategies (how to think)
- Learning/Study tips so material don't get forget that easily
- Problem patterns/tricks (not only problem categories)
- A curated list with decent amount of problems to get exposed to all categories and useful patterns/tricks (hopefully sequential, like building blocks)
Sunday, March 07, 2021
Learning to Solve the Coding Problem
Learn the reasoning behind a solution and how they derived that solution. After a few days, go back and solve the same problem again from scratch without any reference. Even if you remember the gist of the solution, you would still have to implement it again, which can be a challenge. You can also look at the solution in a different language and code it in a language more familiar to you. Understand the thought process behind a solution and how to derive it. Ideally use only the hints so you don’t look at the complete solution and have the chance to solve the problems on your own. But the goal is to reach a state where you can come up with optimal solutions without looking at the answer. This just takes practice and time.
Build a solution from scratch. Get into the habit of getting your implementation to work. If you have difficulty to get it to work, you can then rule it out and move on to another approach. Speed should not be the focus. Developing a method of working through the problem in a methodical way with a set number of steps is the goal. Speed will be a byproduct of refining your method of approaching a problem you've never seen before.
Part of the process is working through frustration, finding a starting point and building confidence in your solution. You must expect to work through those uncomfortable moments. Do not look at the solution until you have your own working implementation. Do not write a single line of code until you have written what you think is an entire working solution on paper.
If you are passing some of the test cases and can't think of any other solution after spending a significant amount of time on it then look up the solution. Read the algorithm and then implement it. Do not look at the solution and copy and paste the solution in to add a +1 to your record.
There's no short cuts. It's hard work, discipline and spending time working through it. The point isn't solving the problem. The point is improving your problem solving skills and communicating how you're going to approach the problem before writing code.
The hard part isn’t solving the problems themselves, but rather overcoming the mental barriers and having the discipline to solve the problems consistently.
Study Links
https://medium.com/basecs
https://www.youtube.com/playlist?list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu
http://www.youtube.com/mycodeschool
https://www.udemy.com/course/introduction-to-data-structures-algorithms-in-java/#/)
http://cp-algorithms.com/
https://www.reddit.com/r/cscareerquestions/comments/bc85gv/i_have_to_literally_lookup_up_every_leetcode/
https://medium.com/@sourabreddy
https://www.reddit.com/r/cscareerquestions/comments/6luszf/a_leetcode_grinding_guide/
https://teachyourselfcs.com/
https://bottomupcs.com/intro.xhtml#d0e93
https://techdevguide.withgoogle.com/resources?no-filter=true
Thursday, March 04, 2021
Long Term Goal
1. Solving 1500 problems is NOT practical
2. Two types of problem on LC.
1. Problems Skills
2. Mundane coding exercise
3. Copying code from their notes.
4. Just show the finished product.
Thinking process is more important.
5. Why does this work?
6. Very abstract explanations.
7. Stanford: Code for demos.
8. What to emphasize? Graph topics.
9. algo + data structures
Software Engineer - 2021
Chips - Go ALL IN.
10. Slack access
11. Kills Two Birds in One Stone
- Russel Brunson
- Competitive Research
- Nomad life
12. Build a product that delivers the most value for the customers
- $50
- $500
- $2000
50% - Problem Solving
50% - Coding Drills
1. Wyzant
2. Course Hero
3. codementor.io
Luck + Personality

























