How I Want to Program
Programming is hard. We all know it’s difficult to keep this kind of complexity in our heads, but are we making it too hard on ourselves? I believe we are, and lately I’ve been thinking it’s because of the authoritarian way we relate with computers.
We program by giving the computer precise instructions. Even the slightest mistake can have enormous ramifications. The classic example is a robot crossing the street; we tell it to wait to do so if it sees a car, and it waits indefinitely next to a parked car.
What if, instead of telling it what to do, we discussed what we wanted.
Me: I would like you to avoid cars when crossing a street. Computer: What should I do if I see one? Me: Wait until it passes. Computer: What if it's not moving? Me: Then go ahead and cross. Computer: Ok.
This includes a lot of hard problems, and I have no idea how to solve them. My point, though, is to have a dialogue with the computer.
I think this is something programmers are approaching, without realizing it. Think of some of the practices encouraged by agile methodologies.
TDD is essentially asking the computer if the code you just wrote works. We currently don’t have a way of asking that question directly, so it’s necessary to explain how to figure that out with a test.
Pair Programming also speaks to a need for a dialogue while writing software. An additional perspective helps when fully thinking through the details. The computer lacks the ability to carry on a conversation, so another person is enlisted.
Research and Experimentation
Is this a new idea? Is it too ambitious? I don’t know.
I don’t want to retread a thoroughly explored area, so I’ve started with research into language design. By bringing my knowledge to the current edge, I can ensure my work is contributing new ideas.
I’d also like to do what I can do to make my experience more interactive. I see no reason not to make simple adjustments to my environment, if something is immediately beneficial I see no reason to wait.
My upcoming blog posts will be focused in two categories. The first is my research and thoughts on language design; specifically how it applies to this larger idea. Second are changes to my environment and their effect on how I work.}