Java Future

D

Daniel Pitts

amanda said:
About assembly, when I started taking programming classes I didn't take
Assembly. Now, after learning C++, Java, VB.net, C# (currently) - will
concentrate on Java - should I bother taking a clas in Assembly? (Note
that I took DBMS, TCP/IP, and some other classes). Personally, I dont'
feel like I am missing that much for not having taken Assembly but I
still wonder ...

BTW, to all those responded here, know that this thread has been very
informative for me as well.

Because Assembly is so low level, learning it helps give one a better
understanding of how the computer works in a fundimental way. I think
it is useful to learn assembly, but I know many programmers who know
very little about it.

To refrase: You may never need write anything in assembly, but learning
how to do so will give you a more rounded experience base.

Personally, if I were a manager hiring someone, I would prefer an
applicant with assembly experience, but I'd also prefer they avoided
using it unless there was a time-critical project involved. "Premature
optimization is the root of all evil" -Knuth

Good luck,
Daniel.
 
A

amanda

Daniel said:
Because Assembly is so low level, learning it helps give one a better
understanding of how the computer works in a fundimental way.

That would include how each data type is handled, etc.
I think
it is useful to learn assembly, but I know many programmers who know
very little about it.
To refrase: You may never need write anything in assembly, but learning
how to do so will give you a more rounded experience base.

I always felt that way. When I wanted to take it the class time was
clashing and now, I am so pressed with time.

Personally, if I were a manager hiring someone, I would prefer an
applicant with assembly experience, but I'd also prefer
they avoided using it unless there was a time-critical project involved.
Can you Elaborate on the above statement?
 
D

Dag Sunde

amanda said:
Daniel Pitts wrote:

Can you Elaborate on the above statement?

"Time to market" and "maintenance nightmare" are two thoughts
that springs to mind...

And thats a third...

:)
 
T

Tom Forsmo

amanda said:
That would include how each data type is handled, etc.

I would also suggest reading a good book about modern hardware and
specifically processors. It will help you understand how a computer
performs high level tasks and what to avoid and such. (a good book on
modern computer systems/processors is "Computer Organization And Design"
http://www.amazon.co.uk/Computer-Or...ef=sr_1_1/202-3475253-3023821?ie=UTF8&s=books


F.ex. a common assumption by many programmers today is that memory usage
does not matter any more, because its so cheap. But if you have some
knowledge of how computers work you would understand that a given
algorithm processing a large amount of data could perform significantly
better if it took into account actual usage of data types on the
processor, memory alignment, level 1/2/3 caches, superpipelining etc and
how that can affect the efficiency of a solution. It could in other word
help you design/program a solution which only requires say 32MB of
memory instead of 128MB. And for the system to don't have to read
through 4 times as much memory would save some time.
Can you Elaborate on the above statement?

only optimise a piece of code with assembly if that part of the code is
time-critical.
 
A

amanda

Tom said:
I would also suggest reading a good book about modern hardware and
specifically processors. It will help you understand how a computer
performs high level tasks and what to avoid and such. (a good book on
modern computer systems/processors is "Computer Organization And Design"
http://www.amazon.co.uk/Computer-Or...ef=sr_1_1/202-3475253-3023821?ie=UTF8&s=books


Thanks. I got the isbn no for it (1558606041) and saw that used books
are available. In fact, at
http://www.amazon.com/Computer-Orga...id=1162754505/ref=sr_11_1/104-1059271-0022363
amazon is suggetsing the book "Operating System Concepts by Abraham
Silberschatz" to buy along with it. Should I also an operating system
book? I really don't want to take a class for Operating System since
only Universities offers it and the nearest Univ here has severe
parking issues for me to commute.

Should I bother reading Operating System? Whatw ould be best book for
self-learning?

One review on "Operating System Concepts by Abraham Silberschatz" said
as follows:
"Where that book (refers to isbn 1558606041) looks at how computers
work from the point of view of electrons whizzing by on the silicon,
this book looks at how they work from the point of view of the
operating system."

Another review said " Excellent textbook on the design of operating
systems, January 13, 2006"

But another said " Try reading 3 pages without falling asleep, March 4,
2006" and suggests to try the book by Tanenbaum but I know that
Tanenbaum's book is text book too. The school I was going to used it
but instructor at the time was terrible - it's not her fault theough
since the shcool used here for every courses they didn't have an
instrictor - and I didn't take it.


F.ex. a common assumption by many programmers today is that memory usage
does not matter any more, because its so cheap. But if you have some
knowledge of how computers work you would understand that a given
algorithm processing a large amount of data could perform significantly
better if it took into account actual usage of data types on the
processor, memory alignment, level 1/2/3 caches, superpipelining etc and
how that can affect the efficiency of a solution. It could in other word
help you design/program a solution which only requires say 32MB of
memory instead of 128MB. And for the system to don't have to read
through 4 times as much memory would save some time.


only optimise a piece of code with assembly if that part of the code is
time-critical.

Guess I should take Assembly then.
 
D

Daniel Pitts

I did, it was the quote of Knuth. Optimizing early wastes time,
energy, and money. Not just early, but later during maintanence.
only optimise a piece of code with assembly if that part of the code is
time-critical.

The truth is, generally you can optimize your algorithm effectivly
without resorting to worring about a cycle here or a byte there.
Sometimes, if you're on the cutting edge of technology, you need to
trim as much as possible. However, in most circumstances, having a
profiler to tell you exactly what part of your code is taking the most
amount of time, and then fixing that, is the best way to go. Often
times you'd be surprised by what is actually slow versus what you would
expect to be slow.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Daniel said:
Personally, if I were a manager hiring someone, I would prefer an
applicant with assembly experience, but I'd also prefer they avoided
using it unless there was a time-critical project involved. "Premature
optimization is the root of all evil" -Knuth

The common practice 20-30 years ago of determining the performance
critical code and write that in assembler should be considered
obsolete.

The reason to write in assembler is if you can do something
in a way that the compiler can not - like using special instructions
and similar.

The first give maybe 5%. The latter may give x5.

Arne
 
D

Daniel Pitts

Arne said:
The common practice 20-30 years ago of determining the performance
critical code and write that in assembler should be considered
obsolete.

The reason to write in assembler is if you can do something
in a way that the compiler can not - like using special instructions
and similar.

The first give maybe 5%. The latter may give x5.

Arne
True, however, the better solution would probably be to change the
optimizer to use those special instructions where appropriate.

Daniel.
 
T

Tom Forsmo

amanda said:
Should I bother reading Operating System? Whatw ould be best book for
self-learning?

Its allways a good idea to know something about the underlying systems,
be it hw, os, libraries, frameworks etc.

I have not heard of the book you are refering to, but from the index it
looks like a reasonable book. But I dont know about its actual contents.

There are two authors well known for their operating systems books,
William Stallings and Andrew Tannenbaum. Stallings tend to write books
about OS concepts, while Tanenbaum writes books about making operating
systems (he is the inventor and maintainer of the Mach operating system)

The book you suggested has higher rating on Amazon than Stallings, but
as I said I dont know it.

Tanenbaums book is

http://www.amazon.com/Modern-Operat..._bbs_sr_2/002-8324595-2191217?ie=UTF8&s=books

There is another book as well, which I used when at university (its not
highly rated at amazon either, but I think its quite good). Mind you, it
is much more technical and a bit older, than stallings, but the main
principles conveyed should still be the same.

http://www.amazon.com/Concurrent-Sy...ef=sr_1_2/002-8324595-2191217?ie=UTF8&s=books

(I dont understand though, why OS books are so expensive, over a $100!?!?!)
Guess I should take Assembly then.

You should learn some assembly because it helps you better understand
hardware details. You probably wont be using assembly much, at least if
you do enterprise programming, but if you do embedded or other similar
things, then of course. In my 11 years of working in computing I have
only used assembly once in an actual project, and that was when
optimising a TCP/IP stack in NetBSD to use parallell processing to
perform internet checksum calculations for multimedia servers
But as I said, its a good idea to have done some programming in assembly
to understand it better and to know what its about.

tom
 
K

Kenneth P. Turvey

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

How does one determine whether one can pick up a new language quickly or
not? So far, they all seem pretty much the same to me, at least at basic
level.

All this said, it does matter in reality. Most employers would like you
to have a couple years experience doing exactly what they are doing in the
language they are using. When they say experience, they mean full-time
experience.

It may not make sense, but that is the way the world works. If you are
going to invest the time to learn a new language to use, you might want to
look at who your target market is before you pick the language.

I really enjoy programming in Java more than I did in C++. If that's a
factor in your decision making. Java is just a nicer language to work
with. It isn't perfect by any means, but it is nice.

Ideally they would break the old code once every ten years and come up
with a new and better language based on the old one. They could open
source the old code and allow it to continue developing, but make all the
fixes that were ignored to avoid problems with incompatibility.

Just my 2 cents.


- --
Kenneth P. Turvey <[email protected]>

XMPP: (e-mail address removed)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFFTpzLi2ZgbrTULjoRAvmyAJwPsKvg+v7LAyvoJbgpWFi0mXfRxACcDox0
XNcZjIJCotd3oHPPZgNpkRM=
=97fk
-----END PGP SIGNATURE-----
 
T

Thomas Weidenfeller

Arne said:
A FAQ is excellent for questions with a reasonable
objective answer.

I can tell you from experience that an FAQ doesn't help much. These days
the people who would benefit most from reading an FAQ are also the ones
who most likely don't read it.

/Thomas
 
C

Chris Uppal

amanda said:
How does one determine whether one can pick up a new language quickly
or not? So far, they all seem pretty much the same to me, at least at
basic level.

First off, languages are /not/ all pretty much the same -- however it is quite
possible that you have only seen some of the subset of languages that /do/
resemble each other quite strongly. E.g C is not so very different from Pascal
(once Pascal has been enhanced enough to make it actually usable), and C#
resembles Java rather closely. But if you were to look at some of the other
real languages which are our there, such as Smalltalk, ML (and family), Lisp
(and family), then you would find very different ways of thinking, much more
powerful ways of structuring programs, and generally a higher level of
abstraction. And they by no means exhaust the range of seriously intended
languages (e.g. Icon, Prolog, Sather, Dylan, and many, many, more).

Oh, and don't forget SQL.

Secondly, it is easy, when you are used to language X, and trying to learn Y,
to miss important differences between them. Especially if Y seems to have
near equivalents to most of the features of X. The problem is that you'll try
to program in Y in the same style (using the same kinds of programming
structures and the kinds of abstraction) as you did in X. The classic example
of this is the C programmer who uses a C++ compiler but still writes in C (or
very nearly). Another example which comes up fairly often here is the C++
programmer who tries to use Java as if it were a dialect of C++.

So, how long does it take to pick up a language ? It depends on your
standards. If all you are trying to do is get to the point where you know the
syntax well enough to write programs without having to check the manual every
time you use, say, a while loop; then it I see no reason why it should take
longer than a weekend for most well designed languages (simply because any well
designed language has been designed to be learned). There are exceptions -- I
doubt whether it is possible to learn C++ (even to that minimal extent) in less
than a week or so. And I doubt whether I personally would ever be able to
learn APL (or its descendent J) no matter how long I tried.

However, knowing a language to that extent is a useless party trick. You will
neither be writing correct code yourself, nor able to follow other people's
code -- unless it is written in baby talk. Learning a language to the extent
where you are naturally comfortable with full and idiomatic use of its features
takes a long time. I would say 1 year of nearly full-time use at a minimum.
You would certainly be /productive/ long before then, but not expert enough to
be trusted to work safely unsupervised.

There may be cases where two languages are genuinely close enough to each other
that knowledge of one will significantly reduce the startup time for another
one, but I can't think of any examples offhand (unless, perhaps in the
functional language world). I doubt whether I could gain a level of knowledge
of C# equivalent to my knowledge of Java in less than a year -- and they are
about as similar as languages get.

On the other hand, there are /definitely/ languages which are so complicated
and/or arcane and/or treacherous that it would take a lot longer than a year.
I don't believe that it is possible to become a competent C++ programmer in
less than 3 years -- and most people (if they ever manage it at all) will take
longer still.

-- chris
 
C

Chris Uppal

amanda said:
Should I bother reading Operating System?

If you want to be any good then sooner or later you will have to learn
something about what goes on below the level of the language(s) you are using.
That includes things like hardware design, language implementation, and OS
implementation. Whether it is a good idea for you to try to learn all that
stuff /now/ is a different matter. If you find you are uncomfortable with your
current levels of insight (feeling as if you are being kept in the dark about
important things), or are just plain curious (and have time/cash to indulge
that) then by all means try to broaden your scope now. If not then there's no
reason not to put it off until later. You can't do /everything/ at once...

I remember feeling very frustrated when I was learning to program -- all this
stuff that seemed to happen "by magic". Did people really expect me just to
accept all that ?! Anyway, I found a book which scratched that itch nicely --
Andy Tanenbaum's "Structured Computer Organisation". That's a very old book
now, but if you can find a copy in a library then I think it's still worth a
read. I don't know what the current edition is like (it's in it's fifth
edition, I read the second -- which is now quite dated), but few[*] concepts in
hardware/software have changed in the last 50 years so I suspect it might still
be pretty good.

One specific point: I don't think that (these days) learning assembler is a
particularly good way to learn hardware. The real architecture of common
modern CPUs is so different from their instruction set that effectively
"assembler" is just another high level language (a very odd one, and one that
is very difficult to use, but not much more "close to the metal" than -- say --
C). of course, you may need assembler for other reasons -- you may even pick
it up as you learn about hardware. I'm not suggesting you avoid it, but only
that it has little value as an end in itself.

-- chris

[*] But not none: for instance the Micro-Kernel approach to OS design seems to
have faded away (ed. 2 talks quite a lot about that). Also micro-processor
design has become Very Strange...
 
T

Tom Forsmo

Thomas said:
I can tell you from experience that an FAQ doesn't help much. These days
the people who would benefit most from reading an FAQ are also the ones
who most likely don't read it.

That might be true, bit it is a good source to refer to so we don't have
to answer the same question for the nth time. The comp.lang.c faq for
example is extremely valuable and well written.

Does there exist a comp.lang.java.{programmer,help} faq of its own?
(I know there is one comp.lang.java faq but it has not been updated
since 1997, so its a bit old.)

I know of the mini faq that's posted in this group every week or so,
does any of the faq in there cover many of the faq questions that come
up in this group? Some of the questions I can think of are
- which is the best language
- what is best for developing app X
- what do you think is the future in java
- compilation/classpath problems
- does java have pointers / what's a reference compared to a pointer
and other basic language questions.

I know that the faqs listed in the mini faq are very good, but I feel
that there is some stuff not covered by them. Am I mistaken?

tom
 
T

Tom Forsmo

Chris said:
One specific point: I don't think that (these days) learning assembler is a
particularly good way to learn hardware. The real architecture of common
modern CPUs is so different from their instruction set that effectively
"assembler" is just another high level language (a very odd one, and one that
is very difficult to use, but not much more "close to the metal" than -- say --
C). of course, you may need assembler for other reasons -- you may even pick
it up as you learn about hardware. I'm not suggesting you avoid it, but only
that it has little value as an end in itself.

To a certain extent I agree, but it does allow you to read the details
of and experiment with the processors own instructions, this is
invaluable information. In addition to this, knowing how modern
processors and computers work, helps you understand what actually
happens when you write a statement or algorithm in java.

tom
 
A

amanda

Tom said:
Its allways a good idea to know something about the underlying systems,
be it hw, os, libraries, frameworks etc.

I have not heard of the book you are refering to, but from the index it
looks like a reasonable book. But I dont know about its actual contents.

There are two authors well known for their operating systems books,
William Stallings and Andrew Tannenbaum. Stallings tend to write books
about OS concepts, while Tanenbaum writes books about making operating
systems (he is the inventor and maintainer of the Mach operating system)

The book you suggested has higher rating on Amazon than Stallings, but
as I said I dont know it.

Since I won't be making OS, I think what I should get is the other type
of book, not Tanenbaums's.
Tanenbaums book is

http://www.amazon.com/Modern-Operat..._bbs_sr_2/002-8324595-2191217?ie=UTF8&s=books

There is another book as well, which I used when at university (its not
highly rated at amazon either, but I think its quite good). Mind you, it
is much more technical and a bit older, than stallings, but the main
principles conveyed should still be the same.

http://www.amazon.com/Concurrent-Sy...ef=sr_1_2/002-8324595-2191217?ie=UTF8&s=books

(I dont understand though, why OS books are so expensive, over a $100!?!?!)


You should learn some assembly because it helps you better understand
hardware details. You probably wont be using assembly much, at least if
you do enterprise programming, but if you do embedded or other similar
things, then of course. In my 11 years of working in computing I have
only used assembly once in an actual project, and that was when
optimising a TCP/IP stack in NetBSD to use parallell processing to
perform internet checksum calculations for multimedia servers
But as I said, its a good idea to have done some programming in assembly
to understand it better and to know what its about.

Oh, I really wanted to get to know these things. At the time - where I
was going to school in another state, I was in a hurry to leave the
school and city becaue of illness worsedned by the climate. I will
take it here - a 2 year college but the instructor for that class very
good.

For operating system books, I can get Barnes and Nobel - one in 5 mins
drive from my place - odrered it check out before buying.

Thanks a lot.
 
A

amanda

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



All this said, it does matter in reality. Most employers would like you
to have a couple years experience doing exactly what they are doing in the
language they are using. When they say experience, they mean full-time
experience.

It may not make sense, but that is the way the world works. If you are
going to invest the time to learn a new language to use, you might want to
look at who your target market is before you pick the language.

Thanks a lot. This is very useful info. I like Java a lot, and some of
the jobs ads I saw that requires Chemistry knowledge which is what I
want to get into - I would like to use my Chemsitry knowledge from
Master's degrees - uses Java but some, no doubt are getting into C#. I
haven't seen an ad but a friend of mine, a Java guy, got an interview
at a big Parma company where he was told that they were going to use
C#. He lacked Chemistry knowledge and probably showed his dis-interest
in it and so he didn't gett he job.
I really enjoy programming in Java more than I did in C++. If that's a
factor in your decision making. Java is just a nicer language to work
with. It isn't perfect by any means, but it is nice.

Ideally they would break the old code once every ten years and come up
with a new and better language based on the old one. They could open
source the old code and allow it to continue developing, but make all the
fixes that were ignored to avoid problems with incompatibility.

Just my 2 cents.

Thanks a lot for the info.
 
A

amanda

Chris said:
First off, languages are /not/ all pretty much the same -- however it is quite
possible that you have only seen some of the subset of languages that /do/
resemble each other quite strongly.

You are right.

E.g C is not so very different from Pascal
(once Pascal has been enhanced enough to make it actually usable), and C#
resembles Java rather closely. But if you were to look at some of the other
real languages which are our there, such as Smalltalk, ML (and family), Lisp
(and family), then you would find very different ways of thinking, much more
powerful ways of structuring programs, and generally a higher level of
abstraction. And they by no means exhaust the range of seriously intended
languages (e.g. Icon, Prolog, Sather, Dylan, and many, many, more).

Oh, and don't forget SQL.

Secondly, it is easy, when you are used to language X, and trying to learn Y,
to miss important differences between them. Especially if Y seems to have
near equivalents to most of the features of X. The problem is that you'll try
to program in Y in the same style (using the same kinds of programming
structures and the kinds of abstraction) as you did in X. The classic example
of this is the C programmer who uses a C++ compiler but still writes in C (or
very nearly). Another example which comes up fairly often here is the C++
programmer who tries to use Java as if it were a dialect of C++.

I agree. Fortunately, I am not set on any language yet but I am
familiar with C++ syntax adn moreover java syntax. I have made a
decision to stick with Java to get to J2EE level. (I am learning VB.Net
- intermediate level - and C# just to be familiar with that
environement, hoping to get an internship with any of these but not too
desperate since I really want to stay focus on Java).
So, how long does it take to pick up a language ? It depends on your
standards. If all you are trying to do is get to the point where you know the
syntax well enough to write programs without having to check the manual every
time you use, say, a while loop; then it I see no reason why it should take
longer than a weekend for most well designed languages (simply because any well
designed language has been designed to be learned). There are exceptions -- I
doubt whether it is possible to learn C++ (even to that minimal extent) in less
than a week or so. And I doubt whether I personally would ever be able to
learn APL (or its descendent J) no matter how long I tried.

However, knowing a language to that extent is a useless party trick. You will
neither be writing correct code yourself, nor able to follow other people's
code -- unless it is written in baby talk.

Yes, that's whay I said "basic level".

Learning a language to the extent
where you are naturally comfortable with full and idiomatic use of its features
takes a long time.
I would say 1 year of nearly full-time use at a minimum.

It is good to get some perspective like this. Thanks.
You would certainly be /productive/ long before then, but not expert enough to
be trusted to work safely unsupervised.

I really appreciate this info. It confirms my thought on it.
There may be cases where two languages are genuinely close enough to each other
that knowledge of one will significantly reduce the startup time for another
one, but I can't think of any examples offhand (unless, perhaps in the
functional language world). I doubt whether I could gain a level of knowledge
of C# equivalent to my knowledge of Java in less than a year -- and they are
about as similar as languages get.

This is so useful information. A lot of time, I hear people saying
(without much thought), if you know one language, you can learn
another, as if it is like peeling a banana. of cousre, I can understand
that peoples are referring to different level of skills like this
scenario I expereinced in 6th grade in final exam. A classmate asked me
how I did in the exam. Since I didn't feel that I got all answers
right. I said "Not too well.". She said, she did *verey* well. When
the result came out, she was way way behind me since our shool give the
results in catagories group studnets of different skill level.
..
On the other hand, there are /definitely/ languages which are so complicated
and/or arcane and/or treacherous that it would take a lot longer than a year.
I don't believe that it is possible to become a competent C++ programmer in
less than 3 years -- and most people (if they ever manage it at all) will take
longer still.

Great information you gave. Thanks a lot.
 
A

amanda

Chris said:
If you want to be any good then sooner or later you will have to learn
something about what goes on below the level of the language(s) you are using.

That's exactly how I feel.

That includes things like hardware design, language implementation, and OS
implementation. Whether it is a good idea for you to try to learn all that
stuff /now/ is a different matter.
If you find you are uncomfortable with your
current levels of insight (feeling as if you are being kept in the dark about
important things),

Yes, I feel that.

or are just plain curious (and have time/cash to indulge
that) then by all means try to broaden your scope now.

Yes, I think it is time for me to not procrastinate anymore, i.e not
let other things get me sidetracked as it has been the past 3 years
doing things for this sibiling and that sibling who're taking advantage
on my helpful nature. There is only so much time to get things done.
If not then there's no
reason not to put it off until later. You can't do /everything/ at once...

That has been the case.
I remember feeling very frustrated when I was learning to program -- all this
stuff that seemed to happen "by magic". Did people really expect me just to
accept all that ?! Anyway, I found a book which scratched that itch nicely --
Andy Tanenbaum's "Structured Computer Organisation". That's a very old book
now, but if you can find a copy in a library then I think it's still worth a
read.
Ok.

I don't know what the current edition is like (it's in it's fifth
edition, I read the second -- which is now quite dated), but few[*] concepts in
hardware/software have changed in the last 50 years so I suspect it might still
be pretty good.

Will look for it.

One specific point: I don't think that (these days) learning assembler is a
particularly good way to learn hardware.

That's what I was wondering too.
The real architecture of common
modern CPUs is so different from their instruction set that effectively
"assembler" is just another high level language (a very odd one, and one that
is very difficult to use, but not much more "close to the metal" than -- say --
C). of course, you may need assembler for other reasons -- you may even pick
it up as you learn about hardware. I'm not suggesting you avoid it, but only
that it has little value as an end in itself.

That's very good to know. Thanks.
-- chris

[*] But not none: for instance the Micro-Kernel approach to OS design seems to
have faded away (ed. 2 talks quite a lot about that). Also micro-processor
design has become Very Strange...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,130
Latest member
MitchellTe
Top