-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agg builder blog post #2
base: v2.x
Are you sure you want to change the base?
Conversation
operators or even stages, so we wanted to make sure that we can easily expand | ||
the builder. | ||
|
||
We could try to rely on generative AI to help us with this, but this only goes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please tell me "generative AI" here was intended as an SEO play for the blog post. Did we, at any point, actually consider using it for this project? IIRC, it was always defining the aggregation syntax in YAML and employing code generation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests/AggregationBlogPost/article.md
Outdated
the builder and feel what it's like. To top it all off, we could add this code | ||
to the server documentation, similar to how we add other language-specific code | ||
snippets. We're not quite there yet, but we'd love to include this in the | ||
documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ultimately, we love to add this builder code to the server documentation, similar to how we add other language-specific code snippets, but we're not quite there yet.
See if that reads better. I don't think this idea warrants more than a single sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, much better 👍
Co-authored-by: Jeremy Mikola <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more optional suggestions. Take what you like.
help beyond syntax highlighting. Pair that with a few levels of nesting, and | ||
you've got yourself the kind of code that you can write, but not read. We could | ||
start off by refactoring the code, but instead let's try to move away from array | ||
structures and use a better solution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
structures and use a better solution. | |
structures and towards a better solution. |
"Towards" balances "move away" nicely.
refactor this code, but before we get into that, we want to move away from these | ||
array structures. | ||
is that the only way to express the aggregation framework domain-specific | ||
language (DSL) is through untyped arrays, and any PHP editor can't provide much |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
language (DSL) is through untyped arrays, and any PHP editor can't provide much | |
language (DSL) is through untyped arrays, for which a PHP editor provides little |
See if that reads better.
We also decided against this option, partly because the underscore marks (or at | ||
least used to mark) private functions or methods, but also because the | ||
underscore would break alphabetical sorting in code completion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also decided against this option, partly because the underscore marks (or at | |
least used to mark) private functions or methods, but also because the | |
underscore would break alphabetical sorting in code completion. | |
We also decided against this option, partly because underscores have | |
historically been used to mark private methods and properties, but also | |
because the underscore would break alphabetical sorting in code completion. |
underscore would break alphabetical sorting in code completion. | ||
|
||
A less-than-serious approach was to use emojis, which I learned was valid in | ||
PHP: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to be especially evil: https://en.wikipedia.org/wiki/Zero-width_space
); | ||
``` | ||
|
||
Again, PHP's use of `$` to mark variables plays nice with aggregation pipeline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, PHP's use of `$` to mark variables plays nice with aggregation pipeline | |
Again, PHP's use of `$` to mark variables plays nice with the aggregation framework |
This is the second time I noticed you refer to "aggregation pipeline" as you would a proper noun. I think "the" is necessary here as it's a thing and not a formal name.
Also changed to "framework" because I don't consider the pipeline as a logical owner of stages and operators. It's just another component where those get used.
We have not implemented this for now, but if you prefer this syntax to static | ||
methods, or if you have alternative suggestions, please let us know about them! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have not implemented this for now, but if you prefer this syntax to static | |
methods, or if you have alternative suggestions, please let us know about them! | |
We have decided not implemented this for now, but if you prefer this syntax to static | |
methods, or if you have alternative suggestions, please let us know about them! |
I felt like a word was missing here.
Please ignore the test files - only article.md needs review.