On Mon, Jul 19, 2010 at 10:22:33PM -0400, Gyepi SAM wrote:
> On Mon, Jul 19, 2010 at 05:01:09PM -0400, Uri Guttman wrote:
> > first off, why are there so many languages? and by many, i mean
> > thousands and more. how many of you have invented a language (even a
> > mini-lang)?
> There are many reasons why there are so many languages; fun, profit,
> inventiveness, need, annoyance are all good reasons, I am sure.

There's also NIH, lock-in, ignorance, prima-donna-ism, ...

Hands up who's not suffered from any of those?  Ah yes, none of us ;-)

> > should you learn assembler? is there work in it (yes)? what would
> > assembler teach you when using a high level lang?
> Absolutely! I thoroughly enjoyed learning assembler. Though I no longer
> program in it, I still look at the assembler my compilers generate.

I rarely write it any more, and these days I never bother looking at my
compiler's output unless I'm debugging - I stopped when compilers got as
good as me at optimising the code.

The only assembler code I write these days is for fun, on a Z80,
although at some point I'm gonna learn ARM assembler too, Just Because.

And something that few programmers think about, but in my opinion just
as important as knowing how code gets executed is having a good
understanding of how the OS works: how processes start, stop and
communicate with each other; how a filesystem works; how TCP and IP
work; and so on.  Knowing at least the basics of that sort of stuff
makes so many problems go away and will make it much easier to write
better code, and will prevent you from wasting time on stuff that won't
work.

Taking a recent case on a project I work on, someone suggested that
because 'rm -rf $foo' was taking too long, you could speed it up by
re-writing it to first scan everything under the $foo directory and then
deleting stuff in inode order, *assuming* that that would reflect their
physical order on the disk and so reduce the time wasted thrashing the
head back and forth.  Naturally, it won't work.  Not only does inode
order have no relationship to files' position on the disk, he's also
making a fundamental misunderstanding about how filesystems work.
Parent "objects" in a filesytem are not guaranteed to have higher (or to
have lower!) inode numbers than their "children"; inode numbers get
re-used over time; space freed up by deleted files gets re-used;
deleting a file (actually deleting a dirent) means updating a directory,
an inode, and (possibly) the disk free space map, which might be in
three different places; and so on.

-- 
David Cantrell | Reality Engineer, Ministry of Information

Arbeit macht Alkoholiker

_______________________________________________
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to