Try going from PHP to C++ or C#. I was primarily a PHP programmer before. I tried learning C++ but it was all too complex. I didn't get the OO thing. I think it's finally clicked in my head, though, with C#.
You make me so happy, it doesn't seem like I am the oldest one here. But I can concur with latest speaker here. I also found the transition pretty natural from C and assembler to C++ and then java/C#.
I agree that you might be a bit sloppy with java / C# since you have the garbage collector but otherwise they are superior in handling your difficulties. I also found the concept of DirectX/3D math much harder to pick up than the programming. But now it works pretty decent :)
I started programming about 30 years ago with Basic. Many years later when I learned C I found it a bit different as far as the syntax was concerned, but conceptually I could do the same things in pretty much the same way. C had a few advanced features that let you get closer to the hardware and optimize your code, so you needed a better understanding of the machine to get into that part of it.
Learning C++ and other object oriented languages has been a huge challenge for me. The difference between C and C++ is a much larger gap than going from BASIC to C. I felt the same way when moving from VB6 to VB.NET, because that's when they really started pushing object oriented concepts and making the language revolve around it, eliminating a lot of the things that just didn't work in the OOP paradigm.
My mind has still not fully made the "switch". When I attack a problem with programming, I automatically think of how to do it procedurally. It's very strongly embedded because I did it that way for so long. I understand all the benefits of OOP but its going to take doing several more projects in that style before it really sets in and becomes natural.
I guess what I'm getting at is to not become too attached to the procedural way that you do things in C. It's good to know and it's a very good head start but move into object oriented programming as soon as possible. In the long run you'll be much better out.
I started programming doing BASIC on an Apple 2e and COBOL and FORTRAN on a mainframe. I then picked up Pascal and C, then C++. I had no problems moving from procedural to event driven when I finally picked up VB3. I can't imagine doing it any other way now.
Yeah, I think there are many different levels you can go into it. Certain aspects of OOP are often discouraged by game programmers because of the performance hit. Specfically, I can remember reading that multiple inheritance is bad for games, not sure about the others.
I suppose you could write the entire project and never really create your own classes. With the .NET framework pretty much all of the ones you could need have already been written.
The event driven aspects of windows programming wasn't a problem at all because you could still write procedurally and get the job done. I was more referring to writing your own classes and thinking about your project in terms of objects rather than the line by line code that needed to be written.
The C# language is a descendant of C, so it shares many common features, including operators, operator precedence, if/else/for/while constructs and much more. C# however is a modern object oriented language and contains many more sophisticated and useful constructs than C. Things like Events, Delegates, Generic Types, Runtime type information and reflection.
Learn C for your course. If they don't offer C# at your university, start learning it on your own now. It's very important to learn an object oriented language early on in your programming career. It changes the way you think about programming.
C is a great language to learn programming with but you can't stop there. In today's world you really need to learn an object oriented language. C++ would be one obvious choice but either Java or C# would be at least as good and (IMHO) are easier to learn. If you like programming for MS platforms it's looking to me like C# would be a very good choice.
The one pitfall I can see with C# or Java vs unmanaged C++ is you could develop bad habits since with C# or Java you don't have to worry about deallocating your objects nearly as much.
All of those languages try to use a syntax as close as possible to C, although they have so many new concepts there would still be a lot to learn.
I don't know if they are, but I hope Universities aren't still pushing objected oriented development into graduate courses. People need to be exposed to it as soon as they get the basics down.
I understand that. Still it was not that hard a transition to me. But on the other hand. Who knows if I have grasped it and use it to it right extent :)
Ya, right now I'm taking C not C++ because it's a requirement for a minor degree, I'm majoring in Business. Basically I'd like to get into C# when I get some time, it looks interesting that’s why I brought it up how different are the two code wise. As expected since C is not object oriented we're using top down design. I know it's not the most recent stuff. lol.
C vs C#
Potato K
João S. B.
You make me so happy, it doesn't seem like I am the oldest one here. But I can concur with latest speaker here. I also found the transition pretty natural from C and assembler to C++ and then java/C#.
I agree that you might be a bit sloppy with java / C# since you have the garbage collector but otherwise they are superior in handling your difficulties. I also found the concept of DirectX/3D math much harder to pick up than the programming. But now it works pretty decent :)
Good luck
Bulldog.NET
I started programming about 30 years ago with Basic. Many years later when I learned C I found it a bit different as far as the syntax was concerned, but conceptually I could do the same things in pretty much the same way. C had a few advanced features that let you get closer to the hardware and optimize your code, so you needed a better understanding of the machine to get into that part of it.
Learning C++ and other object oriented languages has been a huge challenge for me. The difference between C and C++ is a much larger gap than going from BASIC to C. I felt the same way when moving from VB6 to VB.NET, because that's when they really started pushing object oriented concepts and making the language revolve around it, eliminating a lot of the things that just didn't work in the OOP paradigm.
My mind has still not fully made the "switch". When I attack a problem with programming, I automatically think of how to do it procedurally. It's very strongly embedded because I did it that way for so long. I understand all the benefits of OOP but its going to take doing several more projects in that style before it really sets in and becomes natural.
I guess what I'm getting at is to not become too attached to the procedural way that you do things in C. It's good to know and it's a very good head start but move into object oriented programming as soon as possible. In the long run you'll be much better out.
daat99
Amjath
helsingfors
Yeah, I think there are many different levels you can go into it. Certain aspects of OOP are often discouraged by game programmers because of the performance hit. Specfically, I can remember reading that multiple inheritance is bad for games, not sure about the others.
I suppose you could write the entire project and never really create your own classes. With the .NET framework pretty much all of the ones you could need have already been written.
werner m.
The event driven aspects of windows programming wasn't a problem at all because you could still write procedurally and get the job done. I was more referring to writing your own classes and thinking about your project in terms of objects rather than the line by line code that needed to be written.
Kevin Rodgers
Learn C for your course. If they don't offer C# at your university, start learning it on your own now. It's very important to learn an object oriented language early on in your programming career. It changes the way you think about programming.
penninha
I presume you meant C and not C++
C is a great language to learn programming with but you can't stop there. In today's world you really need to learn an object oriented language. C++ would be one obvious choice but either Java or C# would be at least as good and (IMHO) are easier to learn. If you like programming for MS platforms it's looking to me like C# would be a very good choice.
The one pitfall I can see with C# or Java vs unmanaged C++ is you could develop bad habits since with C# or Java you don't have to worry about deallocating your objects nearly as much.
All of those languages try to use a syntax as close as possible to C, although they have so many new concepts there would still be a lot to learn.
I don't know if they are, but I hope Universities aren't still pushing objected oriented development into graduate courses. People need to be exposed to it as soon as they get the basics down.
Haff
babu171
Ya, right now I'm taking C not C++ because it's a requirement for a minor degree, I'm majoring in Business. Basically I'd like to get into C# when I get some time, it looks interesting that’s why I brought it up how different are the two code wise. As expected since C is not object oriented we're using top down design. I know it's not the most recent stuff. lol.