If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

Learning programming - advice and resources?

There's another programming thread at the moment but this topic is something I have been wondering about for quite some time and I think it deserves a thread to itself. Googling around 'learning programming' can bring up a whole lot of outdated rubbish. So can anyone suggest any great resources, websites, forums or books for learning programming?

For me in particular, I'd like to learn some very basic C++. I worked through some of http://inventwithpython.com/ and then decided to buy 'beginning C++ game programming' by Michael Dawson. However the vast majority of the programs in the book aren't game-like at all, they're mostly just a page of words that are in the context of gaming, there is no interaction from the user or anything that could ever be different. I feel like it would be much easier to progress if I could get some extremely crude game or model up and running that I could mess around with, change the values and chop new bits in and out.

At the risk of starting a holy war: don't start with C or C++. As a (bad) analogy, it's like saying "I would like to learn how to fly, so I'm going to get in a concorde and try". You don't, you find yourself a nice little two seater plane that's just got a stick, a rudder and a throttle and go from there. Sure, you can learn in the concorde, but you won't have any fun.

The dirty little secret that you don't know as a newbie is that the fundamentals of programming are the same pretty much anywhere. Flow control, data structures, etc. is stuff you can learn in any language just how you should be learning in a two seater. Because you aren't going to find a simple c++ game that you can tinker with that makes *any* sense to you right now, and you're not going to learn anything from it.

I'd suggest finishing the python book (which means doing the exercises just reading it means you won't really absorb it). Then either experimenting with pygame on your own or trying something else. You could try XNA, as that's C# and so it a bit nearer C++ than python, and there's lots of good learning books for XNA. Or you can try Unity which has some really good documentation for beginners and lets you get doing visual stuff very quickly and lets you write in C# or javascript.

I second Unity and python. There's some good resources for both of them, and you can very quickly get something game-ish going in Unity that you can play with (while python's interpreter lets to play interactively with the language without going through compile-cycles, which I think helps you to explore what a particular function does in a more natural way).

Eh, I'm not so sure about if C/C++ is actually all that bad. I mean, it means you don't have the benefit of large standard libraries of C#/Java, but it'll give you a lot of insight what happens deeper down in the programming language. That being said, they are also a big pain in the ass in the beginning and if you aren't really motivated, they can kill your motivation. Java is what I began programming with, and moved to C(++) from there.

All in all: pick a language (probably not a functional programming language like Haskell), and stick with it. Programming isn't about language - it's about a mindset and understanding how the system flows.

If you want to learn to be a good coder: C or C++, depending on what field you intend to work in (C++ if you want gaming). There are better languages out there, and there are more powerful languages. Those both provide a good "bare bones" that will generally not have you develop too many bad habits (I learned on Java, and I always have to keep a sticky note handy to remind me to free what i malloc :p). But those are "real" languages, so they'll be taught in the context of programming, not game making (even an OpenGL or DirectX tute will be more about how to render a scene, not how to make it interactive).

If your problem is that you want to feel like you are working toward a game: Go with Unity, as suggested. I think it supports a few different languages these days, pick whichever one has the best tutorial. You'll pick up some (or a lot of) bad habits, but you'll actually learn. Because you can see the impact of everything you do in the context of a game.

Steam: Gundato
PSN: Gundato
If you want me on either service, I suggest PMing me here first to let me know who you are.

On a slightly unrelated note, if anyone living around the Cambridge area with good C++ and MySQL knowledge is looking for a job as a software engineer, please send me a pm and I can give more details. Salary would be £35k, a pension scheme and share options within the firm.

Sorry if I'm not allowed to advertise job roles in the forum, please remove this post if it violates any rules.

If you are an absolute beginner, try www.codecademy.com for the explanation of the thinking and basic stuff
To anyone choosing their first language I recommend either Python or Javascript.
Codecademy is for JShttp://learnpythonthehardway.org/ is for Python

I like MIT OpenCourseware, too. Their introduction to Computer Science uses Python, which is a plus for me. They make non-trivial topics sound easy. The course is about learning to think like a computer scientist.

I will just say -- I don't recommend the following if you are trying to learn "proper programming" to do it for the rest of your life.

But for those who feel that programming a game is the only way they'll ever learn to program, and want something fairly fast and flexible, you could do worse than looking for a Flixel tutorial here: http://forums.flixel.org/index.php

The best thing about Flixel is that you can super-easily put a man on the screen and have him run around without flickering. Once you've gotten that far, the rest is just tweaking. :)

Of course I found Flixel after programming with REAL LANGUAGES for years, so I may not be the best judge of its intuitiveness for beginners.

The Secret of Gargoyle Manor, a browser point-and-click adventure about retrieving your lost hat whatever the cost, is something you could play!

I happen to teach University Undergraduate (and Masters) Introduction to programming courses, among other things. Our University, after having tried a couple different approaches, uses Java. I will elaborate a little, later... but just now I'm away to teach some Undergrads...