Books? [message #177335] |
Wed, 14 March 2012 18:37  |
Christopher M.
Messages: 9 Registered: March 2012
Karma: 0
|
Junior Member |
|
|
What are some good PHP books? I've been reading the manual on PHP.net and it
looks pretty basic.
W. Pooh (AKA Winnie P.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Books? [message #177348 is a reply to message #177347] |
Fri, 16 March 2012 00:53   |
Call Me Tom
Messages: 9 Registered: August 2011
Karma: 0
|
Junior Member |
|
|
On Thu, 15 Mar 2012 23:36:34 +0000, Tim Streater
<timstreater(at)greenbee(dot)net> wrote:
> In article <snq4m7djqvu4em424v5bs5rj7qjbv7o5ta(at)4ax(dot)com>,
> Call Me Tom <noemail(at)nowhere(dot)com> wrote:
>
>> On Thu, 15 Mar 2012 15:54:41 +0000, The Natural Philosopher
>> <tnp(at)invalid(dot)invalid> wrote:
>>
>> [SNIP]
>>>
>>> I am not 'generally against books'. But...if you already know how to
>>> program, a language reference is all you need, and if you don't already
>>> know how to program, is PHP the place to be starting?
>> [SNIP]
>>
>> Fair Enough. I am interested in learning how to program. I want to
>> learn from home. Where do you suggest I begin?
>
> You mean you know nothing at all about programming?
Tim,
I have created a website with PHP/MySQL ( corporateairamerica.com ).
I would say I did it by manipulating portions of the language. Good
programming techniques would be coincidental. While the site works,
I'm sure a professional programmer would see many problems. I do this
as a hobby, not a profession. However, I would like to do it right.
Tom
|
|
|
|
Re: Books? [message #177350 is a reply to message #177348] |
Fri, 16 March 2012 13:07   |
Erwin Moller
Messages: 228 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 3/16/2012 1:53 AM, Call Me Tom wrote:
> On Thu, 15 Mar 2012 23:36:34 +0000, Tim Streater
> <timstreater(at)greenbee(dot)net> wrote:
>
>> In article<snq4m7djqvu4em424v5bs5rj7qjbv7o5ta(at)4ax(dot)com>,
>> Call Me Tom<noemail(at)nowhere(dot)com> wrote:
>>
>>> On Thu, 15 Mar 2012 15:54:41 +0000, The Natural Philosopher
>>> <tnp(at)invalid(dot)invalid> wrote:
>>>
>>> [SNIP]
>>>>
>>>> I am not 'generally against books'. But...if you already know how to
>>>> program, a language reference is all you need, and if you don't already
>>>> know how to program, is PHP the place to be starting?
>>> [SNIP]
>>>
>>> Fair Enough. I am interested in learning how to program. I want to
>>> learn from home. Where do you suggest I begin?
>>
>> You mean you know nothing at all about programming?
>
> Tim,
>
> I have created a website with PHP/MySQL ( corporateairamerica.com ).
>
> I would say I did it by manipulating portions of the language. Good
> programming techniques would be coincidental. While the site works,
> I'm sure a professional programmer would see many problems. I do this
> as a hobby, not a profession. However, I would like to do it right.
>
> Tom
Hi Tom,
I think you can do thousands of roads.
It really depends on what you want to achieve.
A few considerations for you that pop into my head that are general in
nature:
Pick a language:
Are you sure you want to study PHP further?
Why not C or C++ or Java or etc.etc.?
If you want to focus on webtechnology, there is also MS dotnet and Ruby
On Rails, and etc.etc.
Not that I want to send you elsewhere. :-)
But why do you pick PHP? Because it is easy?
I know it is very hard to tell upfront what language is good for you
(since you don't know the others), but it certainly is worth some thought.
PHP is very web focussed. You will never write a device driver in PHP,
or a cool piece of 3D graphics software.
But for the web, PHP is very good.
Framework or no Framework?
These days many people work with frameworks. Frameworks have the
advantage of hiding complexity, but they add bureaucracy, in some cases
to the level that programming is no fun anymore, a situation that should
be avoided at all costs.
If you want to learn, I suggest you do it without frameworks. Later on,
when you made a lot of costly mistakes, you will be in a much better
position to decide if you need one (or even write your own.).
Try to work modular/components/objects.
I express myself vaguely on purpose.
Bottonline: If you think you solved some particular problem do the
following:
1) sit back and take a cup of coffee.
2) Try to describe what you just did. What kind of input are you taking?
What problem did you solve? WHat types of output can you produce? etc.
3) Pull the thing OUT of your code, and make a class for it, or a
function, or whatever suits your needs.
Then use that new component from within your code.
Also: Document it, store it somewhere where you can find it, preferably
with some clear description attached to it.
You don't want to wander through your "clever classes" directory and see
names like:
Test23_ver2
MyGodmodule
MyEmailer_ver2(I think)
myEmailer
Emailer
etc.
If you do this right, you will end up with a bunch of classes and
functions you will be proud of. You can even add funky stuff like
unittesting later on.
And last:
Let others review your code.
Let others review your code!
(3 times more)
Simply post in here a function, even a whole script, or some approach
you have just finished, and ask for opinions.
Don't use an online forum, most I have seen are poor and filled with
people who want to score karma-points or some other useless nonsense.
This group is pretty good.
There exist as many programming-styles as there are programmers.
Nonetheless, you will make rookie-mistakes, and more experienced
programmers will catch them easily (mostly because they made the same
mistakes themselves earlier.).
Don't be shy and remember most experienced programmers became
experienced by having their OWN code reviewed (in a public forum or in
private, doesn't matter).
For example: Do you really need to have your website screwed up by some
SQL injection to learn to escape your input? Of course not: if somebody
tells you how that works, and you understand it, it comes natural. But
first you must have heard of the concept SQL injection.
Oh well, I talk too much. :-)
Good luck.
Regards,
Erwin Moller
--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
|
|
|
Re: Books? [message #177351 is a reply to message #177350] |
Fri, 16 March 2012 20:17   |
Call Me Tom
Messages: 9 Registered: August 2011
Karma: 0
|
Junior Member |
|
|
On Fri, 16 Mar 2012 14:07:15 +0100, Erwin Moller
<erwinmollerusenet(at)xs4all(dot)nl> wrote:
> On 3/16/2012 1:53 AM, Call Me Tom wrote:
>> On Thu, 15 Mar 2012 23:36:34 +0000, Tim Streater
>> <timstreater(at)greenbee(dot)net> wrote:
>>
>>> In article<snq4m7djqvu4em424v5bs5rj7qjbv7o5ta(at)4ax(dot)com>,
>>> Call Me Tom<noemail(at)nowhere(dot)com> wrote:
>>>
>>>> On Thu, 15 Mar 2012 15:54:41 +0000, The Natural Philosopher
>>>> <tnp(at)invalid(dot)invalid> wrote:
>>>>
>>>> [SNIP]
>>>> >
>>>> > I am not 'generally against books'. But...if you already know how to
>>>> > program, a language reference is all you need, and if you don't already
>>>> > know how to program, is PHP the place to be starting?
>>>> [SNIP]
>>>>
>>>> Fair Enough. I am interested in learning how to program. I want to
>>>> learn from home. Where do you suggest I begin?
>>>
>>> You mean you know nothing at all about programming?
>>
>> Tim,
>>
>> I have created a website with PHP/MySQL ( corporateairamerica.com ).
>>
>> I would say I did it by manipulating portions of the language. Good
>> programming techniques would be coincidental. While the site works,
>> I'm sure a professional programmer would see many problems. I do this
>> as a hobby, not a profession. However, I would like to do it right.
>>
>> Tom
>
> Hi Tom,
>
> I think you can do thousands of roads.
> It really depends on what you want to achieve.
>
> A few considerations for you that pop into my head that are general in
> nature:
>
> Pick a language:
> Are you sure you want to study PHP further?
> Why not C or C++ or Java or etc.etc.?
> If you want to focus on webtechnology, there is also MS dotnet and Ruby
> On Rails, and etc.etc.
> Not that I want to send you elsewhere. :-)
> But why do you pick PHP? Because it is easy?
> I know it is very hard to tell upfront what language is good for you
> (since you don't know the others), but it certainly is worth some thought.
> PHP is very web focussed. You will never write a device driver in PHP,
> or a cool piece of 3D graphics software.
> But for the web, PHP is very good.
>
>
> Framework or no Framework?
> These days many people work with frameworks. Frameworks have the
> advantage of hiding complexity, but they add bureaucracy, in some cases
> to the level that programming is no fun anymore, a situation that should
> be avoided at all costs.
> If you want to learn, I suggest you do it without frameworks. Later on,
> when you made a lot of costly mistakes, you will be in a much better
> position to decide if you need one (or even write your own.).
>
>
> Try to work modular/components/objects.
> I express myself vaguely on purpose.
> Bottonline: If you think you solved some particular problem do the
> following:
> 1) sit back and take a cup of coffee.
> 2) Try to describe what you just did. What kind of input are you taking?
> What problem did you solve? WHat types of output can you produce? etc.
> 3) Pull the thing OUT of your code, and make a class for it, or a
> function, or whatever suits your needs.
> Then use that new component from within your code.
> Also: Document it, store it somewhere where you can find it, preferably
> with some clear description attached to it.
> You don't want to wander through your "clever classes" directory and see
> names like:
> Test23_ver2
> MyGodmodule
> MyEmailer_ver2(I think)
> myEmailer
> Emailer
> etc.
> If you do this right, you will end up with a bunch of classes and
> functions you will be proud of. You can even add funky stuff like
> unittesting later on.
>
> And last:
> Let others review your code.
> Let others review your code!
> (3 times more)
> Simply post in here a function, even a whole script, or some approach
> you have just finished, and ask for opinions.
> Don't use an online forum, most I have seen are poor and filled with
> people who want to score karma-points or some other useless nonsense.
> This group is pretty good.
>
> There exist as many programming-styles as there are programmers.
> Nonetheless, you will make rookie-mistakes, and more experienced
> programmers will catch them easily (mostly because they made the same
> mistakes themselves earlier.).
> Don't be shy and remember most experienced programmers became
> experienced by having their OWN code reviewed (in a public forum or in
> private, doesn't matter).
> For example: Do you really need to have your website screwed up by some
> SQL injection to learn to escape your input? Of course not: if somebody
> tells you how that works, and you understand it, it comes natural. But
> first you must have heard of the concept SQL injection.
>
> Oh well, I talk too much. :-)
>
> Good luck.
>
> Regards,
> Erwin Moller
Thank you Erwin. I will be staying with HTML/CSS/PHP/MySql. Plenty
for me to learn there. You have given me a direction. I'll let
others decide if you talk too much. :) However, I assure you that
your post was far more helpful than TNP's contribution.
Tom
|
|
|
|
Re: Books? [message #177353 is a reply to message #177350] |
Sat, 17 March 2012 02:27   |
Leonardo Azpurua
Messages: 46 Registered: December 2010
Karma: 0
|
Member |
|
|
"Erwin Moller" <erwinmollerusenet(at)xs4all(dot)nl> escribi� en el mensaje
news:4f633af9$0$6988$e4fe514c(at)news2(dot)news(dot)xs4all(dot)nl...
>
> Hi Tom,
>
> I think you can do thousands of roads.
> It really depends on what you want to achieve.
>
> A few considerations for you that pop into my head that are general in
> nature:
>
> Pick a language:
> Are you sure you want to study PHP further?
> Why not C or C++ or Java or etc.etc.?
> If you want to focus on webtechnology, there is also MS dotnet and Ruby On
> Rails, and etc.etc.
> Not that I want to send you elsewhere. :-)
> But why do you pick PHP? Because it is easy?
> I know it is very hard to tell upfront what language is good for you
> (since you don't know the others), but it certainly is worth some thought.
> PHP is very web focussed. You will never write a device driver in PHP, or
> a cool piece of 3D graphics software.
> But for the web, PHP is very good.
>
>
> Framework or no Framework?
> These days many people work with frameworks. Frameworks have the advantage
> of hiding complexity, but they add bureaucracy, in some cases to the level
> that programming is no fun anymore, a situation that should be avoided at
> all costs.
> If you want to learn, I suggest you do it without frameworks. Later on,
> when you made a lot of costly mistakes, you will be in a much better
> position to decide if you need one (or even write your own.).
>
>
> Try to work modular/components/objects.
> I express myself vaguely on purpose.
> Bottonline: If you think you solved some particular problem do the
> following:
> 1) sit back and take a cup of coffee.
> 2) Try to describe what you just did. What kind of input are you taking?
> What problem did you solve? WHat types of output can you produce? etc.
> 3) Pull the thing OUT of your code, and make a class for it, or a
> function, or whatever suits your needs.
> Then use that new component from within your code.
> Also: Document it, store it somewhere where you can find it, preferably
> with some clear description attached to it.
> You don't want to wander through your "clever classes" directory and see
> names like:
> Test23_ver2
> MyGodmodule
> MyEmailer_ver2(I think)
> myEmailer
> Emailer
> etc.
> If you do this right, you will end up with a bunch of classes and
> functions you will be proud of. You can even add funky stuff like
> unittesting later on.
>
> And last:
> Let others review your code.
> Let others review your code!
> (3 times more)
> Simply post in here a function, even a whole script, or some approach you
> have just finished, and ask for opinions.
> Don't use an online forum, most I have seen are poor and filled with
> people who want to score karma-points or some other useless nonsense.
> This group is pretty good.
>
> There exist as many programming-styles as there are programmers.
> Nonetheless, you will make rookie-mistakes, and more experienced
> programmers will catch them easily (mostly because they made the same
> mistakes themselves earlier.).
> Don't be shy and remember most experienced programmers became experienced
> by having their OWN code reviewed (in a public forum or in private,
> doesn't matter).
> For example: Do you really need to have your website screwed up by some
> SQL injection to learn to escape your input? Of course not: if somebody
> tells you how that works, and you understand it, it comes natural. But
> first you must have heard of the concept SQL injection.
>
> Oh well, I talk too much. :-)
>
> Good luck.
>
> Regards,
> Erwin Moller
Best advice!
|
|
|
|
|
|
|
|
|
Re: Books? [message #177369 is a reply to message #177367] |
Tue, 20 March 2012 09:19   |
M. Strobel
Messages: 386 Registered: December 2011
Karma: 0
|
Senior Member |
|
|
Am 20.03.2012 02:39, schrieb Christopher M.:
> "macca" <ptmcnally(at)googlemail(dot)com> wrote in message
> news:7257183.754.1332178327363.JavaMail.geo-discussion-forums@vbhv6...
>> PHP 5 Objects, Patterns, and Practice
>> Matt Zandstra
>
-- cut ...
> and learn about PHP best coding practices.
- use proper code indenting to make your code readable
- document your code with phpDocumentor or other
- use meaningful variable and function names
- use an editor with syntax highlighting to help find any unbalanced quotes
and parentheses before running the script
- if something does not work like expected: use a debugger to inspect your
variables at every execution step, IMO a must for serious programming
- get used to a version control system early, you will populate your file system
with test1.php, test2-old.php, test2-1.php and so on not knowing what you will need
later and what to delete
This was the easy advice, now the difficult:
- break down a problem into smaller 'working units' using functions and objects
- design your functions (and methods) to work on data passed in by parameters, the
benefits will be better isolated testing, and reuse of code
- test your code after every logic step
- work on your understanding of the whole system: client browser, IP (address, ...),
TCP (port, SSL, ...), DNS, HTTP (headers, ...), HTML, CSS, JavaScript, web server
settings, PHP settings, logging, ...
There is a reason why good programmers can ask for high hourly rates.
/Str.
|
|
|
|