[Newbies] Feedback: Using Output as the Next Input

Ralph Johnson johnson at cs.uiuc.edu
Sat May 2 14:26:40 UTC 2015

Writing to a file is very similar to writing to the transcript.  You need
to open a writestream on the file, then you write to it.

If I were writing the data out, I'd probably try to write it out as a CSV
(comma separated values) so that I could read it into a spreadsheet.

If you want to make it easy for people who don't like computers, perhaps
you should make a GUI for it.  The GUI might list all the drawings in the
top pane.  When you select a drawing, you get to see its contents in the
bottom pane.

I assume that when you run drawn2012 it returns some kind of data structure
that gives you the drawing for 2012?

My son had something like this.  He had his program send each person email,
telling them who they drew.  If you wanted to do this, you could focus on
how to send email instead of on how to make a GUI.

I'm not sure what your motivation is here.  Is your main aim to learn a
little Smalltalk?  To make a useful tool for yourself?  To make a useful
tool for someone else?  These are all worthy goals.  My advice would depend
on your goal.  And of course, goals change.  You might have started out
just wanting to learn Smalltalk but now you just want to make a tool that
someone else can use so you don't have to be in charge any more.

On Sat, May 2, 2015 at 8:07 AM, Dan Norton <dnorton at mindspring.com> wrote:

> Dumb questions can have uses after all. Thank you Hannes and Ralph for
> your thoughtful
> responses. You must have been digging into the archives - my original post
> was nearly a
> year ago.
> Perhaps it is time to say what I chose to do. Design of Secret Santa was
> driven by:
>    1. A desire for simplicity
>    2. Relatively infrequent use (annual)
> Input is a text file listing the names of participants. A pair of names on
> the same line denotes
> a couple. Output consists of the result of drawing names, compiled as a
> class method.
> Method names are serialized: drawn2012, drawn2013, ...
> The Transcript shows the latest drawing, as a Dictionary, which is
> compiled. Below that in the
> Transcript are the statistics (iterations, rule violations). The image
> must be saved.
> I would appreciate any thoughts on application delivery. The above is a
> very crude, if not
> non-existent, way to deliver an app. Use of external files for output
> would improve things a
> little. Isn't it possible to do better than this for a Smalltalk app? What
> if the user is not a fan of
> computers?
>  - Dan
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20150502/277e6d61/attachment.htm

More information about the Beginners mailing list