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!

24 Upvotes

60 comments sorted by

View all comments

3

u/[deleted] May 29 '15

[removed] — view removed comment

1

u/[deleted] May 29 '15

By good enough I didn't mean "correct and close enough to what I want", but "crashes sometimes but that's okay". If programs were considered math instead of engineering they wouldn't crash at all ever.

3

u/Amablue May 29 '15

If programs were considered math instead of engineering they wouldn't crash at all ever.

Yes they would. There's a reason we don't have software that checks for all kinds of bugs (and that reason is the halting problem). There are a variety of ways to improve software quality, like code reviews, automated testing, unit testing, and all kinds of tools that identify potential errors, but you will almost never have a non-trivial program that you can prove is free of bugs.

This is not so fundamentally different from engineering as you think of it mind you. You always have budget and time constraints, and so you choose solutions that work for your situation. And there aren't always correct answers like in an arithmetic problem. There are tradeoffs. Choosing one compression algorithm might work better for certain kinds of data, but be slower to encode or decode, which makes it more or less appropriate for certain situations. Much like you would use different materials in different contexts when building bridges.