Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

successdav's avatar

How do I become good at programming

Oh! I need your help to make myself better...

I think I understand and know what the code does when reading through it.

but when ask to code this very feature, whoops I complete feel like a blockhead.

I keep referring to documentation, or video tutorials for almost anything I want to code

even for a project as simple as creating a basic CRUD project with laravel, I still refer back to documentation and videos.

Recently I decide to learn TDD and yes I did, but when I try to build a project with TDD, I dont even know how to go about writing a simple test.

I feel like a guru when reading a TDD test or anyother code I have learned. I understand the code when reading it.

also

I feel like a complete newbie when I am trying to code a TDD feature on my own

I need your advice on how to get better at writing code...

I have heard people say the learned php in 90days and are doing awesome, writing good code.

damn I have been learning PHP for a year and am not good at anything (it sucks)

0 likes
13 replies
jlrdw's avatar

Do a practice project, crud. Do not cut and paste the code, use keyboard for everything.

3 likes
Talinon's avatar

To quote Einstein:

If you can't explain it simply, you don't understand it well enough.

I'm not saying that you can't learn from reading documentation and code, but I think nothing beats a good teacher. Jeffrey Way is a talented teacher that has a method of explaining things in a way that makes things click. Some people respond better to different styles of learning. Some might excel during lectures, others might need visual aids, other might need things in print. If everything you've tried up to this point hasn't worked, I'd suggest one of the best things you could likely do for yourself is subscribe to Laracasts and watch the dedicated series on TDD.

A couple hours of videos of having someone explain things in simple ways will advance your skills much faster than trying to decipher other developer's (potentially) complex code.

1 like
siangboon's avatar

practice make perfect... developers are not machine who can store everything in memory/disk, even Jeffrey still referring documentation and google all the time... just keep coding and it will become muscle memory in one day and it take long time...

1 like
artcore's avatar

Coding is art and creating an app from scratch takes a lot of planning and imagination. It's easy to get overwhelmed especially if you expect yourself to write at the level of Laravel's base.

In general I'd say; allow yourself to be productive with your current skill set.

And creativity only flourishes with small parts, the bigger the construct of any concept in your mind, the less flexible it will be.

This, from almost 20 years of teaching music and now applied to coding (in case you're wondering, it's paying better...) Been at it for 6 years almost and each few months there's a natural improvement in understanding and thus coding level.

1 like
camacazze's avatar

Well they seem like teething troubles. Some more time with this stuff can make u a little better. It takes nearly 10 yrs. to really be an expert!! Until then we have to struggle sometimes.

I have never really had difficulty in coding independently, but I started coding in the 10th grade ('1992).

There's only one way; struggle. As the gentleman has mentioned. Do a serious learning project. Development & Testing. You will get slightly better.

Learn PHP again. If you think it helps. Make many example programs while studying. You could learn other languages.

See if it helps. A good teacher/author can also help a great deal.

1 like
martinbean's avatar
Level 80

How do I become good at programming

@successdav The same way you become “good” at anything else: practice. There’s no shortcut to knowledge.

2 likes
ederson's avatar

all answers are helpful but pay attention to @jlrdw altjough it may seems not important.

When i started with laravel i kept copy-pasting to go faster and after a while i realized i couldn't remember anything. Nothing sticks to mind unless you type it yourself

1 like
successdav's avatar

@EDERSON - Yep... I just started a new project from scratch and I plan to not use copy and paste.... hope this helps

successdav's avatar

@MARTINBEAN - Yep. I get it, maybe I have been trying to learn it all quickly and I ended up being a dump. thanks alot for your contribution.

martinbean's avatar

@SUCCESSDAV - @successdav No problem. Learn at a pace that’s comfortable to you. Don’t worry about the end goal. I’ve been developing for over 10 years, but still learning every day.

Treat it as a journey. As long as you’re further forward than you were yesterday, you’re on the right track :)

2 likes
steve_laracasts's avatar

I've been thinking about this, looking back on the things that really helped me progress and one thing keeps standing out - that is to constantly watch your data.

By this I mean inspect everything at every stage of the process e.g. when you first retrieve a database query result, before and after any operations you may apply, just before you pass your data to your view, all the data in your view, anything you pass through to javascript and once your data is in the browser, inspect every element - if you are using Vue get the development plugin and dig in - it's really good.

I also highly recommend Telescope https://laravel.com/docs/5.8/telescope - this helps you do many of the things listed above easily and a lot more besides. I really like the interface and it's kinda fun clicking around it seeing what's happening. It is very helpful when you're trying to solve a particular problem and when you are trying to understand how something works that someone else has written.

These tools are to the programmer what the oscilloscope is to an electronics engineer, they let you see what is actually happening.

Once you can see everything that's going on, the commands start to make more sense in that you will develop a deeper understanding of what they are actually doing.

Other than that, enjoy the process - you're always going to do better at something you enjoy.

Good luck!

p.s. this tutorial on how to read code is excellent - highly recommended:

https://laracasts.com/series/how-to-read-code

sebraponi's avatar

Learning to program, not just only specific language, helped me to advance. It was easy to pick up any language after taking a ride with this book (half year): Programming -- Principles and Practice Using C++

Everyone has a different journey and nobody can say one day "There is nothing to learn anymore". So practice every day and you will get better.

Please or to participate in this conversation.