• Welcome to Valhalla Legends Archive.
 

Should a n00b use C++ to learn programming?

Started by Mitosis, April 22, 2004, 07:06 PM

Previous topic - Next topic

j0k3r

I think Moonshine hit it. I also think that this was a very basic programming problem and that you should probably learn an easier language to get to know the basics of how a program is run before getting into/using C++.

[edit]Not very scientific is t? :P[/edit]
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

iago

Quote from: j0k3r on April 22, 2004, 07:06 PM
I think Moonshine hit it. I also think that this was a very basic programming problem and that you should probably learn an easier language to get to know the basics of how a program is run before getting into/using C++.

[edit]Not very scientific is t? :P[/edit]

In my opinion, C is the best language to learn in.  You should learn to do things right before getting lazy.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Mitosis

Quote from: j0k3r on April 22, 2004, 07:06 PM

[edit]Not very scientific is t? :P[/edit]

First off, I just started it so its I havent even touched that part yet. Second of all, I have spent too much time on C++ and Im not going to give up now, even when it feals like Ill never understand something. Like just yesterday, iago and I were talking and I learned what a float was. (Go ahead and laugh but I never got to that part yet :\) So yeah Im learning something everyday like he says :) So Im not going to switch to another langauge. I've done that too many times. I started with C++ then moved to VB. Then back and forth, even went to Java. But I know what Im going to do now, which is C++. Since I got a taste of multiple languages I prefer C++.

j0k3r

#3
If you don't know how to take in input, I don't think you know enough to truly decide what you like. I have gone around to a lot of languages and learned the basics, never sticking with one because I keep thinking one is more useful than the other, but it has taught me the basics very well. In-school programming is the best way to learn to program IMO, it's where I picked up the language the fastest, learned new concepts the fastest, and got feedback on what I was doing.

If you're too young to take programming languages in school, I commend you,  but trying to learn a language such as C without any knowledge of actual programming is going to be alot harder than it should. Learning a basic language and understanding it then migrating to a new language (even going from that language to C) will give you a much better understanding, and make it alot more enjoyable.

I'm just speaking from my experience. That last comment was just a joke. I won't laugh at you for not knowing what a float is, I'm sure over 99% of the world doesn't know what a float is.

Note: It seems stupid I said you should learn a basic language first, because I always thought that was a stupid idea, but it does help, alot.

[edit]Also, you wouldn't be giving up anything, what you have learned so far is knowledge that has to do with programming, it's not restricted to C++. An integer is an integer in any language, outputting a message is the same in any language, it's just a matter of different keywords.[/edit]
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

Mitosis

Another thing Joker, I have been reading my book and some tutorials. So when I do code I dont know the best way to do it. I havent made very many programs. My experience in writing a program is limited, however reading is what I have been doing. So the more I practice, Ill learn more. I see what I did wrong and now I know for next time. I also have a better understanding on how to use that input.

MyndFyre

I think the question at hand is really, what do you want to do with it?

I have the basics of C/C++ down fairly well, and can generate console programs well enough.  But when it comes into using libraries and headers and all that junk, I run into problems.  My own headers are fine -- but some macros are just so complicated.  And the whole Windows macro

BEGIN_MESSAGE_MAP

just blows my mind.  I don't understand some of these things.

Oh well.  Sooner or later I'll learn it.  I'm not trying particularly hard right now.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Adron

IIRC, the begin message map macro and its companions declare an array of structs. Each struct in the array has a window message and a callback function to be called for that message.

MyndFyre

Quote from: Adron on April 24, 2004, 05:11 PM
IIRC, the begin message map macro and its companions declare an array of structs. Each struct in the array has a window message and a callback function to be called for that message.

Meh, you're probably right - in fact, I think you are.  The idea is just somewhat daunting, though, because you have these pre-built macros that come in the library, that I have no idea what they do, or more importantly, why they do it.

My meaning, though, is the things that look nothing like the language that are so central to the Windows programming environment.  It's intimidating.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Adron

Quote from: Myndfyre on April 24, 2004, 07:37 PM
Meh, you're probably right - in fact, I think you are.  The idea is just somewhat daunting, though, because you have these pre-built macros that come in the library, that I have no idea what they do, or more importantly, why they do it.

My meaning, though, is the things that look nothing like the language that are so central to the Windows programming environment.  It's intimidating.

They are central to using MFC.

I think it's what some people call "syntactic sugar" - doesn't really add anything, just makes it look different. Might be a bit faster to type when you're used to it, but makes the whole thing much more complex.

You don't have to use those to program in Windows though. Programming without MFC will allow you to build faster and smaller programs. You can't use all the sugar though, the "doubleclick here to declare a function that will be called when you click the button".

For that to work, the development environment must be able to add message handlers, and they have to look a very specific way that is easy for the text processing code to recognize.

Yoni

Message crackers >>>> Message maps.

#include <windowsx.h>

MFC sux.