How to get started?

First, let me apologize for my complete ignorance of programming in general. My naive foray into the world of C++ might be obnoxious to some of you. However, I cannot stress enough how much I desire to understand computer programming. A few days ago I downloaded openFrameworks , but I’m having trouble finding a place to start. I guess my question boils down to this…

Does anyone know of a beginners guide to writing C++ in openFrameworks? I’m using this program on a mac, and I’m just having a difficult time finding a place to start. Could anyone spare a little time to point me in the right direction? Thank you.

The Xcode-setup-guide is the place to start if you are on a mac. Your first steps would be to get the examples to run which come with the OpenFramework download.

From there you can start making small changes in the various examples and get yourself familiar with the OF code style. At this point getting a good overview is good. After that I would suggest getting a good book on c++ and start making sense of what is in the examples. I like the OReilly books, especially the pocket reference versions.

How is going with the examples. Have you gotten them to run?[/url]

Stefan,

Thanks so much for taking your time to reply. So far I’ve figured out a few very small things with XCode. For instance, I can make a button beep or bring up that classic window that says “Hello World!.” What I think it boils down to is that I’m too ambitious. I want to start making interactive digital video installations right away, but I have to take baby steps.
The O’Reilly Books look very helpful, I think I’m going to purchase C++ The Core Language or maybe C++ for dummies (fitting?). Anyway, Processing seems to be more user-friendly. Especially for someone just starting to learn programming like myself.

Do you think familiarizing myself with java before leaping into C++ is a good strategy… or would this just confuse me? I’d like to hear your input since you’ve probably mastered both of these languages already.

Thanks again,
Katie

This is probably the wrong place to ask this question. I, for one, find C++ way more enjoyable to code in than Java. C++ is also decent to start with when done in conjunction with a framework like OF.

I also think it’s a good idea to go between language (unless you have close dealines ). Feel free to compare languages/frameworks. I always thought that I learned the most when I moved from one language to another because it’s like seeing the same thing from different vantage point. So, no, going from Processing to OF is not a bad idea at all.

hi katie,

we are happy to have you here, and the questions you have are completely welcome. we are actually, at the moment, trying to develop a short guide / tutorial about getting beginners started, so if you don’t mind, this week we might be posting some ideas / questions / resources on this thread.

part of what we are trying to do with OF at the moment is develop it so that it makes sense more for experts (thus all the addons stuff) and for beginners - we feel it’s pretty comfortable for mid range folks to get into because the code and example are fairly clean…

my first set of questions for you is:

a) what experience do you have programming?
b) what kinds of things do you want to do?
c) how well do you understand basic concepts like: variables, data types, object oriented programming, functions?

I think part of the work we will do this week is to develop a short tutorial about working in c++. I found this book is very useful - learning c and c++ in 5 days. it explains alot of basics (not all having to do with OF, but more general stuff about the language).

http://www.anotherworld.eu.org/Anonymou-…-e-days.pdf

also tutorials, like this:
http://library.thinkquest.org/C0111571/manual.php
are pretty helpful just to get around basics – variable, functions, classes, etc

I think the most important thing is to play - start altering variables and asking how to do basic things here in the forum - and also to keep in mind that the learning of a language like c/c++ is like any other language : words, then sentences, then paragraphs, then writing – it can be frustrating at first, but the time and energy you put in will translate across all the programming languages, because the principles are really, really similar.

p5 is definitely more suited for beginners, but we will do our best to try to help you get going here, and again, welcome.

take care,
zach

Thank you zach. I’m glad my lack of knowledge isn’t bothering you now, but just wait until I’m posting here bugging you because I’m confused with what a ‘string’ is. Anway, I really do appreciate your hospitality. Since I’m going to be bugging everyone else here I’d be more than happy to answer your questions.

First, I have a very limited knowledge of programming compared to everyone here it seems. I took one basic course in java about a year ago. I’ve made the Hello World and Celsius to Fahrenheit temperature converter programs like most people have. I’ve been playing with Processing and OpenFrameworks for a little less than a month now. Agh, I’m such a novice sorry- but after doing some reading, buying a book or two, and playing with your examples I feel like I have my head around the basics.

So terms like ‘variables, values, operators, functions, and object-oriented programming’ doesn’t sound like gibberish to me. I can make an educated guess about what most of the posts on this board are talking about. However, I’m all sauce and no meat. I don’t know how to use anything. What would really help me out, to be honest, would be a course full of ‘mini challenges’ which increase in difficulty with each step. Once you’ve tried to complete the program maybe the next page would describe what you’ve just done. It sounds simple, and maybe there are already websites similar to this, but I haven’t found any.

For instance, that link you gave me ‘C++ MADE EASY’ is very helpful, but it’s just full of examples. The site rarely asks you to program anything for yourself. The quickest way to understand something I feel is just to go at it and learn from your mistakes. I’d suggest something like a challenge or project followed by short a walk-through would be best if you want to write a starter for beginners like me.

Programming has always interested me and I’m very interested in interactive art and video. When I saw a video of the Funky Forest by Watson I couldn’t stop watching. In fact I downloaded all of the guides for the program and told all of my friends in Amsterdam about it. Eventually I’d be happy to make a very simple piece like programming a camera to recognize the brightest spot in a room- then move on from there.

Sorry to write your eyes out. I have to go to class now. But just so you know I really admire all of this open source information and help you guys put out here. I hope it turns into a movement.

Best Wishes and Thanks Again,
Katie

Hi Cypher!

you’re not alone! another OF (‘kinda’) noob here!
I was thinking about your q’s and hacking the OF examples, might be a good way to familiarize yourself with the OF and C++ structure and code and get some interaction running.
As for the video tracking imho u should first try to get some interaction with ‘regular’ input devices (mouse, keyboard) and play a bit with that.

here’s a quick hands on that will hopefully help u!
open the graphics example project on Xcode, if u look at the left side bar, inside the src folder u’ll find two kinds of files: the header files (*.h) and the compilable files (*.cpp).
the header files contain declarations, this is where u declare classes, functions and variables and associated types.
the compilable files include / import these declarations and contain definitions - the code that will generate ur program.
lets begin the hack!
edit the testapp.h file

  • add 2 ‘int’ variables (integer) each for a mouse axis::
  
  
int mouseX;  
int mouseY;  
  

  • now in the testapp.cpp file scroll down to mouseDragged function::
  
void testApp::mouseDragged(int x, int y, int button){  
mouseX=x;  
mouseY=y;  
}  

the mouse drag function has 3 variables, three data sources received each time the mouse is dragged. If u take these attributes and use them for your previously declared variables (mouseX = x; mouseY= y), then u can use these variables as the source for a drawn object location. U’ll be replacing the chosen object’s coordinates by these variables and any time u drag the mouse the object will follow it.

build and go!

In general this will be the same u’ll do with object tracking (though instead of the mouse movement and location u’ll have a brightness or color spot coordinates).
The next step will be to get the camera image and later do some image transformations to allow for a better analysis. This will involve a bit more effort but will also be more rewarding!
I’ll be posting more (hopefully) helpful clues and hands-on, let me know how this goes!

r