When visiting Nicaragua you will, if flying, spend some time in the city of Managua. Whether that time simply involves landing, walking through the airport and heading off to the Corn Islands, Granada etc. or sticking around and seeing what this city has to offer is up to you. My advice, keep walking, do not pass go and head to the more scenic, less frenetic and less dangerous places this amazing country has to offer. Enjoy the colorful cab/ bus ride/ flight as you head out. (oh and hold on, cabbies, yellow buses, horse drawn carts,motorbikes and vendors meandering through lanes all compete for limited spaces on these crazy roads)
If you do stay, be careful and don't always trust the guidebooks! As a New Yorker and life long city dweller I expected no problems and while I didn't encounter anything major we were consistently warned by friendly cab drivers, hotel owners and others about where we could and could not go. Walking the streets at night is fine is some spots but turn a corner and you may be in a place that's far less tourist friendly. Even during the day we were warned that there were areas we just shouldn't go I suppose that's why the state department doesn't recommend travel in Managua. Not that there isn't plenty to see in this somewhat chaotic city just heed the warnings! Ask people in your hostel/ hotel etc. to call cabs for you, negotiate your fare in advance and double check the places you'll be going with those in the know about how safe they are for tourists.