Thursday, 19 April 2012

Digital Design Desires

Response to: http://jonbho.net/2012/01/24/i-want-to-fix-programming/

Developing software is fundamentally a learning process; As developers, we direct the majority of our efforts towards exploring & learning the problem domain and the space of possible solutions. In comparison to this, the act of transcribing that understanding to a formal machine-readable representation ("source code") is rather less significant. 


Notwithstanding this, the learning process itself is intimately involved with the manipulation of formal representations and the interaction of these with the environment. The formal language (and associated tools) that we use helps us not only to formally specify a set of possible solutions to the problem; but also helps to guide us in our search for those solutions and to build up our knowledge and understanding of the problem domain and of our proposed solution. 


Importantly, the tools that we use help us to understand the implications of the formal statements that we have already made in our exploration.


This is really about the software development process as a whole, and how the specifics of the language support that process. The output of the software that we create, test results, debugger output, static analysis etc.. all help us to understand the problem domain and the current state of our search for a solution. 


The languages that we use do need to support these tools better than they currently do, (especially static analysis, IMHO) but the focus of the (many) discussions on the language itself and it's syntax is somewhat misleading, I think. 


I would rather the effort be spent on extending and improving the toolchains surrounding languages that already exist and are popular. I want continuous testing, style checking, static analysis and fuzz testing to be ready "out of the box" and enabled by default; from the get-go, I want my IDE/compiler/interpreter (with default settings) to refuse to build/run my code unless the style is spot-on, the test coverage 100% and the static analysis gives the thumbs-up. 


If that means I must constrain the way that I develop software, so be it. 


I agree with the original post: it would be nice for a program to consist only of invariants and test-cases, with the algorithm generated automagically. I suspect that, feasibly, the developer will still need to provide some guidance in the choice of algorithm, but I see no reason why we could not have our IDEs/text-editors provide continuous feedback when the statements that we type violate some constraints that we have previously specified, or cause some test-case to fail. 


This would have been unthinkable a few short years ago, but the computational power at our disposal right now is immense: enough to make us shift our concept of what is possible.