To answer the first part, nobody said your defense attempt would be automatically be SUCCESSFUL(I'm pretty sure 2 of the responders have already stated they'd likely not survive), it was just asked with what would would try.
To answer the second part, I was assuming the situation occured in my home, where I have a whole variety of blades within reach at any given time. I mean, if I was in my room and someone busted down my door, I have like 3 DOZEN machetes within easy reach, and another couple dozen "fighting/combat" knives. There's literally not a place I would be in my room where I couldn't have a machete in hand in about 2 seconds. Sure, I have guns too, but they're kept in their cases and stored unloaded. And if I was completely unaware of an upcoming attack until they were actually coming through my door, I could get to a machete or combat knife faster than I could get to my guns. Now, if I just thought I heard something and was gonna go investigate, yeah, I'd get a gun first and take it with me, but if say, I just wake up and my door is opening, well...I can have a machete in hand right away.