intfiction.org

The Interactive Fiction Community Forum
It is currently Sun Oct 22, 2017 5:46 pm

All times are UTC - 6 hours [ DST ]




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

Joined: Mon Dec 07, 2009 9:14 am
Posts: 160
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: 959
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: 160
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


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