Why Labs are Important
One of the most unique aspects of the J environment is the lab. Imagine that, a language with instructional support built in to the interface. Even more ambitious is that the support is provided not by page after page of description such as a man file in the unix system, – but by a series of ‘lectures’ followed by access to the entire J environment to experiment on all those new ideas – and it is all just a menu click away in the standard J user interface.
How Labs are structured
Lab files all end with the .ijt extension and can be opened in any text editor. So how are these labs structured to provide this facility? The format of the lab files is simply a specifically formatted text file which the J environment, interprets and presents as a living lab. The file starts with some identifying header information and then moves into the main structure. Each time you advance the file you get some new information in a section of the lab. Most sections have two parts: 1) a text message to the learner that ends with a single ‘)’ on its own line and 2) a series of executable J sentences and results that will be seen by the learner. Sections are combined to form chapters. the difference between sections and chapters is that J provides a way to jump between chapters but sections must be done in the same order each time. J labs can also do some hidden creation that the user does not see using the PREPARE keyword to bracket the section that will be executed invisibly. This allows the learner to focus on the lesson instead of developing the context of the lab. As a learner grappling with a new concept, the last thing you would want would be to perform a detailed series of instructions to create the results that you are trying to observe. This is also a reason that section need to be run in order because each lesson within the section may set up different parts of the environment and a misstep could result in very odd behaviour.
In a nutshell that is the mechanism behind the remarkable feature of the J language called labs. In future posts I will explore in greater depth the potential of labs when combined with HTML5 in the JHS environment and what approaches can be used to make these changes more effective. Eventually it would be good to create a tool that can easily create labs. I believe that it is by making the labs easier to create that we can actually involve more people in producing them and in that way develop an even more effective learning community for the J software language.