6 kyu
Hard Time Bomb
3,636 of 4,121constablebrew
Loading description...
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.
When you spend hours on a really complex solution and then you realize the answer was staring you in the face (T-T)
Great kata! Thank's :)
Very fun and original kata. Thanks!
If you struggling with the descripton, improve your oop and then come back.
This comment has been hidden.
This comment has been hidden.
So, why is this 3 kyu, exactly? 6 or 7 kyu is more apropriate, for JS version.
Old kata syndrome (i.e overranked af). Also people's general lack of understanding of JS language features and functionality (despite the constant mocking at it).
Very interesting kata!
I enjoyed the simplicity of this kata. I do however think that more should've been hidden (if possible, i haven't written a kata yet, so i don' tknow the feasibility.)
Something like: "There is a bomb defined somewhere, figure out where to find and diffuse it."
And instead of giving us the functions, we have to find them and call the disable with correct key, or we lose.
The current description pretty much gives us all the answers.
Can you please start off by having a proper or at least a more precise description, without it, the kata is garbage.
This is a
puzzle
.Why doesn not work? I think I resolved it but it is not still working!!!
Not an issue
Totally garbage and I spoiled my valuable time to find some shit
The description is garbage and the starting point for the Ruby code is extremely un-idiomatic. Worst kata I have encountered.
Start by fixing the description. Look at other katas to see what a good description looks like.
This Kata is still cheatable, although its definitely not so hard to solve. Msg me for details.
That's not an issue.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Oh grandmaster of JS and / or Ruby, can you give a hint where to start from? I am kind of stuck :-(
This comment has been hidden.
This comment has been hidden.
Oh boy, I laughed at this Kata.
This comment has been hidden.
There is a problem with the tests. I get "0 test passed, 0 test failed". I'm unable to submit my code.
Unlike other Katas, Test.expect is only given two arguments (condition,cmd) instead of three (actual,expect,cmd). I believe this may be the problem.
I tried to override Test.expect to hack the execution to feed it 3 args, but it didn't seem to work around the problem...
CodeWars seems to have made some changes. I revised the kata and it should work for you now.
Works great now. Thanks!
This comment has been hidden.
CodeWars seems to have made some changes. I revised the kata and it should work for you now.
[js] Tests do not seem to be functional. Bomb never explodes.
It doesn't work. Test case seems to be broken.
CodeWars seems to have made some changes. I revised the kata and it should work for you now.
This comment has been hidden.
CodeWars seems to have made some changes. I revised the kata and it should work for you now.
This problem is definitely broken. I asked someone who already solved it a little while ago to check it, and even his solution doesn't work.
CodeWars seems to have made some changes. I revised the kata and it should work for you now.
I found the key and i set the variable... but it does not let me through. Something is wrong here.
I think that there is some error in service work, because even I try to submit only one line
I just have
and the log message
but i never can get the message like "BOOM! ... ".
I think that the code is failing somewere inside of testing methods.
CodeWars seems to have made some changes. I revised the kata and it should work for you now.
Great! Thank you! :)
This comment has been hidden.
if you post your code below and mark as a spoiler someone can help you :)
This comment has been hidden.
CodeWars seems to have made some changes. I revised the kata and it should work for you now.
How can I downwote a kata?
You don't! If you were having issues, please not that CodeWars seems to have made some changes. I revised the kata and it should work for you now.
"Boom, you failed to cut the wire"
This is more riddle than coding challenge, and apparently I am bad at riddles. Can someone give me a hint?
var wireCode = 1; // Find the wire. var Bomb = { CutTheWire: function(wireKey) { if (wireKey = 1) { return; } }, Explode: function() { return } } Bomb.CutTheWire(wireCode);
This comment has been hidden.
This was funniest kata I have ever did...
This comment has been hidden.
This comment has been hidden.
to easy for 3 kyu
Depends on the language I guess, but yeah probably.
Easy money :)
Well, I dont think this should belong to 3kyu but i over thinking it at the beginning.
This was really easy lol. 3kyu is probably not the right ranking.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
I like this kata, but I don't think its 3 kyu. I'd probably rank it at 6 kyu.
It seems that codewars is starting to break more and more. I've made no modifications and all I get is
This kata is not created by codewars; this kata is created by the user who made it, and has been completed 327 times. I doubt that either codewars or this kata is broken.
It looks like codewars has changed since this kata was created. The sample tests are broken, so you will need to submit to actually test your code. I will look into this when I have some time.
Yeah this kata is a bit special, since its about trying to hack around things. We now run within a fully standard NodeJS environment. The kata can no doubt be fixed, although the difficulty is now probably too high.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
I have revised the kata to be more informative when you look at the source. It should be clear now why
thWireVar
doesn't help you to pass.Thanks a lot for the revision, that was indeed more explicit. I enjoyed it a lot, as usual with your katas ;)
This comment has been hidden.
So you can see that the eval is creating a randomly name variable. You need to figure out how to use that randomly named variable.
OP solved it, closing
This comment has been hidden.
I've upated the kata to provide better details when you view the source. Try it again.
when it says
Does it mean I cut the wrong wire?
That is correct. More accurately, it looks like you didn't pass an argument to the Bomb.CutTheWire().
I keep getting "ReferenceError: Bomb is not defined", did this Kata change?
This was related to a CodeWars bug. I believe it has been fixed now.
Hmm... I'm still getting that exception. It's unfortunate, really wanted to solve this one. =/
Please post your current solution and tests (and mark as spoiler) so I can troubkeshoot.
This comment has been hidden.
Also, I can't even seem to reset the kata... I have feeling this is another CodeWar issue.
I can reproduce the 'Bomb is not defined' error by having a commented out solution and the test supplied by DanNolan99
This comment has been hidden.
This was mind bending, I really enjoyed it. :)
This comment has been hidden.
This comment has been hidden.
This kata seems cool but it is solvable at the moment?
I have dumped all the global objects(chains too) have some functions doing the bomb stuff however as from description there's no GLOBAL var which seems to be the key. I would like some insight as I have nowhere to go at the moment :)
I also believe I should not redefine the functions or so as per description i look for GLOBAL variable ?
Lukas, sorry for the delay in responding. Any variables declared with var are not properties and therefore are not able to be discovered by looping over the object's property names. This kata takes advantage of that, forcing you to look for the variable in different ways. Have you tried to see what the source code looks like?
Great kata, it was harder than simple bomb :).
I have a question - how do you create objects that have properties that are not visible in for(var key in object) loop and that are not visible in object, or in object.prototype (when prototype is undefined).
I don't think I would ever use this technique, I am just curious about how did you do it.
Any variables declared with
var
are not properties and therefore are not able to be discovered by looping over the object's property names. This kata takes advantage of that, forcing you to brute force look for the variable.Ok, I get it now, thank you for response :)
This comment has been hidden.
No, that is not cheating. It isn't what I had initially anticipated when I created the kata, but it is still perfectly valid. This is an exercise in reverse engineering and out of the box thinking.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
BUMP: Upvotes and rank suggestions anyone?
Is this Kata currently solvable? I feel relatively confident that I have found the variable, but I don't know how to pass an argument to Bomb.CutTheWire() in a way that allows me to pass the test case.
Yes, it is still solvable. (Just verified.) Look for other ways to gain access to the variable that stores the wire key.
This comment has been hidden.
Sorry for the delayed response.
Look at the code given by the arguments.callee. Notice that there is an
eval
statement there. What do you think is happening there?This comment has been hidden.
Look for other ways to gain access to the variable.
This comment has been hidden.
I think that you are clever and I had to deploy a fix to try to stop this madness from continuing. I'm very glad you pointed it out. You also got a shout out in the latest release notes BTW. Thanks for the help with the ranking system.
Awesome! If you guys did more stuff in JS I could help even more!
function (){return 'Codewars!'}
You tricky....This comment has been hidden.
Kata has been slightly modified - I had neglected to clear out one of the variables.
This comment has been hidden.
This comment has been hidden.