i had to read the manual cuz i had php course at the university but still most of the things i've learned working and copy pasting from internet stuffs already made and also reading forums.
Do it right! Do it perfect!
As for searching for examples of code use, if you are a FF user, install the search for Google Code.
This allows you to easily search for real-life code samples, especially useful for functions or classes you only use rarely, or like me, despite your having rtfm you still cannot see the point of something.
Say you didnt know how people would use DirectoryIterators, you can then easily search using DirectoryIterator lang:php
Wow, quite a response to my post. Obviously we read the manual, but I'm hearing a few times that it is not so beginner friendly. I think it would be great to have list some tips on how to use the manual. For instance, I didn't know for a long time that function parameters in square brackets were optional.
Not cover to cover.
But I usually find myself there when I'm looking for something in particular.
That and Tizag.
Trying to fill the unforgiving minute
with sixty seconds' worth of distance run.
i try to read, and plan to read the whole thing over the next 6 months.. when i first started learning, i didnt quite understand anything, and thought it was officially the worst manual out on the net, and still think it is quite bad, in regards to examples and comments about it.. but can understand since it is open source.
ive read that manuals for newbies is quite scarce, but as you become more and more experienced. there is alot more usful material out there.
I found that the pretty cheap book "PHPArchitects Zend PHP5 certification guide" provided me with very structured checklist of programming subjects - very easy to read and understand. It explains a few basic principles then expects you to dive into the manual to find out more, you can start from page 1 and work your way through the book/manual.
It's a big like having a friend or uncle who is knowledgeable on a subject, like fishing or golf or driving who enthuses you and can explain the really basic things in simple phrases.
It is then up to you to seek out "chapter and verse" in the manual, and sometimes you will need to come back here, to SP for clarification when you have questions.
Setting out and sticking to a learning schedule from the chapters in that book and using the triumvirate of the book, the manual and SP is the killer PHP learning environment - and one I wish I had discovered years before.
this article, which discusses the goto statement. In it, this blog showcases an example of using goto without getting out of hand.
And yes, I use the php manual, as it is indispensable.
EDIT - Speaking of the php manual... The home page of php | architect has a link discussing the push for bringing the documentation up to speed (from Rasmus Lerdorf no less!).
Which isn't to say the PHP Manual is useless, but it is written for geeks, not beginners. When I first started learning PHP, I found it almost worthless. Now that I understand PHP a little better, it's a little easier to understand - but I still prefer forums. Forums allow you to explain exactly what you're trying to do and (hopefully) connect with someone who understands your problem and is willing to explain the solution.
I refer to the PHP manual pretty much every single day. Seems like 80% of the questions out there can be answered simply by referencing the manual.
Scriptalicious SEO Scripts
Save 20% with coupon code SPROCKS
That's what freelance services are for. As I just mentioned, if you're on a developer's forum, it's generally expected that you're genuinely interested in learning development as opposed to treating forums as a problem solving drop-off service.Originally Posted by geosite
And programming isn't a "real" job? Hmmm...
Are you sure you want to keep name-calling the people whose help you rely on ?Originally Posted by geosite
Trying to fill the unforgiving minute
with sixty seconds' worth of distance run.
Actually, it is - or can be. I was referring to "real jobs" as in traditional, non-IT jobs. For those us us who aren't employed in IT, web design is something of a hobby, while we pay the rent with a "real job."And programming isn't a "real" job? Hmmm...
Logic without the fatal effects.
All code snippets are licensed under WTFPL.
Yeah but just because people like you dabble into web / IT as a hobby doesn't correctly label web dev / programming / IT as non "real" jobs... There are plenty of people within those professions that do very well for themselves financially and support themselves and their families quite well (full time work included). By your notion, if you 'toyed around' with car engines, you'd label actual mechanics as non "real" jobs, afterall, you don't do this for a living, you do it as a hobby while paying the rent with a "real" job. Those mechanic chumps who do this every day full time to pay their rent can't be possibly doing a "real" job.Originally Posted by geosite
*whistles* wow.. all I can say is your definition of a "real" job is terribly skewed.
For most people, that is NOT a real job. Keep in mind, also, that many people in the IT industry have very flexible hours and/or telecommute. Again, you may consider that a "real job," but there are millions of people working more traditional jobs who would disagree.
I'm not offended (and I'm not a programmer / web developer either.. I, like you, do this [web stuff] more as a hobby than anything else). You're not insulting me, and I'm not taking your answer personally (sorry if it comes off that way). I do, however, think that your response / mindset to this entire concept of what a "real" job is not accurate in the slightest.. Everyone who chooses a profession (and yes, web developers, programmers and IT are professions that demand skill and talent which like many (most?) other professions, take time to cultivate to do the job right (sure, there are idiotic bad developers that should be shoveling crap on a farm instead - but I digress). Like other professions, having something done right requires considerable investment in time (and perhaps money if we start involving college / universities) to cultivate a skill set that employers find valuable and worth paying for.Originally Posted by geosite
So you know for fact that most people don't consider IT and the like as real jobs? You think flexible hours / telecommuting has any bearing on what a "real" job is? Have you not considered perhaps the corporate employer's culture? What if a company lets professionals work from home or offer flexible hours? Not everyone has to work from exactly 9-5 to qualify as a "real" job. Not everyone has to travel x amount of distance to go to a certain place for it to be a "real" job.Originally Posted by geosite
Perhaps by being around the people and the professions you were involved in (and I'm not knocking you nor the professions you chose down), the mindset is 'old fashioned'. In case you haven't noticed, computers / technology are a huge driving force in where we are headed.
Make no mistake, we are a technological race that isn't about to put down our keyboards anytime soon.. we need IT / programmers / developers for much of the technology we take for granted (and I might add that the technological drive only continues forward at a feverish pace). And I can't possibly see how such a massive combined set of industries involving technology would not be considered a "real" job. Your terms / definitions of what determines a real job (not toying around with something as a hobby, only set strict start and end times, the need to commute as opposed to telecommuting) is IMO outlandish (and I'm sorry if I offend you here, as this is the best choice of words at the moment without crossing over into political incorrectness).
You haven't insulted me, but by claiming programming isn't a "real" job, you may have offended others who have invested huge amounts of time, energy and money to get into a field that yields to great financial rewards coupled with perks like flexible time tables so that they can provide for themselves and their families.
Sorry sir, your definition simply doesn't hold any water.
Do you consider surgery a "real job"? How about President of the U.S.? Acting in a major motion picture or recording a hit song?
All of those (usually) require an enormous commitment and lots of training and sacrifice. Yet many people - and I would guess the mast majority - would not consider any of them a "real job."
The term real job - as I understand it - refers to a traditional job. That generally means working relatively fixed hours, usually for a relatively modest salary.
It's also worth noting that many people who offer advice on SitePoint and other forums aren't employed in the IT industry to begin with. Many are beginners or hobbyists. Check out their signatures, and you'll see that some of them are actively seeking employment, "real" or otherwise.
Hence 'old fashioned' (as I suspected). Times are changing. It's as simple as that. We're in a society that is in constant flux. What was once traditional then might not be so traditional now. People used to traditionally ride in horse carriages.. until the car came along (so much for tradition, as now people traditionally travel in motorized vehicles). The profession landscape is not static.. it's always evolving... So your definition of a real job (fixed hours with modest salary) only differs with IT in the fixed vs flexible hours.. IT people still have to put in their 7.5 or 8 or whatever hours a day.. I worked in the electronic gaming industry for a decade (you wouldn't consider it as a real job, as hours are indeed flexible.. but make no mistake, you can't just come in whenever you want (like say noon) and leave whenever you want (like say 4pm). While many companies allow flexible hours, they still require your normal amount of hours in a day).Originally Posted by geosite
No dispute there. I'm not saying that all people on these forums are all established professionals. But I'd wager there are some people on these forums who are professionals in webdev / programming that do this for a living.Originally Posted by geosite
Yes, I know the key word here is perceived limitation of working with exceptions. Don't get me wrong, I prefer working with exceptions myself. But the manner in which the goto was demonstrated wasn't bad IMO (although again, I would prefer the exceptions).The conclusion on my second talking point was that goto can be used to overcome some of the perceived limitations of working with exceptions in a batch/procedural execution model. Without the support of an event-driven execution model, and without a dedicated retry-type statement, programmers need to resort to looping constructs. The code that results can be brittle and difficult to maintain over time. goto offers an eloquent and succinct alternative.
I would be more concerned with people starting to throw goto statements all over the place and run loose and wild instead of small focus areas like the author has done.
Yes I like to read the manual and use it when I forget something - I have downloaded the PHP, MySQL and Smarty .chm versions of the manuals. They are great
a new day, a new beginning
never follow the crowd, the crowd is poor!
Some software, like NuSphere phpED, has the important part of the manual pop up after you type the function name. There's even a popup for user defined functions that gives you the argument list.
Nusphere is my home software and I love it, but at work I use TextPad and I'm turning to the manual constantly. More often than not, it's to check the argument order.
Every once in a while I find myself in the references:
After years of coding in PHP I sometimes find myself predicting that a premade function exists, and find it in the references.