A long-distance friend of mine (ie: we're separated by the Atlantic Ocean) recently made a good point as we swapped emails comparing 'Tales Animator' and 'Scratch'. In most programming languages, it is relatively easy to construct long programs and still be able to read them quite easily. Certainly you can usually print out listings to study them. How are more experienced or advanced users of Scratch coping with the apparent inability to do anything like this? (eg: In 'Tales Animator' you can't print a listing, but you can copy the text and paste into a word processor. In MSWLogo, you can print whole listings at will.)
My own programming experience goes way back to the days of naming subroutines and calling them as necessary. That of course, was when you REALLY needed to be able to print out a listing.
I'm fully aware that Scratch is designed primarily for younger users and I'm 100% in support of that, together with it's uniquely clever GUI and method of inputing and constructing programs. But isn't it quite feasible that many users will want to grow with the program and create ever more complex (and lengthy) listings? Many, hopefully, will move on to other software, but many, I guess, will want to stay with Scratch.
So, after all that rambling - how are more expert users of Scratch finding it as they develop long programs, many of which will presumably have Scratch-equivalents of subroutines, nested loops, procedures etc. etc.
And is it envisaged that there will ever be a way to print out listings so as to study them? I've already noticed a few 'conversations' in the forum as members try to explain in words their Scratch programs or try to suggest solutions to problems. Some even revert to trying to translate these into the normal text-style presentation that I'm referring to.
Offline
Holding the Shift key while clicking on the Extras button will give you the option to Write Project Summary which will save a text listing of your programme - each script roughly equatable to ye olde sub-routines.
I agree these forums are not ideal for exchanging coding examples. I set up a gallery specifically for providing help but am not sure that that is the answer either.
Offline
Thanks Duncan.
Is that tip listed in any of the documentation, I wonder?
I've tried your idea and see the option in the pull-down menu. I did a couple of tests but can't see where it saves the file so that it can opened in something like Notepad (I assume that's the format). There's nothing in clipboard (which was my first assumption).
Can you solve that mystery as well?
Last edited by mohlar (2007-05-28 12:59:47)
Offline
I normally write rather large programs in c++ (one of the ones I'm working on is about 70,000 lines of code). So I don't do printouts---I have no desire to try to thumb through over a 1000 pages of code. I rely on using emacs and viewing the code on screen.
I don't think scratch could create programs that big, and the current mechanisms are adequate for the tiny programs that scratch is relevant for.
Offline
kevin_karplus wrote:
I don't think scratch could create programs that big, and the current mechanisms are adequate for the tiny programs that scratch is relevant for.
70,000 lines. Yes, I agree. But even with moderately complex programs it is easy to end up scrolling up and down a column of blocks. Although these are VERY well thought out and cover pretty well everything a 'Scratcher' will need, by their very nature they occupy a lot of space. If you're having to scroll up and down, it can become rather confusing.
Offline
Mmmm - that's what I assumed, but I've tried 3 or 4 now and can't find anything.
Has anyone else tried this on a PC? In my case, Scratch is on my 2nd hard drive (D) whereas C: is my main drive. I wonder if I need to move the whole folder there?
Offline
I tried the "write project summary" and "write multiple project summaries" on my Mac, and nothing appeared anywhere. I looked over all the likely directories and did searches with the finder, to no avail.
I think that the "write project summary" option is not working in the release version.
Has anyone outside the Scratch Team gotten it to do anything?
Offline
My own Projects (Scratch 1.1) saved within the Projects folder within the Scratch folder produce a file called ProjectName-summary.txt in the Scratch folder. It does not seem to work with the sample projects that come with Scratch.
Offline
This is what I love about Scratch and this forum - no sooner do you ask something than there's a good chance someone will leap in with a suggestion. AND the fact that members of the development team obviously keep an eye on what's being discussed makes this a VERY lively and positive project.
Offline
Somewthing that would help would be a good old fashioned REM statement - a block (in a contrasting colour) that you can type text into but that has no effect on the running of the program.
Would be useful in debugging, but even more useful when sharing code.
Offline
Hi all,
I just tried this on my PC, and it seems to work. It automatically creates a .txt file in C:\Program Files\Scratch (this is where the Scratch folder is located on my computer).
As Duncan pointed out, the name of the .txt file is <name of project>-summary.txt, so it might help searching for that file on your computer to see exactly where the project summary is located.
I also tried it with a few of the sample projects, and that seems to work as well.
Please let us know if you are still having problems and which versions of Scratch you are using (it only works in version 1.0.2 and higher).
Thanks again for the detailed reports!
-Tammy
Offline
Using Scratch 1.1
Just copied my entire Scratch file onto my C: drive; put it into Program files and tried again by using shift/extras/write project summary.
Nothing has appeared.
I've also used *.txt as the basis for a search of both hard drives and - you guessed it - nothing.
I must be doing something wrong. Is this working for everyone else? I can feel a Homer Simpson Durrrrgh coming on.
Offline
On Mac OS X (10.3.9) running Scratch VM 3.8.14b7y (which says Scratch 1.1 on the window title), I get no effect from "write project summary". I did searches to look for the file and there is nothing on the hard disk that might be it.
Offline
kevin_karplus wrote:
I did searches to look for the file and there is nothing on the hard disk that might be it.
Ditto on my PC.
There must be a reason for this apparent variability of success - but I've no idea what it is.
Offline
Hi, all.
The "write project summary" is not documented and it is difficult to find (using shift to get that option) because it's not intended for most a Scratch users. We use it sometimes to look at the code for projects and it's fine for others to use it as well; if they manage to find out about it they are probably experienced enough to understand what it does.
Two possible explanations for the problems:
a. be sure to release the shift key before you make the menu selection
b. make sure the Scratch folder is writable by you when you do this
Happy hacking!
-- John
Offline
The folder is writable, and I released shift as specified.
There was still nothing written.
Offline
Just printed out the program for "Endless Road" by Red Neptune (great program, by the way) and, like him, had no problem getting the listing. The program appeared in the same directory as I had installed Scratch and was quite readable (I'm on a PC using XP).
I did note the listing does include formatting - it looks much better in WordPad, for example, so I suspect it may actually be an .rtf file or something similar. Can't see why this would cause the problem - but don't see anything else either.
Offline
johnm wrote:
Two possible explanations for the problems:
a. be sure to release the shift key before you make the menu selection
b. make sure the Scratch folder is writable by you when you do this.
OK - THAT's the answer. Just being instructed to hold down shift and press Extras isn't quite enough. Johnm's point (a) is the key.
So it's .....
Press Shift and also choose Extras with the shift key still being held down.
The drop down menu appears with the option to 'Write project summary'.
Release the shift key.
The dropdown menu stays visible.
Click on 'Write summary project'.
Two things now happen - The text listing is saved as a file in your main 'Scratch folder)
and - The text listing is held in memory and can be pasted into
any wordprocessor that you prefer.
I'll start a new thread in this forum just for this solution so members don't have to trawl through the whole dialogue.
Offline
Actually, there is still a bug. My Mac OS X version still doesn't write the file.
It is true that the copy buffer gets the text, which I had not been aware of, so there is a very ugly workaround for this bug.
Offline