I guess the longer I've worked with other developers, I prefer readability first, test-ability second.
I guess the longer I've worked with other developers, I prefer readability first, test-ability second.
What would be ideal is a system that allowed you to define advice by monkey-patching but indicated what advice was applied to a method at the site of it's definition. As mentioned in this comment http://news.ycombinator.com/item?id=3246215, I think we are bumping into a limitation of what can be easily managed in "unstructured" (I would say "dead") text files.
Yes, I think so too. There are many kinds of relations between entities that we cannot specify just because "dead" text files make them hard to express. Also, it makes that language "wars" focus on shallow concerns such as syntax, instead of semantics.
It would be great to be able to put constraints and relations at the abstract syntax tree level, or abstract semantic graph level (cross references and such that are automatically updated if entities are moved/renamed).
IDEs sort-of work around this by parsing the code and trying to bolt on features, by handing the "dead" text files intelligently. But all this work is lost as soon as you close the editor, so it does not allow the programmer to retain changes at this level.
But I'd love to work on a project that examines different, new ways to represent source code. Which could aid static/dynamic code validation, documentation, code comprehension, refactoring, cross-cutting concerns, and would allow for rendering the source code in any style and syntax that the developer wants.
Of course, this also would present challenges in the area of scm systems, because those are really focused on 'dead' text files. One idea I've had is to represent code as a graph, for example, in a graph database.
You mean like in LISP?
Alternately, you can do the the reverse - someone writes the change in the more traditional manner, but you can view - and edit - the change-set as if it were a module of monkey-patches isolating the relevant concerns. Or any particular view of the program someone can think of that's useful.
I'd like to program like that.
ETA - Sorry for the accidental downvote; found a couple of your other comments to upvote.
On the other hand I don't want to go completely bananas with the 'structureless' LISP. In my opinion at least it would aid comprehension to be mirror modern high-level languages. But you'll be able to choose Ruby or Python syntax-mode at will (or maybe even LISP-mode :-).
One common followup argument is that functional programming is great for this, because pure functions can be treated as black boxes. Sorry, but the problem is on the algorithmic/business logic level, which cannot be solved by the choice of programming language/paradigm.
Example: Remove data from one database and put it into another one, transactionally. At any point in time any other process must see the data in exactly one of the two databases. You can not merge the databases into one.
For stuff like this the absolute worst case is you update one or more legacy systems. But, that's just part of the cost / benefit / risk analysis.
I joke of course. But wouldn't you find it weird if two hundred years from now we were still writing and reading code like we are today? If that were the case, I'd say we had done a shit job of developing development.