ADD and programming

Apprentice
Posts: 8
Joined: 2010.01
Post: #1
Hey iDevGames community, I'm not sure if this is the correct forum to post this but I have a weird phobia that stops me from learning C++ through experimenting with tutorials.

I was wondering if anyone else gets anxiety over compile errors at least when they are starting out. It's pretty bad, to the point where I won't click compile & run because I'm scared that I've made a stupid typo (I'm prone to typos) and I'll get an error. I know it's an irrational fear. The strange thing is that in general I'm a learn by doing kinda guy. I learned everything I know about computers by breaking them and fixing them and just experimenting in general. But when it comes to compiling even simple code. I get serious anxiety about pressing compile. The errors hit me like a slap in the face (LOL). Making me feel stupid and insecure like I suck (I guess that's true since I'm a n00b atm anyway lol).

I'm worried that I'm a bad match for programming because I'm prone to making typos and I'm not really consistent with my naming of variables and such. Often I simply can't think of the correct name to call something. I'm also easily frustrated and impatient. I have ADD.

Is this just a normal thing that all new programmers face or am I just not cut out for programming?

Are there any other programmers here who have ADD and if so how do you cope with it?

thanks in advance,
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #2
Well, I don't know about the ADD thing, except that I have a close friend with it and he's the most annoying person I've ever met. Rasp ... so on that, all I can say is, good luck!

On the compiler errors thing, for a very long time, you will be getting lots and lots of errors as you are learning. That's just the way it is. After you've been programming for a few years you might actually get a build once in a while with no warnings or errors. That just means you likely screwed something else up which is harder to find. Trust me when I say this: Compiler errors are your friends. You will learn to love the ones the compiler tells you about, because they're the easy ones to fix. Wink

I've been programming modern computers for like twenty years, so I can say I'm pretty experienced with this stuff now. I still get errors almost every build it seems. Heck there are techniques I use where I actually induce errors just to save me the time of thinking about what I changed. Don't be afraid of the red dots dude.
Quote this message in a reply
Member
Posts: 27
Joined: 2008.12
Post: #3
You're nervous and anxious because you're a noob and that's normal. Your program seems like a house of half-invisible cards that you don't quite understand, and you're afraid that you'll touch something, it'll break, and you won't be able to fix it; that's normal too.

Like learning to ride a bike it's a difficult hump to get over but you'll get there eventually. Once you understand how everything works your nerves will go away. It'll be like the matrix - everyone else sees a page of crazy characters, but you see a blonde, a brunette, etc.

And Jake is right, it's worse when there are no compiler errors but it still doesn't do what you want!

-- Available Now: Dead Panic, a casual zombie shooter!
-- Development Blog: How to make a game under $1k
-- Twitter: xsmasher
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2010.01
Post: #4
Thanks guys, I got over it.

I'm learning C++ and by extension Objective C++ using the complete C++ programing language book by it's creator. It already assumes I know C, which I don't, but I've made some progress via some C++ tutorials that assume you don't know anything (learncpp.com), and then applying what I learn from those to the book. It's slow going, and I'm about to give up on C++ and try to learn Objective-C instead.

I'm having a little trouble learning from books and webpage tutorials though. My eyes usually glaze over after an hour or so and my brain turns to mush, I start groaning like a zombie etc.

Are there any alternatives to books? -like audio or video tutorials that are equally comprehensive?

thanks,
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #5
Starting with C++ is going to be much harder than learning C in my opinion, especially if you don't have plenty of prior programming experience with some other language. Make no mistake about it, C++ is/can be a very complicated language.

Bruce Eckel makes a freely available book called Thinking in C++. I don't remember if he has videos for the C++ stuff, but his prerequisite is that you learn C and he does provide videos for that. Looks like the site is down right now, but you can google for it later and maybe it'll be back.

Bottom line though: This stuff ain't easy to learn, no matter how you cut it. If you have to beat on your brain one hour at a time, then that's the way it has to be for a couple months before things start "clicking".
Quote this message in a reply
Member
Posts: 194
Joined: 2009.02
Post: #6
There was a great thread here on this topic about add 6-8 years ago I seem to recall. People with add often have the ability to intensely focus in on tasks with which they're interested in, so it can be a potentially good thing as far as programming is concerned.

I second what AnotherJake says about learning C, really I can't stress this point enough. Learning how to drive a car is hard enough on its own, why compound the difficulty by learning how to drive on a big rig?
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2010.01
Post: #7
Good points guys,

I'm going to look in to that book. ADD people can hyperfocus at times, blocking out everything but the task at hand. It's not really something you can call at-will though.

I'm going to put the C++ book aside and hire some C and Objective C books. I've started doing beginner C tutorials using the Foundation Tool project template in Xcode. Months you say? -holy cr4p. I guess those "Learn C in 24 hours" books are all BS. I'd love to learn this, and I'm willing to put in the time. I have some more questions.

Should I learn a programming language before I learn C?

It's a shame that Mac doesn't have a simpler starting point like visual basic.

Will I be able to apply lessons from simpler languages to C to speed up the process -AKA- learning C and Python at the same time? -or will this just slow down my learning of C?


I don't know if this is common knowledge. But the learning curve of C++ appears to have this kind of spike close to the beginning. It starts out incredibly easy, printing strings, defining variables, creating functions, basic operators and ifs and loops etc. and then _BAM_ you get hit with multi-dimensional arrays, structs, vectors, and pointers and it's like OMFG! -which leads to feelings of overwhelm. How do you work past this spike? you just take it slow? I spent a whole day trying to use a vector from the code fragment in the C++ book in vain, I just kept getting errors I didn't understand.


thanks for your time,
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #8
Those are all good questions. There are so many different answers and paths to take...

> Should I learn a programming language before I learn C? ... It's a shame that Mac doesn't have a simpler starting point like visual basic.

You're in luck! You don't have to start with C on the Mac. You can do something like Python/Pygame or some modern dialect of BASIC first to get your feet wet and get some stuff done much sooner, which I would highly recommend, unless you have aggressive goals like perhaps wanting to develop for iPhone ASAP.

Alternatively, if you want to ultimately get into 3D, you should learn to script Unity3D from the start, and forget about C/C++/Python/BASIC/etc. for now, IMHO.

> I guess those "Learn C in 24 hours" books are all BS.

I think their intent is more that you'd spend an hour a day over the course of about a month. Don't get me wrong, you can get going pretty quick, but yeah, the roadblocks to what you might imagine doing start popping up real fast. For instance, game programming requires a lot more knowledge than just what you'll find in one of those 24 hour books. You could probably make a decent command line tool though.

A wildly inaccurate comparison of learning curves on a scale of 1 to 10 in my eyes:
- BASIC, Python, etc. ... 1-4
- C ... 6
- C++ ... 10

Do take careful note that the difference in power and efficiency between C and C++ is essentially nothing. The only real difference between the two is that C++ can be insanely confusing to even the most hardened developer, but offers a lot of high-performance, built-in object-orientation features. Whether or not you need that built-in object-orientation is a matter of preference, ability and style. The professional gaming industry currently prefers C++, so that is something to consider in the long-run if that's what you would like to pursue. OTOH, the hardcore hackers are perfectly happy with C. John Carmack, of id, wrote most of their games from Doom to Quake 3 in C. Bungie wrote most of their stuff in C all the way up until Halo.

> Will I be able to apply lessons from simpler languages to C to speed up the process -AKA- learning C and Python at the same time? -or will this just slow down my learning of C?

Personally, I think learning something like Python is beneficial to the overall understanding of how to program, so ultimately it will help, not hinder. OTOH, C isn't ridiculous to learn either. It can be done from scratch without having learned any other languages prior. I simply cannot recommend one way or another. That's something you'll have to poke and prod at and figure out for yourself. Learning both at the same time would likely be confusing, but if you can do it, then go for it! You can always drop one if you prefer the other.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #9
Learning a new programming language isn't like learning a new natural language. Even two of the most radically different programming languages, like say C and Haskell, have way more in common than two closely related natural languages, like say French and Italian. The hump is learning the *first* programming language; after that you'll be able to pick up most new languages in days or even hours. In particular, all the languages mentioned on this page (C, C++, Python, C#, Objective-C) are more like the difference between an Australian accent and a Scottish accent -- everything sounds really funny to begin with, but really, there are only a couple of new words to learn. C++ has the most "new words" by a long way, too.
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2010.01
Post: #10
Thanks for all the helpful advice guys. I think I'm getting rather bored of learning programing languages. My specific goal is to create a 3D game and not general applications. At some point, I'd like to create my own game engine, but to begin with I'm happy to use someone else's.

I'm in no hurry to create a best selling masterpiece. But I am in a hurry to create a graphical game of some sort. I want to take advantage of modern tools and methods for doing so. I just sorta realized you don't need to know programming to create a good game with modern day engines.

I guess I was intentionally learning the hard way because I decided that I would have to do it eventually, so why not just get it over with, I now realize it's not that simple. A bit of will power won't get you over the learning curve, it takes months of focus. I don't want to get a job in the games industry, I want to create and publish games myself.

I don't want to write command line programs, or general software. I tried Torque Game Builder before but the tutorials were outdated and essentially broken. I'll give Unity a shot. Ultimately I want to create an iPhone game. From what I've seen at the Unity website it supports creating iPhone games using scripts that will compile in Xcode...


"Publishing a build for iPhone will create an entire, complete XCode project that just works. Press "Build and Run" in Unity and put your feet up. Relax until your game automatically compiles in XCode, installs, and launches."


Do I have this right?


I think learning a scripting language would be a lot more fun than learning C. The question is, should I learn Javascript or C# ?

Also, can you use OpenGL with scripting?
Quote this message in a reply
Member
Posts: 749
Joined: 2003.01
Post: #11
I probably don't have ADD but there would have been no way I would have learned to program as a hobby without immediate gratification/results (making a game from day 1).

A great tool for learning by doing is http://processing.org

Great for 2D and can also do 3D.

it comes with examples you can easily figure out.

Sample code:
Code:
PImage myimage;

float xpos;
float ypos;

void setup()
{
  size(200,200);
  myimage = loadImage("myimage.gif");
  frameRate(60);
}

void draw()
{
  background(255,255,0);
  image(myimage, mouseX, mouseY);
}

That is all you need to get a program running, hit the play button and you're done.

Setup function is automatically called once when your program is run, then the Draw function is called every frame (you update the variables and draw stuff in that function)

So you can make a pong game and other simple things in no time, acquire the programmer's mindset, make more games, start using more advanced stuff as classes...

The syntax is basically C/C++, so it will be useful when transitioning to those.

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #12
wise_monk Wrote:Do I have this right?
If that's what they say on the Unity website, then that's what happens.

Sounds like you definitely need to give Unity3D a shot. You'll still need to learn some programming to use it, but you'll get results much much faster than learning C.

If that doesn't work out so easy, then you could always take up Najdorf's suggestion and give processing a try, to get things rolling quickly.

wise_monk Wrote:I think learning a scripting language would be a lot more fun than learning C. The question is, should I learn Javascript or C# ?
If your intention is for use with Unity then I'd recommend poking around the forums there and asking for advice. If it were me, I'd prefer C#, because 1) It's a better language, and 2) You could always move on to XNA later (Windows and Xbox 360 only, but very powerful and fun) and your C# skills would be directly usable there.
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2010.01
Post: #13
Holy sh!t, I'm using Unity... it's awesome...I'm not interested in coding for windows or 360 though. I'm wanting to create an iPhone game. I think I really like this javascript. It's more simpler than C#. I have read about dev studios porting all their code from javascript to C# because C# is better. But I have a bad taste in my mouth because of how complicated C++ was. I'm really liking the simplicity of javascript. I think I can pick this up and start coding games pretty quick. Either way, this stuff is simply amazing.

What I really love are the video tutorials, and all the community support, it's incredible. I'm working on a game project in Unity with my friend and a game design document on google wave. The price is a little overwhelming though, but I think it's worth it.

Right now I'm just experimenting with the 30 day trial and the free assets. I'm starting to tinker with the scripts and it's going nicely. I'm picking this up quickly. Now I'm just wishing I had some more artistic skill :-(
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #14
Well, heck if Javascript turns you on then roll with it and have fun! Smile Good luck with Unity, and come back some day and let us know what you've been working on!
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2010.01
Post: #15
Who would've thought you can develop high end games using Javascript? -it's unbelievable. Modern game development software is mind blowing. Once I've mastered this, I might delve in to C++ and create my own game engine. But that is a long way away now. I need to learn a game engine before I can create one.

I took the plunge and paid for the Basic iPhone version of the engine. I have photoshop for creating textures and I'm going to get possibly either 3D studio max or maya for modeling. I have access to over 13 hours of video tutorials on this engine, looks like I won't be getting much sleep tonight! LOL

Thanks for all the help guys. I'll be sure to annoy you all with my Javascript typos and buggy games in the near future!
Quote this message in a reply
Post Reply