L
Lars-Eric Gisslén
Malcolm,
Naahh, I use pointers only when I need to. If I'm forced to/must use
pointers I use them, otherwise not. Until last spring I was the president of
a programmer user group. I did a lot of low level programming for many of
the member companies in the user group. Many of the 'dirty' jobs was down to
memory management, creating your own heap and manage the memory by your
self, plenty of pointer artithmetic, pointer type casting, bit shifting and
all that stuff. One job I had was communicating with hardware that delivered
the data in variable number of bits and packed data. Getting the data out of
one huge bit stream was only a lot of pointer artithmetic, bit shifting,
pointer type casting and pointer referencing/dereferencing. It was the kind
of code you write ones and then never touch it again. If you go back and
look at the code a few month later you have no clue about what the code is
actually doing (line by line). My oppinion is that you should never go down
to a lower level than you have to. There is no idea of writing fancy code
just to show others what you are capable of. You mostly just end up in code
that will become very hard to maintain and sometimes a nightmare to debug.
My motto is to keep the code as simple and readable as possible. That will
really be rewarded when the day comes when you have to go back and maintain
your code, independent of which development tool you use.
But I think there is something else for VBA newbees to learn before they
tries to understand some pointer basics. That is how to structure the code
and break it down to manageable and maintainable pieces.
Regards,
Lars-Eric
Naahh, I use pointers only when I need to. If I'm forced to/must use
pointers I use them, otherwise not. Until last spring I was the president of
a programmer user group. I did a lot of low level programming for many of
the member companies in the user group. Many of the 'dirty' jobs was down to
memory management, creating your own heap and manage the memory by your
self, plenty of pointer artithmetic, pointer type casting, bit shifting and
all that stuff. One job I had was communicating with hardware that delivered
the data in variable number of bits and packed data. Getting the data out of
one huge bit stream was only a lot of pointer artithmetic, bit shifting,
pointer type casting and pointer referencing/dereferencing. It was the kind
of code you write ones and then never touch it again. If you go back and
look at the code a few month later you have no clue about what the code is
actually doing (line by line). My oppinion is that you should never go down
to a lower level than you have to. There is no idea of writing fancy code
just to show others what you are capable of. You mostly just end up in code
that will become very hard to maintain and sometimes a nightmare to debug.
My motto is to keep the code as simple and readable as possible. That will
really be rewarded when the day comes when you have to go back and maintain
your code, independent of which development tool you use.
But I think there is something else for VBA newbees to learn before they
tries to understand some pointer basics. That is how to structure the code
and break it down to manageable and maintainable pieces.
Regards,
Lars-Eric