View Full Version : Best programming language for beginners
canadaski
February 1st, 2012, 01:22 PM
I know html and the xhtml markup, and CSS. I want to eventually learn PHP and MySQL. Is there anything I should learn before those or should I jump right into PHP? Where is the best place online to learn for free? I'd rather not buy books.
I mainly going to use it for developing wordpress/joomla plugins and standalone web apps. Is there something better to learn first? Is there a basic programming theory explanation somewhere?
Thanks
nick
February 1st, 2012, 01:43 PM
php is fairly user-friendly compared to other scripting languages like pearl and it's very much easier to pick up than Java. You should be able to find online tutorials. It's also very easy to install php, mysql and apache onto your own pc, I use a bundle called xamp for this which ensures that you install versions that are compatible with each other.
TheMatrix
February 1st, 2012, 07:53 PM
I, too, started out with PHP. That, unfortunately, was a disaster -- a huge disaster -- and I never accomplished anything without consulting the documentation every 5 minutes. Since then, I've moved on to Perl-CGI(aka "web perl"). It's worked very well, and since Perl works both on the web as well as off, it's perfect for doing other tasks as well.
Since I usually don't have time to create full web applications, I stick with little utilities for my own machine.
If you're interested, the Perl homepage is here (http://www.perl.org/), the Comprehensive Perl Archive Network(CPAN) is here (http://www.cpan.org/), tutorials and a good starting script are here (http://learn.perl.org/first_steps/) and here (http://learn.perl.org/), and the duct tape of the internet may also be an interesting google hit.
Hope this helps! :)
php is fairly user-friendly compared to other scripting languages like pearl
*Perl ;)
and it's very much easier to pick up than Java.
Well, yeah.
You should be able to find online tutorials. It's also very easy to install php, mysql and apache onto your own pc, I use a bundle called xamp for this which ensures that you install versions that are compatible with each other.
*xampp
Although XAMPP is good for the beginner, it gets difficult to do advanced things with it. This is especially painful on Windoze, where you are not supplied with a Perl(or PHP, Java, etc) core that a package manager interacts with. Therefore, you must manually install(or recompile, in PHP's case) to add any functionality.
canadaski
February 1st, 2012, 09:33 PM
Although XAMPP is good for the beginner, it gets difficult to do advanced things with it. This is especially painful on Windoze, where you are not supplied with a Perl(or PHP, Java, etc) core that a package manager interacts with. Therefore, you must manually install(or recompile, in PHP's case) to add any functionality.
thanks for the resources. Is there a good alternative to XAMPP that you would suggest using? Is this pretty much what you think of PHP? Either way, I'll need php because most open source CMS use it. Maybe after I learn Perl. It's been getting a lot of praise lately.
Does this pretty much sum up PHP?:D
http://tnx.nl/php.jpg
Mzor203
February 1st, 2012, 10:47 PM
Heya. I've been programming with PHP, MYSQL, and Javascript for about 5 years now, and I've managed to become adept enough at programming that I'm turning it into my profession, so I think I can give some decent advice.
First of all, as a beginner, I can recommend two programs that you should 100% get that will make your life a lot more simple. WAMP (http://www.wampserver.com/en/) and PSPad (http://www.pspad.com/).
WAMP is a MySQL, PHP, and Apache bundle for Windows. You literally only have to click the install button and run through a couple options and then you're set up and good to go. WAMP is good enough for any amateur web-design work and even professional-level.
PSPad is an amazing editor for PHP/JS/HTML files. It has tons of options to make programming easier, is very simple to use, and is very cutsomizable. Another great feature it has is that it can hook up to any FTP server and allow you to directly edit the files without re-uploading if you're doing design on an actual web-site. Download, it, practice with it, use it. It will become you best buddy as a programmer.
Now, with that aside, PHP is a very easy language to start with. The reason for this is there's no bullshit with it. You type down a line of code, and you can load it up in your browser and it will just do stuff. The other part of that is it has perfect compatibility with HTML in that you can do all the stuff you already know how to do in HTML, but sprinkle some calculations of nifty function around in PHP very easily.
When learning programming, something I cannot stress enough is GET A BOOK. Do not use guides off the computer. Just don't. Having an actual physical book is great. You can take it with you and re-study something you've already done if you need to get a better handle on it, or just look ahead and get ready for whatever's coming up. If you spend lots of time programming, eye-strain can be an issue and a book is great for that. I know you said you don't want to get books, but seriously...
When you're actually doing the learning, a couple things to keep in mind. Don't just take files they provide you and copy-paste them. When you're learning, write down every line of code. It will help you remember and learn exceptionally. Secondly, don't be afraid to play around with the examples they give you. Make it a point to change something up in each program you write, that will mean you actually learn how to use the material instead of just how to copy it down.
Lastly, don't ever be afraid to ask for help. Find a good resource for this... phpfreaks.com has a great forum and they love to help out beginners.
Good luck! I do still check back at this site so if you ever need help, feel free to shoot me off a message. I have a very good grasp of programming theory and the specific languages you're interested in, so I would be glad to offer help.
Also, for your above post, PHP is probably the best, and very likely the only, server-side scripting language you will ever need to learn to be successful. Some people may argue that, and there are definitely alternatives but PHP is very robust and incredibly ubiquitous, and its functionality isn't going to be deprecated any-time soon.
canadaski
February 1st, 2012, 11:34 PM
Heya. I've been programming with PHP, MYSQL, and Javascript for about 5 years now, and I've managed to become adept enough at programming that I'm turning it into my profession, so I think I can give some decent advice.
First of all, as a beginner, I can recommend two programs that you should 100% get that will make your life a lot more simple. WAMP (http://www.wampserver.com/en/) and PSPad (http://www.pspad.com/).
WAMP is a MySQL, PHP, and Apache bundle for Windows. You literally only have to click the install button and run through a couple options and then you're set up and good to go. WAMP is good enough for any amateur web-design work and even professional-level.
PSPad is an amazing editor for PHP/JS/HTML files. It has tons of options to make programming easier, is very simple to use, and is very cutsomizable. Another great feature it has is that it can hook up to any FTP server and allow you to directly edit the files without re-uploading if you're doing design on an actual web-site. Download, it, practice with it, use it. It will become you best buddy as a programmer.
Now, with that aside, PHP is a very easy language to start with. The reason for this is there's no bullshit with it. You type down a line of code, and you can load it up in your browser and it will just do stuff. The other part of that is it has perfect compatibility with HTML in that you can do all the stuff you already know how to do in HTML, but sprinkle some calculations of nifty function around in PHP very easily.
When learning programming, something I cannot stress enough is GET A BOOK. Do not use guides off the computer. Just don't. Having an actual physical book is great. You can take it with you and re-study something you've already done if you need to get a better handle on it, or just look ahead and get ready for whatever's coming up. If you spend lots of time programming, eye-strain can be an issue and a book is great for that. I know you said you don't want to get books, but seriously...
When you're actually doing the learning, a couple things to keep in mind. Don't just take files they provide you and copy-paste them. When you're learning, write down every line of code. It will help you remember and learn exceptionally. Secondly, don't be afraid to play around with the examples they give you. Make it a point to change something up in each program you write, that will mean you actually learn how to use the material instead of just how to copy it down.
Lastly, don't ever be afraid to ask for help. Find a good resource for this... phpfreaks.com has a great forum and they love to help out beginners.
Good luck! I do still check back at this site so if you ever need help, feel free to shoot me off a message. I have a very good grasp of programming theory and the specific languages you're interested in, so I would be glad to offer help.
Also, for your above post, PHP is probably the best, and very likely the only, server-side scripting language you will ever need to learn to be successful. Some people may argue that, and there are definitely alternatives but PHP is very robust and incredibly ubiquitous, and its functionality isn't going to be deprecated any-time soon.
Wow, thanks. i just downloaded and installed WAMP. Does it have a feature to restore the server to it's original state with a single click?
Is PSPad something i could keep and use once I pick up Perl? Does it have good auto syntax highlighting? I'd be lost without it.:P
Mzor203
February 1st, 2012, 11:53 PM
Wow, thanks. i just downloaded and installed WAMP. Does it have a feature to restore the server to it's original state with a single click?
Is PSPad something i could keep and use once I pick up Perl? Does it have good auto syntax highlighting? I'd be lost without it.:P
PSPad has support for pretty much every major programming language out there, and I know it has support for Perl as well. It also has features where you can add your own syntax highlighting, or customize the colors/etc. it uses. I haven't used anything else than PSPad except when I was doing Actionscript development (in which case I just used Flash's SDK).
The way Wamp works is there's a "www" folder inside the wamp folder, which contains the files that are displayed if you go to the http://localhost/ location. If you want to get rid of the files and start over, just select everything in there and delete it.
If you ever really need to you can also just uninstall and re-install wamp. It doesn't take very long at all, but just deleting your files in the www folder will almost always suffice.
TheMatrix
February 2nd, 2012, 01:52 AM
thanks for the resources. Is there a good alternative to XAMPP that you would suggest using?
On most Linux distributions, the repositories offer a web server(usually apache, nginx, and lighthttpd) to choose from. I would suggest using one of those. On Windows, I haven't really looked into it(I never do anything advanced because Windoze is a pain to work with), but I'm pretty sure that XAMPP, WAMP, and even the Windows port of Apache should work fine.
Is this pretty much what you think of PHP? Either way, I'll need php because most open source CMS use it. Maybe after I learn Perl. It's been getting a lot of praise lately.
If the whole world jumped off a cliff, would you follow?
PHP gets the most praise because it's heavily commercialized.
Does this pretty much sum up PHP?:D
image (http://tnx.nl/php.jpg)
In my opinion, yes, it does :D
First of all, as a beginner, I can recommend two programs that you should 100% get that will make your life a lot more simple. WAMP (http://www.wampserver.com/en/) and PSPad (http://www.pspad.com/).
PSPad is not open source. I would recommend Notepad++ instead -- although that is merely my preference on Windows. On Linux, I almost always use vim.
PSPad is an amazing editor for PHP/JS/HTML files. It has tons of options to make programming easier, is very simple to use, and is very cutsomizable. Another great feature it has is that it can hook up to any FTP server and allow you to directly edit the files without re-uploading if you're doing design on an actual web-site. Download, it, practice with it, use it. It will become you best buddy as a programmer.
Directly editing files on the site is a VERY bad practice. I've exploited many security flaws in my peers' websites who use such techniques.
Now, with that aside, PHP is a very easy language to start with. The reason for this is there's no bullshit with it.
Oh, if only. Namespaces, anyone? Or maybe a better separation of logic and presentation?
You type down a line of code, and you can load it up in your browser and it will just do stuff. The other part of that is it has perfect compatibility with HTML in that you can do all the stuff you already know how to do in HTML, but sprinkle some calculations of nifty function around in PHP very easily.
And that is where it all begins. The worst coding nightmares start from this sort of approach. Believe me, I've been there.
When learning programming, something I cannot stress enough is GET A BOOK. Do not use guides off the computer. Just don't. Having an actual physical book is great. You can take it with you and re-study something you've already done if you need to get a better handle on it, or just look ahead and get ready for whatever's coming up. If you spend lots of time programming, eye-strain can be an issue and a book is great for that. I know you said you don't want to get books, but seriously...
That is true. If you need advice from fellow programmers about a book, one community that I visit, PerlMonks, has an entire section (http://www.perlmonks.org/index.pl?node_id=23304) dedicated to book reviews.
Personally, I believe that O'Reilly Associates (http://orielly.com/) has a lot of excellent books available. some(well, for perl anyways) even from Larry Wall himself.
When you're actually doing the learning, a couple things to keep in mind. Don't just take files they provide you and copy-paste them. When you're learning, write down every line of code. It will help you remember and learn exceptionally. Secondly, don't be afraid to play around with the examples they give you. Make it a point to change something up in each program you write, that will mean you actually learn how to use the material instead of just how to copy it down.
I agree with this. Life gets boring if everything looks the same.
Lastly, don't ever be afraid to ask for help. Find a good resource for this... phpfreaks.com has a great forum and they love to help out beginners.
PerlMonks (http://www.perlmonks.org/?node_id=131) has the Seekers of Perl Wisdom (http://www.perlmonks.org/?node=Seekers of Perl Wisdom) that many programmers consult for various things.
Also, for your above post, PHP is probably the best, and very likely the only, server-side scripting language you will ever need to learn to be successful.
Successful? Yes. Happy? Ehh, probably not.
See this article (http://tnx.nl/php.html) for a great description.
Some people may argue that, and there are definitely alternatives but PHP is very robust and incredibly ubiquitous, and its functionality isn't going to be deprecated any-time soon.
Actually, many of those alternatives -- not only Perl -- are becoming more popular because PHP is lacking a lot of code and functions. Many times that I tried to write something using a particular function, only to have PHP tell me it was deprecated. Guess what? I had to write it myself.
That's my big issue with PHP - you have to re-invent the wheel for many things. That, unfortunately, is the cost of extreme consistency [across all platforms].
Is PSPad something i could keep and use once I pick up Perl? Does it have good auto syntax highlighting? I'd be lost without it.:P
I don't know, I seldom do anything more than HTML stuff on Windoze -- and that I do with Notepad++.
And I agree with you, syntax highlighting is key. :cool:
<-------------->
All in all, I would say: use what you want to use best. If that is PHP, then I wish you the best of luck(you'll certainly be needing it), and may you create glamourous things.
If you choose Perl, then welcome aboard the easy path to success :yes:
nick
February 2nd, 2012, 03:30 AM
I stick by my earlier assertion, just a personal opinion I guess. Perl is a foul language which I wouldn't recommend to anyone. Php is far easier to work with.
monkee98
February 2nd, 2012, 07:37 AM
I personally find that PHP is relatively similar to Javascript. Somewhat stricter syntax and more advanced functions.
But seeing as you are asking about programming languages, I recommend FreeBASIC, a better version of BASIC (Beginners All-purpose Symbolic Instruction Code)
TheMatrix
February 2nd, 2012, 08:24 PM
I stick by my earlier assertion, just a personal opinion I guess. Perl is a foul language which I wouldn't recommend to anyone. Php is far easier to work with.
I could say PHP is "foul" because it lacks extensibility(modules etc). And the things that do exist, are all wasting memory in the main namespace. Everytime you initiate a PHP script, all the functions -- even the sha1 is loaded, whether or not you need it. Now, for small and low-traffic sites this is not so much of a problem, but once you need to make a higher traffic application, then the common allocation of 128M of RAM likely won't cut it. Hence, you will need to either A) upgrade to a better server costing you more money or B) recompile PHP, which most webhosts disallow.
Regardless, I try to refrain from using strong adjectives to describe languages. I would do the same, or people will not like you very much.
But seeing as you are asking about programming languages, I recommend FreeBASIC, a better version of BASIC (Beginners All-purpose Symbolic Instruction Code)
And yet, BASIC isn't the best place nowadays, unless you're an absolute beginner.
Mzor203
February 3rd, 2012, 09:49 PM
Sorry for a later reply, as said I don't check this site very often.
To TheMatrix, I'm not going to go through each and every part of your post but I think you're reading too far into what I'm saying and overcomplicating things here. I was presenting information to someone who has no previous server-side scripting knowledge.
A couple important things though, PSPad is free and there is no part of it that you have to pay at all to use. I'm not sure exactly what your beef with it is but it is a wonderful program and no editor I have used has come close to the fondness I have for it. In regards to its FTP capability, it's nice if you need to change some text on your web-site of update a bit of CSS here or there. I don't advocate doing actual programming from your web host, quite obviously that's a terrible idea but for minor touch-ups, it's a faster way to get things done than re-uploading the entire file. It's like saying "Oh I exploited my peers' websites because they used FTP to upload a file." What?
In regards to accessibility, I was speaking of PHP as an easy language to pick up in the way that I would speak of ANY server-side scripting language. For a beginner, you have the benefit that you don't have to use a compiler, mess around with various classes, or even work with the DOM in the case of Javascript/HTML5. making a program that will say "Hello, world!" takes significantly less time in PHP than it would in languages such as Javascript, C++, ActionScript, etc. That is what I'm indicating. The language itself has an incredibly smooth learning curve.
Everyone's going to use inefficient coding practices when they're first beginning. There's no way around that, coding theory is something that takes practice and doesn't always translate from one language to another very well. You have to remember again that my post is directed to someone who has no previous knowledge of server-side scripting or indeed very much programming knowledge at all.
Also, give me a nice list of deprecated functions in PHP that you actually need to use on a regular basis that don't have a suitable replacement. I have yet to run into any major problems with the language, and while every language has their pros and cons (because you're comfortable with a certain language doesn't mean that there aren't flaws that someone else is going to come across) PHP does what it needs to do fairly well. It has its place, just like every coding language out there. (Well, most of them anyway. If I see you running around trying to justify coding in browser-based VBScript I'm going to have to have a few words with you. =P)
EDIT: As a final note, if you're programming in a situation where you're having issues with PHP's performance you're using the wrong tech. In any project in which you're going to have a very heavy load coming in you need to either have dedicated server(s) or have something set up with your hosting company. It doesn't matter what server-side language you're using, just putting stuff up on the web and thinking a normal web host can handle it if it's used a lot is asking for trouble. Once you're in such a situation it's often going to be better to write your own server-side applications to handle processing of data instead of using a scripting language. Doing the front-end display is about all those scripting languages are really suitable for once you're into territory where you've really got to worry about efficiency.
TheMatrix
February 4th, 2012, 02:55 AM
To TheMatrix, I'm not going to go through each and every part of your post but I think you're reading too far into what I'm saying and overcomplicating things here. I was presenting information to someone who has no previous server-side scripting knowledge.
Alright then.
A couple important things though, PSPad is free and there is no part of it that you have to pay at all to use. I'm not sure exactly what your beef with it is but it is a wonderful program and no editor I have used has come close to the fondness I have for it.
It's free in the sense of money -- but non-free because it isn't open source. But a discussion about that is best saved for another day.
In regards to its FTP capability, it's nice if you need to change some text on your web-site of update a bit of CSS here or there. I don't advocate doing actual programming from your web host, quite obviously that's a terrible idea but for minor touch-ups, it's a faster way to get things done than re-uploading the entire file.
That's true.
It's like saying "Oh I exploited my peers' websites because they used FTP to upload a file." What?
I said that I could exploit their flaws because they didn't use FTP. Nevermind about that -- it was a side note anyways.
In regards to accessibility, I was speaking of PHP as an easy language to pick up in the way that I would speak of ANY server-side scripting language. For a beginner, you have the benefit that you don't have to use a compiler, mess around with various classes, or even work with the DOM in the case of Javascript/HTML5. making a program that will say "Hello, world!" takes significantly less time in PHP than it would in languages such as Javascript, C++, ActionScript, etc. That is what I'm indicating. The language itself has an incredibly smooth learning curve.
While that is true, I was talking about doing more advanced things -- that will become spaghetti code quickly.
My opinion of PHP is it should be used exactly as the name suggests: A hypertext preprocessor. In all honesty, PHP makes a great templating language. Combined with a backend written in, say, Perl(for example) with PHP as the frontend, I could imagine great things coming about. There is already an equivalent (search.cpan.org/perldoc?PLP), but that is written in Perl and still lacks some of PHP's features.
Everyone's going to use inefficient coding practices when they're first beginning. There's no way around that, coding theory is something that takes practice and doesn't always translate from one language to another very well. You have to remember again that my post is directed to someone who has no previous knowledge of server-side scripting or indeed very much programming knowledge at all.
Okay.
I have yet to run into any major problems with the language, and while every language has their pros and cons (because you're comfortable with a certain language doesn't mean that there aren't flaws that someone else is going to come across) PHP does what it needs to do fairly well.
I'm not saying it doesn't, even if it may have seemed like it before. I agree, PHP is great for what it's name says: Hypertext Preprocessor. I use it now and then to quickly generate a form, for example, or display a simple result set. Quick and easy.
But then I use Perl for all of the more advanced(and eventually the final product) things, where the code becomes spaghetti in PHP.
If I see you running around trying to justify coding in browser-based VBScript I'm going to have to have a few words with you. =P)
I dislike Microsoft. Anyone who uses anything IE-specific is out of their minds.
EDIT: As a final note, if you're programming in a situation where you're having issues with PHP's performance you're using the wrong tech. In any project in which you're going to have a very heavy load coming in you need to either have dedicated server(s) or have something set up with your hosting company. It doesn't matter what server-side language you're using, just putting stuff up on the web and thinking a normal web host can handle it if it's used a lot is asking for trouble. Once you're in such a situation it's often going to be better to write your own server-side applications to handle processing of data instead of using a scripting language. Doing the front-end display is about all those scripting languages are really suitable for once you're into territory where you've really got to worry about efficiency.
You get the last word on this little debate of ours :)
(I don't want to continue this argument.)
canadaski
February 7th, 2012, 04:05 PM
Thanks for all of the resources. I just bought the book "PHP and MySQL Web Development" as it had great reviews.:)
vBulletin® v3.8.9, Copyright ©2000-2021, vBulletin Solutions, Inc.