@RydwolfPrograms IIRC, there's at least one historical language where any keyword could also be used as a variable name, leading to valid syntax like if if == then then then else if
@Adám I don't mind using x for a variable and X for an operator or vice versa, but I do think having an operator that can also be used as a variable is a bad idea. It adds confusion, and it increases the odds that a typo will become a runtime error rather than being caught earlier as a syntax error.
@JoKing Ah, that's right. I was trying to remember how Perl and PHP do it.
@mousetail I ask because I wonder if encouraging even mediocre challenges would be good for the site. I don't mean that the mediocre challenges themselves will be good for the site. But, receiving recognition for your effort makes you want to write more challenges.
Not all challenges are great, even the best challenge writers, for instance Calvin, have written qute a few mediocre challenges. But they also write many great challenges.
I believe that being more generous with the upvotes on questions, and also not downvoting questions that are mediocre will lead to more users trying to write challenges. This will in turn result in more mediocre challenges, but also a more good and great challenges.
It's not like the site is swamped with challenges/questions like SO.
Note that there has been an unusual lack of activity lately. There's been periods where I've been really itching for a new code golf challenge but found there's been nothing new posted
It wasn't like that a few months ago
and obviously today's activity levels don't compare to say, 2016, but they're relatively quiet even for post 2020 standards
@StewieGriffin I really think we are already quite generous, even highly simple challenges that weren't sand-boxed usually get a lot of votes. The only time they get downvoted is when they are either very unclear or do things from "things to avoid when writing challenges"
@StewieGriffin yeah i haven't downvoted but the formatting and requirement to generate multiple does feel a bit sideways from what makes the challenge interesting
@UnrelatedString I know it's a bit sideways. The reason why it is that way is because that was the part that made it hard to make short (in MATLAB). The part about random numbers was the easy one.
Also, I don't really care about this particular challenge. I realize that it's not great. :)
By the way, I hope this doesn't come off as me begging for votes on my challenge. I just wonder what will be best for the site in general. I don't have time to contribute much anymore. So even if my challenge got >100 it would not lead to many more challenges on the site.
@StewieGriffin Honestly the main factor that would encourage me to post more challenges (though I already post a lot) is more sandbox feedback. It's really discouraging to have no activity after several days in the sandbox
And that's why if I make an actual effort to go "Hmm, ok, I'll try to make a challenge. What should it be about...?" and use quite some time on writing it, it feels wasted if I don't get the praise I want :P
@mousetail I've never used the Sandbox for that very reason.
Keep in mind that I've written loads of challenges and have been an active user for years, so I seldom forget to provide proper explanations and test cases. The challenges might not be great, or even good, but they are usually well-specified and explained.
It's really hard to find duplicates on this site though, that's the main reason I use it. It's basically impossible to "search" for similar challenges often
You just have to hope some person who has been on the site longer has seen it before
I think this is the only challenge I have thought of and went: This has to go through the Sandbox. I ended up giving it to another user who was better than me :)
An aesthetically pleasing divisor tree is a tree of divisors of input n that, for any composite number m, has two children nodes that are the pair of divisors that are closest to the square root of m. The left node should be the smaller divisor of m and the right node should be the larger divisor...
I have to go back to real-life... I hope you (all of you) find ways to get more challenges, if that's something you want. My suggestion is: Make challenge writers feel it's worth the effort.
And skip the Sandbox if you don't like it. Go through the challenge a few times and check if it's well explained and if you've thought of all edge cases in the examples, and hope for the best.
If it's a duplicate then it will get closed (or the other way around, it happens). There's no harm in getting a challenge closed as a duplicate.
there's something darkly poetic about the answer about not accepting answers being at the bottom because another one with half the votes was accepted :P
Gimme some sums
In this challenge we are going to have a little fun with lists. Your output should contain
exactly the following (down to the 14 dashes). Leading and trailing characters are permitted, although no numbers should immediately follow the last digit of the last part of the answer as '...
the funny thing is that in the loophole linked, it says
> If the question doesn't require input and so a solution which just prints the answer would seem to meet the spec, downvote the question rather than post a protest answer consisting of the literal output.
@lyxal just had that happen to me lol: TypeError: MediaWiki\Extension\SEAuth\SEAuthHooks::onApiModuleManager(): Argument #1 ($moduleManager) must be of type MediaWiki\Extension\SEAuth\ApiModuleManager, ApiModuleManager given
Reverse the polyglot, change the language.
Write a polyglot in two languages that when run, outputs the language it is run in. Additionally, this program must also output the other language's name if the source code is reversed
Example:
Program ABC in language foo outputs foo. ABC in language bar...
I realize that this might not be the best platform to ask this, but I think this would be best unbiased one to put my question in.
How would you compare OpenMDAO v/s modeFrontier with regards to there optimization capabilities and application scaling and overall software development? Which one wo...
@StewieGriffin I have a number of my challenges which I personally believe are better, more interesting, more clearly specified, all-around-better challenges that have gotten 10-20 votes than my highest scoring challenges
Like, of my top 10 challenges by score, this and this one are the only ones I'm really proud of. The others are either kinda trivial that just got a lot of upvotes, or have issues with them that people overlooked cause they were fun
You work at a bakery, and every day you make pastries. You make 100 of each of several different types. However customers are less predictable. Some days they order all of one kind of pastry and you run out, some days they order hardly any and you have some left over. So your boss has made up a c...
@NewPosts Huh, interesting. This was previously posted on StackOverflow, and recently (after the question here got closed) self-answered there with an answer explicitly labeled as "Generated using ChatGPT."
Sum numbers which are string
Your function must accept 2 strings which are "numbers", summarize them as normal numbers and return a result as string without leading zeros in integer part and trailing zeros in decimal part
Correct number is a string which can start with leading minus, contains onl...
> Observing events in the summer of 1787 from his diplomatic post at Paris, Thomas Jefferson referred to the sitting Constitutional Convention in America as “an assembly of demigods” likely to reach “good and wise” decisions.