How to Learn Programming - Fast, Think Like a Monk for Happiness, & More


Hey friends,

Hope you're having a great week so far. Thanks for sharing your kind words after reading the first issue last week - it means a lot to me. =)

I still remember when I was studying Physics in college, my first programming language was Matlab. I was bad at coding, and I hated it. I couldn't even imagine a career where I'd code for a living, let alone data science.

Four years after graduation, I love programming and I do it for a living, be it in data science or my startup.

What changed?

It's the approach that I took to learn programming. In today's issue, I'd like to share with you how to learn programming — fast, based on my past mistakes and experience.

Let's get started! 🚀


What's in the hub today?

  • Tip: How to learn programming — fast
  • Mistake: I re-learned Python a few times
  • Learning: Learning by doing
  • Book: Think Like a Monk
  • Quote: Detachment for happiness

1 Tip:

⭐️ How to Learn Programming — Fast

Back then, when I was learning Matlab in school, I tried to memorise everything. If-else, For loop, you name it, I probably memorised it. I did the same when I started learning Python.

The issue? I couldn't apply what I memorised on other problems. Fortunately, throughout these 4 years of coding using different languages, I've taken a different approach to learn programming within a short period without memorising anything.

If you're getting started, here are 5 tips to learn programming - fast:

1. Use the 20-Minute Rule

I get it, you don't have time to code. Perhaps you have time, but don't feel like coding. So here's a simple trick:

The next time you feel like procrastinating, tell yourself this:

"I'm just going to do 20 minutes of coding practice."

After that, sit down to learn and code for 20 minutes. The next thing you know, it's already an hour of coding practice, because you got so absorbed and you are already in the zone.

Don't rely on motivation. Overcome the inertia, and you'll keep making progress, no matter how small it is. Do it consistently and you're on your way to building your coding muscles.

Remember, consistency is everything.

2. Focus on the fundamentals

There are 700 programming languages out there, but they all follow the common programming fundamentals and concepts.

While you can't learn 700 programming languages, you can learn the fundamentals, and be able to learn any programming language you want.

Here are the programming fundamentals you should focus on:

  • Variable Declaration
  • Basic Syntax
  • Data Type and Structures
  • Flow Control Structures (Conditionals and loops)
  • Functional Programming
  • Object-Oriented Programming
  • Debugging
  • IDEs and Coding Environments

While this list is not exhaustive, it has helped me learn Python, Scala, Dart (Flutter), and React within short period of time - simply because the fundamentals are transferable.

In short, get the foundation right, before going fancy.

3. Switch between focused mode and relaxed mode

When you're concentrating on a topic to learn new concepts, your brain operates in the focused mode (focused thinking). It's the mode that allows your brain to absorb new knowledge and execute intense tasks. In short, you're in your zone.

But your brain can't operate in the focused mode for too long. It needs to take a break and digest new knowledge subconsciously - this is called relaxed mode (diffused thinking). It's the mode that allows your brain to make connections subconsciously to come up with new ideas and creativity.

When I'm learning new stuff, I'm in focused mode for 1 hour. Then I switch to the relaxed mode by going for a walk, listening to music or just doing nothing, before going into focused mode again.

This approach has helped me learn, understand, and implement new concepts within short period of time. Highly recommended.

4. Code for a purpose. Have a project.

Project-based learning is, by far, the most effective way of learning how to code (in my opinion). Why? Because you learn by doing.

If you are learning to code for the sake of learning to code, chances are you won't get good at it or know how to apply the knowledge to solve other problems.

A better way? Start with a project:

  • Find a problem to solve
  • Learn coding to solve the problem

By learning to code with a purpose in mind, you'll be more motivated to learn programming to solve the problem.

Even better, you can apply what you've learned in a project that would further solidify your understanding and improve your programming skills.

5. Don't over-learn

It sounds counter-intuitive, but it's not. Let me explain.

When you're getting started in programming, you're excited. You want to learn as many things as possible to make sure you know everything.

Then reality hits, you're frustrated because there are way too many things to learn. Even worse, you feel like giving up because you are overwhelmed.

Here's the truth:

You don't need to know everything, because everything is googleable.

Here's a better path:

  • If you start coding with a project, you just learn enough to get started.
  • For example, say the project requires you to know from A, B and C. You just learn A, B and C to get started.
  • You may think you need to know D, E, F, G, but that's your assumption. Don't over-learn, just get started, and learn along the way if needed.

TL;DR

  • Use the 20-Minute Rule
  • Focus on the fundamentals
  • Switch between focused mode and relaxed mode
  • Code for a purpose. Have a project.
  • Don't over-learn

This strategy has also helped me learn Flutter (Dart programming language) and build a fully functional mobile app within 2 months (I had zero knowledge in mobile app development).

I hope that was helpful. Give it a try and let me know how it goes? 💜


1 Mistake:

I made a mistake when I first learned Python. I re-learned Python a few times.

I first watched Udemy course to learn Python.
practised along with the instructor,
did some capstone projects,
and that's it.

I thought I already knew how to use Python,
so I went on to do other stuff.

Few weeks later, I forgot about Python,
my Python skills became rusty,
so I re-watched Udemy,
and repeated the loop.
and that's it.

Not surprisingly, I forgot about Python again after some time. That was when I realised something was wrong.


1 Learning:

After realising I was in the constant loop of learning and re-learning Python, I stepped back and re-strategised my approach to learn programming.

Here is what I've learned:

  • I should have learned by doing, not learned for the sake of learning Python.
  • I should have got started with a project using Python. Again, project-based learning works best for me because I can apply what I've learned in a project with deeper understanding of how to use Python in real life.

1 Book:

Think Like a Monk: Train Your Mind for Peace and Purpose Every Day

This is one of my favourite books written by Jay Shetty - a former monk, entrepreneur, motivational speaker, and life coach.

Here are my few takeaways after reading the book:

  • Your passion becomes a purpose when you use it to serve others. Want to earn a living while doing what you love? Find your passion and use it to serve others.
  • Be an objective observer to see things clearly. In other words, be mindful of your inner self (thought, emotion etc.) and outer self (behaviour, action etc.). Observe them without judgement, learn from them.

Personally, I'm a big advocate of practising mindfulness in our daily life as I think it's such an underrated life skill to maintain peace of mind and keep us in control.

This book has helped me gain a better understanding of mindfulness and how to practise mindfulness in my daily life. 💜

Have you read this book? What's your thought on it?


1 Quote:

Detachment is not that you should own nothing,
but that nothing should own you.

From Think Like a Monk by Jay Shetty.

I was once attached to my material possession, emotion, and expectation of others. I was not happy. Because the moment I lost control, I would beat myself up.

When I detached myself from these things, I became happy again, not because I didn't care about my surroundings, but because I no longer let my surroundings control my well-being.

The moment you accept all things are temporary, and you don't truly own or control anything - that's when you're free.

I'm curious. What's your thought on practising detachment in our daily life? Do you think attachment is the cause of suffering? Would love to know your thought on this. 🙂


That's all for today

Thanks for reading. I hope you enjoyed today's issue. More than that, I hope it has helped you in some ways and brought you some peace of mind.

You can always write to me by simply replying to this newsletter and we can chat.

See you again next week.

- Admond


linkedintwitterinstagramfacebookmedium

Admond Lee

Hi! Admond here 👋🏻 I am a data scientist currently building a tech startup. Sign up for Hustle Hub - my weekly newsletter where I share actionable data science career tips, mistakes and lessons learned from building a startup - directly to your inbox.

Read more from Admond Lee
time lapse photography of man jumping on waterfalls

Hey friends, Last week I shared my story of going from physics to data science. Well... That's just Part 1 of the story. In today's issue, I want to share Part 2 of the story on how I ended up quitting my job (after working for 3 years in data science) to build a startup - Staq. P.S. You'll be surprised how I ended up building a startup. 😂 My 1st Job - Research Engineer at Titansoft Spot me in the picture 😉 In June 2018, I started my first full-time job at Titansoft as a research engineer. It...

man wearing gray T-shirt standing on forest

Hey friends, Having been asked by a number of people why I decided to transition from physics into data science, and eventually quit my job to build a startup, I'd love to share my story with you today to hopefully encourage you to keep exploring, and most importantly, inspire you to pursue your passion. You can't connect the dots looking forward, you can only connect them looking backwards. — Steve Jobs The truth is that I didn't know I wanted to become a data scientist when I was studying...

person about to lift barbell

Hey friends, Hope you're having a great week. After much preparation, we finally launched Staq in Entrepreneur First Global Reveal last week. Spot us (Staq) HERE to watch our 2-min pitch with my cofounder! 😂 It was also my first time meeting many top VCs and investors at an exclusive meetup organised by EF. It was an epic night when we shared what we've been building at Staq. Excited, we even took a picture together! Taking a picture with investors As promised, I'll document my fundraising...