[KLUG Hardware] Re: Join "HARDWARE" for "endian/alignment" -- WAS: Calling all Linuxnovices

Bryan J. Smith hardware@kalamazoolinux.org
16 Jan 2003 12:17:42 -0500


--=-xjDuu02fjaSHxbgXRsLX
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2003-01-16 at 12:22, Jeremy Leonard wrote:
> Thanks for the explanation.
> So when writing data to a file you should know endian and exactly how lon=
g
> the data is, based on the system and optimization.

No, it's far more _in-depth_.  You need to the _exact_, per-byte endian
_and_ alignment for _each_ and _every_ variable in a structure.  Every
single one of them!


> In most programs I've written when writing data to a file I've had no ide=
a
> what's happening at that level. I've had strange errors in opening
> files happen after upgrades and OS changes. I unfortunately write
> mostly in VB now and I used to write in Quick Basic mostly for quick
> and dirty utilities.. I know a little C++ but haven't used it since
> MSDOS 5. I don't call myself a programmer but am trying to learn.

Again, most people don't ever learn this stuff.  It's sad.
I've written software to test networking protocols and share data across
platforms.

In fact, if there are two things that _all_ programmers should learn:
  1.  byte endian and alignment
  2.  state machines

--=20
Bryan J. Smith, E.I. (BSECE)       Contact Info:  http://thebs.org
[ http://thebs.org/files/resume/BryanJonSmith_certifications.pdf ]
------------------------------------------------------------------
* A lecture on software piracy from Bill Gates is like a lecture *
* on adultry from the owner of a brothel of other people's wives *


--=-xjDuu02fjaSHxbgXRsLX
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQA+Juk2DjEszaVrzmQRAlCwAKDFulSkR+wmQK4g5KNJyqRPwHQ0dACg24XE
7QPLvKHzAl9N31PkbuxguZI=
=SagL
-----END PGP SIGNATURE-----

--=-xjDuu02fjaSHxbgXRsLX--