Page 1 of 1
Begineer, Having trouble understanding code
Posted: Wed May 12, 2010 3:39 pm
by obesechicken13
Hi guys, this is my first thread. I just started learning PHP a few days ago.
So I just searched for a few threads pertaining to learning PHP, and it piched(sp?) an interesting question that I have. I've only learned C before (mild HTML self taught), and i just started reading PHP. However unlike C, I was learning in a class, whereas now, I'm self teaching from a book build your own database driven website by Kevin Yank. I'm having trouble understanding some of the syntax in his code whereas I didn't when learning C. This in turn leads to some difficulties understanding how his code does what it does. Is this normal?
I think I have two options.
1. I can go online and try to find do it yourself tutorials after the book,
2. or do them as I read through the book.
Which one would you suggest that I take or if you have another suggestion I would love to hear it.
Currently I'm trying to design a website similar to say... amazon except without most of the cool features.
Re: Begineer, Having trouble understanding code
Posted: Wed May 12, 2010 6:00 pm
by gotfunction
yes that is normal. I'm self taught and found that I never understood everything from one book. The best thing to do is look for multiple sources and cross reference when you don't understand something.
Re: Begineer, Having trouble understanding code
Posted: Wed May 12, 2010 6:22 pm
by Eran
The best thing to do is look for multiple sources and cross reference when you don't understand something
That is great advice. Don't rely on just one source as there bound to be some irregularities / errors. Cross-reference and get multiple views / approaches for every subject to really distill the relevant information.
Re: Begineer, Having trouble understanding code
Posted: Wed May 12, 2010 8:41 pm
by califdon
I agree with the other 2 responders, but offer the following. I will tell you upfront that I am biased, having taught computer courses for years (not programming, but business applications). That said, I caution you that learning on your own can be very inefficient, because unless you strictly follow one book's curriculum, you will risk learning the wrong things first, making it more confusing. One of the advantages of taking a class is that somebody has put in a lot of time and thought about what to teach first, then what next, and so forth. A good book or tutorial can do that, too, but it won't force the discipline of actually taking it in that order. So there's no question that you can learn on your own, if you're motivated, but I recommend following a carefully planned sequence, rather than just jumping around, learning how to do each step as you need to use it. You will miss the connections and deeper understanding that comes from learning how to crawl before you walk, and walk before you run.
Re: Begineer, Having trouble understanding code
Posted: Thu May 13, 2010 2:35 pm
by Doug G
You mentioned database-driven web sites. I recommend you spend plenty of time learning to properly design your database structure. There is an incredible amount of weird php coding that's written trying to compensate for or code around bad db design.
Re: Begineer, Having trouble understanding code
Posted: Thu May 13, 2010 5:57 pm
by califdon
Doug G wrote:You mentioned database-driven web sites. I recommend you spend plenty of time learning to properly design your database structure. There is an incredible amount of weird php coding that's written trying to compensate for or code around bad db design.
I COULDN'T AGREE MORE! This is extremely important.
Re: Begineer, Having trouble understanding code
Posted: Sun May 16, 2010 5:32 am
by Mi-Dia
I actually learned php with no book or class, just started modifying a forum software and used sites like php.net to find what functions I need. If you want an easier way to learn php, your more than welcome to use Mi-Dia Blog as a base for your learning. Its open source and under GNU GPL licence so you can do what ever you want really.
Just try installing it, and making your own pages and looking at the code. If you strip out the blog related pages its a pritty good foundation for a website.
http://ww.mi-dia.co.uk
Re: Begineer, Having trouble understanding code
Posted: Mon May 17, 2010 10:10 am
by pickle
If all else fails, ask here. We don't mind beginner questions, as we were all there at one time or another.