I feel like people are a bit hard on Richard because it seems like he is just a constant fuck up but you it's hard to demonstrate his incredible ability in the show: if in the real world, he would most probably be the greatest coder alive. He codes an incredibly efficient compression algorithm accidentally whilst working on another project. When that gets matched, he comes up with something even more efficient - by a seemingly huge factor- in a single night. Then when he can't turn that into a business he seems to just invent a new internet within a few episodes of time.
Richard is basically like Superman or some other OP hero, constantly given these weird obstacles because otherwise there would be no challenge. In real life the success of failure of his apps would have absolutely no bearing on his success because the googles, microsofts and apples of the world would be lining up to pay millions for his company, just to get him (and probably Dinesh and Gilfoyle, who are also portrayed as coding geniuses). Even in universe it's shown that Richard can just stroll into any CTO job he wants.
There is the argument against this that what SV should do is just not make the group such prodigiously skilled people and have them constantly struggle against their limitations as coders, but that would be incredibly difficult to make interesting or funny. The average, and even the informed viewer, just don't have a good enough frame of reference to understand what kind of code troubles they might get into.