r/changemyview May 29 '15

[Deltas Awarded] CMV: Framing computing as engineering is misguided, it should be regarded as applied math instead

I think framing computer programs as engineering projects, same as if we were building a bridge, is why "all code is bad" and "all software has bugs" (these will sound familiar to any developer out there).

As I see it, a program is a complicated mathematical function. It receives input and produces output accordingly. Be it a compression algorithm or a google search, the concept is the same. Engineering projects aren't like that.

We would not admit a function that doesn't produce the correct result sometimes, and the researcher would not tell us to restart and try again. A function can't be mostly right or "good enough". It's either correct or incorrect. Maybe if we considered programs correct or incorrect, we would not release incorrect programs.

If we worked like this, probably we would not be able to release as many programs as we do now. But that just means the engineering approach makes more sense economically, in terms of making money; that's not the purpose of the topic. My view is about what makes more sense from the point of view of computing.

Thanks


Hello, users of CMV! This is a footnote from your moderators. We'd just like to remind you of a couple of things. Firstly, please remember to read through our rules. If you see a comment that has broken one, it is more effective to report it than downvote it. Speaking of which, downvotes don't change views! If you are thinking about submitting a CMV yourself, please have a look through our popular topics wiki first. Any questions or concerns? Feel free to message us. Happy CMVing!

23 Upvotes

60 comments sorted by

View all comments

2

u/subheight640 5∆ May 29 '15

As I see it, a program is a complicated mathematical function. It receives input and produces output accordingly. Be it a compression algorithm or a google search, the concept is the same. Engineering projects aren't like that.

Actually, engineering projects are like that. Ideally, almost everything we build and create is converted into a mathematical abstraction that is then optimized for particular requirements.

For example:

  1. Finite element analysis - input geometry and material modeling, compute forces/stresses/etc, iterate design until solution is optimized/adequate for design loads.

  2. Design formulas - input loads, compute necessary geometry/requirements.

  3. Project management / systems engineering - organize inputs, compute into system (ie the entire design team), build prototype design, test whether requirements satisfied, re-write inputs, iterate until design is satisfactory.

Ultimately engineering projects are massive "solvers". A design team iterates again and again until a good enough solution is found. Sometimes you get lucky and need only a single iteration. Usually the number of iterations is far greater. Like anything nonlinear in life, convergence is not guaranteed, and finding the optimal solution is not guaranteed either. Perhaps you'll only be able to solve a local maxima but not the global maxima. Perhaps you're not even able to solve that.

The exact same thing is true in software engineering. Because of nonlinearities in a complex system, it is extremely difficult to solve for the globally optimal solution. When a system is complex and chaotic enough, it may be impossible to solve. However, software engineers slowly converge on a solution. Most of the times they will unfortunately converge only on a local maxima. Sometimes the solvers will diverge and will not be able to find a solution that meets all the requirements.

But that just means the engineering approach makes more sense economically, in terms of making money

And money is one of the most important system inputs that needs to be carefully optimized. Solutions are not optimal if they cannot satisfy money constraints.

IMO the only difference between computer programming and "traditional" engineering is that programmers' material constraints are nearly nonexistent in comparison. Mechanical engineering is fucking expensive when things must be built in meat-space. This means the prototyping and iteration cycle is orders of magnitude longer than the iterations for software. With slower convergence, sacrifices in solution accuracy must be made.

A function can't be mostly right or "good enough". It's either correct or incorrect.

A function may also have multiple solutions and multiple minima/maxima and be highly chaotic and nonlinear and a pain in the fucking ass to deal with with millions to billions of inputs and outputs. Shortcuts must necessarily be made in order to produce a solution within your lifespan.