what gave you the most hassle?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

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?

Post by malcolmboston »

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...........
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

regex. Never learnt it, probably never will master it either..
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

for sure will go with Punk on this too.... //1!!
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Did you mean \\1 ? ;)
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

s/\/\/1/\\\\1/

:o
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

see, most hassel =]

i always mix up my forward/back slashes

i always type \\ after the http: in the address bar. i'm horrible :cry:

:/ edit - this is going to turn into a sub-pattern/back reference topic. :lol:
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Weirdan wrote:Did you mean \\1 ? ;)
Haha... Good one. :twisted:

Personally, I hated (and still do) regexps and OOP, even though the later is a very big buildingstone in PHP... :?
User avatar
llanitedave
Forum Commoner
Posts: 78
Joined: Thu Jan 15, 2004 11:24 am
Location: Las Vegas, NV.

Post by llanitedave »

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...
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

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 ;))
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

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.
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

Trying to figure out work arounds for things that PHP doesn't natively support. Like threads! Semaphores, fork, and shared memory helped, but I had to do some reading.

Cheers,
BDKR
User avatar
llanitedave
Forum Commoner
Posts: 78
Joined: Thu Jan 15, 2004 11:24 am
Location: Las Vegas, NV.

Post by llanitedave »

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 ;))
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.

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

Post by malcolmboston »

markl999 wrote:s/\/\/1/\\\\1/

:o
i gotta agree regex is a nightmare
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

llanitedave wrote:I expect OOP to give me the most trouble, since I seem to have a mental block about it.
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.

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.
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

McGruff wrote:
llanitedave wrote:I expect OOP to give me the most trouble, since I seem to have a mental block about it.
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.

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.

Cheers,
BDKR
Post Reply