5 ms·
There are useful mental analogies between pedestrian line-of-business CRUD apps and a compilers. I don't disagree with that thesis at all. But I have seen it ta
by ucarion 4y ago
There are useful mental analogies between pedestrian line-of-business CRUD apps and a compilers. I don't disagree with that thesis at all. But I have seen it taken too far. Many engineers abstract and generalize business requirements until they find them interesting, and then implement against those requirements.
Programming languages are typically designed to be relatively simple and easy to compile. Line-of-business software tends to be as complicated and arbitrary as the organization requires. Trying too hard to make your mundane app into a compiler can push the software in a direction that makes it difficult to change in the messy ways you'll need to later on.
Note, for instance, that the author worked on a system that generates SDKs in multiple languages. This is pretty obviously a sort of compiler. Are your requirements really so fancy? Or are you making a CRUD app hooked up to a couple external integration APIs?
It's useful to see the analogies between one's domain and compilers, but see if you can't keep that analogy in your head and out of the code whenever possible.
- twitchard 4y agoAny stories to tell about compiler analogies being taken too far in web apps?
- mattgreenrocks 4y agoI dislike picking on people like this, but I feel like anything that might involve CS theory inevitably elicits this type of comment. I'm not sure what drives it, but I don't see how it helps, as it essentially amounts to, "don't write boneheaded code." I don't think many people would argue with that. I'm just not sure what it is contributing to this discussion. The number of people who know compilers well enough to know how to jam them somewhere inappropriate is probably...startingly low, too.
- ModernMech 4y ago> The number of people who know compilers well enough to know how to jam them somewhere inappropriate is probably...startingly low, too. Agreed, I had a number of students complain to me in my programming languages class that I was focusing too much on compilers, and who would ever really need to write a compiler except compiler writers? They would rather I had taught them Go or Python. But I had to tell them, guys, compilers are awesome. There are so many uses! You can use them everywhere! No one seems to want to :(
- ElectricalUnion 4y ago> The number of people who know compilers well enough to know how to jam them somewhere inappropriate is probably...startingly low, too. Nah, (almost) everyone that don't have a clue what they're doing does this for every app, be it required or not; it's however called "Babel" or "Webpack" because "compiler" is "scary".
- marcosdumay 4y agoThe discussion is really not about people using compilers on their build systems.
- ElectricalUnion 4y agowebpack is a very customizable compiler; my take is that once you're deep enough into --config (supposedly only required for non-trivial projects, in pratice, almost every JS project I saw requires extensive webpack mangling to work) you're building your own custom compiler with custom quirks for your project.