3 kyu
Defuse the bombs!
2,770 of 2,771Zyklus
Loading description...
Strings
Puzzles
Security
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.
This comment has been hidden.
Duplicate issue
??? i don't get what you mean by that
oh my bad they still didnt fix the issue from 5 yrs ago for some reason
This kata needs more info in the bomb 'is something missing?'.I wanted to see if there were any clues in the files and I accidentally accessed the source code, That was not my intention. The way I accessed it (in my solution) should be blocked, since it avoids the 'require' restriction. I learned about this restriction from the exceptions messages. It's a shame, because when you see the other bombs, they seem interesting
I'm stuck on bomb 7, the track 'Is something missing?' doesn't help. Can anyone give me a hint on where I should look for what I need? I don't know how to continue
This comment has been hidden.
I am stuck on last 3 bombs? It say "hint: 'Sorry, no more hints!!'" I really don't have idea.
Any help on #1?
console
to know what your input isAny help on #2?
No need, I got it my own :)
It is still possible to get entire test.js file
That code throws an error:
Great kata, had fun and learned some new JS features :-)
THis kata was so harf for me...
So glad I could've beat it w/o googling/cheating.
A great kata worth trying. Thanks
Accidentally cheated the Kata. Really needs a fix. I thought
is something missing?
. Well ... can see my thought process in my solution.But looking at the solutions, no idea how people came to the conclusion for bomb #IsSomethingMissing?
Hi,
Not a kata issue, and actually not an issue at all: this is sort of "by design". Forbidding this would involve destorying a lot of features that make for cw's identity/way of working, so it won't happen.
Now, please note that what you used is considered an actual cheat and can lead to banishment when used "to some extent". I hid your solution, but don't use that again.
Cheers
Everything was working fine for me, I defused every bomb except the last one, understood what was needed, got "true" in the last statement, but tests were not passing. Couldn't understand what is wrong and looked up the answer for the last one. I rewrote Array.prototype.toString and it was working fine for me, but they rewrote Array.prototype.valueOf and it is working the same way, but only their variant is working in this kata. How should I find that out by myself?
Ooof, last bomb... Really can't understand what the second parameter is and how can I change it to true if it's even necessary. Any direction where should I go?
Haha! 30 minutes later I solved it! It was a very useful Kata, my respect to the author.
This comment has been hidden.
That's a problem with your code, not a kata issue.
I solve the problem in one line! However it is not a valid solution (File access attack). See my solution for more information.
Append: Sorry, I have resubmitted another solution, which is valid.
Here is the original code:
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
It's worth a try, let's see. It messes up with chai, but I'll look further into it.
This comment has been hidden.
It seems reading the file won't work anymore, could you check it?
This comment has been hidden.
Penultimate bomb was the most difficult, last one was ez.
This was great and gave me a lot of insight about the workings of javascript and the kinds of out-of-the-box things I can do. Loved it...
Clicking 'RESET' removes entire TDD field body.
It doesn't really matter, doesn't it?
this is a puzzle that has no sample tests on purpose. the sample tests are just the default codewars stub for JavaScript, so this is not an issue
What a wonderful Kata! Really challenging. I definitely learned a lot from it.
god it was hard
I wad pretty sure Bomb.something="missing" was a GREAT answer, but it's not, and I'm crying.
I don't know if it's a bug or what, but I'm stuck in the 'Exactly 4 years ago...' step, any answer give neither exploding log or continue log ... Any ideas ?
Idk if that should be marked as a spoiler, but anyway, the solution is related to manipulating js dates.
If that didn't help, can you share your code here without exposing the solutions to previous steps?
After letting this soak in for a month your comment was a great help, thanks. I was disturbed by not getting error messages or bomb exploding comments.
I just wanted to check that the date solution is still working. My code outputs a valid date object, exactly four years ago and I've tried additionally accounting for daylight savings to no avail. Having looked up published solutions - mine appears to output the same.
const date = new Date() date.setFullYear(date.getFullYear() - 4) Bomb.diffuse(date)
output: 2018-06-06T09:00:44.852Z
Thanks
This part is correct. You should check the line above though (line 13 of your code).
Very useful kata!!!
can someone help me with "Is something missing?", can't get it ;\
No. As stated in the description it's a puzzle, and a 3kyu, so expected to be at least a bit hard. Giving hints would make no sense (I didn't solve it myself).
gl to me then
This comment has been hidden.
This is an absolute nightmare and all of you commenting "just think about it" are the worst. "Is something missing?" yes, my will to live after beating my head against the wall because of this kata.
What a kata! I was beginning to think the last bomb question is silly.
This Kata is one of the best ones yet! I enjoyed it a lot! Good job mate!
Stuck on bomb 7 "Is something missing?". I dont know much more than console.log() so is there some secret function that i should know or should i just turn my brain on?
I was stuck on this for the last N times I tried this kata >.< You should be able to see something with console.log, but it may not be obvious. Think... JavaScript :D
This comment has been hidden.
Can anyone help me on "Check the globals" clue?
not 'globals', just 'global'. (might help?
Thank you, but what do you mean by that?
This comment has been hidden.
Don't spoil solutions please. I haven't solved this kata, this is the last kind of comments I like seeing on Discourse page.
@Maxlev, could you please send me your comment in private please? So that people who haven't solved this kata don't see it.
Thank you.
stuck at "is something missing?". any clue
I enjoyed a lot while I did this Kata. I felt myself like a hacker 😎 , completed in less than 2 hours.
Pro Tip: This kata is vulnerable to file access attack.
I think it should be solved now, if it's not open another issue.
Another kata similar to this one? I loved this one.
someone help me what should we do?
I went and thought maybe the secret to diffusing one of the bombs would be written in a file, so I printed out the file contents of all the files in the directory. You should really look to patch this, I had to forfeit the kata after I saw all of the diffuse methods in index.js. The only thing the user needs to do is:
Very funny!!! Thanks!!!
Im sorry, but can someone check if the #1 Bomb (the last one) is working correctly?
Can someone who know the answer resubmit the kata please?
Yes, it's still working.
Thanks for the reply!
I was pretty sure I got the right answer to that bomb after reading the discussion here, but I was unable to submit. I guess that was my bad then...
I'm still stuck on it :(
This comment has been hidden.
Any hint for Bomb #3?
Been sitting on this for a month, still don't have any idea whats "missing" for bomb #7. Any hints?
In other bombs we couldn't see check() or next() but we can infer their existance. In that one there is truly something missing, which would be obvious if the exception wasn't discarded.
it was breathtaking! good kata
Stuck on this one for months. I used the help of a friend to be able to complete it. Learned a lot in the process. Excellent puzzle. Thanks.
I like this one, this kata is something new, thanks. Last bomb let my brain explode. And no, I do not enjoy being forced to respond a certain way.
I like this one.Well done, however another bomb has just armed itself! 9 bombs left! haha
This comment has been hidden.
This comment has been hidden.
Where is the description of this kata? What should I do? The sample tests and the requirements are defined by myself? I'm confusing about this kata.
Start by logging to the console the properties, etc. of any objects you have available.
I really enjoyed this kata. EXCELLENT JOB. The last bomb stumped me for months, though. So here's yet another hint for people, since none of the existing hints helped me enough...
BOMB 10 HINT:
If you've already been 'inspecting' the Bomb code, you're on the right path. This is a big clue for the entire kata, but there's more to the final bomb than just that. But do that for bomb 10 and it'll give you a pretty good hint in the form of a comment, which should reveal two tasks you need to complete.
If you try to diffuse right away, you'll probably get an error (Something like "TypeError: ___ is not defined!"). There's a very good reason for the error, and part of solving the bomb includes ensuring that the error doesn't throw. Find out why the error throws, and you're halfway to solving bomb 10. The other half of bomb 10 solution is kind of similar in approach to some of the earlier bombs, but more complex.
You can do it! I believe in you!
So I've defused the first nine bombs; I've probably been noodling on the last one for a year (returning very infrequently). Any MEANINGFUL hints much appreciated (I understand that a question is being asked, that it's testing for a string which is presumably the answer, I think I understand the 'matrix addition', but I have no idea how to tie it all together to actually defuse the last bomb)
Getting the last bomb involves modifying something you've almost certainly already modfied to get past an earlier bomb.
This comment has been hidden.
Some people have cheated their way to the solution. Is this acceptable?
What do you mean by cheated their way to the solution?
This comment has been hidden.
Bomb 6 not checking date. You can do
Bomb.diffuse()
without params and it will pass.fixed
!
I am really stuck on this one. Solving the first bomb is easy, but how to get the name of the second bomb?
After half hour I managed to defuse the 1st bomb only. I can't think anything to proceed. I feel really stupid. :-(
stuck on hint 'Is something missing?' please help.
phew.. finally :)
same right now :'(
don't give up ;)
I finally made it to the last Bomb and now I'm stuck here XO
congratulations :)
This has been the most fun kata I've done, by far.
I'm super sorry for solving it in such a hacky way #onelinermadness.
Kudos @Zyklus !
How do you check global variables?
This comment has been hidden.
Need some help with this error, im on the last bomb and seem to get this?
Missed the
()
at the end?No, im not even calling that function. It says its being called inside the
check()
method which i dont have access to?Bit stumped tbh, any ideas?
Solved it a long time ago and my solution still works, I could take a look (and try to remember what I did and why) but not now, maybe later. As you said, that's part of the kata testing framework.
This comment has been hidden.
It seems so, try another thing.
Why is your
toString
method not returning a string?This last bomb... not so easy.
Don't overwrite anything on Buffer, just pass something to
Bomb.diffuse()
that will tell the designer what they want to hear (in lower case in the first parameter to the check() call)The last bomb is too bad
Yes, too many ways to explain from the hints
Now this kata should be pretty reinforced and all previous cheeses have gone rotten ;-)
Pluralization error: "1 bombs left!"
Fixed.
What's with the 2nd last bomb? I tried everything I could think of but I'm still getting floating point precision errors. I doubt there's a way to bypass that.
I figured it out immediately after I posted this. Rip the wasted half an hour prior
The word 'diffuse' should be 'defuse'. Diffuse means "spread or cause to spread over a wide area or among a large number of people." Defuse refers to disarming a bomb.
Changed everywhere except the code, so it won't render all solutions invalid.
This comment has been hidden.
It should still work fine.
This comment has been hidden.
Well, if someone is asking you a question in the comment, you'd better answer it!
Are you referring to hao_phan_93? because i can't see his comment.
This comment has been hidden.
Well, cheesing the kata in unexpected ways is also fun! So there are no problems with that.
The only problen I can think of is that it might be too obvious.
This comment has been hidden.
This comment has been hidden.
figured out how to do it, (obj) was really a good hint by itself
hm
..
Well, struggled with the second one (which turned out to be trivial, doh) but after that it was reasonably simple until the last bomb. 2 hours later, and ... nothing?
The Kata is still cheatable. I am not sure if I could have solved it without 'cheating' ... But I definitely learned more from trying to cheat this for hours, then from solving the puzzles. For details on improving the cheatability, msg me, I don't want to spoil the Kata for other users.
Fixed
Since I had so much trouble with the last bomb and no doubt a lot of other people do too, here is a hint that would really have helped me:
Both parts of the function need to be equal to true in order to pass. The comment above the
check
line is a big hint for the first part. Except as you can see it encodes your responses before it checks it, and you need to find a way to get around that. For the second part, reconsider what arrays are ;)Thanks for the hint. It helped :)
This comment has been hidden.
This comment has been hidden.
Hi! I'm stuck with this hint: 'Is it freezing in here?' and have no idea what's next. Help please!
This comment has been hidden.
Thank you! It helped! =]
Thats kata take me alot of time to solve,thanks Zyklus you are a one big,bloody torturer. Give my time back!
Not a real kata... this is too bad. Not even a description you need to "guess" what to do..... "kata are real code challenges focused on improving skill and technique." Not in guessing....
But you can still learn from it.Some bombs are really cool to solve.Cheers!
Learn from what? There is nothing about programming there
Learn javascript syntax thats for sure.Why do you think that there is nothing about programming?what about solving problems? You must be aware that there are folks(like me) who want to learn javascript build in objects,methods etc. In example i have learned about valueOf method here ;) Anyway this kata is tagged as "Puzzle" and "Games".Cheers!
This comment has been hidden.
The puzzle gives you nothing..... not even a function or a hint
It gives you a function. Right there, in the comments.
Bomb.diffuse()
Do you think that in real life, if you must defuse a bomb, the bomb will give you specific instructions on how to do so? No. You must analyze how the bomb works, figure out what you can do to the bomb to make sure it doesn't explode. I think this kata does a really good job of simulating this.
There will be many times when you will need not only to build something with logic but to understand how to manipulate and hack a pre-existing system to serve your own ends.
You also learn some very important skills along the way. Out of all the kata I have done, I've learned the most from this one. Stuff like freezing objects or taking apart global variables or simply being able to understand and manipulate pre-written code.
These are skills neccessary to build web crawlers, bots, etc.
If you truly are capable to solve this kata, you would be able to complete the entire thing without any guesswork. It's how 700 people were able to do it. I can guarantee you that none of them used any guessing to solve this. Having seen the entire thing, guesses would never be able to pass the kata.
Not a real issue... this is too bad. Not even a suggestion you need to "guess" what's the issue..... "issues are real kata problems intended on addressing mistakes and inadequacies." Not in complaining....
Okay, jk, but gonna close the issue.
This comment has been hidden.
!
It really is just like debugging which is something you'll do every day if you're employed as a programmer
Really struggling on the last Bomb; I can see the body of the diffuse function, but I can't figure out what it's even trying to accomplish. Do both parts need to evaluate to true or something? Totally lost, would really appreciate any help!
This comment has been hidden.
This comment has been hidden.
I am stuck at is something missing, any help? Thanks
I'm stuck on the bomb which has this hint : 'is something missing?'
Can someone help me figure out what is missing?
I've tried just writing Bomb.diffuse() without any arguments but it doesn't work.
Try to avoid the error
Something is missing from the Bomb
But there's nothing missing :S It's the same keys as before!! I'm losing my mind trying this..
hey can you help me ? did you find it whats wrong ?
Best kata ever
The final bomb, nightmare.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Now I understand better, thanks
oh
This comment has been hidden.
This comment has been hidden.
I have the same problem
Same error here too
Try now, I was able to submit it.
same error :(
same error, any thougths on how to submit this one?
Time: 213ms Passed: 1 Failed: 0 Test Results: Log Well done, however another bomb has just armed itself! 9 bombs left! Well done, however another bomb has just armed itself! 8 bombs left! Well done, however another bomb has just armed itself! 7 bombs left! Well done, however another bomb has just armed itself! 6 bombs left! Well done, however another bomb has just armed itself! 5 bombs left! Well done, however another bomb has just armed itself! 4 bombs left! Well done, however another bomb has just armed itself! 3 bombs left! Well done, however another bomb has just armed itself! 2 bombs left! Well done, however another bomb has just armed itself! 1 bombs left! Congratulations, you have diffused all of the bombs!! ✔ Test Passed STDERR: Error: unrecognized flag --trace-warnings Try --help for options
This comment has been hidden.
Great kata, thanks!
This comment has been hidden.
Took me one week but I solved it
After I pass this kata, I still can not figure out what the last bomb's first argument supposed to be ?
i don't get it. isn't the last one already accepting only one argument?
This comment has been hidden.
Finally,I figure it out by my self.
Forgot to close the question.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
.
This comment has been hidden.
Very fun kata. and fun to see all the different ways everyone solved it
This comment has been hidden.
Just take a look at JS values comparison, man:)
I was able to figure it out and the answer had little to do with Javascript value comparison.
This comment has been hidden.
I see
me too jomo
Helppppp for the third one. At least does 'Sorry, no more hints!!' actually is ?
Ok, so it was actually not. Just some javascript code I've never seen/used before.
Can you point me into some direction to solve it?
Getting stuck... :(
How find out what code hide nested function?)
I would like a little hint for this for case 2 too
please a little hint for the final bomb, the second argument can be true but what the hell is supposed to be the first one!?!?!?!?
pliiiiiiiiiiiiiiiiiiiiz
Same here, wonder what's the first one supposed to be??
hey bro, i made it, don't overthinking it, just try to answer a question ;)
yeah, it was so silly...
Tried to answer it, but still didn't get it. Any hints?
it's trivial...and silly...don't give up
For me the first part was trivial, the second part required more effort.
I'm 30 minutes here. Didn't have any idea how to solve last bomb :/
if you managed to get to the last one it means that you can do it, think simple
3 hours there. 0 ideas :/
I'm really stucked here, I have absolutely no idea what can be the answer. I've spent 5 hours thinking and trying to solve the last bomb. I'm going crazy.
no man, it's not worth going crazy for that...just keep in mind that the author of the kata is a narcisistic bastard...just tell him what he wants to hear
Ok, I'm really pissed off. Do I need to answer in a full sentence or does the answer is a single word? I hate guessing... Why did the author ruined this really good kata with such a question that is not about programming at all?
you need to inspect the source code of any object or function you recieve :)
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
I think I've found the most hilarious solution to this kata:
It's probable this isn't your intention, in which case you should find a way to stop me from doing this.
This comment has been hidden.
This comment has been hidden.
really?
This comment has been hidden.
This comment has been hidden.
I guess I'm going to be that guy who points out that you probably meant "defuse", i.e. to remove the fuse. Unless you actually meant that we are spreading out the bombs over a large space, which is what to diffuse them would mean.
Secretly, we're exploding the bombs to get rid of them.
Instructions are not clear. What the hell am I supposed to do...
The instructions are intentionally not clear. Figuring out what you're supposed to do and how to do it is half of the point.