I am hoping that you would be able to help me acquire better programming skills
views:
134answers:
11Programm something, and if you have a problem ask explicit questions, this is how I learned
I learned php by taking a class... but it's easy, you could learn without it. Do you know any other programming languages? I'd try to do something really simple like loading html from other files and stuff. what's got you hung up exactly?
Might be worth noting what your current experience is and which areas you'd like to work on.
Set yourself a task, for example: I'm gonna write a CLI application which dispatches to objects. Using reflection I will build a 'help' menu displaying possible callable classes, their methods and what parameter each method takes.
And then work on it until you've reached your goal.
If you're looking for a tutorial, I personally started off with W3Schools and Tizag as tutorials, but in my opinion, you really get better with experience.
Read some books on a higher level than your own. Some posibilities could be
- PHP in Action: Objects, Design, Agility
- PHP Objects, Patterns, or Practice
- Pro PHP: Patterns, Frameworks, Testing and More
If you're a beginner, those mentioned will be too hard. You should read some beginner books then.
Write an application to play with. Specifically, write a cookbook - a list of recipes. Add features.
You'll learn databases, PHP, HTML, and probably CSS, Javascript, and a few other things along the way.
The answer to this will depend on how experienced you are with PHP already. If you're an absolute beginner, start with a nice book. If you're somewhat experienced with the language, the basic answer is "write more PHP." Aim for projects that are just beyond what you already know how to do. If you have a basic understanding but aren't that experienced, try writing a simple blog or something on your local machine. If you're already pretty knowledgable, see if you can figure out what area it is exactly that you're lacking, and pick a project targeted to that.
Unfortunately without knowing more about your experience it's hard to make a more specific recommendation, but hopefully this helps get you going.
Learn about programming concepts / philosophies like
and design patterns.
Maybe this gives you some new ideas to create better structured and maintainable code.
you need a mission. you can't learning anything unless you have a real mission. go drown.
Sounds like I'm at a similar level to you, to be honest. In which case, I'll suggest what I've been doing: Writing a whole load of PHP code.
Look at what you can already do and think about what is the next step up (in your opinion anyway), then get to doing it. For me, I'm currently learning OO PHP because I also want to get a grasp of OOP. That way, I'm killing two birds with one stone (as the saying goes).
Read a lot. Sometimes a refresher is nice, and I find myself occasionally visiting w3schools, even though I can make full PHP database driven sites already. Read specific stuff for what you are trying to do and then put what you read into practice.
Maybe set yourself a challenge that does everything you can do now and then some more. At the minute I've just started my own challenge of creating an RPG-style game. I know that it will enable me to put OOP into a real situation, will allow me to improve my general programming skills as I haven't yet done any really in-depth logic-driven programming.
Also, if you find that you're rewriting a lot of code, take a look at functions. Every thing you might use more than once, put into a separate file as a function, then just include()
that file in everything you do. That's another thing I've been doing recently and it's helping me code a) more quickly, b) more efficiently.
Hope that helps, from a fellow learner.