NYCJUG/2008-09-09

From J Wiki
Jump to navigation Jump to search

NYCJUG meeting, interactive graphics, competition, promoting J


Meeting Agenda for NYC JUG 20080909

1. Introducing J: different approaches to introducing more people to J:
    A. Evangelize through competition on the web - see
        "evangelizingByCompetition.txt"
    B. Providing tools - see "Numerical Code in Demand.doc"
    C. Demonstrate J's usefulness - see "Distributions of Equity Returns.doc"
        and "Exercises from simple to not-so.doc".
    D. Conferences - see "AlgorithmsConferencesNYCJan2009.doc".


2. Hands-on workshop: Interactive Graphics - demonstrations, ideas for
development.


3. Advanced topics: getting a J task to respond to a shutdown request.

Proceedings

We changed the order of topics on the agenda as Thomas had to leave early and he was on our agenda to demonstrate an interactive graphing tool that he's been developing.

Hands-on workshop: Interactive Workshop

Since we have use of a nice, wired conference room courtesy of BEST, it was suggested that we take advantage of this by having interactive, hands-on code demonstrations.

So, Thomas showed us an interactive graphing tool he's developing. It's a work in progress and he welcomes input about it. Unfortunately, what he has now is too enmeshed in the system at work, so he can't make it available as a standalone system. However, he would like to help anyone who would like to develop an independent version of this project. It's the sort of project that would work well with collaboration on a Wiki.

He told us a little about the design and showed us what he had done so far.

Rationale

Thomas started developing this system as a way of studying the time series data instrumental to the financial models on which he works. The problem with the existing graphing in J is that it's too static - if you want to focus more closely on part of a time series, you have to select that portion of the data by hand and re-graph it. Also, as you're developing and tweaking a graph to get it the way you want it to look, you'll think of changes you want to make but it's often hard to introduce these changes without re-executing all the commands used to generate the graph.

His solution to this is to store all the parameters of a graph in an array, something like this:

+---------------...----+--------------------------------...-----------------------...
|+--------+-----...-+-+|+-------+----------+------------...-+-----+-------+-----+-...
||type    |line ... |1|||ID     |KEY       |DATA        ... |COLOR|PENSIZE|STYLE|B...
|+--------+-----...-+-+|+-------+----------+------------...-+-----+-------+-----+-...
||lbltype |text ... |0|||Series1|New Series|0.24153 0.37... |     |1      |     |0 ...
|+--------+-----...-+-+|+-------+----------+------------...-+-----+-------+-----+-...
||lblfrmt |date ... |0|||Series2|New Series|4 1 0 2 0 3 ... |     |1      |     |0...
|+--------+-----...-+-+|+-------+----------+------------...
||xlabel  |36000 36001 36002 3...
|+--------+-------------------...
||func    |(])                ...
|+--------+-------------------...
||title   |My Plot            ...
|+--------+-------------------...
||keypos  |rti                ...
|+--------+-------------------...
||xrange  |0 29               ...
|+--------+-------------------...
||yrange  |0 4                ...
|+--------+-------------------...
||xrange0 |0 29               ...
|+--------+-------------------...
||yrange0 |0 4                ...
|+--------+-------------------...
||panx    |0                  ...
|+--------+-------------------...
||pany    |0                  ...
|+--------+-------------------...
||zoomx   |1                  ...
|+--------+-------------------...
||zoomy   |1                  ...
|+--------+-------------------...
||width   |29                 ...
|+--------+-------------------...
||height  |4                  ...
|+--------+-------------------...
||width0  |29                 ...
|+--------+-------------------...
||height0 |4                  ...
|+--------+-------------------...
||viewinit|1                  ...
|+--------+-------------------...
+-----------------------------...

As may be evident, this structure contains all the parameters necessary to re-create the plot. Its layout is actually more complex than simple name-value pairs as evidenced by some of the top lines.

What it Does So Far

Thomas showed us a simple example using two sine waves. However, he has since sent me some screenshots showing more realistic data.

This first one shows a line plot with over 20 series each having about 850 data points. The x-axis is labeled with text showing dates. ScreenShot1.png

In the next view, we've zoomed in to show roughly two years of data in greater detail. ScreenShot2.png

Finally, we focus further on a subset with most of the series hidden and two of the series drawn in bold to stand out. ScreenShot3.png

This facility to allow the user to zoom in and pan the window across the data can be very useful for studying large data series. The rendering was very quick and smooth. He relies on J to re-draw the graph repeatedly as the parameter data gets changed. We had the idea of looking at it with many more points - we tried 15,000 - and it still worked well. Thomas commented that a single long series doesn't seem to present as much of a problem as multiple, long series.

Introducing J

We discussed different ways to "evangelize" J. Dan introduced the topic (and John responded - see these emails) by talking about some trouble he's been stirring up by entering various code competitions and comparison venues like Rosetta Code.

Advanced topics

How to I get a J task to respond to a shutdown request? I have a J task that starts (under Windows) when I login. However, when I shutdown, I get a message telling me the J task is not responding and asking if I want to end it. How can I make this task aware that a shutdown has started?

Scan of Meeting Notes

File:Nycjug20080909meetingNotes.pdf