🏗 How To Use What You Know to Learn What You Don't

Cherlock Code 🔎 - Oct 12 '23 - - Dev Community

A Guide to Using Mental Scaffolding to Learn New Languages.


Although I had been learning from a young age, my actual full-time career in software development began after I completed a bootcamp a few years ago.

During that bootcamp, the first language they told us to learn and practise was Ruby.

I had never learnt Ruby before, but I got on quite well with it. After about an intensive 6 weeks we were building Ruby applications with Rails and everybody in the bootcamp was pleased with themselves.

After we completed the task of creating a Facebook clone, the bootcamp instructors said “Right, now we want you to build the whole thing again using JavaScript”.

Huh???

We were all so confused!

But we only know Ruby, how are we going to do it in JavaScript?

The instructors said, “Ahh that’s right you know Ruby, so use what you know to learn what you don’t”.

What the instructor then explained was how to use mental scaffolding for learning a new language.

The concept of mental scaffolding provides a framework for constructing connections between old and new understanding.

Just as scaffolding provides workers access to new heights in construction, mental scaffolds enable us to reach beyond our current grasp.

In programming, building on prior concepts not only accelerates learning - it deepens understanding.

Research shows our brains are wired to embed new information within existing neural networks.

By relating new ideas to established ones, we can integrate that new knowledge more effortlessly.

In this article, I want to provide a guide on some of the techniques you can use for learning new programming languages using mental scaffolding.

With the right approach, you can build on your hard-earned knowledge instead of starting from scratch each time.

Let’s see how…

The Power of Prior Knowledge 📖

Our brains are uniquely wired to embed new information within existing frameworks.

Neuroscience reveals that neurons strengthen pathways each time we recall and apply knowledge.

In effect, our brains build scaffolds connecting new ideas to established ones.

A diagram of a brain with scaffolds connecting new ideas to established ones

Memories are stored in the brain as connections between neurons. When we learn something new, these connections are strengthened.

This makes it easier to remember and understand the information in the future.

We see this phenomenon at play in everyday learning. For example, relating the French word "pomme" to the English equivalent "apple" accelerates memorisation.

Connecting unfamiliar terms to known words provides an anchor for new vocabulary.

Prior knowledge also helps us tackle tricky new concepts.

For example, a high school student learning physics will understand new formulas more easily if they link back to basic math rules they already know.

Scientists make sense of new discoveries by connecting them to existing theories in their field.

In both cases, building on old knowledge provides a framework to take in new info.

Tapping into what we already know is crucial for making headway with unfamiliar concepts.

By actively searching for connections between the new material and our prior knowledge, we can fully leverage our brain's natural ability to embed learning within familiar frameworks.

Drawing Parallels Between Languages 🤝

Programming languages share many core concepts and structures.

While the syntax varies, the fundamental building blocks like variables, loops, and functions operate similarly.

Recognising these parallels can make it easier to understand familiar concepts when learning a new language.

For example, the structure of a basic for loop in JavaScript:

for (let i = 0; i < 10; i++) {
// Code to be executed for each iteration
console.log(i);
}
Enter fullscreen mode Exit fullscreen mode

...is fairly similar to a for loop in Python:

for i in range(10):
# Code to be executed for each iteration
print(i)
Enter fullscreen mode Exit fullscreen mode

Understanding how loops iterate through code in one language provides a mental model for quickly grasping how they work in another.

You don’t have to relearn the logic from scratch.

This pattern of drawing connections between languages applies to many concepts.

Functions in C++ aren’t radically different from functions in Java.

Object-oriented principles remain largely consistent across various languages.

Once you see the parallels, you can spend less time figuring out syntax and more time applying familiar logic.

Strategies for Building Mental Scaffolds 🏗

When learning a new programming language, it is important to intentionally build connections to your prior knowledge.

This can be done through a variety of techniques, including:

Visual Aids

Diagrams, flowcharts, and other visual representations can help to anchor new concepts in your mind.

Visually mapping out program logic, data structures, or system architecture can provide an at-a-glance reference for how pieces fit together.

Having a bird's-eye view of code relationships can accelerate learning.

Analogies

Relating new concepts to familiar concepts from other languages or domains through analogy can help to build helpful associations.

For example, you might say "Arrays in Java are like lists in Python" or "A class is like a blueprint for objects."

Making comparisons between languages and domains can help to connect new concepts to what you already know.

Practical Application

There is no better way to cement knowledge than to use it. After learning core concepts, start small coding projects to apply them.

Experiment with language features by building basic programs, or immerse yourself in the new syntax by translating an old project.

Through repeated hands-on use, you will strengthen your mental scaffolding.

Here are a few additional tips for building mental scaffolds:

  • Be mindful of the context. When learning a new concept, try to understand how it fits into the overall language or system. This will help you to build a more comprehensive mental model.
  • Don't be afraid to ask questions. If you are struggling to understand a concept, don't hesitate to ask for help from a mentor, instructor, or online community.
  • Take breaks. Learning a new programming language can be challenging, so it is important to take breaks and avoid overworking yourself. This will help you to stay focused and retain information more effectively.

By using these strategies, you can build strong mental scaffolds that will help you to learn new programming languages more quickly and effectively.

Don't Over-Rely on Existing Knowledge 📵

While linking new concepts to existing knowledge can help, be careful not to overdo it.

Relying too much on old ideas can backfire when learning something new.

Here are some traps to avoid:

  • The Double-Edged Sword - Hooking the new material too tightly to old concepts can hide important differences you need to know. Find a balance between drawing connections without forcing a perfect match.
  • Oversimplifying - Boiling down complex topics into familiar terms can lead to missing key details. For example, saying a Python list is the same as a JavaScript array glosses over unique features. Make sure to fully grasp each idea within its own context.
  • Assuming an Exact Translation - Expecting everything to carry over directly from one language to another will trip you up when the fit isn't perfect. Be ready to reshape your knowledge to align with the new language's approach.

Stay flexible in your thinking. Be open to changing existing mental models to incorporate new conventions.

Avoid too many assumptions and stay open-minded.

By scaffolding flexibly, you can maximise learning while minimising misconceptions.

Benefits Beyond Learning Syntax 🚀

The techniques of mental scaffolding provide advantages that extend far beyond acquiring new coding languages.

Building connections applies broadly across programming disciplines such as:

Troubleshooting

When debugging, relate errors back to ones you've previously encountered.

What solutions worked before? How can you adapt them to new contexts? Use prior debugging experience as a framework.

Problem-Solving

Break down large problems into familiar patterns. Have you solved a similar logic problem in another language?

How can you abstract that approach and apply it here? Scaffold new problems onto old solutions.

System Design

Relate architecture patterns you know to new system requirements.

Does this workflow resemble a structure you’ve built before?

Can you reframe prior designs to fit new use cases? Anchor unfamiliar systems to tried-and-true models.

In short, mental scaffolding is not just a way to learn new programming languages. It is a valuable skill that can help you to become a better programmer overall.

Conclusion

Learning to code requires constantly learning new skills and languages.

This can be daunting, but using your existing knowledge to your advantage makes it easier.

Mental scaffolding techniques can help you build bridges between familiar and new concepts.

By finding similarities and anchors, creating visual models, and using scaffolding flexibly, you can improve your understanding and reduce confusion.

Making connections turns separate pieces of information into a unified whole.

Over time, this builds a vast network of knowledge that you can easily navigate.

The benefits go beyond faster learning. Mental scaffolding also develops versatile problem-solving skills that can be used in any coding area. By abstracting approaches, you can adapt to new challenges.

While each language has its own syntax and conventions, the underlying logic is still accessible through your existing mental models.

With a little thought, you can continue to reach new heights in your programming journey.

The path ahead becomes clearer when you build on your experience.

Choose to build on a solid foundation instead of starting over from scratch every time.

With consistent practice, you will sharpen your ability to mentally link new concepts to your existing knowledge.

All it takes is learning how to learn.

From your fellow ever-growing dev,

Cherlock Code


💙 If you liked this article...

I publish a weekly newsletter to a community of ever-growing developers, seeking to improve programming skills and stay on a journey of continuous self-improvement. Focusing on tips for powering up your programming productivity 🚀.

Get more articles like this straight to your inbox.

Let’s grow together 🌱

And stay in touch on 𝕏 @evergrowingdev


Dev Pages

And if you're looking for the right tools to build awesome things, check out Devpages.io, an ultimate hub I built with 100s of developer tools and resources 🛠

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .