I was thinking about some really tight pressure
project I'm working on, and my turnaroud time for
requests.
Boss says, I review, I code, I produce report (lots
of big file grindthrough to figure crap out), we
validate the numbers might be sane, we throw to
client, he questions stuff, we do it again.
Boss to report is anywhere from 10 minutes to
2 hours.
Mind to code is usually less than 2 minutes, with
file wrapper, reporting, etc, another 5 to 10 minutes.
Sanity checking is most of the time.
Ok, so I write in Perl, it's the one I'm most productive
with (at least for this non-visual type of work), and
I know that if I think of something, I can have working
prototype in a very quick amount of time. Far faster
than anyone used to expect I could.
Note the used to. Damn, I raised the bar, they expect
this stuff ALL the time. Oh well, just need a bit more
caffeine.
Back to mind vs code. So I whip this stuff out, sometimes
it is throwaway crap, sometime it is a core lib that I'll reuse
since it pulls the files together, etc.
If I go back and reread the code, I use it to put my mind
back in the state I was when I wrote it. I'll review and
add comments if I need a hint for later. I can tell it really
meshes with my thoughts in a few minutes. I've read about
this aspect of setting state, but never really thought about
it before.
So now I'm thinking about historical code I've read from
other people. I knew it was REALLY bad. Thousands and
thousands of lines of cut and paste, no usage of arrays
or hashes, just total horrible crap that never worked and I
had to rewrite.
The person I was thinking of in this case was an older hot
babe. She wrote that code over a year, never delivered anything,
her boss loves her, and he'll throw a more $$ at her on the next
company he kills.
And this code was a huge window into her mind.
Perl was based on bunches of unix utils thrown together, glued
by a linguist. It grew a huge amount since then, but as most
people who dislike it know, you really can't get away from
your roots in this lanquage.
Which means it really is not like any other language I've ever
worked with.
Except English. Fast thought to code, but some very odd syntax
required since certain features grew organically and were tacked
on.
So does this window to the mind aspect work with other languages?
Sure. Somewhat.
I assume any of the more recent compact scripting languages (ruby,
python, etc) allow the very compact mind->code translation, which
means small amounts of elegent code might be obvious.
But they might not. These languages were designed by people who
were focused on the computer, and had a lot more education and
direction.
So even if they are very good languages, there is still more stuff
happening in the person's head before it get committed to code,
which means when you read the code you see something twice removed
from the thought process that created it.
Comments?