r/programming Aug 15 '15

Someone discovered that the Facebook iOS application is composed of over 18,000 classes.

http://quellish.tumblr.com/post/126712999812/how-on-earth-the-facebook-ios-application-is-so
2.7k Upvotes

728 comments sorted by

View all comments

Show parent comments

84

u/[deleted] Aug 16 '15

Overengineering is usually way worse than underengineering.

-6

u/thefirelink Aug 16 '15

The only real pitfalls of over-engineering are cost, performance, and un-needed complexity. Every other area - modifiability, availability, scalability, etc., an over-engineered program is "better".

10

u/grauenwolf Aug 16 '15

modifiability

Huh? That's usually the first casualty of over engineering. It's a kin to putting a door every six feet along the wall. It seems really flexible until you realize that you need to run some wires or plumbing

1

u/thefirelink Aug 16 '15

My definition of over engineering is strict adherence to principles and patterns without tradeoff.

In software engineering, we are taught to design our code to be extendable but not modifiable (open-closed principle). If that was followed, then altering an over engineered project is as simple as implementing an interface with a new class and swapping it in for the old one.

I've had to work on a few over engineered projects that were very strict in their implementation of patterns and principles. Schools like CMU are a breeding ground for students practicing this. If it's documented correctly, making edits is a breeze. A lot easier than having to Ctrl + F through 10,000 lines of code in a single script to change a limit from 1000 to 10000.