Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
AndrewB

Looking to learn C++, PHP, Perl, and Javascript...

Recommended Posts

In preparation for my 2nd school year, I want to learn this stuff.

C++: What utilities should I download? For a code editor, I downloaded Vim. For a compiler, I downloaded GCC (or G++, not sure what that's about), but I'm about ready to poke my eyes trying to figure out how to install it. I don't want to get into any serious stuff. Just some practice with object-oriented stuff, getting to learn the syntax, and that sort of thing.

PHP: I want to get into this web programming stuff, but I don't have any webspace. Can I teach myself this stuff on the local machine?

Perl: All I know is that it has something to do with text. I have to figure out what tools and resources I need to practice it.

Javascript: Pretty much the same as the others. I need to figure out what exactly I need to start learning it.

Share this post


Link to post

Being a computer science major...let's see if I get anything right.

Well, for the C++ you're on the right track. I use the g++ compiler myself. btw, gcc is for C code and g++ is the C++ version. Anyways, did you also get the libraries for the compiler? And are you doing this in Unix/Linux/Cygwin or Windows? If you're in Windows, I wasn't aware there was a version of g++ for it. Really, that's all you'll need iirc. Vim is a very good, powerful editor if you don't mind learning it. I've been using it more and more myself. If you have problems with it, look into pico (find the package known as "pine", as it comes in it). Pico works like MS-DOS edit.

PHP...dunno, never used it. I've only done some simple cgi stuff with perl/C++.

Perl, the Practical Extraction and Report Language (aka Pathologically Eclectic Rubbish Lister). Also known as the Swiss-Army Chainsaw. You're right, it does have to do with text. You can use perl like you use grep. You can pass it a filename and regular expressions and it will search for matching patterns. But, it's also a full-fledged programming and scripting language (interpreted, btw, not compiled). Technically, you can do just about anything in it. Larry Wall designed it, and actually my last comp-sci teacher, Andrew Burt, was responsible for suggesting to Larry something relating to the way variables are handled... Anyways, it's an alright language. I personally hate it, as it looks odd when it's typed, but it'll get the job done and done well if you like it.

Javascript....well, if you learn the object-oriented part of C++, you'll do fine in Java/JavaScript. I refuse to learn Java/JavaScript, though, preferring to instead learn FORTRAN, COBOL, or ALGOL.

And for programming humor, go here: http://www-users.cs.york.ac.uk/~susan/cyc/p/prog.htm

Edit: for C++, get a debugger like gdb.

Share this post


Link to post

PHP is so easy you don't even have to learn it. Learn C/C++ and you will know PHP by proxy.

Share this post


Link to post
DJ_Haruko said:

Being a computer science major...let's see if I get anything right.

Well, for the C++ you're on the right track. I use the g++ compiler myself. btw, gcc is for C code and g++ is the C++ version. Anyways, did you also get the libraries for the compiler?

[/b]I was wondering about that. If you're talking about the hundreds of megabytes of pre-coded methods for all sorts of common tasks, then no, I don't have that. Through dialup, that may be an issue.

And are you doing this in Unix/Linux/Cygwin or Windows? If you're in Windows, I wasn't aware there was a version of g++ for it.

Windows. I just want to start learning and practicing C++. I didn't think I'd need a different operating csystem.

Javascript....well, if you learn the object-oriented part of C++, you'll do fine in Java/JavaScript. I refuse to learn Java/JavaScript, though, preferring to instead learn FORTRAN, COBOL, or ALGOL.

Heck, I know Java pretty thoroughly. (Not the libraries of course, but the language.) Many people have said repeatedly that Java and Javascript have no similarities beyond the name and nothing to do with each other.

And for programming humor, go here: http://www-users.cs.york.ac.uk/~susan/cyc/p/prog.htm

Ugh. One particular self-proclaimed uber-geek in my class has bastardized that stuff for me forever. He is such a repulsive slob who has done everything possible to alienate other people.

Share this post


Link to post
AndrewB said:

Windows. I just want to start learning and practicing C++. I didn't think I'd need a different operating csystem.

At most, check out Cygwin. It may proove to be easier to work with. It's not an alternative operating system, but a sort of Unix emulator that runs in Windows. Emulator, however, stretches the term a bit. http://www.cygwin.com/ is the page. It's also free and you can download g++ and libraries (as well as editors) with it. But, as you said, dialup can be an issue here. If you can get access to a fast connection, you can download cygwin and burn it to a cdrom to transport it over.

Share this post


Link to post

I'd go with Python right away, but perhaps there is a point to going through the pain of using all the languages above first since you'll appreciate it even more once you get there.

Share this post


Link to post
AndrewB said:

Can I teach myself [php] on the local machine?

Try Apache. If you know anything about computers at all you should be able to set up a local server running PHP (and if you like, mySQL) without too many headaches. And since you already know some Java, PHP and basic C/C++ should be no problem at all.

Share this post


Link to post

I love PHP. It's simple and fun to mess with, the only problem is I don't have a server :( You don't need anything but a server with the newest PHP version installed. PHP is a server side language and is interpereted or parsed by the server with PHP installed on it. Therefore veiwing PHP server side, you just get a bunch of code, where as things like Javascript are parsed client-side (by the browser) and can be veiwed with an up to date webborwser locally

Share this post


Link to post

Cygwin: I've been to the page, but I can't figure out why I'd want it.

And with PHP, like I've said, we don't have a spare computer just lying around.

I could attempt a C++ library download thingy through several overnight sessions. How big is it exactly? Any recommended mirrors?

Share this post


Link to post

C++

For C/C++ on windows you can try Dev C++, which can be found here:

http://sourceforge.net/project/showfiles.php?group_id=10639&package_id=12148&release_id=148734

Debugging isn't amazing, but you can learn the basics with it. We also used this to compile our release versions of EDGE.

---

PHP/MySQL:

If you don't have access to webserver that supports it - the sourceforge web servers do - then you can download and install it locally. Its recommended that you use Win2k or later, although Linux is preferred since it is the native environment for both. In addition to PHP you'll have to get a webserver for it to run with. Technically it does run on
the command line, but that isn't what it is designed for. Apache is the default choice for a webserver. MySQL will run as a seperate service.

Best order of business would be to get a
local webserver running. Get PHP running
with and then sort out MySQL.

Share this post


Link to post
DJ_Haruko said:

If you have problems with it, look into pico (find the package known as "pine", as it comes in it). Pico works like MS-DOS edit.


My Gentoo Linux installation included Nano which is exactly the same as Pico. I'd like to find something closer to the DOS text editor though.

Share this post


Link to post
AndrewB said:

And with PHP, like I've said, we don't have a spare computer just lying around.

Lord FlatHead said:

Try Apache. If you know anything about computers at all you should be able to set up a local server running PHP

By 'local server', I do mean a server running on your desktop pc or laptop. You don't need an extra computer.

Share this post


Link to post
læmænt said:

Javascript is nothing at all like Java, and much cooler.

But I could swear that Javascript is the annoying Internet cancer that everyone hates and has disabled.

Share this post


Link to post
AndrewB said:

But I could swear that Javascript is the annoying Internet cancer that everyone hates and has disabled.


That's pretty much what it is, but it can be useful sometimes.

Anyways, this thread is beneficial to me as well, considering I've been wanting to learn C++, PHP, etc, for quite a while.

Share this post


Link to post
AndrewB said:

But I could swear that Javascript is the annoying Internet cancer that everyone hates and has disabled.

It's painful for those on the receiving end, yes.

Share this post


Link to post

I use MSVC++6.0, but if you want a free compiler, I recommend devcpp.

and if your learning the language for the first time, please, get a book. I recommend C++ how to program 4th edition by deitel and deitel.

Share this post


Link to post

DevC++ isn't a compiler, it's an IDE. It uses MinGW as a compiler by default.

Share this post


Link to post
boris said:

DevC++ isn't a compiler, it's an IDE. It uses MinGW as a compiler by default.


lol. whoops...oh yeah. thanks for the correction :)

Share this post


Link to post
DJ_Haruko said:

Well, for the C++ you're on the right track. I use the g++ compiler myself. btw, gcc is for C code and g++ is the C++ version.


Actually gcc can compile any language supported by the GNU compiler collection, but you gotta add all the runtime libs and use the right command line parameters, so it's a lot easier to just use the one that defaults to the right stuff for the current language ;)

DJ_Haruko said:

Anyways, did you also get the libraries for the compiler? And are you doing this in Unix/Linux/Cygwin or Windows? If you're in Windows, I wasn't aware there was a version of g++ for it.

All of the Windows GCC ports include g++ and some of the other compiler frontends as well. This definitely includes MinGW, as I have installed and used it to port Eternity to that compiler so that it could be compiled for Windows without Visual C++.

DJ_Haruko said:

Javascript....well, if you learn the object-oriented part of C++, you'll do fine in Java/JavaScript. I refuse to learn Java/JavaScript, though, preferring to instead learn FORTRAN, COBOL, or ALGOL.

You can refuse, but I don't think that's a good attitude. Java and JavaScript are both very marketable skills right now, whereas during my year and a half of searching for a CS job, I have seen only one job that requested FORTRAN knowledge (and it was optional), a small handful that requested COBOL (for legacy systems maintenance primarily), and absolutely none that requested ALGOL.

I actually considered using JavaScript as Eternity's scripting language, but even the smallest C interpreter is quite large, and I didn't feel like adding that much code to Eternity. A game's scripting engine shouldn't account for a quarter of its code IMO ;)

Share this post


Link to post

Well, I have high-speed access for the next few hours, so I'd really like to know what I need in terms of C++ libraries.

Share this post


Link to post
Quasar said:

All of the Windows GCC ports include g++ and some of the other compiler frontends as well. This definitely includes MinGW, as I have installed and used it to port Eternity to that compiler so that it could be compiled for Windows without Visual C++.


So tell me, was the most difficult part getting it to link the DirectX libraries or finding them? :)

Share this post


Link to post
DarkknightXC said:

So tell me, was the most difficult part getting it to link the DirectX libraries or finding them? :)

Eternity uses SDL so this wasn't an issue.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×