Saturday, July 13, 2013

Programming and Philosophy

"This, what is it in itself, and by itself, according to its proper constitution? What is the substance of it? What is the matter, or proper use? What is the form, or efficient cause? What is it for in this world, and how long will it abide? Thus must thou examine all things that present themselves unto thee." --Meditations, Marcus Aurelius

"That forces you to sort it out in your own mind. And the more slow and dim-witted your pupil, the more you have to break things down into more and more simple ideas. And that's really the essence of programming. By the time you've sorted out a complicated idea into little steps that even a stupid machine can deal with, you've learned something about it yourself." --Dirk Gently's Holistic Detective Agency, Douglas Adams




I once read a posted question from a person asking advice on what degree to pursue in preparation for a computer game programming career. My answer, in its entirety was:

Although it's been awhile since I left college, I know several universities are starting degree programs that are geared more toward practical applications of programming skills. Whether it's called "Computer Engineering" or "Informatics" (A word that's always somewhat bewildered me) these degrees are more centered on applying the concepts of Computer Science.

In other words, you won't learn how to write sorting algorithms, but you will learn how to use them in various platforms. Take for what you will.Personally, I don't care. Give me someone that can mentally deconstruct a problem and think through a practical solution. They can be taught to be good programmers, assuming they haven't already learned. In a lot of ways, I'd take someone with a philosophy degree. Someone who is used to asking what the nature of an object is and it's role in the system it resides in is a heck of a lot more useful than a "Cowboy Coder" that just blasts through something to get a project done. Without software development, programming is ultimately a pointless exercise. Computer Science is intellectually stimulating and a necessary part of software development. However, unless applied for some practical use it is nothing more than theoretical pedantry. And while Computer Science is encompassed by Software Development, it is by no means the most important aspect.



Software development is about solving a problem. Whether it's "I need an online application to sell my product" or "I need a game on my mobile device to pass the time", software development fills a need. And in order to fill a need, you first have to understand the need and the domain in which that need will be filled. These are not trivial points, nor are they tasks left to a business analyst or some such, although it is up to such a person to help the development staff understand these things.



A teacher of mine, back when I began learning about software development, told me that programming is about creating idealized models of real world concepts. In order to implement a payment processor, for instance, you need to create a software analog of the concept of a payment. Of the machine that accepts the payment. Of the items you are paying for. And in order to create accurate models of these real world ideas, you need to understand them, what they do, what they know and are responsible for, and how they fit into the whole. Again, this is not a triviality. Creating a model of a payment that knows about the items being purchased causes problems when it is time to create a new kind of payment or a new way of representing the items being purchased. Just as creating a shopping cart that knows how to pay for its contents causes problems when a new kind of cart or payment is needed. This is a fundamental concept in software development and one that can not be properly implemented by someone that doesn't understand the problem to be solved or the domain in which it is to be solved.

This is the reason for my comment. I don't care if you can swap variable values without an intermediary variable. I don't care if you can hand-code a sorting algorithm or think you can write a better encryption scheme or algorithm. In fact, in order, I say "Who cares?", "Use a tool", and "No you can't. Use a tool." I care if you can ask the questions "What is this? What does it mean to be this? What does this thing do and what does it know?" I want someone that can deconstruct a problem and break it down into little steps that a stupid machine can understand, thus increasing his own understanding of the problem. Without these abilities, a developer's actual programming ability can only be properly applied by accident. In other words, in order to become a successful software developer, one must first become a philosopher.
Full Post

No comments:

Post a Comment