intfiction.org

The Interactive Fiction Community Forum
It is currently Thu Dec 14, 2017 1:27 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Thu Oct 12, 2017 7:32 am 
Offline

Joined: Mon Dec 07, 2009 9:14 am
Posts: 175
Location: Chicago, IL
Here's an example of what I'll be doing with some of the classes I'll be using TADS 3 with.

GitHub link: learn_with_tads

These classes will be mainly for younger kids but also for anyone of any age who wants to learn a bit of programming in a fun context.

More Details and Rationale

One of the issues I've always had with getting Inform into these contexts is that Inform 7 looks nothing like any other programming language. There's a bit of a "coolness" factor to it -- but once you realize people want to easily transfer those skills, that coolness loses a bit of its sheen. Unless you are catering to a group that only wants to learn interactive fiction (a very small segment), you limit transferable skills quite a bit. Inform 6 is a little better but structurally it's very unlike many programming languages when you compare it. Consider how functions look for example: [ Initialise; ]; I do think there's a lot of elegance to Inform 6, actually, but it just doesn't translate as well in my experience.

Regarding TADS, a few points stand out from a learning perspective:

  • With TADS 3, I have a build-type system. So I can at least get people thinking about tools like make, Maven, Gradle, Rake, Gulp, etc.

  • I don't have to rely on the artifact crutch of an IDE (but I can in a Windows context). It's very important to learn to program outside of an IDE. I can get people thinking about the command line and learning not to fear it.

  • I'm using some existing "testing" extensions and reframing them as tSpec (for internal test scripts) and tUnit (for assertions and expectations). Thus I can teach different levels of testing, not just of the game but of the code itself, and use terminology (xUnit, xSpec) that is out there in the industry.

  • The TADS language itself has much of the structure and operating model of languages like C#, C++, and Java. For example, the #include process is very much like importing (Python), requiring (Ruby), or using (C#) and, of course, the import of C and C++. Even the notion of templates translates well into aspects of Clojure or Scala.

  • TADS also has an (allegedly) "complex" library. And that's good! People who want to get into programming ecosystems often have to deal with large and complex APIs or libraries (again: C++, Java, JavaScript, C#, etc) and learn to navigate them. This can also lead into teaching about reducing complexity by providing abstractions.

  • The fact that an alternative library exists (adv3Lite and even adv3Liter) can be used as a means of showing that sometimes you will have competing libraries, which calls for making choices and tradeoffs.

  • The fact that I can structure the language with the ending semicolon or the { } allows me to prepare people for different language styles. For example, JavaScript, Java and whatnot with the {} but something like Ruby with its use of "end". Further, in some languages semicolons are not needed or at least not required in some cases (Python, Ruby, JavaScript) and that matches how TADS can be used as well.

If nothing else, this should be an interesting experiment.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Oct 12, 2017 3:05 pm 
Offline
User avatar

Joined: Tue Apr 20, 2010 2:48 pm
Posts: 965
Location: Greece
One thing to look out for is that "using" in other languages does not translate into any TADS mechanism. "#include" is not it (TADS 3's "#include" doesn't even translate that well to C or C++.) In fact, the closest "using" equivalent in TADS is to add a .t (or .tl) file to the build, which in other languages would be the equivalent of adding a "using" or "import" statement in all source files in the project.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Oct 12, 2017 4:20 pm 
Offline

Joined: Mon Dec 07, 2009 9:14 am
Posts: 175
Location: Chicago, IL
Yep, understood on that. But from a purely conceptual point of view the idea is "including something from somewhere else into my code" -- meaning "having some thing at the top of my code that somehow brings in other code." The fact that there are differences is actually part of the point. Conceptually things can be similar but the specifics can be quite a bit different: something all budding programmers have to learn.

You do bring up a very good point about the library aspect as well, in terms of the .tl files. I'll definitely be sure to expose that a bit more.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Nov 22, 2017 4:02 pm 
Offline

Joined: Wed Nov 22, 2017 3:39 pm
Posts: 2
Dear Jeff,

I am a Czech TADS3 fan, very interested in playing and of course programming IF. TADS is truly my first programming language, as a linux administrator I have not any previous experience with it. Exactly how you write, Inform is not similar to C++ od Java, but TADS is, so I am sure, that any experience with it I will use in the future with linux C and C++ programming.

I am very interested in your examples, but the url:

https://github.com/jeffnyman/learn_with_tads

is not accessible. I had examined your git and found TADS plugin for Atom or Sublime, but nothing about your very interesting experiment. Can you please check your git and recover the files or if it is possible to send it as an attachment?

Nice day to you

Ludek Stastny
Czech republic


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Nov 25, 2017 4:36 pm 
Offline

Joined: Mon Dec 07, 2009 9:14 am
Posts: 175
Location: Chicago, IL
krouziciorel wrote:
I am very interested in your examples, but the url ... is not accessible. I had examined your git and found TADS plugin for Atom or Sublime, but nothing about your very interesting experiment. Can you please check your git and recover the files or if it is possible to send it as an attachment?


Ah, yes, sorry about that. I have attached the zip of the repo to this post. Fair warning: it's not much right now, just the basis. The reason I took it down from GitHub was due to some organizational changes I might do. As part of those changes, right now I'm also looking at providing a tutorial for writing a library in TADS 3. Essentially taking something like Adv3Lite but showing how to build it -- or at least a good portion of it -- from the ground up.

Part of this is also involving a "drastic" cleanup of the existing documentation, essentially refining it and making it a lot more concise.

Note that this is not any changes to the "official" documentation nor will I be submitting them to anyone in that context. Rather, it's all just based on streamlining the TADS 3 learning experience.


Attachments:
learn_with_tads-master.zip [8.77 KiB]
Downloaded 6 times
Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Nov 25, 2017 7:22 pm 
Offline
User avatar

Joined: Sat Sep 09, 2017 5:57 pm
Posts: 31
Location: Under the rainbow
Hi Jeff,

I am looking forward to following your project. I also hope to use TAD 3 in a learning environment but the same as yours. More from the sharing side. I have examined many of the IF development systems. I am most comfortable with TADS 3 due to a modest c/c++ background. I expect to use Twine for very young students but TADS for secondary and beyond.

Please post as your development continues. I will also begin to post as my project develops as well.

Thank you,
v/r
fos1 (also Jeff)

_________________
https://faroutscience.com


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Nov 27, 2017 1:58 am 
Offline

Joined: Wed Nov 22, 2017 3:39 pm
Posts: 2
Good Morning,

many thanks to your files, I have examined this and I am excited. I met in the past with unit tests and test driven development, so TADS3 Unit Tests are very suitable to me, TADS is modern object language and as I hope suitable to be a first programming language for students and maybe older childrens. In the past I met Python for Childrens book, but as an IF fan I prefer this form of learning of course.

I join the wishes of fos to share your next development.

Have a nice day

Ludek


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group