I've been trying to learn PHP recently and have come to a bit of a roadblock. Although I have some knowledge of HTML & CSS I'm new to programming and I don't understand the basic terms such as arguments, operators, etc.
I feel that if I could learn a basic programming language that it is really easy for beginners to get the hang of, that it would give me an overall understanding of programming and hence make it a lot easier to learn PHP.
Is that a logical approach?
Thanks for your help!
sql most certainly is not a programming language
stick with php, is my advice
Thanks for the advice r937, BTW I've previously purchased your "Simply SQL" book from here in ebook format, but I haven't read it (sorry). Edit The reason I bought it was because I thought it would be a help for when I got into the MySQL part of PHP & MySQL.
Any other suggestions or opinions would be most welcome.
PHP is a great language to learn.
When I started learning programing languages, I Googled "programing languages" and I liked C++ because it was reportedly more "powerful". It's actually a difficult language, but once you learn it, almost every other language you'll encounter will more than likely have something familiar to you. But, really, PHP is a good place to start, especially if you're in web development.
Some alternatives would be ASP, Classic or .NET. I always found this hard to get to get my head around. This language is mostly used in the same place as PHP.
C, somewhat different than C++, easier to learn.
Really, just try and learn any object oriented program and you'll be well on your way.
(Object oriented is the way the language is formed. It holds data in objects. Think tables.)
Hope this helps.
PHP isn't a programming language, it is a scripting language. However, it will introduce you to some basic constructs common across all programming languages such as logical comparisons, operators, loops, objects, and most importantly, algorithm development. You may do things differently in various languages, but there are some commonalities and PHP will allow you to learn them pretty easily.
PHP will teach you some poor programming habits because it's more forgiving than other languages.
C#, Java, and C++ are all good starting points.
I may recommend Java for the sake that many other languages employ similar syntax and structure, and until you determine which type of programming you enjoy most (websites, web apps, applications, etc), Java can accommodate development in all these areas.
If you are going to start in Java, I'd recommend the latest edition of "Java - An Introduction to Computer Science & Programming" by Walter Savatch.
But, if you already have an interest in only websites and web site development, then PHP will probably be the quickest way to reach your goal.
I would recommend Java because there are many more similarities with it and PHP then c or c++. If your interested in ASP.NET then c,c++,c# would probably be the better route.
thank you for setting me straight
calling me ignorant, however, shows a complete lack of class on your part
it's a good thing our paths don't cross too often, because you're rude
Thanks very much everyone for your great advice. My main objective is to learn PHP, so that I can first understand how web applications work - for example I own a couple of forums and I want to understand the forum software so that I can better manage and update my sites. Once I have achieved that, I would like to be able to create web applications of my own.
I've been going through Larry Ullman's PHP for the Web book. The book is great and I believe suitable for beginners because it is focused on PHP only, with just the last 2 chapters delving into MySQL. I thought I was doing well until I got to the chapter on using conditionals "else if" etc, chapter 6. I'm familiar with HTML but no other programming and I am struggling to understand the concepts of conditionals, particularly nesting them.
I also own a copy of Kevin Yank's ebook, but I thought it would be easier to learn from a book that just covers PHP before a book that covers both PHP and MySQL.
My plan at the moment is to start the Larry Ullman book again. If I'm still struggling I will probably take a stab at learning Python. Perhaps I'm wrong but I spent some time looking at Python resources on the web last night and IMO they appear to be more geared towards complete beginners. I get the impression that PHP books and tutorials seem to assume more tech knowledge on behalf of the reader.
My advice: Pascal. It was pretty much created for the sole purpose of learning programming... It uses verbose names on EVERYTHING, with easier to understand grammar -- letting you learn how things work BEFORE you dive into the world of C Syntax (php is a C syntax language) with it's needlessly cryptic names, operators and grammatical constructs.
Free Pascal - Advanced open source Pascal compiler for Pascal and Object Pascal - Home Page
pascal, ha ha ha ha ha – what a fossil! pascal is just about worthless in this day and age. Learning pascal will make you a fully qualified software archeologist.
Wow, No offense, but that's a really ignorant viewpoint as there's PLENTY of modern software out there written entirely in Pascal. You may even have used one without realizing it!
Avant? (the IE wrapping browser?) Asus Power4Gear? ThinkSQL? Pixel? GBXEmu? FLStudio? PC Tools Spyware Doctor? Inno Setup? CambridgeCAD? MSI Afterburner? MediaMonkey? PE Explorer? MyCORSA? AVS? BitZapper? IMGBurn? Daring Apprentice? Space Rangers 2?
... and that's the little stuff... How about Partition Magic? MagicISO? CloneCD? IcoFX? Spybot Search & Destroy? ADAWARE?!? WINRAR?!?
How about this one: SKYPE?!?
All those software packages? Written in Delphi... or Lazarus+FPC when there's a cross-platform version. Modern Object Pascal being used to build modern applications... Quite often for multiple platforms at once!
It goes back to something I've been saying for years, the only thing holding Pascal back was a lack of a decent cross platform compiler. Delphi was a good start to keeping Pascal modern by tossing Visual programming on top of it, but FPC+Lazarus takes that cross platform. There's really little you can do in C or C++ that a modern Pascal compiler like Delphi or FPC can't do.
More "mainstream" languages could learn a LOT from Pascal -- It has strict typecasting so you'll actually learn how to use values properly (before being unleashed on the "i'm an idiot, what's typecasting?" of PHP), Object pascal dialects have one of the best models for learning objects (and unlike PHP since you have POINTERS it's actually USEFUL as objects). It's a very verbose language making it's syntax naturally clear to users (Unlike say... C or worse, Ruby -- which are needlessly cryptic)... It's not case sensitive, it requires forward declaration of variables meaning you don't have to worry about typo's ever making it past the compiler. All in all it is one of the most sensible languages ever developed. (along with Modula 2 or even better Oberon) .
The errors not making it past the compiler is a BIG feature when learning, because it will train you to not make those mistakes in the first place as opposed to C where the compiler is very permissive or PHP where things "fail silently" IF THEY FAIL AT ALL. (ooh look, typo you'd never notice just became a new variable)
Pascal remains the choice of people who would prefer not to have mistakes even make it past the compiler in the first place. Which is probably why for all it's faults, Skype is probably the most stable VOIP application out there.
... and Pascal was created by Professor Wirth so you can spend more time learning how to do things instead of wasting time learning all the little cryptic language constructs so common in the various C/AT&T Syntax families.
Pascal is alive and well... and gaining more users all the time -- hell, Delphi XE2 just launched 3 days ago; FPC's most recent release was in May -- and FPC supports OSX, Haiku, and several ARM platforms including the Nintendo DS and GBA... many commercial DS and GBA games are in fact written in Pascal!
Worthless you say? I think not.
Besides, any compiler that can compile itself...
Thanks for the suggestion deathshadow60, I'm going to try sticking with PHP for a little while longer and if that doesn't work for me I will look for another more straight forward language to start off with.
I met with a computer programmer friend yesterday evening and he gave me some great pointers on PHP which were very helpful. I was surprised at how a few minutes of his time made something that appeared really complex in a book, suddenly quite understandable.
You often have to remember that a lot of the books on shelves are decade out of date rot -- Often written for profit instead of education. (funny thing is, the closer you get to a actual schoolbook, the more true that statement is).
It also doesn't help that a lot of the books are written by die hard coders who don't know how to step back from the geekery, and use things like simile's, or even just plain English to explain things.
See Objects in PHP -- it's not bad enough it's a incomplete/half-assed job of shoe-horning them into the language, you get a PHP coder trying to explain how it works and your brain will start to shut down.... makes C++ coders sound sane.
My advice: Dont learn a language.
Learn to Program.
Any programming (scripting, whatever) language is just the skin on the logic of your program.
Programming is 99% theory and 1% syntax.
If you can look at a problem, and expand it into the pseudocode steps of how to tackle it, then you have learnt how to code. After that, you're just converting your plan into whatever language you choose to enact it.
Either that, or you have to consider all interpreted languages to not be "real" programming languages -- ROM BASIC, PERL, PHP, RUBY, JAVA, .NET (for all the talk of VM's, they're interpreted). They all require some other piece of software to sit on top of the system changing the code (or bytecode) into native code instead of running directly as native executables.
Kind of like the XML nudniks who run around calling their bloated formatting "machine readable" -- are the integers stored in 8,16,32 or 64 bit binary? Are the floats in 16, 32 or 80 bit IEEE 754 format? Are the strings stored leading length limited or null terminated? IF the answer is no, then it's NOT machine readable, and requires a PARSER to turn it into something that's machine readable. The ONLY reason to use XML is to be HUMAN Readable. (which is the real laugh of people minifying XML)
next page →