6 kyu
None shall pass
1,281 of 1,353adriaanbaelus
Loading description...
Security
Puzzles
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Fun little kata, but as for 2023 it should certainly be downgraded to 8-7kyu
This one was genius! :D
I dont understand how I even got this right...
I have no idea what to do, but I'm enjoying myself nevertheless. If 1238 Codewarriors were able to crack this, then dammit so can I. To be continued.
wtf is this?
I'm surprised to see so many people complaining about this kata. It's marked as a puzzle - if you don't enjoy puzzles you shouldn't try to solve them.
It would be grate for guys at codewars to implement something like reddit(hide) so I don't need to see this crappy shit anylonger.
Fun Kata :) If I haven't solved similar puzzles before I may not have been able to figure it out.
This kata is not helpful and should be removed.
agree, bunch of bull!
i would like to leave my suggestion to this kata: it should be removed. the description does not make any sense and i don't feel like watching a boring video just so i can solve a puzzle. very unrewarding kata. classic FUWG behaviour.
This comment has been hidden.
I don't mean to be rude, but this Kata didn't really give me any new perspectives on problem solving. I think it could be more useful if it had a better description.
I don't think I'd enjoy too many of these puzzles, because I don't feel like they teach much about a language beyond lateral thinking, but I had fun trying to crack this one.
I do think the description could be more clear about what the goal is (getting the function to return true in a black-box-ish setup) however.
So is there a way to view the source now that I've submitted a solution? I'd like to see how it works.
A generally awful Kata.
what's meaning of black knight? a knight who is a black man? it's too shit!!
You don't know "Monty Python And The Holy Grail", right?
Worst one Ive seen. Should be removed IMO.
And why you say that? Any reasons?
The description is just a movie reference. There are no clear directions. Have you read or tried this kata?
I can not understand the title at the first time.I can not see it clearly.
I get the "ReferenceError: BlackKnight is not defined" even when I try to log it from my solution.
This is a CodeWars framework bug, where preloaded code (such as
BlackKnight
) is not loaded until you click Submit, meaning that you can't test your solution. The workaround is just use Submit instead of trying to use tests.You can, however, write tests in the same frame as your solution goes, or log things from there. Then when you click Submit they'll be run and you can see what the results are before the Kata's solution tests are run.
Is there a way to solve this problem in impossible mode? or is it really "impossible"?
I felt like I was cheating, but yeah. It's possible.
Hmm, I do not understand how to start this. ...
This comment has been hidden.
No one dose!
I really dont know how to begin with this one, the object BlackKnight isn't available for debugging, I believe one must "cross the bridge" but what methods are there or how to interact with BlackKnight ?
BlackKnight is prepared before your code. Doing a
console.log(BlackKnight)
should show you that the object does exist.I don't want to give away too much, but (at least for easy difficulty) you should be able to solve the kata simply by inspecting that object (there are many ways to do this; you could iterate over the object properties, for example).
If BlackKnight was undefined or something for you, that's a fair sign something went wrong with the kata setup. In that case, would you mind letting me know? If you can't submit the kata, please post your code (marked as spoiler) below.
This comment has been hidden.
As far as I know, you're not going to be able to meaningfully interact with the sandboxed JavaScript using the Chrome console. Interact with the BlackKnight under difficulty = 'easy';
But then, how does one go about solving this challenge? it defaults to 'easy' and I didnt change anything, I just can't find a way to see what methods it has so Im basically "blind"
Quite sorry for the late response, I have been somewhat MIA here.
First of all, thank you. This post pointed out one of my assumptions that is probably causing confusion for some people; I am relying on the user being familiar with the Codewars provided objects (Test and console).
For the details on the test framework used by Codewars, take a look at http://www.codewars.com/docs/js-slash-coffeescript-test-reference .
You can use
console.log(BlackKnight)
in the code you type for your solution, and it will show some basic output in the response you get from the codewars server. Once you can get output, it should be possible to iterate over the keys of the BlackKnight object and output their corresponding values, and that should help you on your way. I'll restate you can't use the browser console because of the way Codewars works.I hope the above made some sense... If not, feel free to let me know, and I'll see how I can clarify.
Ohhh!! I certainly learned something today! I was trying console.log but directly in the Chrome's dev tools console, not inside the test!! and that's where it gets interesting. Thank you SO MUCH bloos! Have an awesome day! :D
Agreed. This is rather confusing. Running "console.log(BlackKnight);" within the Codewars console and Test console doesn't return anything for me.
Try
console.log(BlackKnight.toString());
... And for some reason, most of my replies end up as separate threads. Bummer.
I almost mentioned that... You need to click the '<- Reply' link just under the comment. (Right next to the 'Spoiler' flag link.) The text box at the bottom of the page is for new comments to the overall thread.
This happens a lot. Need to figure out how to make the UX better.
I do actually use the reply button. I think it has something to do with the preview tab (when I use it, I tend to jump out of the thread), but I haven't been able to reproduce it consistently so far.
Inspecting for any objects/properties under 'this' produce no "BlackKnight". This is a terrible set-up for a kata that doesn't work for some users.
Thank you for your feedback.
I'd say the purpose of the kata is to figure out a way to bypass a mechanism that you have no control over, without explicit instructions. In that way, I suppose it is incomplete on purpose, yes.
Please don't take offence at my previous comment; what I meant was that you have
at the top of your submitted code. As the comments state, you can change that to (for example)
and the solution you wrote wouldn't pass. The difficulty setting is mostly an experiment to allow you to try and get as far as you can while still being able to submit your solution if you get stuck along the way.
If the difficulty thing was not obvious for you, please let me know. It might indicate that I should move the explanation for that to the description.
I can +1 the fact that it wasn't clear you could adjust the difficulty.
I ended up liking this kata. but it took too long to figure out what it was about. I had to read this comment to finally understand what the kata was about. At first I thought it was just a nonesense kata and was going to skip it. You should add that bit about "[figuring] out a way to bypass a mechanism that you have no control over", or something similar, to the description. That would allow people coming to it for the first time to actually give it a chance.
Yes, that's exactly the point of the kata (by the way, your solution would only work for the easier difficulties). Is there any particular part of the description that isn't clear enough for you? Is there any suggestion in particular that you would like to make?
My solution passed all of the tests in the Kata, and is what I submitted. The instructions are incomplete, like I've already said in my first comment. Are you saying that is the whole point of your Kata? To be incomplete?
Bloos experimented here with the user-adjustable difficulty setting as a way of trying to tie together multiple katas that would all be very similar.
Take a look at some of the other solutions. Notice how each have specified a difficulty? Try solving this kata again with
difficulty = 'impossible';
and you will see that the puzzle changes when you specify a different difficulty. The reason for doing this was to help you learn in incremental steps. Each difficulty setting could have been a separate kata, but that would disrupt the educational experience.This comment has been hidden.
yeah, but that only works in easy and medium difficulties
Everyone, don't forget to upvote for a beta kata if you feel it is a good one.
So, I've opted for an approach with a couple of difficulties. Why?
Mostly because I noticed in the "You shall not pass" kata (on which this kata is based) some people were unable to complete the kata, and therefore unable to participate in the (interesting) discussion that occurred behind the curtain.
I figured it would be better to let everyone in, and just make the problem as challenging as you want to make it.
One problem this does create: I'm not quite sure what rank to give this kata. While I wouldn't assume too high a rank for anything but
impossible
, there is still quite a gap betweeneasy
andharder
.I'd love to hear what you think!
This kata is a wonderful example of how katas should be made.
You are obviously a very intelligent person and an extremely talented coder, adriaanbaelus. I'm sure this kata is absolute genuis and I appreciate that it could be fun and a good learning experience to figure out how to "bypass a mechanism that you have no control over". I applaud that idea.
However, I think that for any coding challenge, we at least need some awareness of what the problem is we are trying to work on, otherwise what's the point of coding? Why would I approach a problem if I'm not even aware that it exists?
I don't want to join the list of people here that say this kata should be removed, because I suspect those people, including myself, simply don't appreciate or understand the kata. But I do think there needs to be some thread of explicit instruction just to make the user aware of the problem to be solved. Perhaps a couple of prerequisite katas with proper instruction to introduce the idea?