abdus Posted April 10, 2008 Share Posted April 10, 2008 hi, Im learning PHP since ~6 months now (and still can't write a pretty simple application ) Anyway this is not the problem. my problem is ... I can't read code !! I mean when I try to view some of the scripts spread around the net I could'nt understand them .. where to start.. what this var, func or class is used for, what is it's role and effect in the script especially when it comes to big applications that contain page includes ,numerous classes , enormous variable and functions names (like vbulletin application for example) although I know the syntax and understand what this certain function or class does alone but cant figure out what it does in the context of the application and why it is used so Im being looking at hieroglyphs ???. my question is there any method,tactics, or way to analyse a script .. should I take (for example)classes or function first and dissect them seperately ? or should I start with the index page check it first then take its links? do I have to understand the var name first to help me understand its work. what you experts do usually when reading a code .. and how much time it took you often ? please help .. thanks in advns. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted April 10, 2008 Share Posted April 10, 2008 hmmm - hard to help you there - these are terms that may be in cluded in a pre-requisit list for php101 at college... please don't be offended - I'm not trying to get at you - its just if you don't understand some of teh basic terminaology and are unable to follow the flow of a script then I doubt there is anything you could get from anyone over the internet - I suggest you try and find someone who can phyiscally sit with you and hold your hand for a couple of hours - that shoudl give you enough to go and at least follow a script to its conclusion... Quote Link to comment Share on other sites More sharing options...
nafetski Posted April 10, 2008 Share Posted April 10, 2008 Easiest way is to learn by doing...tons of step by step tutorials out there that explain what's going on line by line. Quote Link to comment Share on other sites More sharing options...
abdus Posted April 11, 2008 Author Share Posted April 11, 2008 ToonMariner , nafetski thanks for your replays actually Im not very bad Cool. I know the programming basic concepts (Ive learned some C fundamentals before) and do some tiny scrips in php. but I always wonder ,when I stay more than 1hour looking at a page in some script,am I in the right way? does it worth all that time? do all ordinary programmers stay 1hour to understand just one page of the script and how they make 'hacks' to some applications.. of course they understood the script very well... HOW!. so I feel I lack some approach or method to read others' scripts. nafetski..do you have tutorials for a big project or application (10 pages or so) that will be appriciated Quote Link to comment Share on other sites More sharing options...
discomatt Posted April 11, 2008 Share Posted April 11, 2008 If the stuff you're looking at is overwhelming, then you're in over your head.. You can't expect to understand complex language by looking at it if you cannot write it yourself Your best bet is to just code, code, code Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted April 11, 2008 Share Posted April 11, 2008 yes, there is no replacement for experience. when i was first learning PHP and had to make changes to complex code, i would put echo()'s all over the place so I could follow the logic and figure out what files were include()'d or require()'d where. then put echo()'s in those files, etc. as you learn more, it will become much easier to follow logic without echo()'ing every step of the code. Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted April 11, 2008 Share Posted April 11, 2008 You have to write lots and lots of code to have a chance at being a good programmer. Programming is always about efficiency. How can you do the same tasks better and faster. The only way you can make a process more efficient is by understanding it thoroughly. Basically write 10 small programs that do similar things. As you write each one you'll realize you are repeating certain steps and that is where you take a step back and go, "Now how can I do this so I'm not always repeating myself?" Basically if you want to be a better programmer you have to thoroughly understand the process of writing code. And you won't have that until you write lots of code. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.