Programming Learning path?

Hi all;

(If you don’t want to read my rambling you can skip to the bolded section, thanks! :D)

I’d like to be able to contribute to Blender’s soruce code someday, but I currently don’t know any programming languages.

I took a semester of VB6, which I BARELY got through, so I’m not sure I have “the right stuff” for programming; i.e., logical thinking :smiley:

My dad just recently took a VB.Net course, and as disciplined as he is, he said that was pretty brutal.

Now if that’s the case, how much MORE brutal would a course in a more advanced language be(C, C++, etc…) :eek:

So, really, I just want to program as a hobby, not necessarily for my career. (And because I have some AWESOME ideas for Blender…)

But, I have been met with nothing but confusion and frustration in my attempts.

My dad still has his VB.Net book which is pretty easy actually, I just need time to go through(which I won’t have till summer).

But my attempts at learning C or C++ have been wrought with frustration.

I ordered a C++/OpenGL video from 3dbuzz.

However, I am using Visual C++ Express 2005, and they used Visual Studio C++ 2003.

And there are some things they didn’t cover; like setting up the paths and everything for the compiler and whatnot.

I’m sure it’s a great video, once you get the differences resolved, I just don’t have time to do that right now(again, till summer).

MSDN even has video tutorials, but I don’t think they are geared to a complete beginner(or someone like me, who just seems to suck at this kind of thing).

I also bought C Programming in Easy Steps, and it doesn’t seem to be so easy!!

It tells you to install the GCC compiler, but has absolutely NO directions as how to do so!!!

I thought there would be a binary or something; but I downloaded it and splattered files all over my desktop lol

Maybe it’s a great book, if you have a compiler to work with.:mad:

I guess I could use VSC++ Express…


OK, I’ve rambled enough(thanks for reading this far!), my main thing is I just need some time.

SO, if there are any hobbyist coders among us, how did YOU learn to code?

Can you suggest a learning path for me, some good books on C/C++?

Or should I really start with VB, despite how hard even THAT is?

Thanks

LC

umm, i guess i can be considered a hobbyist, despite my career path…

anyway, i learned c++ from an old book my school was throwing away (they were updating their course material, from c++ to java), and that had a very nice approach to it. in the first couple chapters you learned several essential commands, and how they can be used in other applications. unfortunately, it didn’t cover graphics in any way. if you want to do c++ but play with graphics, do some research. here’s a link to a c++ page, though i have yet to go through it myself: http://www.cprogramming.com/

also, if you’re just doing programming as a hobby, i got a few words of advice for you: DON’T SCREW WITH THE BLENDER SOURCE CODE!! it’ll drive you crazy! did you even look at it yet? if you have trouble with visual basic, this stuff will make your head explode. seriously, i’m pretty good at c++, java, and programming in general, and this stuff went over some crazy-ass math, enough to make me delete it a day later. so, i suggest you either get a job in programming or sell your soul for programming talent before you mess with the Blender code.

hope that helped (though i’m kinda sure it didn’t, sorry)

Google. Really, it’s all you need. Books are ok, but most of them ramble on about certain things far too long. You want to find something with nice, straightforward examples.

Can you suggest a learning path for me, some good books on C/C++?
I suggest you start with python and the blender game engine. It’s really the best language to start with, using it to make small blender games turns it into interesting fun and later makes transition to C/++ much easier (actually, you might not even have a need to move on to a lower level language, python can almost do it all, and it’s syntax is like psuedo-code)

Or should I really start with VB, despite how hard even THAT is?
I wouldn’t recommend starting with VB, go with python. It’s really the best way to start. It was for me anyway.

I don’t think there is anything wrong with starting in C++. That’s what I did. I would like to refer you as the other guy did to http://www.cprogramming.com It has good tutorials. There are free compilers out there and I wouldn’t recommend any compilers from microsoft. Whether you want to program games or not a really good book to begin with is: http://www.amazon.com/Beginning-C%2B%2B-Game-Programming-Development/dp/1592002056/sr=8-7/qid=1170563059/ref=sr_1_7/105-7844784-1305200?ie=UTF8&s=books

It gives a nice overview of C++ and comes with a CD that has on it a compiler (so you don’t have to worry) and all the source code from the book too. Everything is explained it simple terms and it has diagrams, examples, and other useful learning tools.

I went

QBASIC -> Pascal -> C -> C++ -> Java / C#
Still working on that last part. I’m only learning Java because everyone seems to use it now.

If I could go back, I would cut out QBASIC and C. QBASIC is pretty worthless and its spaghetti code tends to hamper logical programming skills that you need to develop. I would get rid of C because it’s just as easy to go straight to C++. It’s not like anyone is FORCING you to use C++'s advanced OOP features from the start, and you can avoid some of the more antiquated habits present in C like global variables.
As for Pascal, you can take it or leave it. It’s a good starting language because that’s what it was designed for, but its style of programming is a little outdated.

In place of C or C++, I would also recommend Python, Perl, or Java. They’re all similar in feel, but have very different purposes.
C# is really cool, but it takes a very solid understanding of object-oriented programming to really use it effectively, so I would recommend Java, Python or Perl first.

Avoid VB like the plague. Even though it avoids the spaghetti code GOTOs of its ancestor’s, what’s the point? It won’t be like anything else you’ll want to learn and all it will do is reinforce bad programming habits. If you are a professional coder and you ever get a job that requires you to use VB you’ll be able to pick it up in a few hours after all the other languages you’d have learned.

The hardest thing about learning programming is that it confronts you with mounds of “silly little details,” like where the commas and parentheses go. And when you put one of them in the wrong place, the language spews gobs of incomprehensible messages at you. It can be very discouraging.

But… those details actually are silly, because they have nothing to do with the true essential-skill of programming, which is devising algorithms. In other words, figuring out exactly what you want to tell the computer to do, in order to solve your problem. That skill is exactly the same no matter what language you use, and if the algorithm is incorrect, a program written in any language will be equally … wrong.

An early magazine article on computers in National Geographic magazine (back when computers were novel and new) used the example of “programming a person to cross the street.” The person could look to the left, look to the right, take a step forward, or stand still; and the person could answer direct questions “yes” or “no.” The author then proceeded to illustrate how the program could fail, with an endless loop.

The program was supposed to say, “is there a car within 50 feet?” And the answer, continuously, would be “yes,” and so the program would stall helplessly … until the driver returned to that parked car, got inside, and drove away so that it was no longer (parked) “within 50 feet” of that robot. Oops.

Too many programming-courses get stuck in commas-and-parentheses land and never come out. I know I’ve been guilty of that a few dozen times when I was too tired to pay attention to lesson-plans…

For installing the GCC (GNU Compiler Collection: includes C, C++, Ada, and Fortran 77, plus others like Pascal, Objective-C, Java, etc.), did you happen to take a look at this?

I learned to code by reading books and hacking at it. I started with BASIC. I quickly found its limitations and moved up to Pascal, which today remains my favorite iterative language. From Pascal I went to Assembly and C and C++. From there I picked up all kinds of interesting languages I won’t bother you to list here.

As a result, I have no great suggestion for a learning path other than “pick a language and try to do something with it.” I recommend against VB, just because it is a bad example.

Otherwise I’d have to agree with Social and recommend you start with Python. It is a great language and you’d have little trouble migrating to others from it. If you choose C++, the cprogramming site is a good place to start. Also, I have a lot of links on my links page.

Oh yeah, a good site to start with OpenGL is http://nehe.gamedev.net.

Wow, [edit] three [/edit] people have posted while I was writing this…

Hope this helps.

[edit] sundialsvc4 makes a good point (one I make as often as possible) [/edit]

Thanks a lot guys!

MattH:

Sure I did struggle a lot with VB,but I think that’s just getting the thinking down.

I thought it would be “easier” to learn C than C++ because, well, C++ is a superset of C, and C is, well, more “compact”, so I’ve heard.

Might take longer to code due to lack of OO features, but I could probably learn it faster than C++.

I just need a good resource; thanks I’ll check that out! :slight_smile:

BTW, yes, I have browsed the source code; I have a folder on my desktop containing 1.34GB worth of source code, mostly C/C++, aptly titled Source Code. :slight_smile:

Now, do you think it will drive me nuts because of the language itself, or do the Blender coders have bad coding habits; white space issues, incomprehensible variable names, and bad documentation?

Social: That’s the trouble though, I’ve done google!

It all seems so nebulous.

Have you heard of this site?

Also, Python is a scripting language, right?

So it’s not really a fully featured programming language; i.e., you won’t be building a program with it?

Me personally, I learned everything through google, programming forums, source codes just to explore, tutorials. I also took a course in VB6 but I already had a knowledge of all of that from VB.NET, just took a little to get used to the differences. Another good place to start would be the documentation for your IDE. A good site for tutorials is www.pixel2life.com.
As for programming languages start with python, then try vb. After that you could try C# which is basically the same as vb, but it has similarities to C and C++. If you can get all that done, you should have an ok idea of programming and C++ shouldn’t be too hard after that. A tutorial for C++ that I found very usefull was at Cplusplus.com
Anyways, enough of me, good luck

[edit]
didn’t notice your last post, about python it is a programming language, and you can build a program with it with a gui and everything with tools like WxPython and stuff.

As the boldface print on pythons homepage clearly states: Python is a dynamic object-oriented programming language that can be used for many kinds of software development.

The ability to write easy to understand code, and run uncompiled is not the only thing to categorize a language as a scripting language. A scripting language is ussualy designed for a particular application domain, meaning that it can not be applied to a wider area of problems, making it inferior to programming languages. Python on the other hand, (like C) can be used to program solutions in any area (It’s better in some, and worse in others when compared to C, but the point is: it can be applied everywhere, and its not limited to any one problem domain).

Heh, no worries, it’s a common misconception.

Get bloodshed dev c++ it can be used with opengl and wxwidget

C++ is not a superset of C! They are two distinct languages. C++ was designed to work well with C, and so looks very much like it. So if you want to learn one, you are better off starting out with C++.

Very early on it would have been true to say that C was a bit more compact than C++, depending on which compiler you chose. Today that is simply not the case. In fact, the opposite is often true.

Now, do you think it will drive me nuts because of the language itself
no

or do the Blender coders have bad coding habits; white space issues,
some do, some don’t. For example, anything written by theeth is clear as day. Almost all of the blender coders are organized to some degree but there are a few bad spots.

incomprehensible variable names, and bad documentation?
ahem yes. This is part of the problem with the blender source.

Another problem is that the original structure is strained with kludges to make things work right. Keyboard input, for example, is spread out across too many source files and too many data structures.

If you do want to modify the blender sources, do so. Just make sure that anything you add or change doesn’t cause the compiler to warn or complain about anything. (When you compile blender, you’ll see zillions of warning messages from previous coders. Don’t add to them! There is, I believe, current effort to reduce/remove those.) If you get your code to work right then you can submit a patch.

Check out http://www.blender.org/forum/ (the Blender Developer’s Forums) and subscribe to the bf-committers mailing list. Make sure to read the stickies there for information on how to submit a patch, problems compiling, etc.

Scripting languages are generally designed to work between programs. However, any good language can also be used on its own. Python really is a very good, very complete language --and a good choice for learning to program!

LOL, ok, my bad, I was sort of saying this off the top of my head that I had no clue about.:stuck_out_tongue:

Thanks :slight_smile:


OK, to those of you who learned online:

If there are such good free resources, then why am I having such a difficult time?

I’ve found some of those resources you’ve listed, but I seem to be encountering minor differences in the compiler/IDE I use and it totally screws me up.

Help!!:frowning:

But… those details actually are silly, because they have nothing to do with the true essential-skill of programming, which is devising algorithms. In other words, figuring out exactly what you want to tell the computer to do, in order to solve your problem. That skill is exactly the same no matter what language you use, and if the algorithm is incorrect, a program written in any language will be equally … wrong.

QFT.

It tells you to install the GCC compiler, but has absolutely NO directions as how to do so!!!

So? There are plenty of explanations around the place. In fact, it’s a good aid for teaching programming. If you aren’t able to either figure it out or find out yourself, then learn how to find stuff on the internet FIRST.

I’ve found some of those resources you’ve listed, but I seem to be encountering minor differences in the compiler/IDE I use and it totally screws me up.

Yup, same here. The winner is a combination of trial and error, patience and reasoning.

I’d suggest python too. Java is fine but personally I hate it. Ruby is apparently very good, but I haven’t tried it.

Get python, you’ll have running programs in 10 minutes.

Also, I’d really suggest learning assembly, and doing some simple things in it.

Ian

[quote] It tells you to install the GCC compiler, but has absolutely NO directions as how to do so!!!
So? There are plenty of explanations around the place. In fact, it’s a good aid for teaching programming. If you aren’t able to either figure it out or find out yourself, then learn how to find stuff on the internet FIRST.
[/quote]Please don’t be rude. I’ve been programming for more than 20 years in all kinds of languages and environments, and the MinGW website confused me. It requires an awful lot of reading and clicking to figure things out and even to find a path to various tutorials. Also, I did respond with a simple tutorial for installing it. Please read other responses before responding to something in the first post.

Also, I’d really suggest learning assembly, and doing some simple things in it.
I’d never recommend learning Assembly as a first language, simply because it is too far a gulf between the concrete machine and the abstractions the programmer applies to it for the beginner to readily bridge. Python is a good beginning language because it provides a comfortable third generation language to deal with broader constructs than dealing with integers whose only value is in contextual use.

Once familiar with a high-level language, then I too recommend learning some Assembly to better understand what is going on underneath.

Otherwise, I agree with everything else IanC said. Dealing with the compiler and IDE is much the same as learning programming. You just have to dink with it until you understand it better. If something really odd happens and you are at a complete loss, post with specific problems/symptoms and we’ll help diagnose and suggest a solution.

Hope this helps.

I’ll second that.

Assembly as a first language would be like learning to swim in a pool full of sharks.

Also, regarding Python, I also think it makes a lot of sense as a learning language because of how it is easy to adapt to different paradigm (imperative, OO, functional (to a lesser extent)).

Which is why I think Java is a very poor choice for a first language, because it locks you up in a way of thinking which, IHMO, is not well adapted to beginners (having seen beginners classes thought in Java, it often ends up with students copy/pasting skeleton templates, filling in static methods to make pseudo functions in giant blob classes).

Martin

VB is brutal, cause its a pain to learn and you have no drive to actually do anything in it.

However it can teach some of the basics but I would suggest learning python instead.

I’d suggest learning (not as a first tho) java, as it can limit the problems you may have like dependencies etc. A great book to buy is Head First Java, thats how I learned it.
Then I got “Java in a nutshell a quick desktop reference” which by no means is quick seeing how its about 1000 pages, I also got myself Swing hacks great little book :slight_smile:

And a few more.

If you want to learn C++ I’d suggest checking out C++ in easy steps costs about £10 and is extremely good.

Man, I’ve been looking for that one for forever, but it seems to be an old title and is very rare now.

Actually, Amazon partner sellers have a few…

I think Mike Mcgrath wrote C in easy steps, which might be a good book if you skip the part about installing the GCC…

Apologies, I didn’t intend it to sound rude. I knew a tutorial had been given, but thought it worth saying that you need to be able to look things up.

Re-reading my post it sounds like I was extolling the virtues of learning assembly as a first language. I meant that it’s worth learning at some point, to understand what is actually happening.

I’ll post my learning path just because it’s so weird:

Prolog -> Perl -> Minimal Dabbling in C/C++ -> Smalltalk (professional developer for 1 year) -> Python -> PHP -> JavaScript/OpenLaszlo

I kind of miss Smalltalk. I might get back into it a bit to fool around with OpenCroquet

Aside from Smalltalk, which I learned on the job, I learned all of these languages from the web and from books. I never fully understood the importance of a good IDE until I worked with Smalltalk. Now I work with Eclipse a lot which has good plugins for Laszlo, PHP, and Python, among others. Not sure what the story is with C/C++ on Eclipse.

Re-reading my post it sounds like I was extolling the virtues of learning assembly as a first language. I meant that it’s worth learning at some point, to understand what is actually happening.

I never studied assembly language, but I did study Turing Machines and formal language theory (automata, regular expressions, CFGs, etc) which I found really fascinating and also a good way to understand what’s “actually happening” on an abstract level. There was a great piece of software called “Turings World” out years ago which allowed you to build graphical state transition Turing Machines. I was actually looking for an IDE to work with to create an imitation of this software in Python when I stumbled across Blender for the first time, and my attention was permanently shifted…