super-basic questions about using Codea

I got Codea a week ago and have been having a lot of fun. I have very little programming experience (just a wee bit of BASIC and Pascal about 30 years ago) and no experience with modern development environments. The tutorials and sample code here and on the wiki have been great – thank you!! – and I’m successfully playing with drawing to the screen, variables, functions, and loops.

Now I feel ready to “take the next step” and I’m feeling lost. I see a plus sign that will let me “Create a New Class”, but I don’t really know what a new class is, what I would do with one, or how I would link it to my Main program. I see awesome font libraries posted, but I don’t know how to access a library from my code. And if there’s a way to import or export code other than copy/paste into email, I’d love to know it.

I’ve read the wiki and the FAQ and many of these discussions, and most if it goes over my head but often I pick up just enough to realize some of the terrible mistakes I’ve made in my code (and ripping it all apart and rewriting it repeatedly has been probably the best learning experience for me!). The tutorials were awesome, but when I reached the ones with tempting-sounding names that lead to blank pages, my heart broke a little bit.

I’m willing to hunker down and get serious about studying a lua tutorial, but I’m still not sure where to go to learn the basics of how to use Codea itself. I know my questions are about things that are easy and obvious to those who have used other development environments (probably akin to someone staring at a drawing program and asking “what the heck does that paintbrush-shaped tool do?”), and I apologize if my questions are too remedial for this forum.

That said…can anyone point me to somewhere that I can learn some of these basics, so that I can access more of the potential of Codea?

A friend sent me a link to this free online book about Lua programming in general:

http://www.lua.org/pil/

That might be worth a look in conjunction with the examples.

Sorry about the tutorials petering out. I got busy! The “kids” tutorials (by others) are also worth a look.

The lua book is well worth using as a reference to the lua language, but won’t help you with the Codea specifics. Until someone writes some more tutorials, the best thing to do is look at the code in the examples or find interesting code on the forum - the shorter the better!

Hi Goatherd, and welcome to the forum!

You might also want to take a look at Processing. Processsing is quite similar to Codea and has been around a bit longer… meaning there are a number of good books available and quite a lot of online material.

http://lua-users.org/wiki/ObjectOrientationTutorial

That is the how. The why was discussed in another forum topic here. My answer being “the why for class is a philosophical question”. Since I also learned before OO, to me is a newer commonly accepted way to write structured code. Since I’m older than in it’s hard to call it required. Turtlenecks were thought of in some circles as required.

Thank you all! Good stuff for me to read up on here.

When I have specific questions (e.g. “where do I put the Data.plist from one of Andrew Stacey’s posted apps”), is that the kind of thing I can ask in these forums, or is that really too basic for here? I appreciate all the helpful folks here (turtlenecks or no), but I don’t want to clutter things up with my noobishness.

In my opinion, the only dumb question is the one that is not asked.

Jim

  In my opinion, the only dumb question is the one that is not asked.

Agreed! And as a beginner, I learn a lot from other folk’s questions and answers.

Btw: here’s a link to some excellent Processing tutorials (which I find helpful for understanding Codea):

http://processing.org/learning/

My answer being "the why for class is a philosophical question".

Aha! So Spritey is shirking philosophy class? :slight_smile:

https://bitbucket.org/TwoLivesLeft/codea/wiki/kidclass

Ha, so I did forget to have Spritey learn that :slight_smile:

Incidentally, I echo the suggestion to look at the documentation on processing, but with the caveat that the underlying languages are different (processing is java-based) so you should look to understand the system, without paying too much attention to the details.

With regard to the Data.plist the answer is simple: if you have direct file-system access then you use that (such as iExplorer or libimobiledevice). If you don’t, there’s nothing you can do. However, I can’t think of a single one of my projects where the Data.plist file was needed - if you’re getting it from Bortels’ site then it may be that it got added in to the list by accident. (There’s no harm in having it, but I didn’t intend for it to be distributed. Indeed, I suspect that most are effectively empty.)

Dear forum members,

Simple (stupid?) questions.
After booting Codea below the icons of your projects, you will see the text “No description available.” How can I enter a description?

Delete a project, perhaps it is wise after activating to ask ‘are your sure ?’ to avoid accidentally deleting.

BackUp of a project on your PC, is this Apple’s problem of version 1.2.6?
Is there a possibility thinkable that projects can be saved on your own PC, without the possibility to share it with others?
Or
Are Codea projects (also) automatically back-upped in iTunes when iTunes will make a back-up of the iPad?
I do it now with copy/paste in a document and then send it by email.

Greeting Dirk.nl

Hi Dirk,

At the moment, you can’t enter a description of your own, but I’m sure that will be addressed in a future redesign.

Emailing or pasting your code somewhere safe is the current backup… :slight_smile:

Project backup would be good, I think.

Okay Fred,
Thanks for your answer, yes I was just thinking about the same you answered me.
Fred, are you the same as on the forum of iCircuit? There was also a Person with the same name you.
Thanks, greetings, Dirk.nl

Thanks Andrew_Stacey. And maybe I used a poor example with Data.plist. But I just tried to load your “Cube” app. I went to your “How Did I Do That” site and copied each of the files (BinDecHex, Colour, ColourNames, etc.) into a separate tab in a project in Codea. (For some I chose “Create New Class” and for others “Create Blank File” – though I can’t tell if there’s a difference between those two options, other than the prepopulated text if the Class option is chosen.)

I didn’t do anything with “Data.plist” or “Info.plist”, though. (I’ll go get iExplorer later, but for now I was hoping to only flounder around in one app at a time.)

Then I clicked the Play button, prepared to drool over your amazing UI…and…nothing happened. Perhaps that’s Codea’s way of saying “You’re so far from making sense that I won’t even stoop to printing an error message.”

At the risk of testing the “there are no dumb questions” rule, where did I go wrong?

@hartland / Dirk, nope that’s not me… :slight_smile:

@Goatherd If your cutting and pasting manually, you don’t have to worry about the plist.

The only difference between “new class” and “blank file” is what it pre populates with. Your doing a replace all so it doesn’t matter.

For the nothing happens, if it’s still showing the code then the compiler is stopping it. It could be something very small in a very large cut/paste.

@hartland I’ve been backing up by posting anything fairly interesting here in the forums or more recently on the wiki.

For iCloud, I paste into Notes. But, things I do tend to be compact (which is mainly related to attention span)