I can not post a comment on my own discussion.

denis.zaporozhan's Avatar

denis.zaporozhan

16 Mar, 2017 07:42 AM

A few days I can not add a comment for discussion (how swap columns and rows). After publication, the new comment simply disappears. Maybe I do not understand something.

  1. Support Staff 1 Posted by john on 16 Mar, 2017 08:53 AM

    john's Avatar

    Strange.

    I can see your comment on this new thread. We can pick up here if you want.

    Is there anything else you wish to add?

    John

  2. Support Staff 2 Posted by john on 16 Mar, 2017 08:57 AM

    john's Avatar

    Update. I just tried posting a comment to your original thread and it worked for me.

    Frederick said they have experienced problems with the 3rd party provider they use for this forum in the past. Sometimes you just have to keep trying.

    John

  3. 3 Posted by denis.zaporozha... on 16 Mar, 2017 10:07 AM

    denis.zaporozhan's Avatar

    Thank you for writing me!
    Here is my comment that I could not publish:
    Hello, John!
    For some reason I can use the created by you node, but I can not repeat it myself. It seems that the nodes on the subnet and outside of it work differently. At some point even your network stops working (apparently this is a bug of the program) helps to move the file. Can not be repaired) but if copied to another project, the node works as it should.

  4. Support Staff 4 Posted by john on 16 Mar, 2017 04:51 PM

    john's Avatar

    Hi Denis,

    I think I may know what is going on...

    One of the most subtle and confusing features of NodeBox is the distinction between list and value when creating subnetworks. It is all-important, yet invisible, and not at all obvious how to define.

    Whenever you create a subnetwork you can set each port's "range" to either "value", meaning take items one at a time, or "list", meaning take all items at once. It's a crucial distinction. Subnetworks will not work properly unless each port is set in the right way.

    To set these port ranges, you must select the node, then click "Metadata" above the parameter pane near the top right corner of the window. This will open the Metadata dialog.

    On the left you will see each port listed. Click on each port to see its settings on the right. Halfway down the screen you will see the harmless-looking "Range" setting. This is where you choose between List and Value.

    Here are the correct settings for the two subnetworks in my transpose network:

    • Transpose Node:

      • table: set to "List"
    • Assemble Node:

      • data: set to "List"
      • column headers: set to "List"
      • values names: set to "Value"

    Please have a look at the transpose network you recreated yourself and see if setting those values properly solves your problem. Please let me know either way.

    (My apologies if you already knew all about this.)

    I am really glad you are taking the trouble to recreate this node and teach your students about it. I have never tried teaching NodeBox, but I would guess that students would be easily confused by subnetworks.

    As a user experience designer I can think of a number of ways to make this feature less confusing:

    • The port nubs should appear slightly different (e.g. list ports could be little rectangles as they are now and value ports could be slightly curved or sloped like truncated pyramids).
    • Perhaps the connecting links should appear different as well, maybe solid lines for links leading to list ports and dotted lines for links leading to value ports.
    • Instead of "list" and "value" I would consider using "all at once" and "one at a time".
    • When publishing a node you should be forced to declare your choice; instead of just choosing "publish" you should choose either "publish with input all at once" or "publish with input one at a time"
    • There should be much better documentation and examples available for this crucial feature.

    (I include this just in case Frederik bothers to read this. Perhaps I will also publish it as a separate suggestion to increase the odds. As with all UI changes, I would want to test these ideas with students to see if they really do help.)

    I hope this solves your problem. Again, please let me know either way.

    John

  5. 5 Posted by denis.zaporozha... on 17 Mar, 2017 10:49 AM

    denis.zaporozhan's Avatar

    John, I managed to reproduce your example from beginning to end!
    Indeed, I did not correctly set the settings of the pins.
    If I'm honest, I always get confused about this and do not understand when it's right.
    But I thought that subnets are a tool for optimizing working space. To ensure that the set does not expand too much, some of its fragments are combined in a subnet.
    I tried to repeat your example without podsetet, and I did not succeed.
    One to one as you - everything works.
    Probably this is the dark power of electricity :) (joke)

  6. Support Staff 6 Posted by john on 17 Mar, 2017 08:09 PM

    john's Avatar

    Denis,

    Oh good - I'm glad it worked.

    Even after years of working with NodeBox, I am still sometimes confused by subnets. Here are the two things I have learned:

    1 -- Subnets are NOT a tool for optimizing workspace.

    This is how subnets are used in other visual languages. NodeBox's lone tutorial on the subject suggests that's how they work. I wish there was a mechanism in NodeBox that worked that way. But that's not how subnets work.

    Grouping nodes into a subnet will often change behavior. Grouping multiple nodes into a subnet turns the group into a single function, with all inputs arriving simultaneously at the top. If that's not how the group was configured this will change the timing, and timing is everything in NodeBox. Moreover, input ranges will be assigned as List or Value effectively at random; the more the inputs, the more chance one of these settings will be wrong.

    2 -- Many things in NodeBox can only be done using subnets.

    Transpose is a good case in point. I don't think transposing a table in NodeBox would be possible without a subnet like my Assemble node. Subnets, with careful use of the List and Value settings, are the only way NodeBox has of controlling the timing of inputs and outputs across multiple nodes.

    So understanding subnets is not really optional. You won't get very far until you do.

    The trick is learning how to think functionally. Think of what you want to do in terms of a function that will fire each time it receives a set of inputs.

    Value inputs will fire once for each value in the incoming list. If there are multiple value inputs, one value will be pulled in from each stream; if there are an unequal number, streams with less values will wrap. List inputs will be pulled in all at once each time the function fires.

    For example, Assemble produces a new row of the transposed table each time it fires.

    • It takes in the original table all at once as a list to do lookups on.
    • It takes in a consistent set of column headers for the new table all at once as a list (formed by appending the string "Value" to all the row headers in the original table).
    • It takes a set of lookup keys one at a time as a set of individual values (formed by taking all but the first key from the original table). Each key value provides the content needed for one row; Assemble will fire once for each key value supplied.

    If you can frame your goal in this way, subnets will start to make more sense. I now use them constantly. Someday I'd like to produce an animation (using NodeBox of course) to show how subnets work in action.

    Thanks for reading all of this. I hope that, as a teacher, you will be able to transmit this understanding to your students.

    Thanks,

    John

  7. 7 Posted by rioch on 17 Mar, 2017 11:43 PM

    rioch's Avatar

    Thanks John for your detailed answers, I've learned quite a few things from them...
    About subnets I usually fiddle a bit with the setting until it works, having some visual indication as stated in the other thread would be nice -maybe also an indication that a node can be 'expanded' other than the icon-

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

16 May, 2024 02:11 AM
16 May, 2024 01:58 AM
14 May, 2024 01:29 AM
13 May, 2024 12:36 AM
12 May, 2024 07:46 PM

 

05 May, 2024 04:38 PM
03 May, 2024 06:50 AM
03 May, 2024 12:30 AM
03 May, 2024 12:09 AM
19 Apr, 2024 04:41 AM
16 Apr, 2024 06:18 PM