Beginning programming
Moderator: Moderators
Re: Beginning programming
People shouldn't be allowed to use computers unless they know Python
- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29
Re: Beginning programming
More likely it's just the best language the professor knows. Either that or there's some specific program they are dependant on that happens to be in PERL already. In computing we rarely fix that which isn't broke.Panda wrote:As far as PERL programming goes, there's a class being taught at my university on PERL programming and bioinformatics, so apparently it's good to use when it comes to dealing with biological data.
Re: Beginning programming
Dragon45 wrote:I SUCK TITS
THERE'S NOTHING WRONG WITH THAT
- Felix the Cat
- Posts: 2383
- Joined: 15 Jun 2005, 17:30
Re: Beginning programming
First, http://www.amazon.com/Primer-Plus-4th-S ... 0672322234
Read it. The beginning will of course be easy if you already have programming experience, but it gets into key C++ OOP (object-oriented programming) concepts later on.
Then get a solid data structures book and work through that.
Then get a solid software architecture book and work through that. Focus heavily on the design patterns. By the end of this you should be extremely comfortable with every aspect of object-oriented design and implementation.
Run through some Windows programming basics, if you're interested in doing anything Microsoft-related, including DirectX. Familiarize yourself with both the (outdated and procedural) Win32 API and the (less outdated and OO) MFC. Since programming anything Microsoft is approximately equivalent to the sixth circle of Hell, this is a good way to hone your problem-solving skills.
Then, you'll have all the tools to teach yourself whatever you want to learn - DirectX, OpenGL, any other API, AI programming, network programming, etc.
Few people have the patience to learn this correctly, because they have exactly the same way of going about it as you're demonstrating: "I'm gonna like learn C++ and then mod a cool game and then make cool games!!!!". No. Doesn't work that way. You need to have a very solid foundation first, and that takes time, dedication, and work.
This is C++ specific, YMMV with other languages.
Read it. The beginning will of course be easy if you already have programming experience, but it gets into key C++ OOP (object-oriented programming) concepts later on.
Then get a solid data structures book and work through that.
Then get a solid software architecture book and work through that. Focus heavily on the design patterns. By the end of this you should be extremely comfortable with every aspect of object-oriented design and implementation.
Run through some Windows programming basics, if you're interested in doing anything Microsoft-related, including DirectX. Familiarize yourself with both the (outdated and procedural) Win32 API and the (less outdated and OO) MFC. Since programming anything Microsoft is approximately equivalent to the sixth circle of Hell, this is a good way to hone your problem-solving skills.
Then, you'll have all the tools to teach yourself whatever you want to learn - DirectX, OpenGL, any other API, AI programming, network programming, etc.
Few people have the patience to learn this correctly, because they have exactly the same way of going about it as you're demonstrating: "I'm gonna like learn C++ and then mod a cool game and then make cool games!!!!". No. Doesn't work that way. You need to have a very solid foundation first, and that takes time, dedication, and work.
This is C++ specific, YMMV with other languages.
Re: Beginning programming
Felix's tip makes sense. Keep in mind that you'll want to do this over at least a year or two.
- Michilus_nimbus
- Posts: 634
- Joined: 19 Nov 2004, 20:38
Re: Beginning programming
I say: learn Java. It's easier than C++ and more pure OO than C++.
Then, if you really want to learn C++, learn C first.
If you want to learn about gui programming, Java Swing is one hell of a nifty gui toolkit. I really don't know why some people hate it, all other gui libraries can be horribly inconsistent at times compared to Swing.
Then, if you really want to learn C++, learn C first.
If you want to learn about gui programming, Java Swing is one hell of a nifty gui toolkit. I really don't know why some people hate it, all other gui libraries can be horribly inconsistent at times compared to Swing.
Re: Beginning programming
Don't do that - the C first thing. Too many people learn C first, and then go on to use all the unsafe C features that just set you up for disaster once you get a large, complicated C++ project, when C++ has many features that let you write code that is every bit as safe as Java or C#, but faster and native.Michilus_nimbus wrote:I say: learn Java. It's easier than C++ and more pure OO than C++.
Then, if you really want to learn C++, learn C first.
If you want to learn about gui programming, Java Swing is one hell of a nifty gui toolkit. I really don't know why some people hate it, all other gui libraries can be horribly inconsistent at times compared to Swing.
Google "Thinking in C++" - it's a free ebook that nicely covers the C++ language as an object-oriented programming language of its own, rather than treating it like a bunch of crap stuck onto C.
Re: Beginning programming
Also: C++ is not a strict superset of C. Precedence of operators is not identical in both; not all pieces of code that run a certain way in C will run the same way in C++.
A somewhat pedantic point, but just keep it in the back of your mind's lock-box.
A somewhat pedantic point, but just keep it in the back of your mind's lock-box.
- Felix the Cat
- Posts: 2383
- Joined: 15 Jun 2005, 17:30
Re: Beginning programming
Learn C before you learn C++?Michilus_nimbus wrote:I say: learn Java. It's easier than C++ and more pure OO than C++.
Then, if you really want to learn C++, learn C first.
If you want to learn about gui programming, Java Swing is one hell of a nifty gui toolkit. I really don't know why some people hate it, all other gui libraries can be horribly inconsistent at times compared to Swing.
They're two very different languages, with two very different concepts behind them.
It's like saying you need to learn to ride a unicycle before you learn how to drive a tractor-trailer...
IMO there's really no use in learning C these days unless you want to maintain legacy software or something. C++ is the standard for software where performance is critical - such as games. (*braces for onslaught of Java fanbois in 3... 2... 1...*)
C++ isn't as terribly difficult and hardcore as everyone makes it out to be. If you want to learn C++, learn C++ - don't take some complicated, circuitous route to it. If you want to learn Java or C# or VB.NET or freaking Ada... learn it instead.
Also... you could say that Java is "more pure OO", but Java lacks some OO-isms that C++ has and that require workarounds in Java - such as multiple inheritance. True, multiple inheritance is the surest path to completely fucking yourself and your program over, and IMO if you think you need to use multiple inheritance to solve a problem then 9 times out of 10 you're approaching it the wrong way... but still, it's an OO-ism that Java doesn't have.
- Michilus_nimbus
- Posts: 634
- Joined: 19 Nov 2004, 20:38
Re: Beginning programming
That's a very good point. C++ is a very different language to C, but that's exactly why I'd recommend people to learn C first. C is quite a bit simpler than C++, and imho it's a better tool to learn about pointers and memory management. You'll get a better view of the low-level workings of the language, which imo can be a real advantage when starting C++.Pxtl wrote: Don't do that - the C first thing. Too many people learn C first, and then go on to use all the unsafe C features that just set you up for disaster once you get a large, complicated C++ project, when C++ has many features that let you write code that is every bit as safe as Java or C#, but faster and native.
I'm quite sure you'll think twice before touching a C idiom if you're used to Java, C# or any high level language
I like to see it more like learning to ride a unicycle before doing down-hill mountainbiking with itIt's like saying you need to learn to ride a unicycle before you learn how to drive a tractor-trailer...
Last edited by Michilus_nimbus on 13 Jan 2009, 21:26, edited 1 time in total.
Re: Beginning programming
Yes, it's important to know about those tools, but it's also important to never, ever, ever do manual memory management if you can avoid it. Bringing out malloc should be seen with the same disdain as bringing out, say, assembler.
Good C++ does not have void*.
Good C++ does not have void*.
- Michilus_nimbus
- Posts: 634
- Joined: 19 Nov 2004, 20:38
Re: Beginning programming
No arguing thatPxtl wrote:Yes, it's important to know about those tools, but it's also important to never, ever, ever do manual memory management if you can avoid it. Bringing out malloc should be seen with the same disdain as bringing out, say, assembler.
Good C++ does not have void*.
Re: Beginning programming
Michilus_nimbus wrote: C is quite a bit simpler than C++
Re: Beginning programming
You can safely disregard most of the advice from this thread.
Re: Beginning programming
Dragon45 wrote:You can safely disregard most of the advice from this thread.
- Felix the Cat
- Posts: 2383
- Joined: 15 Jun 2005, 17:30
Re: Beginning programming
IMO that's like saying that a cotton gin is simpler than parliamentary democracy... again, they have two different concepts behind them.Michilus_nimbus wrote:C is quite a bit simpler than C++,
If you really LEARN C before even touching C++, then you'll pick up a lot of habits that are bad in C++.
Most of the time you're better off ignoring the low-level workings of the language anyways... I've seen far more mistakes resulting from misuse/abuse of low-level tools than from ignoring them.and imho it's a better tool to learn about pointers and memory management. You'll get a better view of the low-level workings of the language, which imo can be a real advantage when starting C++.
This is especially true for someone who wants to learn to program recreationally... someone who won't be in a position where he has to heavily optimize his programs.
IMO learning the very low level technical stuff is something that should come later and as necessary.
On the other hand it would be very amusing to walk into an Intro to C++ class and see them discussing, say, hacking the vtable
Re: Beginning programming
There really needs to be a programming subforum that only actual programmers have write access to. For stuff like this.
Re: Beginning programming
dragon45 founds club that wouldn't take him as a member itt
Re: Beginning programming
dragon45 thinks cobol is an elegant language