We all go through this in our dive career. You have to sit out a dive because of gear failure. The reality is that most of this is preventable with proper maintenance and planning. The first part in the process is to understand what maintenance your gear requires. The second part is thorough preparation before going on a dive and thirdly to have a well stocked Save A Dive Kit for unforeseen circumstances.
Proper maintenance is as simple to rinse your regulator properly with the dust cap on (or connected to a tanks while pressurized), rinse your BCD, your exposure suit and any other equipment. Dry it in the appropriate method and provide maintenance to the parts that require it (e.g. some lights need to be charged every time you use them). If you are not sure how to do this talk to your dive shop and find how.
Get your regulator and BCD serviced. Most people don’t understand that even when a regulator is not being used parts in your regulator are under constant tension. These parts need to be adjusted or replaced at least once a year.
In the preparation part of this regime you get your gear ready before you go on a dive. The simple things are to make sure all your lights, computers, cameras have fully charged batteries or are still have enough charge. Check your BCD that it holds air and that your inflator buttons work properly. Check if your regulator functions properly and inspect your hoses for cracks or ware. Check the seals on your suit, and check the O-rings on your tanks. Creating a packing list to make sure you got all your gear before going to the dive site is not a bad idea. It helps you relax and not constantly have panic attacks about forgotten gear. If you are renting your gear it is important to check all the above mentioned things.
Finally having a Save A Dive Kit is a must. Somethings just break no matter how well you prepare. You should have at least a spare fin, mask strap. Some tank O-rings and O-rings for your hoses. Have a scuba multi tool that can loosen or tighten your hoses and other little screws.
Have spare batteries for anything of yours that take batteries (e.g. dive computer). A lot of the newer dry suits have self replaceable wrist and neck seals. If you have a suit like that it is a smart idea to have some spare ones of these (make sure you know how to replace all these things).
Finally have a little notebook and a pen in a zip lock bag. I don’t know how many times I used this to write down directions, phone numbers or things I need to add to my Save A Dive Kit.
If you follow these simple steps you will reduce the chance of sitting out your dive greatly. It sounds like a lot of work to do all this but the alternative is you sitting 3 hours on dive boat while everybody is having fun under the ocean.