PDA

View Full Version : New Stupid...



NickESP
02-07-2003, 07:28 AM
I look at other people's code and feel that I can never do this stuff. Do any other self taught beginners feel this way, or am I not really smart enough to be a programmer?
ps. I can accept it if I'm not! : )

Vber
02-07-2003, 07:30 AM
Hmm me too dude.
I look at some code and think, how the hell I can build this?
It's not your problem, you need to think that they learned more time, and you'll soon be able to code this too...

Travis Dane
02-07-2003, 07:30 AM
Originally posted by NickESP
I look at other people's code and feel that I can never do this stuff. Do any other self taught beginners feel this way, or am I not really smart enough to be a programmer?
ps. I can accept it if I'm not! : )

On what aspect you feel you can't accomplish? If you're beginner
you might indeed suffer some trouble 'thinking' in C++.
Being smart isn't a garantuee to be a good programmer.


Who's the other people by the way?:p

NickESP
02-07-2003, 07:39 AM
I understand nearly everything about c++ and OOP, but I have trouble actually formulating a good program. I can do simple stuff but when I see anyone elses code it looks so much more advanced than mine! Do you think I need to just actually write more code at entry level and build on that? I tend to want to kip ahead. Would you have a suggestion for a programming task that will help me to get accostumed to structure?

Travis Dane
02-07-2003, 07:42 AM
Well, As i said you can learn all of C++'s statements and
variable's but actually using them to solve a problem isn't
something you can just learn from a book. How long has it
been since you started programming? You must give it some
time.

NickESP
02-07-2003, 07:47 AM
I started about four months ago, studying @ work(!) It all makes sense and everything but I find my approach is not how a proper programmer would deal with a problem. For example.


#include <iostream>
#include <conio.h>
#include <vector>
using namespace std;
class Player{
public:
Player(){}
Player(char* name, char token){
m_name=name;
m_token=token;
}
~Player(){}
void SetSquare(int choice) { m_square=choice; }
char GetName()const { return *m_name; }
char GetToken()const { return m_token; }
private:
char* m_name;
char m_token;
int m_square;
};
class Board{ //The board holds a [9] array of Player Objects
public:
Board(){
for(int i=0; i<9; i++)
m_playerArray[i]=NULL;
}
~Board(){}
void ShowBoard(){
for(int j=0; j<3;j++){
for(int jj=0; jj<3; jj++)
m_playerArray[jj]->ShowToken();
cout << "\n":
}
}
private:

This is my attempt at a Cheesy Moo inspired game. I chose the OOP way of doing it, but as far as algorythms go, I know they will be long winded and messy.

adrianxw
02-07-2003, 07:48 AM
>>> Do you think I need to just actually write more code at entry level and build on that?

Yup.

>>> I tend to want to kip ahead.

Of course you do, but as you've noticed, you are not ready to do so.

OO programming is something that suddenly clicks. You can know what an object is, and how to make one, manipulate and modify one, great. One day, you will suddenly start to see the problem you are trying to solve as objects. Then it all takes off.

You have to plod on until you can really see it.

jessie23
02-07-2003, 08:28 AM
the way i would look at it is that it is not that you aren't smart enough to do it. you just havent had enough experience and time to get to that point yet. when you do get their it will be great and fun. just keep on going and youll get there eventually. (i hope this post make sense.)

NickESP
02-07-2003, 08:37 AM
Thanks, it's good to hear that others find this stuff difficult when they begin also. I will keep trying, and build on the basics.

Waldo2k2
02-07-2003, 04:14 PM
if you're truly interested in it, take on a big daunting task of a program. You'll have learned so much going through it you'll be amazed. That's what i had to do to really learn something, and it was well worth it. Took me 5 weeks to make the program, now, if i had to do something similar from scratch it'd take me 4 days. Just practice man.

Silvercord
02-07-2003, 04:48 PM
I'd also like to point out that there's no magical 'forumula' or 'routine' to follow, I'm not saying undertaking a huge task will be pointless, I'm just saying your own knowledge of programming will be the culmination of the time you put into thinking about it, and you'll be able to gain an increasingly fundamental grasp of object oriented programming. I'd also like to point out the fact that you'll do yourself a huge favor by not concentrating too much on what other people are doing. Be aware of others, try to understand what they're doing, but dont' absolutely demand you be writing professional quality code, you'll be less anxious and enjoy programming more that way.

And I too felt the exact same way you do right now :)

face_master
02-07-2003, 04:51 PM
The analogy of a class, subclasses, abstract classes, objectes, etc are easy to grasp. Just keep reading over it untill you understand.

NickESP
02-08-2003, 07:16 AM
Thanks for the support everyone! I take everyone's advice in, with much appreciation.

ammar
02-09-2003, 04:41 AM
Practice, Practice, and practice...
You should write more difficult programs, read more tutorials, just do more work, and you should be better.