C++ learning curve

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
User avatar
runfrodorun
Gremlin
Posts: 154
Joined: Fri Jun 24, 2011 3:50 am
Location: 192.168.0.1
x 3

C++ learning curve

Post by runfrodorun »

I've been doing some research on a relatively new programming Language D, I'm sure you've all heard of it, and even though it's nowhere near ready to be a standard, a lot of people are arguing for it under the complaint that C++ is way too complicated, and attribute that to the new standard.

See for me, I have been coding for quite a while but not as long as some, and I started the hard way... still do it the hard way. I learned to use unix, vi, the gnu toolchain, and C++ all at the same time and I didn't find that to be too challenging. I mean it's not like there's no learning curve, but I think it comes fairly naturally as far as high-ish level programming languages go. I consider myself now to be a C++ expert, so of course I should find it easy, but I don't remember a time where it was terribly difficult, and my productivity in C++ as a programmer is pretty good, and I doubt it would be any better in another language such as java. So of course, I have a highly biased opinion :P. So I'm not sure why so many people are complaining about how hard it is, when I just don't really see what's difficult about it at all. Could somebody with a different perspective than mine make a comment on this?
Sass not tolerated
LAY DOWN THE LAW!
When I don't understand a problem, I punch it in the face and try again.
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: C++ learning curve

Post by c6burns »

I know people who are completely lost when I explain pointers and how both code and variables are stored in memory. They are fine scripters, and can produce decent work and have good logic faculties. Maybe some concepts are just a bit too abstract when explained verbally (or maybe I suck at explaining!!!). I'm sure if it mattered to them, and they sat down and drew a block of memory and had it explained to them properly ... then they put it into practice it would be fine. But they don't have to put it into practice, so it doesn't matter to them. And the more I think about their job and what's important to them ... I think, why should it matter? More power to any new language that meets the demands of programmers ... but personally I still think in C and likely always will :lol:

PS - vi is my nemesis
User avatar
runfrodorun
Gremlin
Posts: 154
Joined: Fri Jun 24, 2011 3:50 am
Location: 192.168.0.1
x 3

Re: C++ learning curve

Post by runfrodorun »

Thanks for the reply. I agree with everything you said. I've always been of the school of thought that if people are serious programmers, the core concepts of C and C++ should be fairly elementary, and so I never saw the reason to fault it for anything :/ Yeah, I'm a C++ fanboy and all that. Just thought it was an interesting thing to see happening, all the discontent.
Sass not tolerated
LAY DOWN THE LAW!
When I don't understand a problem, I punch it in the face and try again.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: C++ learning curve

Post by Kojack »

D is rather cool. It's basically like a parallel world version of C++ (both following the initial plan of "let's make C support object oriented stuff" but doing it in different ways).
It's compile time abilities are awesome, I once wrote a complete Brainf*ck to D parser that ran while the D code was being parsed, adding more D code to be compiled. Like C++ metaprogramming and template programming, but way less icky.
The main thing that turned me off of D was linking with libraries. It wasn't visual studio library compatible, and I didn't feel like writing my own entire graphics engines from scratch. A tool was needed to make a C dll compatible with D, and they charged money for it. So I never got beyond simple text output.


I'd write more about the c++ side of the topic, but I need to wake up in 2 hours to get ready for work. :(
User avatar
Zonder
Ogre Magi
Posts: 1168
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 73

Re: C++ learning curve

Post by Zonder »

I always think people should start with assembler so they are forced to understand how the CPU is actually doing things. Once they have got this then use another higher level language.
There are 10 types of people in the world: Those who understand binary, and those who don't...
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: C++ learning curve

Post by Kojack »

Best thing I ever did was learn assembler (in order: 6502, 6809, 68000, z80, 8088, x86, arm).
Once I had that down, every other language fell into place (except Ocaml, that one always messes with my head for some reason).
User avatar
EricB
Bronze Sponsor
Bronze Sponsor
Posts: 360
Joined: Fri Apr 09, 2010 5:28 am
Location: Florida
x 213
Contact:

Re: C++ learning curve

Post by EricB »

I teach Small Basic and the majority of the students fail. Not just because of my teaching skills, but the failure to grasp basic logic concepts, reading skills, or extreme lack of any sort of basic math knowledge.

"Think how smart the average person is, and realize 50% are stupider than that." - George Carlin

I believe the above statement is true in programming as well. We're a logical subset of the population, but we're still made up of the general public! So yes, it doesn't surprise me that people in our niche consider C++ to have a steep learning curve. Not all programmers are made up of beards like us. Many come from other fields only because they need to utilize the ability to command a computer.

On top of that, in my experience 75% of the general population under 18 has trouble doing Small Basic... Some of these people will seep into our field because the money is there and the stuff we do is awesome (to everyone but hot chicks... :D). Even though these people can hardly grasp a simple for loop or have any idea how to write a basic formula to save their life...

In the end it's supply and demand. There will always be the need for asm, c, c++ programmers to write the underlying systems for the "general programming population" to use. So disable your Javascript and remember: "Think how good the average programmer is, and realize 50% are worse than that!"

rantOff(true);
Image
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: C++ learning curve

Post by c6burns »

Kojack wrote:Best thing I ever did was learn assembler (in order: 6502, 6809, 68000, z80, 8088, x86, arm).
Once I had that down, every other language fell into place (except Ocaml, that one always messes with my head for some reason).
Wowwwww ... I learned x86 long ago and am interested in arm but haven't found the time. And here x86 is your 6th :shock:
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: C++ learning curve

Post by Kojack »

Out of all of them, 68000 was my favourite. Damn nice cpu (in my Amiga).
Arm had some nice stuff too, I did it on the gameboy advance (needed assembly to speed up our custom audio subsystem).
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: C++ learning curve

Post by c6burns »

I know I'm driving this offtopic, but this is the offtopic forum after all :D

That's badass re: GBA ... I loved that system. I'd really like to learn to take full advantage of the neon instruction set, but from my brief glance it seemed tricky to adapt existing code to truly maximize its potential. It looks easy to get bottlenecked on memory access and not have the chip performing at its maximum.

Even working with atmel microprocs I used C and not assembly. Good to be humbled and know I'm not hardcore at all :lol:
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: C++ learning curve

Post by Kojack »

The audio system we did was pretty extreme. Phase shifted stereo positioning (we could pan left and right without volume changes) and pitch shifting (change frequency of sounds without changing the playback speed), all done on the fly and using less than 10% of the available frame time. Shame we never released anything.

I'd love to play around with the more advanced arm stuff like neon. But I find the dev environment for all my arm devices (Open Pandora, Beagleboard, PandaBoard, Raspberry Pi) to be way less friendly than flashing cartridges and working with no operation system or official documentation.
Post Reply