If you are building a deck for the first time or have to cut out old sections that have rotted or otherwise become damaged over the years, it is important that you follow joist width requirements for safety and support of the deck planks. Joists need to be a minimum of 16 inches on center from each other. This means it is 16 inches from the center of one joist to the center of the next joist in line. Joists are the pieces of wood that run along the length of the floor, making up the skeleton frame that the deck platform sits on.
Studs are similar to the joists in that they are the skeleton that make up the frame for your deck and patio -- but instead of supporting the floor, they are built to support the walls. If the wall is not a load-bearing wall (if there isn’t a ceiling or roof on top of it) but is instead a free-standing wall, the studs can be spaced up to 24 inches on center. However, for load-bearing (weight-bearing) walls, the same minimum requirements for joists are required, which means 16 inches on center is the minimum spacing allowed.
Building and repairing load-bearing walls requires more than just general construction knowledge. The walls need to support the weight of the ceiling or roof above. A structural engineer must be consulted to determine the exact specifications for your deck and patio roof or ceiling, otherwise it will not pass inspection. If it doesn’t pass inspection, you cannot insure the deck and patio, which means, for example, if there is a fire and the city officials show up with city equipment to put out the fire only to find that it wasn't built to code, you will be liable for the costs and damages.
Regardless if you are building a new patio or repairing an old deck, you still need to make sure there is sufficient spacing where the deck or patio meets the house. This is especially true of the deck planks themselves, as they are up against the siding of your home. If you try to butt the planks tight to the house, the planks will buckle off the joists when the summer months come and the material expands with the heat. An eighth of an inch to a quarter inch is the minimum requirements for most planking, although some manufacturers will have their own recommendations if you use composite material.