what gave you the most hassle?
Moderator: General Moderators
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
what gave you the most hassle?
Just wondering what you guys have had problems with whilst learning PHP.
upto now my biggest problem has been scanning directories etc, still dont fully understand the syntax, have pretty much sailed through the rest upto now
<-- expecting lots of peeps to talk about classes...........
upto now my biggest problem has been scanning directories etc, still dont fully understand the syntax, have pretty much sailed through the rest upto now
<-- expecting lots of peeps to talk about classes...........
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
- llanitedave
- Forum Commoner
- Posts: 78
- Joined: Thu Jan 15, 2004 11:24 am
- Location: Las Vegas, NV.
I expect OOP to give me the most trouble, since I seem to have a mental block about it.
PHP itself seems pretty straightforward as a language, although there are a few tricks that trip me up, like headers and redirecting. Mostly so far I stumble over dumb little syntax errors that take me forever to find.
I'm learning javascrpt at the same time as php, and javascript seems more difficult for me.
But my OOP problems will be the same in any language!
Expect to be getting a lot of dumb questions from me in the upcoming months...
PHP itself seems pretty straightforward as a language, although there are a few tricks that trip me up, like headers and redirecting. Mostly so far I stumble over dumb little syntax errors that take me forever to find.
I'm learning javascrpt at the same time as php, and javascript seems more difficult for me.
But my OOP problems will be the same in any language!
Expect to be getting a lot of dumb questions from me in the upcoming months...
The problem with OOP is the methodology. The syntax is easy, it's there for all to see on php.net. I found reading/learning about Design Patterns first before learning OOP was more useful. Even if you don't implement the design patterns to the letter in php the whole concept/theory makes designing objects a lot easier.
(imho
)
(imho
- Pyrite
- Forum Regular
- Posts: 769
- Joined: Tue Sep 23, 2003 11:07 pm
- Location: The Republic of Texas
- Contact:
For me, setting up php4 on NT4 Server as a CGI Module for IIS 4.0 was a big basturd.
Also, the infamous "Headers already sent" message has always been a thorn in my side. Especially if you send headers once for some stuff, then you can't use the header for redirects later in the same page.
regex is something I won't ever understand.
Working with cookies ...
Trying to mix php and javascript in certain situations ...
Upgrading php and having my code stop working in the past at certain versions was a pain.
Difference in database syntax (which is why I love ADOdb so much).
etc.
Also, the infamous "Headers already sent" message has always been a thorn in my side. Especially if you send headers once for some stuff, then you can't use the header for redirects later in the same page.
regex is something I won't ever understand.
Working with cookies ...
Trying to mix php and javascript in certain situations ...
Upgrading php and having my code stop working in the past at certain versions was a pain.
Difference in database syntax (which is why I love ADOdb so much).
etc.
- llanitedave
- Forum Commoner
- Posts: 78
- Joined: Thu Jan 15, 2004 11:24 am
- Location: Las Vegas, NV.
A bit of Karma: A couple of years ago, I found a hard-cover copy of "Design Patterns" by Gamma, Helm, Johnson, and Vlissides under a bush near a dirt road in an isolated area of the Spring Mountains. There wasn't another soul around for miles. It was in perfect condition.markl999 wrote:The problem with OOP is the methodology. The syntax is easy, it's there for all to see on php.net. I found reading/learning about Design Patterns first before learning OOP was more useful. Even if you don't implement the design patterns to the letter in php the whole concept/theory makes designing objects a lot easier.
(imho)
I looked through it a little bit at the time, hoping it might be useful, but really didn't understand much of it. I'm rereading it again now, and getting a lot more now.
You never know what you'll find when hiking in the mountains! I was looking for fossils, but found something a bit more current...
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
For me, I'd say everything was difficult until I learned a bit about OOP. I've written my fair share of tangled, un-testable, un-maintainable spaghetti code.llanitedave wrote:I expect OOP to give me the most trouble, since I seem to have a mental block about it.
There is a bit of a learning curve but once you get into the OOP way of thinking, everything becomes much simpler rather than more complicated.
I like and use OOP too (if I didn't, I wouldn't be doing so much with Python these days), but I have a big problem with the idea that the only way to get away from sphagetti is to use OOP. I really don't believe this is correct. One (or a team) can create a very well organized and flexible procedural code base. It may not prove as flexible as an OO based solution, but it can be done.McGruff wrote:For me, I'd say everything was difficult until I learned a bit about OOP. I've written my fair share of tangled, un-testable, un-maintainable spaghetti code.llanitedave wrote:I expect OOP to give me the most trouble, since I seem to have a mental block about it.
There is a bit of a learning curve but once you get into the OOP way of thinking, everything becomes much simpler rather than more complicated.
Cheers,
BDKR