JSAV Development Library

6 replies [Last post]
shaffer
shaffer's picture
Offline
White BeltYellow BeltGreen BeltRed BeltBlack Belt
Joined: 2009-05-28
Posts:
Points: 2009

We have now "released" a preliminary version of the JSAV (JavaScript Algorithm Visualization) library, whose purpose is to help people develop AVs in JavaScript. Release 0.1 does not do a whole lot yet. Support is provided for three things right now:

* Writing messages to the user

* Laying out and manipulating the contents of an array

* Creating a "slideshow" presentation.

Obviously there is a long way to go, but this is enough for us to have created two examples: We redid the Shellsort performance example posted earlier using the library methods, and we wrote a Shellsort "slideshow" presentation.  There is also preliminary documentation for the library API.

You can get at this in two ways right now. To check the library source, examples, etc. out of the OpenAlgoViz SourceForge repository, do:

svn co https://openalgoviz.svn.sourceforge.net/svnroot/openalgoviz/OpenDSA OpenDSA

Or you can access the file directly at: http://algoviz.org/OpenDSA/trunk/

Feedback on this is appreciated!

 

shaffer
shaffer's picture
Offline
White BeltYellow BeltGreen BeltRed BeltBlack Belt
Joined: 2009-05-28
Posts:
Points: 2009
Re: JSAV Development Library

The SourceForge version of JSAV is actually not our active development version, but something more like "stable releases" (to the extent that anything can be stable this early on).

Ongoing development is taking place at Ville’s Github repository. You can find this at:

https://github.com/vkaravir/JSAV

Look at the bottom of the page there for information about how to download and then setting things up. If you are new to Git, then you will need to install it. Some basic commands to get you started are included in our "Readme" file. You will also need to run "make".

 

naps
Offline
White BeltYellow BeltGreen BeltRed Belt
Joined: 2009-06-11
Posts:
Points: 65
Re: JSAV Development Library

 The paradigm to create an AV in the JSAV support library can hopefully be viewed as extending the interesting event paradigm that has been used for AV since the days of Marc Brown. That is, start by coding the algorithm. Then …

  •  Identify start-interesting-algo-event / end-interesting-algo-event
    •  Essentially this is done using the JSAV step function as markers for the interesting events
  •  Within that start / stop indicate pedagogical annotations
  •  Rendering annotations for the data structures being manipulated
  •  Oral annotations, that is, audio accompaniments
  •  Question annotations — add a pop-up question to be administered at this step
    •  Should the answer of the question be "assessed"
  •  Simulation annotations — add a TRAKLA-like activity at this step
    •  Should the results of this activity be "assessed"
  •  Pseudocode annotations
  •  Input (content) generation exercises, e.g, ask the user to enter some data that will make the next step behave in a certain way
    •  How to assess?

Concerns

  • All we have right now is the shell-sort example. All the JSAV code in that example to do something relatively simple (array) and something that only what I have called "rendering annotations above could be seen as intimidating by somebody wondering whether they should get involved in the development component of the Active E-book project.  Things will get exponentially harder quickly as we being working with more complex data structures than array and as we offer annotation capabilities described above.
  • In terms of structuring the JSAV library in a way where many developers might be attracted to contribute to the project, we need to have examples that, as much as possible, exhibit really good software development practices
  • As we begin working on the more complex issues, I’m almost certain that some of the computation will need to be shifted to a server somewhere.
    • Graph layout, assessment, …
    • Will the need for the server become so pronounced that using the Active E-book when you’re not "connected" will not be a realistic option?

 

ville
ville's picture
Offline
White BeltYellow BeltGreen BeltRed BeltBlack Belt
Joined: 2009-05-28
Posts:
Points: 559
Re: JSAV Development Library

naps wrote:

  • Oral annotations, that is, audio accompaniments


Do you see the content of these oral annotations to be something else than the textual descriptions of each step that are in the current Shellsort AV? In any case, I think these should be pretty simple to add using some library like SpeechAPI.


naps wrote:

  • Simulation annotations — add a TRAKLA-like activity at this step
    • Should the results of this activity be "assessed"
  • Input (content) generation exercises, e.g, ask the user to enter some data that will make the next step behave in a certain way
    • How to assess?


For both of these, do you mean that any step in the AV could potentially be just a step in slideshow, interactive simulation, or input generation step? This will make things quite difficult, especially the input generation.
naps wrote:

All we have right now is the shell-sort example. All the JSAV code in that example to do something relatively simple (array) and something that only what I have called "rendering annotations above…
As we begin working on the more complex issues, I’m almost certain that some of the computation will need to be shifted to a server somewhere.

  • Graph layout, assessment, …
    • Will the need for the server become so pronounced that using the Active E-book when you’re not "connected" will not be a realistic option?


Obviously, we have to start somewhere. I don’t see the limited features of the library as a big problem, since I think we all have a pretty good view on what features AVs should have.


As for the server side computations, I think a lot of the things can be done on the client. Especially in browsers that support WebWorkers that enable computationally heavy operations to be run in the background. Reliable assessment cannot be done on the client, though.

Ville Karavirta, Aalto University, http://villekaravirta.com/

shaffer
shaffer's picture
Offline
White BeltYellow BeltGreen BeltRed BeltBlack Belt
Joined: 2009-05-28
Posts:
Points: 2009
Re: JSAV Development Library

Ville — On the other hand, the shellsort walkthrough is already straining my mobile, I think due to the big amount of space/precomputation done to prepare the slideshow. But maybe the optimizations that we have talked about will help this.

 

shaffer
shaffer's picture
Offline
White BeltYellow BeltGreen BeltRed BeltBlack Belt
Joined: 2009-05-28
Posts:
Points: 2009
Re: JSAV Development Library

naps wrote:

  •  Simulation annotations — add a TRAKLA-like activity at this step
    •  Should the results of this activity be "assessed"

 

One thing that I would like to encourage is that people break things down into pieces as small as are reasonable. For example, in the Shellsort storybook, I have the exposition (slideshow) separate from an "AV" for shellsort, which is also separate from the TRAKLA-style proficiency exercise, and then there is the performance activity. The slideshow/exposition and the performance activity are already implemented, I plan to work on the AV version for Shellsort next so that people can see what I mean by making the distinction. The proficiency exercise will have to wait until the library includes the necessary support.

The reason to break it into smaller pieces is that it becomes easier to reuse. I am actively looking into mechanisms to support "modularity", in particular, good ways to embed an active component into other web pages. This will make it easy for instructors to use just those pieces that they want (they could easily make a simple HTML page with the desired activities embedded).

I will post about that and make a page for the issue at the Wiki soon.

 

naps
Offline
White BeltYellow BeltGreen BeltRed Belt
Joined: 2009-06-11
Posts:
Points: 65
Re: JSAV Development Library

 Cliff Shaffer writes:  "The slideshow/exposition and the performance activity are already implemented, I plan to work on the AV version for Shellsort next so that people can see what I mean by making the distinction."

 

That distinction between a slideshow and an AV is something that needs clarification because I think of the slideshow for shell sort as being one form of an AV.   So seeing how the shellsort slideshow will differ from the shell sort AV, in content and (equally important) in development methodology, will be enlightening.