Re: GC pros and cons
Re: GC pros and cons
- Subject: Re: GC pros and cons
- From: Michael Crawford <email@hidden>
- Date: Thu, 25 Jun 2009 11:35:22 -0700
I am very strongly of the opinion that *every* programmer ought to
spend some significant time writing in assembly code.
Not for their whole careers, but they need to put enough time and
effort into it to really understand what goes on "under the hood" when
you use a compiler or interpreter.
Scott Knaster wrote a really wonderful book about how to write Mac
software, back around the System 6 days. It had a detailed discussion
of what the dissassembled machine code of compiled Pascal code looked
like, so you could understand what you were seeing when you used
MacsBug. This because source debuggers were not available for the Mac
in those days. That book made a lot of difference to my career.
If a coder has put in the time coding in assembly, no matter what
language or memory management technique he uses, he will have an
appreciation for the effect that his code is having on the underlying
hardware. It may not be a detailed understanding, but often an
appreciation is all that's required to create better, more efficient
software.
An example of the alternative is a Java eCommerce system I encountered once.
Those who use garbage collectors are quite freqently under the
mistaken impression that garbage collection prevents memory leaks.
Nothing can be further from the truth. Take a Document Object Model
tree for example: every node holds references to its parent and to all
its children, so if you have a reference to *any* node *anywhere* in
the tree, even if you don't really want or need it anymore, then the
whole tree can't be collected. That's a memory leak if there ever was
one.
This eCommerce system had such bad leakage that even under a very
light load, we had to reboot the server every day because it ran out
of swap space.
Inflammatorily,
Mike
--
Michael David Crawford
mdcrawford at gmail dot com
GoingWare's Bag of Programming Tricks
http://www.goingware.com/tips/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden