Learing Programming

Commodore

Deity
Joined
Jun 13, 2005
Messages
12,059
If I were to try and teach myself how to program software, where would be a good place to start? I ask because the degree I'm pursing teaches me the artisitic aspects of what I will be doing, but they don't focus on programming at all. Since I want to learn both aspects, I decided to learn the art stuff in school and try to teach myself programming.
 
There's really two branches of thought----learning coding and learning the logic of programs and their design.

You could just learn a simple scripting language (say Java, Perl) to get your feet wet and get it to do various things. Then take a look at a book about program design to get ideas, then go back to a more complex language (maybe some version of C) to code with more power. If you're interested in a particular application type, such as making games, there's Java-based games programming books that get you using pre-made code libraries to make graphical games.

I'm kind of like you. I started as BASIC hobbyist into gaming and made a few games. Went off too a 2-year degree to study programming and some coding, but then I switched majors before I got around to actually making a serious game since none of the coding languages I was taught was particularly useful for making a serious game. Never went back to computer science but I've collected my share of How to program in C in 30 days, or Java-games making made easy type books. Might actually get to reading those books if I put down the games.

The reality is that commercial games are complex software applications made using software tools more than hand-coding, and made by people with very specialized skillsets rather than old-school generalists. Making hobby games is a bit different than trying to break into the industry.
 
I'm not sure I'd call either Java or Perl "simple scripting languages".

I agree, Java or Perl, IMHO are not a good starting point.

I started with Pascal many years ago. It is supposed to be a good language to learn good practices and structured programing. These are de pros, the cons is that it is not GUI based language. However once you have learned it you can try with Delphy or Kylix (Linux based).

I have heard that python and ruby are a good learning languages as well, but I have not tryed them.

One, more thing. VB (Visual Basic) family may look a very appetizing point to start. For god's shake, do not start here. It is very easy to learn, but encourages a really bad programming practices.

Finally, if you are very interested on it, while you learn a programming language I recommend you to learn SQL
 
I'd recommend Python, Java or C#.

I'm not a fan of Pascal based languages they just feel like a more verbose version of C to me.
 
The place to start depends entirely on what interests you. Nobody is going to recommend Donald Knuth's books to someone who just wants to get something simple done, for example. But they would be recommended to someone who wanted to make a career of programming.

I believe that in your case, as with the vast majority of people, it's about getting something done quickly. Find the most popular language in use for what you want to do, find some tutorials with examples, and start there.
 
I'd recommend Python, Java or C#.

I'm not a fan of Pascal based languages they just feel like a more verbose version of C to me.

Pascal is horrible and has about zero commercial availability. I'd get a copy of QuickBasic or maybe on of those gamer-BASICs (DarkBasic?) over Pascal.

Actually looking over my book collection, I'd rescind Java, but go with Python. Another option would be Flash.
 
Well, I have to be fair and balanced (since Java is not Microsoft), even though C# is what Java should have been ;) Hindsight is always 20-20 vision.
 
I'd recommend Python, Java or C#.

I love Python, but I have to say due to all the implicit things in this language I'd not recommend it for beginners.


But now a bit back to topic, @OP:
Are you asking for
- What to read
- Which language to use
- Or which sort of environment to use?

Oh, and as another thing: It's probably better if you have a practical problem to solve than to discuss the theories. You only learn coding by coding. Theory is also important, but with some guidance you'll learn the necessary things at the point where you need it.
 
The place to start depends entirely on what interests you. Nobody is going to recommend Donald Knuth's books to someone who just wants to get something simple done, for example. But they would be recommended to someone who wanted to make a career of programming.

I believe that in your case, as with the vast majority of people, it's about getting something done quickly. Find the most popular language in use for what you want to do, find some tutorials with examples, and start there.

Well I'm getting a Bachelor's Degree in Game Art & Design, so I guess I would like to learn programming that would be used to make games. I one day hope to have my own game development company so I would like to have some knowledge in programming so I know what the programmers I hire are doing.

But now a bit back to topic, @OP:
Are you asking for
- What to read
- Which language to use
- Or which sort of environment to use?

I guess I would like recommendations for all of those things.
 
I found Java easy to learn - it also has the advantage of a built in library for all sorts of things, including graphics (at least, it's an advantage from a beginner point of view). Not to say that other recommendations aren't worth checking out too.
 
I would go with a modern language like C#, rather than one of the more traditional "learning" languages.

But IMO, if you're learning this stuff yourself, I would do it with a goal in mind, and for something that you would actually use yourself. If you have a goal, something like, "create a connect 4 game for Android that I can play on my commute to work", you'll be much more motivated. You'll also have a better idea of what parts of the language you need to learn, by breaking each bit down into its individual components. I.e. first you need a UI, which means you'll need some way of drawing graphics assets to the screen; then a set of rules about what the player can do, and finally, the fun part IMO, an AI (for which you will learn about recursion, which is badass). And, since it's for Android, you already know what programming language you need to learn: Java.
 
I used to program PS1's - which had 1K of stack if you wanted best performance - so recursion sucked then ;)

EDIT: It had 1K of super fast memory and 64K of fairly fast memory. And no floating point maths. Oh, the good old days :lol:
 
I'd recommend learning the basics (iteration, if statements, loops, arrays, etc.) using a simple programming language.. Turbo Pascal and Turing were good for that, I'm not sure what would be good these days.

After learning the basics step back from the keyboard and learn object oriented programming fundamentals - classes, abstraction, polymorphism, etc. Spend a lot of time learning the concepts and make sure you understand them.

Then I would dive into something like C++ and try coding something a bit more complicated.
 
The place to start depends entirely on what interests you. Nobody is going to recommend Donald Knuth's books to someone who just wants to get something simple done, for example. But they would be recommended to someone who wanted to make a career of programming.

Perhaps so, but they wouldn't recommend his books even to someone who wanted to make a career of programming as first books.

Java definitely is not a scripting language. I also don't consider it particularly easy, although it's not too confusing as languages go. It's not a bad choice. But it's probably not the one you want for games, either, unless you're hoping to make mobile phone games (particularly for Android/Symbian). Although for a first language, it might be more important to learn the programming than whether it's what's often used to make games.

I agree with The_J that you'll want to set a practical goal, even if it's just your own project... but it might take awhile of learning the basics before you can do that, and even then it probably won't be that complicated. You'll want to set realistic expectations, and do some fun things with what you're learning, or you'll lose interest.

Maybe more important than any technical aspects of the language is finding someone else you know who's also learning/recently learned the language you choose, so you can bounce ideas off each other and possibly work on a project together. I did that mainly through classes, and the other-person-available-to-ask-questions aspect was quite helpful.
 
I'm oldschool. I started with GWBASIC, which is an interpreter (i.e., essentially a script vs. an executable program)

In the old days, C++ was the popular choice and anything else was "kiddie scripting/coding". I'd be careful mixing C/C++ and Visual Basic though, since the two languages are mirror images of each other.

C/C++ example:

int main() void
{
int i = 10;
cout << "Hello World " << i;
}

Visual Basic:

Private Sub Load()

dim i as integer
i = 20
txtTextbox1.text = "Hello World " & i

End Sub

There's several methods -

ASM (Assembler) - It's probably rare these days, but back in the 80s and 90s, some would program games using Assembler to make games run faster.

C/C++ - Mostly used for DOS/Command Shell applications or to code the Windows API (interface) from scratch. Hardcore old-school programmers swear by this method. (even more hardcore programmers swear by Assembler)

Visual Basic .NET - Mostly for business applications that need to be built quickly. (BTW, even though I've learned about recursion, shift-bits, tree sorting, linked lists, double pointers (and heard of triple pointers :scared:), I've yet to use them, or even see them in the business world.)

C/C++/C# for .NET - Sometimes used for business applications, but a favorite for gaming.

There's also many variations, too.


Personally, I would learn Javascript (not the same as Java!) to get your feet wet. That's a bit easier, and there's tons of examples on the Internet. It's a C++ based language.
 
Note that with C or C++ you don't have to code the Windows API "by scratch" (I mean, the way you say that, but you don't refer to programming .NET "by scratch", implies there is additional difficulty) - one can still use a wide variety of libraries, either for apps or games programming, from low level to high level. I mean, I know you say there are many variations, but I just thought I would add some info for the OP :)

C# is becoming common for games, but do many people use C or C++ with .NET I wonder (as opposed to simply C++ with DirectX/OpenGL/3rd-party-3D-engine)?
 
You can't use .NET for plain C. You can use the nasty C++/CLI extensions to do managed C++ in .NET though.
 
Pascal is horrible and has about zero commercial availability. I'd get a copy of QuickBasic or maybe on of those gamer-BASICs (DarkBasic?) over Pascal.

Actually looking over my book collection, I'd rescind Java, but go with Python. Another option would be Flash.

I'm not an apple fanboy in any way but I can't deny the commercial success of the iPad. I say this because the iPad does NOT support flash. And apparently, that matters.

http://www.vision2mobile.com/news/2011/11/apple-wins-war-against-adobe-flash.aspx

http://mashable.com/2011/11/11/flash-mobile-dead-adobe/

Of course that's just flash mobile we're talking about. Flash mobile is dying if not already dead. I personally think it's a shame, but you can't deny the reality. I'm not a programmer but C+ seems to be the way to go, at least based on the conversations I've had with actual programmers.
 
I'm not sure that's a reason to not pick a language (and I say this as someone who hates Flash). I mean, lots of devices have been sold that don't support Flash - or indeed, many languages. It would be like saying don't pick a language because it's not supported by 1% of Linux users, or even more significantly, don't write anything that's Windows only, because you "only" get 90% of the market. And you certainly wouldn't write for anything that only supports OS X or IPhones, because of all the other commercially successful platforms like Windows, Android, Symbian etc. Surely just because some device somewhere has had commercial success (which doesn't say very much) doesn't mean you have to support it or you're doomed.

As languages go, I would guess that the number of devices that can run Flash is higher than many languages out there (simply because it runs on most desktops and smartphones, where as many languages only run on one platform).

As for the whole "Apple killed Flash" story, I'm not convinced. Firstly the credit should be to the emergence of open standards like HTML 5. The problem with the Apple argument is that websites have catered for those devices by writing their sites in the form of binary executables that only work on an Apple device. Firstly this isn't exactly a step forward for open standards or accessibility, and secondly, it doesn't provide any argument for killing Flash (since Apple devices are now catered for specifically, you're still free to use Flash). Moreover, there are hundreds of millions of Internet capable feature phones, not just Apple, and these are catered for by mobile specific versions of the websites - and it's here you see the use of HTML, but without Flash. Plus the *big* problem with this logic is that, if it were true, it would mean we shouldn't see the aforementioned Apple-only apps. But evidently people have no problem locking out some platforms.

The "Apple will kill Flash" story has been around for years - this smells like one of those stories that the media hype as a prediction before, then it gets suddenly accepted as a fact based on all the previous stories (e.g., the "two billion will watch the UK royal wedding", then after news reports simply requoted the two billion figure). Apple benefit significantly from this, as they get tonnes of media hype even before a product is announced ("ISlate", "IPhone 5"), along with claims about how these devices will be revolutionary etc; later, the large amount of coverage is cited as "evidence" that it was therefore revolutionary, despite the hype preceding the devices.

But anyhow. I'd also note that the evil of Flash was when people were writing their websites in Flash (same as they now do with Apple-only apps). If you actually want to write a online game, I don't see that Flash is bad. We might prefer that they choose HTML 5 now, but I don't think that kind of quibbling is more relevant than say, preferring someone choose Java over C#, or OpenGL over Direct X. It's not going to stop the majority of people playing it.

Apple devices can't even support Java either, is that a bad language too? I don't think so. Whilst it gets less hype these days, it's still a widely used language, that's cross-platform to a large number of popular commercially successful platforms, and can be used for gaming too.
 
Top Bottom