[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ::scr Touchy Feely?



Simon Kinahan wrote:
> Abstraction is absolutely essential in programming [...] most
> people are not very good at it. And that includes most programmers. 

Indeed.

Abstraction is an artifact of pattern matching.  It is perhaps the most
important functionality of the grey matter in our heads with regard to
higher reasoning - that which gives us the ability to recognise common 
constructs and put a conceptual label on them.

Hmm, white and black blobby thing eating grass and farting... it's a COW!

> Anyone who has ever written a real
> system knows that the "Aircraft" class in a air traffic control system is
> totally different from that in an airline's parts management system. 

Absolutely.  And in the Real World, us humans are very flexible about
having "fluid" concepts that share the same semantic label but have very
different characteristics, all depending on context.  

Computers are so much dumber.  They need everything spelt out in nitty 
gritty detail and won't talk to each other unless they can first agree
about exactly what they're going to talk about and how they're going to
say it.

> Creating or understanding new abstractions is really quite hard,
> especially when they're as ephemeral as software is. 

Yes, and I think it's also something that comes from experience.  The 
more you see, and the more angles you approach something from, the more
likely you are to start recognising common shapes.

Too many programmers work like peephole optimisers.  They focus on one
section of a program, solve the immediate problem with a few lines of 
codes, but too infrequently step back and take a look at the bigger 
picture.

> Most of the time, we try to pull more
> and more information into thinking about something. To think at an abstract
> level, you need to be very selective about what you pull into the thinking
> process.

That's why I think the Design Patterns book was so important.  I've heard 
people say "Well they're just stating the obvious - that's all common best 
practice", but sometimes the obvious is the hardest thing to state clearly 
in a way that most people agree on as being, well, obvious.  

For me at least, it has helped to formalise some concepts in my head, 
some of which I had seen or used before, but many of which I didn't have 
names for.  Now I find I can build high-level systems in my head by 
connecting these words together without the baggage of loading the actual
algorithms and all their inherent noise into my limited brain space.

  "Right, we'll have a request passing through chain of command to 
   generate a response.  Hmmm... wait, how are these slots going to 
   share the mumble data?  Oh ok, we'll build a hand-waving model, that 
   can be a singleton, and each slot can have a different view on it... 
   Might need to attach some observers to the doodah nodes, maybe
   need some controllers too, yes that works..."

Anyway, enough rambling.  I've got patterns to match and concepts to 
abstract...

A