Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
I hated this program in Java as I felt it overcomplicated the problem forcing the use of BigInteger, but Python was super easy! In hindsight, I felt like this was a great example of how some programming languages have massive benefits in certain situations vs other programming languages. In this case, Java is a headache because of the BigInteger syntax (but BigInteger is necessary for large numbers), but python doesn't need different data types for larger numbers, so in that language there's no need to think too hard about this problem.
A step towards something like this could be providing an ability for people to subscribe to collections and have honor displayed for the completed Kata from just that collection.
I don't know if a post like this has already been created, but as a teacher, I'd like to see some educational settings. I'd love to place students into a "class" (in addition to clan), assign specific problems to all the students in the class, and have honor tracked for only the assigned problems students complete - so they'd have their overall honor and their class honor. Also, that class honor can earn points from non-official Katas (ones developed specifically for the class) All of the same features could be set up for a local/regional coding competition instead of just for classes.
I think giving better examples of how the sorting works would fix the confusion that most people have on this problem. "In the result, substrings (a substring is for example 2:nnnnn or 1:hhh; it contains the prefix)" is really subtle and easily missed when figuring out the sorting mechanism. Having a couple examples shown in the description where it's the substring that gets sorted and actually taking the time to explain what is happening would make a world of difference in helping people understand this problem.
B1ts gave some good feedback.
I love the idea behind the story and this would be a great CS2 exercise for our programming class.
The description does a little more work (maybe include example inputs or specify that String may include spaces, in which case the 1st letter of each word should be capitalized), but the fact that I got the general idea and was able to solve it shows that it wasn't that bad of a description either.
Sadly, B1ts' 1st and last comments are really the reason why this problem won't be selected as an official Kata. Random tests prevent people from just being able to test your specific cases and cheat their way to a solution. The story is interesting, but String parsing is done so many times that the people who solve this problem first will likely downvote it purely because of that.
Having said that, you're still capable of sharing it with people and seeing if they can solve it.
I wouldn't put this Kata at a 5, but probably a 6 or 7. It definitely makes you think about how to solve it for all possibilities, but it isn't as hard as most of the 5 rated problems, I think.
Keep coding and trying to come up with Kata ideas! Don't let this prevent you from trying again.
Wow Voile, what a pompous response. You share a couple good points, but mingle it with insults and arrogance that leave me wanting to trash the entire response.
As a computer science educator, I look for programming problems that challenge students at the level they're at (and everyone is at different levels). This was in ways both a simple and a challenging problem, depending on your programming/problem solving background. The original problem this was based on was a computer science programming competition problem developed by a university aimed at high school students.
You argue that students are asked to do the same thing twice, yet you acknowledge that they have to do it in 2 different ways... which sounds to me like they're not doing the same thing twice.
You asked why I developed a problem that asks the user to calculate something using multiple functions... isn't that how most programs work in the real world? How many programs out there do 1 and only 1 thing? Take Adobe Illustrator, for example. It has a series of shapes within a single program and has selection tools to determine which shape is being selected. Isn't this just a simplified version of a similar scenario? Determine which shape is being selected (if any)?
As a teacher, I find that my students don't have too much of a hard time figuring out simple solve-1-thing problems like whether the click is in the square. But, I find that when you add 1 extra level of complexity (such as adding to the same problem whether the click is in the circle or the square), students have a much more difficult time breaking the problem apart, which makes it a great challenge problem.
You're completely right on the Object question. I looked at the problem as I was writing it with so many individual variables, some connected to a circle, some connected to a square, and some connected to a click and I wanted to vomit, but as I mentioned, I'm coming at this problem as a teacher, and in a 1st semester high school programming class, most students don't know anything about objects. I taylored the question to the audience I intended to give the problem to.
The original problem I based this on only accounted for inputs as int values. I considered changing it to doubles, but I thought a) it forces people to have to consider whether they need to convert the numbers to doubles or if they can keep them as ints and b) some graphical programs don't keep track of points on a screen as doubles, only as integers. Really, the int vs double argument is an easy one to fix and doesn't really change whether the kata itself is a good or a bad one.
Hurdles in a Kata don't make it bad, only not ready. That, I think, was my biggest issue with this getting retired within 12 hours of being posted. Only 2 people even attempted it, and everyone else just glanced at it and voted it worthless. This shouldn't be judged like American Idol.
Elephant in the room? Not introducing anything new? Not fun? This is all subjective. To someone who has a lot of experience programming, you're right, nothing new and this is an easy problem. To people learning programming, this isn't a bad Kata. If you had to introduce something new, I doubt we'd gain any more level 8 Katas. I haven't seen any Katas that are similar to this one.
In the end, it doesn't matter if the problem is retired or not as I can still reference it to students to have them solve it. I did find the whole thing rather disappointing though. Agree to disagree on the Kata Beta Process, but I do think that the problem didn't deserve to get immediately retired. Sure, it has improvements that could be made, but retiring it immediately says no ammount of adaptation will make this worth keeping, and I don't agree with that.
Excellent suggestion. I've updated the description to reflect it.
Why is it that it was retired? There was only 1 "issue" which I thought was pretty easy to figure out without needing a detailed explanation, and it's now resolved. Do I need to republish it? Or have the people pretty much spoken?
"A click on the edge of a shape is counted as being "in" the shape." has been added to the description.
"A click on the edge of a shape is counted as being "in" the shape." has been added to the description.
Random tests added now.
I like what Sepero says, about the simplified description, but I also like what you've done with the explanations. I'm a teacher and think more of these Katas should have the purpose of teaching a concept rather than testing a concept. Maybe append Sepero's suggestion at the end of the Kata, such as "For this task, there's a bug in the code that needs to be fixed. We intended to return the text "true" when our parameter is true, otherwise we tant to print false, but our code is always returning true. Find the bug and fix it."
This comment is hidden because it contains spoiler information about the solution