-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter,

On 10/29/2009 4:16 AM, Peter Crowther wrote:
> More seriously, I agree with you and would add a second reason: doing
> a little work in a language that is reasonably "close to the metal"
> gives an insight into how the machine actually works, which stands you
> in good stead when thinking about algorithms and resource usage in
> those higher-level languages.

+1000

I've seen "programmers" hack together components simply because they
work and get the job done without regard to the performance of their
code or sloppiness of the implementation in terms of resource usage, etc.

Sorted heaps and vectors of objects instead of simple arrays, String
representations of things instead of using native data types or custom
objects. I've even seen a whole set of abstract (domain-specific) data
types represented by multiply-nested Vector objects with the order of
the objects in the Vector enforced by nothing more than
(loosely-followed) convention. Ugh.

Recently, someone posted to this list asking about serving images off
the disk by using an ImageIO library to read a file and then serializing
the image to the response's output stream (with no image processing).
Sure, that gets the job done, but bytes are bytes so there was no reason
whatsoever to use the ImageIO library, other than the fact that "there
was an API to work with images, and [I'm] working with images, so it
makes sense, right" [not the words of the poster, but I'm thinking that
was his/her reasoning].

> (And building a primitive CPU from components helps even more, but not
> many of us get to do that any more!)

In college ("university"), I got to build a RISC CPU using a software
package called LogicWorks. Very cool when it worked properly. We had
several floppy disks laying around with time-stamped backups of the
"hardware" laying around because one false move could irreparably ruin
the virtual CPU. My team had the second-fastest CPU in the class, and
the winners had brilliantly written some of their instructions to take
multiple clock ticks so that the single-tick instructions were stupidly
fast.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrpuecACgkQ9CaO5/Lv0PCLWACgtOIKaizwRYAnWizO9TOjdYSj
oa4AoJIVpKm2j1PxxZjDpJKS3IkijRLO
=+MHY
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to