Page 1 of 4 [ 49 posts ]  Go to page 1, 2, 3, 4  Next

RTSgamerFTW
Veteran
Veteran

User avatar

Joined: 27 Sep 2006
Gender: Male
Posts: 5,410

31 Mar 2007, 12:11 am

Is it that hard to learn?


_________________
My sig pwns.


ahayes
Veteran
Veteran

User avatar

Joined: 2 Dec 2006
Gender: Male
Posts: 9,506

31 Mar 2007, 12:52 am

nope, not too difficult, it's good to take a class though



ahayes
Veteran
Veteran

User avatar

Joined: 2 Dec 2006
Gender: Male
Posts: 9,506

31 Mar 2007, 1:00 am

Here is a good OSS IDE for Windows:

http://www.bloodshed.net/devcpp.html

Use this version to develop GUI apps (you need to learn ALL the fundamental concepts first though):

http://wxdsgn.sourceforge.net/
(and be sure to follow some of the tutorials)

Here is a free Borland IDE:

http://www.turboexplorer.com/cpp
it has similar features to wxDevC++

Here is VC++2005 Express, which is also free:

http://msdn.microsoft.com/vstudio/express/visualc/

Linux has free dev tools that are either on the CD or can be downloaded from a repository

OSX has XCode, which is free



calandale
Veteran
Veteran

User avatar

Joined: 9 Mar 2007
Gender: Male
Posts: 12,439

31 Mar 2007, 4:05 am

All depends on how much you want to know. My last undergraduate school was entirely in C++, and my last 'real-world' job was as well, and I feel like I have a pretty good handle on it. Still, there are aspects of the language which almost no-one understands very well.



Gilb
Veteran
Veteran

User avatar

Joined: 4 Jan 2007
Gender: Male
Posts: 1,214

31 Mar 2007, 5:42 am

i wouldn't advise you to learn C++ unless you have a proper teacher or you have learned another language first

the best thing lo learn is the principles of programming that means that you can pick up any language quickly and means you are not so restricted, this is what most computer science departments do at universities.
this is a good book to start off with even has the compilers.

Image

(it covers C/C++ as well :D )



calandale
Veteran
Veteran

User avatar

Joined: 9 Mar 2007
Gender: Male
Posts: 12,439

31 Mar 2007, 6:09 am

Neither BASIC nor Perl are particularly good choices, if you want to continue in programming. C is pretty decent - as it leads straight to C++. For something a little lighter, I would suggest Python.



Gilb
Veteran
Veteran

User avatar

Joined: 4 Jan 2007
Gender: Male
Posts: 1,214

31 Mar 2007, 7:35 am

calandale wrote:
Neither BASIC nor Perl are particularly good choices, if you want to continue in programming. C is pretty decent - as it leads straight to C++. For something a little lighter, I would suggest Python.

oops wrong book lol, a review said it teched the principles but it looks like it just trys to teach several languages at once lol
i looked at principle books an they are pretty heavy reading

i would suggest you learn C# it has a syntax smiler to C++ but the language is more forgiving and is much more suited for beginners

the MSDN is a great place to start http://msdn.microsoft.com/vstudio/express/visualcsharp/features/default.aspx has everything you need!

Edit: used to have all you need, they had on-screen videos at one point which was a great way to learn but that seems to be discontinued heres is a tutorial anyway http://www.softsteel.co.uk/tutorials/cSharp/lesson3.html but you still C# express form the MSDN site.



Last edited by Gilb on 31 Mar 2007, 7:40 am, edited 1 time in total.

kidwiththereplaceablehead
Yellow-bellied Woodpecker
Yellow-bellied Woodpecker

User avatar

Joined: 5 Mar 2007
Gender: Male
Posts: 55
Location: NSW, Australia

31 Mar 2007, 7:39 am

dammit they came so close to the perfect computer language but then they had to go and spoil it all by doing something stupid like the .net framework! i hate it oop and basic need to come together but not like that why can't they use vb for the gui and syntax and c++ for the components and as for counting from zero thats just stupid why can't c++ just count from 1 dammit!



lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 76
Gender: Male
Posts: 9,795
Location: Somerset UK

31 Mar 2007, 8:16 am

kidwiththereplaceablehead wrote:
dammit they came so close to the perfect computer language but then they had to go and spoil it all by doing something stupid like the .net framework! i hate it oop and basic need to come together but not like that why can't they use vb for the gui and syntax and c++ for the components and as for counting from zero thats just stupid why can't c++ just count from 1 dammit!

I'm sorry, but if you don't understand why arrays, etc start at element zero, you are never going to be much of a programmer.
I suggest you stick with a version of Basic that doesn't start at zero (there aren't that many left).

As an aside, I'm guilty of supporting/extending a version of Basic where you could subscript a string to extract its characters (as strings themselves, of length one). Those subscripts started at one. Subscripting a string with index 0 gave the string length (as an integer). What was more fun was that it allowed slicing, so you could extract a sequence of characters just by subscripting with a range. The fiddling about involved to make all that work was really quite painful at times (particularly when extracting the null string from either end of the string).
E.g. if a$ contained "xyz", then...
a$(0) or a$(0 TO 0): 3
a$ or a$(1 TO 3): "xyz"
a$(1 TO 2): "xy", a$(2 TO 3): "yz"
a$(1) or a$(1 TO 1): "x", a$(2) or a$(2 TO 2): "y", a$(3) or a$(3 TO 3): "z"
a$(1 TO 0) or a$(2 TO 1) or a$(3 TO 2) or a$(4 TO 3): ""
All other possibilities were reported as errors.
NB. This version of Basic started arrays at zero, but also included the upper value when they were dimensioned - so "DIM a(10,10)" was 121 elements. Sort of "best of both worlds".


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


calandale
Veteran
Veteran

User avatar

Joined: 9 Mar 2007
Gender: Male
Posts: 12,439

31 Mar 2007, 8:24 am

Gilb wrote:

i would suggest you learn C# it has a syntax smiler to C++ but the language is more forgiving and is much more suited for beginners


I actually find C#/Java much more difficult for beginers. For one thing, you don't get anywhere near as good an idea of certain fundemental concepts. These languages also tend to require all sorts of complex ideas even to handle very trivial programs. I strongly believe that a simple assembly language is probably the best introduction. But, the next simplest language that reveals any of the internals seems to be C.



lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 76
Gender: Male
Posts: 9,795
Location: Somerset UK

31 Mar 2007, 10:07 am

There's a huge problem with learning via a "simple assembly language" - which one? The majority of people only have access to Intel Pentium machines, and that's the worst assembler language I know :) . (Actually, I lie hugely there - I used much worse ones).

I'd agree that learning an assembler will impress on someone what actually goes on, down at the machine level. Unfortunately, the best you could hope for is that they could run their code on some sort of simulator.

However, by the time you are doing that, a simple Dartmouth BASIC interpreter has a lot going for it. (Absolutely not VB.)

I have my reservations about C as a language for a beginner. In principle, generally, I agree. In practice, it is far to easy to make mistakes in C code that are just confusing for a beginner and have no bearing on learning to program (and I'd say the same in spades for C++, but less so for C#).

Pascal (not Delphi) is a direction that makes some sense to me. I don't know if such a language exists, but I'd suggest that an ideal language for a beginner would be C-like, but:

  • Strong typing. I hate it when C hides my bugs from me.
  • No ambiguity. In C what does "#define N -x" followed by "#define M -N" and "x=M" mean?
  • No automatic coercion. The things that happen is C when you have arrays of pointers to arrays of functions returning pointers to arrays...
  • No, mild or optional OO.
  • Less "succinct". I really don't mind saying "and" instead of "&&".
  • Interpretive (but maybe compilable).
  • Following BCPL by having an "O-code" pseudo-machine.

Hm. I'm close to just describing Pascal, aren't I?


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


calandale
Veteran
Veteran

User avatar

Joined: 9 Mar 2007
Gender: Male
Posts: 12,439

31 Mar 2007, 6:20 pm

I'd go with a subset of the 8086 assembler. But, it's not too useful
on it's on, which is why C seemed reasonable. This is the same issue
that any 'learning' language has. So, if you teach someone Pascal first,
they're not really getting anything useful (plus it doesn't give any idea of
memory layout). Same problem with Dartmouth BASIC. Most of the big
mistakes that one can make with C require a little bit of knowledge - more
than a beginner is likely to have - though coercion can certainly bite anyone
in the ass.

Having an interpreter is a huge advantage though, and might make up for
choosing a weaker choice otherwise (though the assembly languages are
close enough to being interpreted as to make me happy). A powerful IDE,
can act like an interpreter - but you need to learn that too then, and that's
another step of pain.

But, my guess is that Unknown is interested in doing some game programing,
and getting started on C/C++ is definitely a good way to go.



TheMachine1
Veteran
Veteran

User avatar

Joined: 11 Jun 2006
Gender: Male
Posts: 8,011
Location: 9099 will be my last post...what the hell 9011 will be.

31 Mar 2007, 6:28 pm

I heard someone say Python http://www.python.org/ would be the ideal first programming language.


http://www.freenetpages.co.uk/hp/alan.gauld/



geek
Veteran
Veteran

User avatar

Joined: 11 Mar 2007
Age: 67
Gender: Male
Posts: 723
Location: Elsewhere

31 Mar 2007, 6:44 pm

Lau wrote:
  • Strong typing. I hate it when C hides my bugs from me.
  • No ambiguity. In C what does "#define N -x" followed by "#define M -N" and "x=M" mean?
  • No automatic coercion. The things that happen is C when you have arrays of pointers to arrays of functions returning pointers to arrays...
  • No, mild or optional OO.
  • Less "succinct". I really don't mind saying "and" instead of "&&".
  • Interpretive (but maybe compilable).
  • Following BCPL by having an "O-code" pseudo-machine.
Hm. I'm close to just describing Pascal, aren't I?


Or Ada, or Modula. Those weren't bad languages, it's a pity that they've mostly fallen into disuse. Still great for learning, though.



lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 76
Gender: Male
Posts: 9,795
Location: Somerset UK

31 Mar 2007, 7:00 pm

Maybe I should look at Python more closely myself. I had a quick peruse via the above link. I'd say the only area where I find it somewhat lacking is that it's a bit too... sloppy? I never like anything where whitespace is significant. (My first programming language was Fortran, on punched cards, with fixed column layout.)

Other than those quibbles, I suppose it fits my earlier list quite well.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 76
Gender: Male
Posts: 9,795
Location: Somerset UK

31 Mar 2007, 7:02 pm

Oh! And I've just realised - the one HUGE requirement - the language must be currently active, available, open source, free, cross platform - just like Python!


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer