Engineering is typically the art of knowing what solution fits best to the problem. If I were asked such as Should I use singleton classes?, Should all database have views and triggers?, What is the greatest PHP framework?, Is C++ or Go better?, or Is RSA or AES more secure? I will most certainly answer It depeneds...But one question stands out, Should I use modular design? - AbsolutelyI have not once doubted modular design in my experience. Software that I make must be assembled, put together, and interchangeable like Lego bricks (after you define what a brick is of course). No matter what language, no matter what machine, no matter what purpose, ect. So I have yet to say it depends when ask if modular design should be used.Nearly every other aspect of software engineering has a take-give index it can be put on. Modular design (so far) only ever gives and gives. This frightens me and I constantly seek out why anyone would not use modular design. I mean if you program in such a way where all the code is glued together and contains variable length functionally and limited expandability, and no means of error severability, does that automatically mean you're a bad programmer? Is there any reason to code in that fashion besides laziness? Are their any other ways to design a project in? Or is modular designing the above all most 100% undisputed right way of doing things (just like breathing)?
Are there any reasons NOT to use modular design?
design;design patterns;modeling;engineering
Modular design requires (a non insignificant cognitive) effort as a design heuristic, but its benefits come back in managing complexity, simplifying long-term maintenance, facilitating reuse, etc. So, a project that doesn't care about any of those things would be one where modular design would be a waste. It's similar to Thomas Kilian's answer mentioning very small systems.For an analogy, think about IKEA furniture and all the modular design effort that go into it. Then, ask yourself if you just needed a table to put food out for guests for a one-night celebration, you'd hack something out of whatever you had at your disposal to solve the problem (kids do this quite well!). Designing a new IKEA-like table (with modular parts) for this purpose would be overkill for your one-night party. I like Neal Ford's spectrum of design. Modular design (the way I see this) would not even exist at the cowboy hacking extreme. 