Coding n00b

I've used computers since a very early age, and have always considered myself fairly technologically competent (particularly regarding hardware).

However, I'm increasingly keen to learn how to program. Ideally, I'd like to get a more thorough udnerstanding of how computers work, and possibly make some cool stuff. I work in finance, so this is going to have no bearing on my career. The problem is, I've no idea where to begin. Should a complete newcomer start with C? C++? VB? Perl? Python?

Also, is it possible to learn any of these online, as opposed to buying some naff Programming for Muppets guide??

Feedback would be appreciated.

Starting with Javascript is a good idea. It''s free (just need notepad and a browser), there''s lots of help on the web, and it uses C-like syntax.

Here''s a good tutorial:

Once you''re familiar with Javascript, learning C/C++ will be easier. Depending on what you ultimately want to do, C# or VB may be better. You can even do quite a lot just wth javascript, like build a 3D game:

I was briefly a CS major, and actually attended a school where they started us out on Ada! Not that I''m recommending it. Actually, I''d say C++ (or whatever the hell the modern equivalent of that is), is as good a place to start as any, but I don''t think you''ll find reasonable instruction online. There are a ton of C++ books available for a variety of prices.

I will encourage you to be certain it''s something you''re willing to stick with before I recommend you drop a few hundred dollars on the software - though, if you''re adventurous, there are much cheaper alternatives to be had. Coding is neither particularly easy, or rewarding for a beginner, and you''ll find that coding a simple program to even search a sentence for a particular letter is sometimes a troubling experience. I just can''t imagine coding as recreation, but that''s probably just me.

- Elysium

Maybe it''s just the books that I buy, but I find that C/C++ are the most common languages. Books like the Game Programming Gems series give most of their examples in either C++ or pseudo-C code and there''s a lot of neat stuff (although they''re not exactly a good place for beginners to start)
If you''re looking to do some cool graphics stuff, you''ll want C/C++ since iirc the official MS guide to DirectX is written entirely in C++. Most OpenGL code you find on the net will be in C.

I imagine there are ""how to learn C"" books on the net, but I find it more convenient to have a book on my desk while I''m coding so I can just glance down to it.
I think it''s unlikely that you''ll find a ""guide to C"" on the net as comprehensive as Kernighan & Ritchie''s book ""The C Programming Language: 2nd Edition."" Can''t get much better than the guys who invented the language!

Personally, I''d recommend starting with C and then moving to C++ when you''re comfortable with it.

Wow! What speedy responses! Thanks everybody...

I think you''re right about books - definitely worth doing it with something in front of me, rather than having to constantly flick between a web page and code...

The general consensus seems to be that C or C++ is the way forward...going to head down to the local Waterstones and see what I can dig up...

Anyone fancy sending a broke graduate trainee some programming literature in their quest for self-improvement ??

Regarding programming as a hobby - I guess it depends on the kind of person you are. John Carmack, for instance, seems to genuinely enjoy spending the majority of his time problem solving and coding. I''ve got a mate whose idea of a good evening is a Pixies CD, giant bottle of Mountain Dew and a tough bit of programming..

C/C++/OpenGL/DirectX. You definitely want to check that one out.

I would recommend learning Java, it has a very similar syntax to C/C++ and it forces you to think in an object oriented fashion. Most of the universities these days are switching their curiculum to Java as well. You can also download the compiler and the SDK documentation off Sun''s website for free.

I would not recommend JavaScript or VB as they will most likely teach you some bad habits once you know java learning Java Script will be a cinch anyways.

C++, VB, Java are the most commonly used languages. VB is good because its fairly visual which helps make it easy to learn. C++ is pretty scary to get started on, but you can do pretty much anything in C++.

I learned how to code through Pascal, which while being useless, is a VERY structured language and is a good one to teach you all the basics of coding.

I''d recommend C as a beginner''s language. Not that C is the easiest language out there (see, VB), but it will give you the basis of programming concept that you can carry with you on to other languages.

I recommend C to everyone, then you could progress to C++ and then get into anything you want too.

There is a free C compiler out there... (actually C++ compiler for win32) called DJGPP.

I haven''t used it (in recent memory) but I remember it from a couple years back.

DJGPP is actually a DOS compiler, it won''t build win32-native binaries, so far as I recall

What you want is probably MingW32, the same toolset as DJGPP, newer, and win32-native. You can pick it up here. It can also be used to cross-compile, I think, but that''d be much later on.

PASCAL is, imo, also a good language to start with, given it was the first language I really understood, and could use. I let my skills slip, though, and when I learned Perl recently, I picked up all sorts of bad habits. It''s making learning C excessively difficult, even though the languages are syntactically very similar.

The best plan is to learn OO programming - Java or C++ - first, since it teaches you concepts differently. Coming from functional programming is much harder, since you have to unlearn quite a lot of stuff, I''ve found. Your mileage may vary, of course.

Hope this helps!

Azure, I was just pointing out the fact that you can use it on a windows box.. no, you can''t build win32 native binaries, but you will be able to compile small little ""beginner"" binaries through your dos prompt.

Just a starting point that I was suggesting.

from my POV start out with a language that is very strict in code syntax like Java, which is also nice as a language to learn programming because it was build from the ground up as an OO language and not as an ""addon"" like C++. I would advise against startin with a non OO language these days. The OO approach is a lot more oriented to modelling real life situations and in general leads to cleaner code.
With C/C++ you can always go the easy route and define global variables / functions which in general lead to really messy code :). And since Java does not allow this, you are on the safe side there.
Once you know more about programming I would advise though to switch to Delphi/C# for any GUI programming or C++ for tasks that would suffer from the Delphi/C# overhead otherwise.
Don''t be afraid of switching languages: once you get the hang of one, the others are the same. Some things are named differently and it may happen that one loop type is implemented differently in two languages, but in general you can say if you know one you know all the languages at least basically.

One more thing: Once you know the basics of OO programming, do yourself a favour and learn UML:

Not only do your projects become a lot cleaner, because you plan ahead a lot more than usual and not just start coding; in the case you want to do this for a living you most likely do not end up as the guy who does the implementation of some other persons work, but as the person designing the project from the ground up, which is a lot more rewarding than just writing code imo :). Once you learn to use UML and case modelling for planning your projects you won''t want to live without it.
Understand that the programming language is just the tool for doing your work not the goal.

I''m surpirsed no one has mentioned BlitzBasic. It''s easy to get into and once you get decent at that you can get a hold of Blitz3d... theres a few things around like this, I think also DarkBasic? anywayz...

Not a real program language, but a hellava lot of fun. Check it out.[/url]