8
0 Comments

Learn to code - the right way!

The inspiration to write this article comes from @IndieJames who asked me to expand my comment into an article - link

I’ve therefore decided to offer you a no-nonsense, "I know it works" guide to learning to code.

If yes, give me next ~3 minutes of your time, uninterrupted.

Disclaimer: This guide will make you a rockstar programmer if you read it till the end.

No, it won’t. Sorry. 😑

This guide is meant for those who have never coded in their entire life. It's also meant for the undisciplined, that is 99.99999% of the homo-sapiens.

You know what - knowing how to code feels like having a superpower.

Especially in the no-code world; you’ll be ahead of the game. At the same time, you will also appreciate the no-code tools.

I want you to ignore your phone and other browser tabs for the next 3 minutes.

Deal?

Let’s start. Here’s what I’ll talk about -

  1. Programming language does not matter
  2. Aim for tiny successes
  3. Don't use a programming book
  4. Build a micro-project on your own
  5. Keep in mind: Programming isn't hard

Programming language does not matter

Contrary to popular opinions that you should start learning to code with C, Python, Java, Javascript, Ruby; I say start with HTML and CSS!

…and I’m serious! HTML and CSS are not programming languages.

Why do I recommend HTML/CSS? Because they are awfully easy to learn and practice. I bet you can understand the basics of HTML and CSS in about 3 hours. That’s all you need to know.

But it’ll be a very good start.

Once you understand basic HTML and CSS, you will be ready to pick a programming language.

I repeat: The choice of programming language does not matter. Our goal is to make simple applications; not build the next Facebook.

The only thing that’d matter at this stage is whether the programming language has plenty of help available online; and has GREAT documentation available. This means, you must stay away from the latest fancy programming language that was announced 3 months ago.

Why?

Because as a newbie programmer, you will encounter a lot of problems when writing code. It’s essential that you find help easily.

  • Don’t run after latest programming language, framework
  • Don’t get into debates on ‘scalability’ and ‘security’.
  • Don’t compare programming languages for speed and features

I just saved you months of time. Your only consideration should be - can I get help easily?

In the next paragraph, I’m going to offend a lot of programmers. I’ll make a few recommendations, if you want -

  1. Javascript - plenty of help available, you’ll find answers to almost every question you encounter. Caution: Don’t run after fancy JS frameworks just yet. Just focus on plain Javascript.
  2. PHP: >70% of the Internet uses it. Super easy to learn. I learned PHP and it does the job very well for all my projects.
  3. Python: It’s got its own fan-base and plenty of help available online.

Aim for tiny successes

I can’t stress the importance of tiny successes in your programming journey. Remember: Will-power is a limited resource. It dries out quickly.

The only way to top-up is to plan tiny successes. Start your programming journey by simply displaying some text on the screen.

Write super simple programs. For example, write a program that adds two variables and shows the output.

Then advance it by writing a program that multiplies the numbers.

Then upgrade it to accept the kind of operation you wish to perform on the two numbers.

You got the point.

Every success you achieve with your program adds to your will-power to keep learning to code. There’s no other way.

Don’t use a programming book

I’m not against programming books. But we’re learning programming the ‘hackish’ way. Skip the programming book.

Why?

Because a programming book quickly becomes boring. Almost every programming book starts by discussing theory and unnecessary explanations of programming concepts.

Note to programming purists: Sorry, but I had to say it. :-)

Refer to books only when you’re comfortable writing small, yet functional code snippets on your own. You’ll find a ton of value in books.

Remember - our prime goal is to make ourselves familiar with coding; without getting bored or overwhelmed by things out there to learn.

I bet YouTube has a tutorial for beginners in programming. The way to watch a video tutorial is to watch it for a few minutes, pause it and try to write the code on your own.

Build a micro project on your own

This is where your actual learning will happen. I encourage you to take up a very small project on your own. For example, try to build a currency converter. This will teach you how programming languages handle input and output data.

You might want to build a bigger project; but hold your horses! Start small, learn and then advance to the next level.

The next step could be a simple blogging system with user authentication.

It’s all about planning our tiny successes so that we keep the momentum going.

Keep in mind: Programming isn’t that hard

You will get stuck. Sometimes for hours or even days. You will feel that programming is way more complicated than you initially thought.

It’s not. Keep in mind that you are acquiring a new skill; and the more you practice, the better you will become.

You’ll become an expert at looking for answers.

Even the smartest programmers I know look for answers on Google. That’s okay. You don’t have to invent new solutions.

…and there are no prizes for writing the best code out there. As an IndieHacker, your job is to build MVPs as fast as you can. You can always rewrite your code and optimize it to address the inflow of users.

Once you start writing code, you will discover frameworks and know which stack to use. Essentially, you will form opinions like ‘PHP is bad’ and ‘Why Python is better than R’ and so on. These debates are unending, and entertaining.

As a programmer, you’ll be better equipped to use the no-code tools to get things done faster.

I hope this helps. I started out as someone who hated programming. However, during my startup journey at CrazyEngineers, I had to teach myself programming and now programming feels like therapy.

I’m currently building Testimonial Guru using Laravel (PHP) + Tailwind + Alpine tech stack. If you wish to follow my progress, sign-up on the site and follow me here.

I’d love to know about your programming journey. I look forward to reading your programming tips and comments.

posted to Icon for group Learning to Code
Learning to Code
on April 20, 2022
Trending on Indie Hackers
I built a text-to-video AI in 30 days. User Avatar 62 comments What 300 Builders Taught Us at BTS About the Future of App Building User Avatar 50 comments I built something that helps founders turn user clicks into real change 🌱✨ User Avatar 49 comments From a personal problem to a $1K MRR SaaS tool User Avatar 30 comments You don't need to write the same thing again User Avatar 29 comments I built an Image-to-3D SaaS using Tencent's Hunyuan 3D AI User Avatar 25 comments