Raised This Month: $51 Target: $400
 12% 

Programing Questions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sYs73m
Junior Member
Join Date: Feb 2005
Location: Maine, USA
Old 02-02-2005 , 13:30   Programing Questions
Reply With Quote #1

Hello,

I am currently trying to teach myself C/C++ programing. I am having a hard time picking which book would best suit me.

I was thinking if I had a better understanding from someone who knows or does this type of work to explain them to me.

I keep seeing the following;

C
C++
C#

I wanted to know the difference between the three and which is best to start and which is best to relate to web-based things and then which is best to relate to CS:S/HL2/SourceMod.

Thank you;
__________________


Commander in Chief of the United States Military Clan
www.Clan-USM.com
Copyright © 2004-2006
sYs73m is offline
Send a message via AIM to sYs73m
Manip
Senior Member
Join Date: Jan 2004
Old 02-02-2005 , 13:57   Re: Programing Questions
Reply With Quote #2

Quote:
Originally Posted by sYs73m
I keep seeing the following;

C
C++
C#

I wanted to know the difference between the three and which is best to
start and which is best to relate to web-based things and then which is
best to relate to CS:S/HL2/SourceMod.
C - Released in the 1980s, it is a very nice programming language but
unless you are writing an operating system or other low level apps it is
not something worth while playing with. I would say don't learn C at start
with.

C++ - Is C plus more. Released in 1998 it is just a super-charged C. Look
at it this way, C - Windows 95, C++ - Windows XP. If you really want to
get into half life development you will need to learn this but even if easier
than C it is not easy to learn and I would suggest learning - C#, VB,
VB.net, PHP or Java (one of, not all of) before you learn C++. You need
to get the basics down before you can move on to something more
difficult.

C# - Is a different kettle of fish... Released in 2000 by Microsoft, it is the
easiest one of the three to learn and the only one that can be used to
develop web-sites. It is also the easiest to use because of its modern
design and very powerful library (called the .Net framework).

The drawback with C# is that it can't be used for Half Life
development at all. However you can't go from knowing nothing to doing
half life development in one jump, you have to build on what you know
and in my opinion C# is a great place to start.

Quote:
Originally Posted by sYs73m
I am having a hard time picking which book would best suit me.
C# for dummies is good. Anything with C# that sounds like a beginners
book should work.

Quote:
Originally Posted by sYs73m
then which is best to relate to CS:S/HL2/SourceMod.
C++ relates to HL2 and CSS. SourceMod uses its own languages -
JavaScript and Small C (not to be confused with 'C' or 'C++' or 'C#').
When SM comes out it will have some nice, getting started guides...
I suggest you try both / all of the scripting languages supported until
you find one you like.
Manip is offline
Send a message via AIM to Manip
BAILOPAN
Join Date: Jan 2004
Old 02-02-2005 , 14:35  
Reply With Quote #3

The best way to learn programming, in my opinion, is to study other people's code. Edit it, change it, fool around with it. Save the books for references or quick tutorials. I learned C++ basically from being on the AMX Mod X project team.

It's best to learn straight C or C++ and make sure you grasp concepts like pointers, memory, and array allocation early on. Then comes Object Oriented Design - books focused on this are good. Whichever one you learn, make sure the book sticks to it. A lot of books these days intermingle the two and it gets confusing.

Manip's history - a little wrong.

Small C - It's not called Small C, it's "Small" or "AMX/Small".

C was developed in 1969 in order to write UNIX (developed by Dennis Ritchie and Ken Thompson - thus K&R C). It was developed for systems programming, mainly to closely represent the hardware without being hardware specific. HL1 was mixed between C and C++ code.

C++ was created as an object-oriented replacement for C. It's not a super or subset of C, it's something new and different, although it often looks very similar. Sometimes C programs will even compile on a C++ compiler. It came out around 1984 after a few trials by Bjarne Stroustroup (originally "C with Objects"). This is what the SM and HL2 framework use.

C# is a lot like Java (although way more complete and powerful). It's not designed for systems programming, although it can be used for that.
__________________
egg
BAILOPAN is offline
Manip
Senior Member
Join Date: Jan 2004
Old 02-02-2005 , 15:14  
Reply With Quote #4

Quote:
Originally Posted by BAILOPAN
C++ was created as an object-oriented replacement for C. It's not a super or subset of C, it's something new and different, although it often looks very similar. Sometimes C programs will even compile on a C++ compiler. It came out around 1984 after a few trials by Bjarne Stroustroup (originally "C with Objects"). This is what the SM and HL2 framework use.
As he doesn't know what OO is I thought I would try and put it in terms he could understand... Most of what you just sad is above him for now. ...
Manip is offline
Send a message via AIM to Manip
Rodrigo Gonzáles
Junior Member
Join Date: Nov 2004
Old 02-02-2005 , 16:30  
Reply With Quote #5

C# only work together with Microsofts Visual C#. It's only for writing Windows Apps. You cannot use it for SourceMod or HL2 Coding.

The first language I learned was PHP (very simple). After that i learned C++ and I am still learning.
Rodrigo Gonzáles is offline
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 02-02-2005 , 18:02  
Reply With Quote #6

C and C++ are pretty close, you learn one, there's just some minor differences in the other (Ok, maybe some are pretty major, but I haven't found them yet)

I'm using C to program a robot, and what I've done is almost the same in c++ ;)
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
BAILOPAN
Join Date: Jan 2004
Old 02-02-2005 , 18:48  
Reply With Quote #7

If your C and C++ code look the same, then you're not using the OOP features of C++, which means you're writing lazy C or simply ignoring the rules of C :p
__________________
egg
BAILOPAN is offline
sYs73m
Junior Member
Join Date: Feb 2005
Location: Maine, USA
Old 02-03-2005 , 10:28  
Reply With Quote #8

Okay, so C++ is where I want to "end up" at. What you suggest I start with?

Java, PHP, C#? PHP and C# seem as if they could benefit my website(s) in many ways, so I may want to start there - what can Java offer me?

Visual Basic and Visual Basic.net - What is the difference with those?

I delayed my order from Amazon - I'll get these questions answered before I waste money.

Thank you so much for the replies thus far, you guys are awesome.
__________________


Commander in Chief of the United States Military Clan
www.Clan-USM.com
Copyright © 2004-2006
sYs73m is offline
Send a message via AIM to sYs73m
Groove
Junior Member
Join Date: Feb 2005
Old 02-03-2005 , 14:37  
Reply With Quote #9

I'd recommend PHP to start off programming. Simple construct to it and great way to learn the principles. I used PHP and MySQL Web Development (Welling and Thomson)

Had it a few years now and it's top notch, going to buy the latest edition soon as I like the style it uses and I want to learn PHP5 now

Incidentally, anyone know a good book to learn javascript in a generic enough way to use it for sourcemod plugins?

I have a javascript bible thing but it's all very web oriented and doesn't go too much in to generic methods.
Groove is offline
manorastroman
Senior Member
Join Date: Oct 2004
Old 02-03-2005 , 15:26  
Reply With Quote #10

you guys seem to make c# sound pretty bad, but Otsego 2 and the otsego client (all for AIM, at fx-soft.com) is being written in C#.net
__________________
manorastroman is offline
Send a message via AIM to manorastroman Send a message via MSN to manorastroman Send a message via Skype™ to manorastroman
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode