2014-07-01 19:58:39 +02:00
|
|
|
---
|
2015-08-08 19:33:11 +02:00
|
|
|
layout: project
|
2014-09-12 20:48:55 +02:00
|
|
|
title: Effectiveness, not efficiency
|
|
|
|
sub-title: By way of a new look at programming.
|
2014-07-01 19:58:39 +02:00
|
|
|
---
|
|
|
|
|
2017-11-28 19:59:01 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="tripple">
|
2014-09-12 20:48:55 +02:00
|
|
|
<h2 class="center"> Where to go</h2>
|
2014-07-01 19:58:39 +02:00
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
When making the distinction between effectiveness and efficiency i like to think of transport.
|
2014-07-01 19:58:39 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
Efficiency is going fast, like an airplane is much more efficient than a car and that is more so than walking.
|
2014-07-01 19:58:39 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
Effectiveness on the other hand is how straight your route is. Say you're in Hamburg and want to go to Berlin, then
|
|
|
|
it is not effective to go to Rome first.
|
2014-07-01 19:58:39 +02:00
|
|
|
</p>
|
2014-09-12 20:48:55 +02:00
|
|
|
<p>
|
|
|
|
Ruby, like python and mother smalltalk, let us be more effective at programming. We accept that they are not efficient,
|
2015-08-08 19:33:11 +02:00
|
|
|
but i think that can be changed.
|
2014-09-12 20:48:55 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
2015-08-08 19:33:11 +02:00
|
|
|
But even while ruby has blossomed we have seen noticeable increase in effectiveness with so called dsl's and
|
|
|
|
what is generally called meta-programming.
|
2014-09-12 20:48:55 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
But meta-programming is just a way to say that we manipulate the program just as we manipulate data. Off course! But
|
2015-08-08 19:33:11 +02:00
|
|
|
to do that effectively we need a better model of what an object oriented program actually is.
|
|
|
|
</p>
|
2014-07-01 19:58:39 +02:00
|
|
|
</div>
|
|
|
|
|
2017-11-28 19:59:01 +01:00
|
|
|
<div class="tripple">
|
2014-09-12 20:48:55 +02:00
|
|
|
<h2 class="center">Understandability</h2>
|
|
|
|
<p>
|
2015-08-08 19:33:11 +02:00
|
|
|
The way i see it is that it is the understandibility that makes ruby or python more effective. As we read much more
|
2014-09-12 20:48:55 +02:00
|
|
|
code than write (even it's our own), focusing on descriptive programs helps.
|
|
|
|
</p>
|
|
|
|
<p>
|
2015-08-08 19:33:11 +02:00
|
|
|
But you only have to look at even rubies basic blocks, to see how misleadingly language is used.
|
|
|
|
We use Strings to represent words and text, while we store data in Arrays or Hashes.
|
2014-09-12 20:48:55 +02:00
|
|
|
If you look these up in a dictionary you may find: a thread used for tying,
|
|
|
|
a military force, or a dish of diced meat and vegetables. So we have a way to go there.
|
|
|
|
</p>
|
2014-07-01 19:58:39 +02:00
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
But even more disconcerting is that we have no model of how an object oriented system actually works. We know what it
|
|
|
|
does off course, as we programm using it all the time. But how it does it is not clear.
|
2014-07-01 19:58:39 +02:00
|
|
|
</p>
|
2014-09-12 20:48:55 +02:00
|
|
|
<p>
|
2015-08-08 19:33:11 +02:00
|
|
|
At least not clear in the sense that i could go and read it's code. Ruby like python are written in c and that just
|
2014-09-12 20:48:55 +02:00
|
|
|
is not easily understandable code.
|
2014-07-01 19:58:39 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
2017-11-28 19:59:01 +01:00
|
|
|
<div class="tripple">
|
2014-09-12 20:48:55 +02:00
|
|
|
<h2 class="center">Playing computer</h2>
|
|
|
|
<p>
|
|
|
|
When programming, we fly blind. We have no visual idea of what the system that we write will do and the only way
|
2015-08-08 19:33:11 +02:00
|
|
|
to get feedback is to have the final version run. Bret Victor has put this
|
2014-09-12 20:48:55 +02:00
|
|
|
<a href="http://vimeo.com/36579366"> into words well</a>.
|
|
|
|
</p>
|
2014-07-01 19:58:39 +02:00
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
So when we program, it's actually mostly in our head. By playing computer, ie simulating in the head what the computer
|
|
|
|
will do when it runs the programm.
|
2014-07-01 19:58:39 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
2014-09-12 20:48:55 +02:00
|
|
|
And so what we consider good programmers, are people who are good at playing computer in their head.
|
2014-07-01 19:58:39 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
2015-08-08 19:33:11 +02:00
|
|
|
But off course we have the computer right there before us. Really the computr should do it rather than
|
2014-09-12 20:48:55 +02:00
|
|
|
us having to simulate it.
|
2014-07-01 19:58:39 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
2015-08-08 19:33:11 +02:00
|
|
|
What will come out of that line when we actually manage to put it into practise is unclear, though it is certain it
|
2014-09-12 20:48:55 +02:00
|
|
|
will be easier to do and result in hugely more powerful programs
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Yet to get there we need better tools. Better tools that let us understand what we are doing better. Better models of
|
|
|
|
what we call programming, and by better i mean easier to understand by normal people (not the computer simluators).
|
2014-07-01 19:58:39 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|