The suggestions I mention in this thread would add the following features to Codea:
A much more flexible and robust undo/redo feature which has 999 or more undo/redo states per project.
Automatically create a source code snapshot every few minutes or when the play button is pressed, or when the “add source code snapshot” button has been pressed on Codea toolbar.
Ability to create Codea tutorials that adds, removes and updates lines of code as the tutorial progresses.
Ability to store and run multiple projects within a single project file without having to comment or uncomment code. This would be extremely useful for archiving purposes, and for testing out previous versions of code compared to the new versions.
In the editor, a three or four digit number counter is placed at the top of the screen, on the toolbar. There will be plus and minus buttons next to the counter to add and remove source code snapshots. There will also be left and right arrows next to the counter to switch between the saved source code snapshots.
Source code snapshots will be created as regular text files using the same copy technique that is used in the Codea project browser, when a user holds down on a project icon and selects “copy” from the menu.
When a source code snapshot is selected in the editor, a temp folder is created and the text file containing the source code is converted into the seperate lua files for each tab in the toolbar. Then Codea will automatically switch to the tab that contains the line of code that was last edited, and highlights the code. There could be a toggle switch in Codea options to turn the code highlighting feature on/off.
Due to the way this feature works, this would mean that tabs on the toolbar would appear and disappear as a user switches back and forth between the source code snapshots.
Autosave source code settings would be placed in the main options bar in the project browser screen. This would provide the ability for a user to change the autosave time interval, along with a toggle switch that turns on/off the ability to record a snapshot whenever the play button is used in the editor.
A lot of what you are describing is version control: snapshots (“commits”), being able to roll back changes, forking a project, comparing the differences between versions. Have you tried Codea Community or one of the Codea implementations of Git?
Nope, but I have done a quick search on google to read about it since you have mentioned it.
As far as I know, this requires wifi turned on with internet access, and I use Codea offline on my iPad. Plus, I don’t want to upload and share all of my code with users since some of my code will be used for commercial purposes in the future. Having a way to add these features without having to use an external app or use a wifi connection would be nice.
My suggestions would allow users to create better source code examples and tutorials in Codea since not all of the source code would have to be displayed in one go. By clicking on the forward and backward buttons to see all of the source code snapshots, a Codea user could see the project being built up line by line instead of opening a project and having to scan & decode 300+ lines of code, and not knowing where to start with it.
the Codea implementations of Git?
I’m not sure what this is, can you please explain this to me?
Git is a version control system, created by the inventor of Linux. On a computer you can have a local git repository, but on an iPad you are dependent on being online to use Git, so it doesn’t exactly match what you are describing. Basically, you implement a change, push the “commit” button in your git client of choice, add a comment that describes that change, and it is pushed up to your online account (or to your local repository, if you’re on a computer). In the git client, either online or on your machine, you can browse back through your versions (if you use a Mac, it’s a bit like Time Machine), and it shows you what has been changed on a line-by-line basis, showing insertions and deletions in different colours.
@adamskii_uk Why would you not use your internet while using Codea? Also, Codea Community projects are only shared publicly if you specify them to be, you can have them private if you want. (snapshots stored on the device would be very inconvenient for me imo, because they would take up lots of space. do I really want to save a bunch of backups of all my projects [over 500 MB] on my iPad, which is already low on space?)
Undo/redo is already a feature, and has a very big history (why would you need to roll back over 999 times, though?)
I don’t see your point with the tutorials. Can’t you just make a blog, like Ignatz did, and write an example like normal?
I don’t understand why you would have multiple projects in one tab, but if you had to, is it really that big of a hassle to add/remove a multi-line comment?
BTW, Codea Community does let you upload private projects, so you can use it for backup if you’re not ready to share (I think private is the default setting actually, you have to flick a switch to make it public). But the sharing aspect of it is awesome. I’ve learned a lot from the programs people have posted there, I would say it’s a must-install for all Codea users.
there is already a very neat way of presenting tutorials, one per tab, each with its own main and draw functions, and allowing the user to choose which one to run. Example here.
The tutorials in any tab can easily be copied to your own project and will run without any modification.
I believe this is simpler, clearer, easier to build, and better, than adding and deleting lines of code on the fly.
ok, fair enough. I didn’t realise everyone would be so against the idea. I’ll have to think more carefully next time if I plan on making any more requests.
I think our caution is more that we are very aware that the developers have limited resources (after all, we don’t pay them for upgrades), and we have to think carefully about what we ask for. If we get this, we don’t get something else - and there are other things we would like to get.
@adamskii_uk I like the idea of versioning Codea projects. I’ve been looking into doing this locally with libgit2 (i.e., keep a local git repository per-project). It’s a tough library to get a handle on, however!
Agreed on better undo, at the moment the undo history is killed when you run a project (because there is a potential for projects to change themselves, i.e., with saveProjectTab).
This post is just to clear something up that was mentioned in a private message between Ignatz and myself.
Here is my response to Ignatz:
Sure, I agree with you on the thread title. At the time of posting the thread
I couldn't think of a good title for it. I just wanted to make sure that my
thread got noticed amongst all of the other threads so I used the words
"awesome" and "revolutionise" to improve the odds of this happening, it
wasn't about bragging at all.
So again, I’m not bragging about my feature ideas for Codea, that was never my intention. I’m just excited about improving our Codea experience, like I did with suggesting in another thread that we have the ability to turn off the escape gestures in Codea.