The Seven Step Framework For Coding Skills Acquisition: Applying The Pareto Principle To Learning How To Code
The Seven Step Framework For Coding Skills Acquisition: Applying The Pareto Principle To Learning How To Code
for
Coding Skills Acquisition
You reach the automaticity in the fourth stage of the skills progression.
How fast should I type the code for the solution?
You should be able to type the solution for the problem as fast as you can
type on the keyboard. If you can retrieve the solution as fast as you can
think, you have progressed to an advanced level. This means you have
bypassed the many steps of translating a problem description to code. This
can only happen if you have mastered the concepts needed to solve that
problem.
Glengarry Glen Ross said that ABC stands for Always Be Coding.
Does that mean I should spend 8 hours a day on practice?
It really doesn’t matter how long. If you practice with your fingers, no
amount is enough. If you practice with your head, two hours a day is plenty.
Improvement requires you giving the task your full attention. One hour of
intense and focused practice is better than 8 hours of practice interrupted
by distractions.
Imagine you have to use punch cards to execute your program. Visualize
the data structure and every line of code using your brain. You will learn
how to visualize in the core concepts module of this unique training
program.
Think with pen and paper. The act of writing exercises our brains in ways
that typing on the computer cannot. According to research in the
Developmental Science journal, the best way to learn something is to write
it out on paper. Handwriting activates large regions of the brain responsible
for thinking, language, healing and working memory.
If you are tired or sick, it's much harder to maintain focus and easier to
slack off.
You cannot maintain intense concentration for much longer than that.
When you are first starting out, it's likely to be less. If you want to practice
for longer than an hour, go for an hour and take a break.
Fortunately, you will find that as you maintain your practice over time it will
seem easier. Your body and mind will habituate to the practice. The
practice never becomes fun, but eventually it gets closer to neutral, so it's
not as hard to keep going.
Pushing too hard for too long can lead to burnout and ineffective learning.
The brain changes most quickly in that sweet spot where it is pushed
outside - but not too far outside - its comfort zone. The drills are designed
to do exactly that for your current skill level.
What is the best time to work through this training material?
First hour in the morning is the best time to work through the training
materials. Assuming a good night’s sleep, your mental and physical energy
will be at its peak in the morning.
You will gain knowledge to match a new problem with a previously learned
solution. The focus is on language independent programming constructs.
This provides a way to implement the solution to a coding problem in any
chosen language. It also builds your vocabulary and provides a relevant
mental model.
For instance, the knowledge about the computer memory and how it is
used during the program execution can be visualized as shown in the
diagram. This is a useful mental model when solving coding problems.
Because, we are able to make the design choices.
Alekine wrote the chess position he was studying down on a piece of paper
and puzzle over it during school hours. He could hold the entire chessboard
in his memory and move pieces around in his mind, trying various lines of
play. He could play whole games in his mind without looking at a
chessboard.
The emergence of the expert programmer from the novice is a process that
involves the formation of multiple mental models, deep and interlinked
knowledge hierarchies and abstract, generalized problem-solving patterns.
In their book, the authors of Software Design Decoded - 66 Ways Experts
Think say:
We can represent a variable with the name x with a box that is filled with a
value. It can be seen that the variable (the box) is different from the name x
which denotes it.
Some object-oriented languages use a different model. According to this
alternative model, a variable is not a container for a value but is a reference
to a value which is typically stored in the heap.
Syntax vs Semantics
x=x+1
Producing and Interpreting are the two dimensions of a matrix that can be
used to identify a range of different learning trajectories and hench to guide
students in how to improve their skills and understanding.
Trial and Error Approach
You learn a new programming concept, you first achieve the knowledge of
this concept. If you continue learning by imitating a ready example of a
program but without a deep understanding of the concept, you will be
trapped in a trial and error approach to learning.
Practical Approach
You have the ability to apply and create without the ability to analyse or
evaluate your own program code. The main problem for practical learners
is in not being able to debug their own solutions when they encounter
errors.
Theoretical Approach
You remember and understand the concepts and have the ability to
analyse or evaluate but lack the ability to apply the knowledge and write
code from scratch.
Ideal Approach
Identify the skills needed to overcome the obstacles. Establish the target
condition.
Acquire the appropriate mental model and the vocabulary that provides the
background knowledge required to acquire the skills. The mental model is
either simple or complex based on the demands of the coding problem that
acts as a performance measuring stick.
The vocabulary built in this step becomes a basic building block that can be
combined with other building blocks to form a conceptually more complex
building blocks. The vocabulary enables you to think like a computer
scientist and solve computational problems.
Step 4 : Skills Breakdown
How can you break down the identified skills into sub-skills?
What are the integrative drills required to combine the discrete drills?
Work through the drills designed to integrate discrete skills. In this step, you
acquire the identified skills. You are now ready to tackle the coding
problem.
Solve the coding problem and code the solution. If you are stuck, reach out
for guidance. In this step, you gain experience in applying your knowledge
and skills to write code from scratch. You can now directly translate visual
diagrams into code. You will understand every line of code that you write
and can reason about the code to make time-space tradeoffs.
Step 7 : Reflect and Get Feedback
Reflect on how you have done and revise your approach to perform better
the next time. Correct previous poor task performance. You have to know
whether you are doing something right and if not, how you are going wrong.
Feedback points out your mistakes and identifies exactly where and how
you are falling short.
Vocabulary
Building Blocks
Coding Problems
Counter
Counter is also a composite building block that uses loop as its building
block.
1. Implement divide method that takes two arguments and returns the
result of dividing the first argument by the second. Do not use the
division operator: /. Use while loop.
2. Implement multiply method that takes two arguments and returns the
result of multiplying those two numbers. Do not use the multiplication
operator: *. Use while loop.
3. Implement powers m ethod that takes an argument n, where n is >= 0.
It prints powers of 2 from 1 through n.
Focused Practice #2 : Counters
Vocabulary
Coding Problems
Counters
1. Get input from the terminal and count the number of lines typed in by
a user. Print the value to the terminal.
2. Get input from the terminal and count the number of characters typed
in by a user. Print the value to the terminal.
Focused Practice # 3: Summation Accumulator
Summation Accumulator
Create a summation accumulator that prints the result of adding numbers
from 1 through 10.
Vocabulary
Coding Problem
Given an array of integers, add all the elements in the array. Array
elements are not sorted.
Focused Practice # 4: Product Accumulator
Product Accumulators
Create a product accumulator that prints the result of multiplying numbers
from 1 through 10.
Vocabulary
Coding Problem
Given an array of integers, print the product of all the elements in the array.
Focused Practice #5: Reduction
Vocabulary
Reduction
Coding Problems
Loop
Basic Arithmetic
1. Implement even? m ethod that takes an integer and returns true if the
number is an even number, otherwise false. Do not use any language
builtin even number method.
2. Implement odd? m ethod that takes an integer and returns true if the
number is an odd number, otherwise false. Do not use any language
built in odd number method.
3. Implement a pseudo random number generator. The method can
take a number as the seed.
Focused Practice #7 : Pascal Triangle
1. Create nested loops with one outer for loop and one inner for loop.
Print the outer loop variable and inner loop variable values inside the
inner loop.
2. Create nested loops with one outer for loop and one inner while loop.
Print the outer loop variable and inner loop variable values inside the
while loop.
3. Given a two dimensional array, print all the elements.
4. Variation on 1: Print only if the outer loop and inner loop variable
value is the same.
5. Variation on 1: Print only if the outer loop and inner variable values
are different.
Vocabulary
Coding Problems
1. Create one for loop and traverse forward. Print the loop variable
values inside the loop.
2. Create one for loop and traverse backward. Print the loop variable
values inside the loop.
3. Move the second element in the array to the left by one.
4. Copy the first element in the array to the last position of the array.
Vocabulary
Coding Problems
Vocabulary
Coding Problems