Skip to content

Add an Ops philosophy#112

Merged
hinerm merged 1 commit into
mainfrom
scijava/docs/ops-philosophy
Jan 23, 2024
Merged

Add an Ops philosophy#112
hinerm merged 1 commit into
mainfrom
scijava/docs/ops-philosophy

Conversation

@gselzer

@gselzer gselzer commented Dec 29, 2023

Copy link
Copy Markdown
Member

This PR adds a new page to the documentation to describe the philosophy of Ops (i.e. "Why Ops").

I'm a bit wary of whether this document makes sense for the audience, so I'm looking for heavy critique from @ctrueden @hinerm @elevans before merging

Closes scijava/scijava#143

@gselzer gselzer added the documentation Improvements or additions to documentation label Dec 29, 2023
@gselzer gselzer self-assigned this Dec 29, 2023
@elevans

elevans commented Jan 4, 2024

Copy link
Copy Markdown
Member

@gselzer So far I like the document and it helps me understand the "gap" that SciJava Ops will fill in the image algorithm space. What I would like to see added to the document at some point is some text that helps soften the blow of the (from my perspective) unusual syntax of a SciJava Op call (i.e. ops.op("filter.gauss").arity2().input(Img, 3.0)). Specifically, I'm expecting people to really be thrown off on why they need to specify the input arity for their Op call. Some text that says "this is why we do this and why its best" would be great!

@gselzer

gselzer commented Jan 4, 2024

Copy link
Copy Markdown
Member Author

@elevans thank you for taking a look.

What I would like to see added to the document at some point is some text that helps soften the blow of the (from my perspective) unusual syntax of a SciJava Op call (i.e. ops.op("filter.gauss").arity2().input(Img, 3.0)). Specifically, I'm expecting people to really be thrown off on why they need to specify the input arity for their Op call.

Yeah, that's needed, although we might argue that it is better to put that discussion elsewhere. Is there not something like that in the Calling Ops page of the documentation?

Some text that says "this is why we do this and why its best" would be great!

I don't think I can write this well, having been an opponent of this change. @hinerm or @ctrueden I would really appreciate if one of you could write this section because as proponents of this change you may be able to better convince users that it is worthwhile.

@hinerm

hinerm commented Jan 17, 2024

Copy link
Copy Markdown
Member

What I would like to see added to the document at some point is some text that helps soften the blow of the (from my perspective) unusual syntax of a SciJava Op call (i.e. ops.op("filter.gauss").arity2().input(Img, 3.0)

I don't think I can write this well, having been an opponent of this change. @hinerm or @ctrueden I would really appreciate if one of you could write this section because as proponents of this change you may be able to better convince users that it is worthwhile.

You do not need to say ops.op.arity - you can write ops.binary. As I said here, separating arity and input type to two steps in the builder gives you an additive number of choices to make, and you never see more than [max arity] options at a time, while combining them in a single step gives you a multiplicative number of choices.

And as @ctrueden wrote, this API is Java-developer-focused (e.g. programming from an IDE). We can write convenience layers on top for python/scripting for users, as needed.

I vote against API-level documentation or explanation in this philosophy document.

@hinerm hinerm force-pushed the scijava/docs/ops-philosophy branch 2 times, most recently from 6d7d982 to 47c1842 Compare January 19, 2024 19:23
Comment thread docs/ops/doc/WhyOps.md Outdated

While it may currently seem that way, SciJava Ops is designed to *wrap* existing algorithms, not to create new ones (although you can certainly do that!)

To that end, SciJava Ops

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gselzer did you have more written that goes here? Do you have more sections planned?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hinerm I just wanted to write something along the lines of "SciJava exposes a rich API for declaring Ops from arbitrary sources, spanning libraries and programming languages". Sorry I forgot!

@hinerm hinerm force-pushed the scijava/docs/ops-philosophy branch from 47c1842 to 32e55be Compare January 19, 2024 20:54
@gselzer gselzer force-pushed the scijava/docs/ops-philosophy branch from 32e55be to 6d93ee1 Compare January 23, 2024 15:18
@gselzer gselzer marked this pull request as ready for review January 23, 2024 15:18
@hinerm hinerm merged commit e5bdf3e into main Jan 23, 2024
@hinerm hinerm deleted the scijava/docs/ops-philosophy branch January 23, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

Create a "SciJava ops philosophy" document

3 participants