I'm no computer programmer, I couldn't even "cook an egg" to quote Lemire. In fact, since I have no idea what a PHP script is, I guess that means I wouldn't even know an egg if I saw one (pretty sad). So I don't have an answer for you, but I find the question interesting because I'm now wondering what it is that all these people with computer science degrees 'do' if they're not writing programs for companies. And the people who are writing programs for facebook and google - do they have computer science degrees, some other degree, or no degree? It's a practical question, I know, and probably one that frustrating for computer science majors. I suspect it would be like asking a criminology major about forensic science (which actually falls within the biologists' domain).
The way I read it, the academics are busy innovating new programmatic ideas like a better web search algorithm or programs to recognize text or faces but their implementation is poor. I can see that it would be great if their implementation was better - faster/more efficient, bug free, and logically constructed/organized and documented. But I can also see why the focus is on innovation rather than quality control. They're not making money based on how neat and tidy the code is, but based on its novelty. Time spent tidying up the code is wasted time that could be spent on developing a new idea. As long as private companies like facebook or google exist then there will be someone there who earns a living transforming that raw idea into a clean, polished, and useful application for the masses. I'm not sure I see what's wrong with that - it's a division of labor that seems to work great.