1. A day before cooking, cut bacalao into 1”-inch squares. Place them in a large basin of water and soak for 12 hours, changing the water at least three times in the process.
2. When ready to cook, drain bacalao but reserve liquid for cooking. Pat-dry with paper towel. Remove any tiny bones present in the fish by feeling each piece with your fingers and then pulling out the bones using a fish bone tweezer, if available.
3. Coat bacalao pieces lightly with flour. Dust off excess flour. Another way to do this is to put flour in a zip-lock plastic bag and put in bacalao pieces in small batches enough to fit the frying pan, zip the plastic bag to seal and shake until bacalao pieces are completely coated in flour. Repeat process for the succeeding batches.
4. Pour 1 cup cooking oil into a frying pan and heat up. Fry bacalao pieces in the hot oil, one at a time, and fry until all sides become golden brown, turning every minute or so.
5. Remove fried bacalao, and pour oil into a stainless bowl lined with a strainer to catch the used oil.
6. Scrape off any fried flour bits from the bottom of the pan, then pour the used oil back into the pan through a fine strainer. Set aside any fried flour sediment together, to be used later as roux (*toasted flour used in making gravy or thick sauces). Cleaning the pan and pouring the oil through a fine strainer also prevents the burning of this brown sediment into the next batch that will be fried. Add more oil as needed for the next batch.
7. When all bacalao pieces have been fried, scrape off bottom of the pan and include the roux with the rest. Pour in 1/2 cup olive oil and heat up. Add garlic and onion, and fry until translucent. Then add tomatoes, pimiento and roux. Cook over low heat for 15 minutes, stirring occasionally.
8. Mix fried bacalao, potatoes and garbanzos into the sofrito.
9. Add 2 cups water, or more as needed. Simmer over low heat for about 30 minutes, stirring occasionally. Do not serve immediately. Let cool to room temperature, then refrigerate overnight and reheat when needed.
10. Serve with hot steaming rice or warm crusty bread.