wpilibsuite / wpilibsuite/systemcore-blocks-interface

Notes on middle section of menu/toolkit

Open
#348 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
9
Forks
11
Avg merge
5d 5h
Merged PRs (30d)
6

Description

New Blocks is looking good!

This post is not a typical Github “Issue” to suggest a specific correction. It’s a simple comparison of New Blocks to Legacy Blocks, limited to one section of the menu/toolkit.

It includes a few minor points that developers may wish to implement with PRs. Please disregard, if this is not the right place for such comments.

The middle section reviewed includes these New Blocks headings:

  • Test
  • Logic
  • Loops
  • Math
  • Text
  • Lists
  • Miscellaneous

=============

Test

This section contains only call Print. It seems to duplicate the print Block added under Text. See below for a question about that New Block (and this one).

Logic

The only change I noticed was null to None. I looked it up and found that None is a special Python constant similar to Java’s null. Namely it’s not the text string “None”, or the number zero (“none”).

The pop-up balloon says only: “Returns None”. Hopefully students will use this only in the Logic Compare Blocks. It does click into New Blocks for Math and Create Text With; not sure how it’s processed there. (I can’t run New Blocks to find out.)

Loops

Seems unchanged.

Math

I noticed only a change in the pop-up balloon for atan2 as follows.

Legacy Blocks:

Returns a numerical value between -180 and +180 degrees, representing the counterclockwise angle between the positive x axis, and the point (x, y).

New Blocks:

Returns the arctangent of point (X, Y) in degrees from -180 to +180.

I was going to comment here that I personally favor the longer description for younger programmers (pre-trigonometry). But then I realized the New Blocks description is technically incorrect:

atan2 is a more comprehensive version of arctan that takes two arguments (y and x) and determines the correct quadrant for the resulting angle, providing a full range of (-pi ,pi) or (-180,180) degrees. In contrast, arctan takes only one argument (y/x) and its output is limited to the range (-pi/2, pi/2) or (-90, 90) degrees, making it unable to distinguish between opposite quadrants.  

Text

This menu contains 3 New Blocks not offered in Legacy Blocks:

  • replace - “occurances” should be “occurrences”
  • reverse
  • print - where does this ouput appear? Will this be replaced with broader Telemetry options?

Lists

  • adds Reverse

  • Find first occurrence now returns -1 instead of 0, when item not found. Seems OK, forces special handling?

Also, get # and set # both change first item from #1 to #0. I presume this was an intentional move away from Legacy Blocks’ (gentle) treatment for younger programmers not yet familiar with the “zeroth” item.

Without commenting on that decision, I would simply mention that the next Block Get sub-list from # to # needs to use (and document) the same new convention, starting from zero. (I can’t test New Blocks to confirm.)

Miscellaneous

This section contains only 2 of the 8 Legacy Blocks; perhaps more are coming later.

For the New Block evaluate but ignore result comment balloon, consider changing “function” to “Method” (per New Blocks).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are identified. Start by locating the New Blocks menu/toolkit definitions and their pop-up text, then compare the Test, Logic, Math, Text, Lists, and Miscellaneous items with the reported Legacy Blocks behavior. Done requires an agreed scope, corrected wording where appropriate, and confirmation of the uncertain block behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.