Hi Valentin,
glad to give some feedback, especially if it is so well received -
evidently you have already put a lot of thought into this and your
decisions are conscious ones, which is refreshing, especially when it
comes to web & usability design :-)
I see your points, especially on the voting system, and have added my
vote for side-by-side cheatsheet support.
Cheers,
mg
On 09/10/2020 18:59, Valentin Deleplace wrote:
Hi MG, thank you so much for this thorough feedback, this is extremely
valuable.
I'll answer your suggestions, keeping in mind that I have to deal with
conflicting concerns and the end result will not be perfect in every
aspect:
0. "Groovy"+"Groovy (Static)": though this would be the "exact thing"
to do, I hope that most of the language is the same in the two cases.
If something works only in one of the two, please mention it in the
comment box on the right. Ideally, add a new separate
implementation+comment box to achieve the same goal in the other case.
a1. Amazing! Looking forward to the good stuff ahead.
a2. Thanks for the link, I didn't know it yet.
b1. It is by design that several implementations for the same language
are accepted, and 2 or more can be regarded as idiomatic. The quality
of the contents is uneven, sometimes a contribution is clearly
inferior. This is a problem that we should ideally address by
curating, provided we have the proper skills, and time to invest.
b2. A voting system is implemented but disabled for now. It is at odds
with the current design in which you don't need to authenticate with
an account. This favors immediate frictionless contribution which is
cool, but also means there is no effective way to tell apart legit
votes from abusive votes. The current tradeoff is to not open the
pandora box of votes, and instead let any user "flag" the content if
they consider it problematic for any reason. A snippet being mediocre
is a valid reason for a user to flag the snippet.
b3. Fair enough! Let's track this in issue #128
<https://github.com/Deleplace/programming-idioms/issues/128>
b4. There is no categorization for now. You may open an issue if you
feel it's missing. The current design favors the "search by keywords"
navigation, and the "related idioms" link in the right bar. Also, each
idiom has a list of "keywords" that make it more surfaceable by text
search. I suspect that adding tags or categories would be redundant,
though I can also understand that grouping is desirable.
b6. Indeed a side-by-side cheatsheet would be cool, please add your
vote to the existing issue #101
<https://github.com/Deleplace/programming-idioms/issues/101>
7. Yes all implementations have their own ID and a canonical URL, e.g.
impl 1449
<https://programming-idioms.org/idiom/28/sort-by-a-property/1449/scala>.
The language list in the top box of an idiom (on the right of the
idiom title) contains all its specific implementation links.
Valentin
Happy path engineer
Google Cloud Platform
Twitter : @val_deleplace
On Fri, 9 Oct 2020 at 18:07, MG <mg...@arscreat.com
<mailto:mg...@arscreat.com>> wrote:
Hi Valentin,
with Groovy maybe one should consider doing a "Groovy" and
"Groovy (Static)", since not all dynamic solutions a valid for the
@CompilStatic case ?
Additional points:
1. I might contribute, as time allows.
2. Havig said that: Just go to
https://mrhaki.blogspot.com/search/label/Groovy, copy & link
back to Mr. Hubert A. Klein Ikkink's site and you should be
all set ;-)
3. I had to laugh so hard when I saw the Cobol version of what is
"s.startsWith(prefix)" in pretty much any other language -
thank god I am young enough to have missed that :-)
Some general site feedback:
1. I found it confusing that there can be more than one tab per
language (e.g. for C++), especially if one idiom is clearly
inferior to the other
2. If multiple versions were allowed, a voting system might be
the way to go - or someone curating each language...
3. I would have expected the landing page to not only display a
search box, but also an (categorized) idiom list. I know the
current web design meta is "as simple/barren as humanly
possible", but the small link icon at the bottom that leads to
a menu, where you can then get this infromation under "All
idioms" or "Language coverage" is easy to miss.
4. Speaking of "categorized idiom list": To be able to quickly
filter after idioms relating to e.g. "threads" or "strings"
would imho generally be helpful
5. On the other hand like the cheat sheet feature (though I find
the name misleading), since oftentimes being able to just
search/browse in a complete result set in the browser can imho
be a good way to find what you are looking for (and maybe
discover something you were not looking for*) :-)
6. Being able to have two languages displayed side by side in the
"cheat sheet" view would be great for comparing languages
Cheers,
mg
*In the category of "So close, but not Groovy" I stumbled upon the
fact that it seems Kotlin still does not have a list/map literal
syntax:
https://programming-idioms.org/idiom/8/initialize-a-new-map-associative-array
**; the Java-like solution looks to be the best of the 3 solutions
offered, but it comes with a "use only if performance isn't
critical" caveat...
(see also https://github.com/Kotlin/KEEP/pull/112 ;
https://kotlinlang.org/docs/reference/constructing-collections.html)
**Is it possible to link directly to a specific language version
of an idiom ?
On 09/10/2020 12:06, Valentin Deleplace wrote:
Hello folks
I admin https://programming-idioms.org/about and I'd like to add
Groovy to the list of available languages. The website is a
collection of "how to do X in language Y".
My friend Guillaume Laforge advised me to ask this mailing list
for help! The goal is to encourage contribution of quality
contents so it can actually be helpful to a beginner or seasoned
groovyist visitor.
A quality contribution is a snippet that is correct, concise,
having an explanation, a link to the official docs, and ideally a
link to an online demo. For example at
https://programming-idioms.org/idiom/96/check-string-prefix some
implementations are high-quality, but not all of them.
Writing a correct snippet takes about 3mn, while writing a
high-quality contribution easily takes over 15mn.
Before I open the gates by adding Groovy in the system, I'd like
to know if some of you would be willing to contribute and curate
some contents?
Thank you in advance
Valentin
Valentin
Happy path engineer
Google Cloud Platform
Twitter : @val_deleplace