[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Java for Rubyists

Albert Chou

3/29/2005 2:20:00 AM

I'm not anything like a Java expert, but I do refer to Bruce Eckel's
_Thinking in Java_ most of the time when I need to look up a language
feature (as opposed to just understanding some API via its Javadoc).
It's freely downloadable via his Web site(s); I always remember
http://Bruce... most easily.

Al


-----Original Message-----
From: Miles Keaton [mailto:mileskeaton@gmail.com]
Sent: Monday, March 28, 2005 6:09 PM
To: ruby-talk ML; shalev@simplyphysics.com
Subject: Re: Java for Rubyists

> I have been forced by the powers-that-be to learn Java.
> Is there some book out there somewhere that will teach Java without
> making me go mad from comparing it to Ruby?


Shalev -

I recently bought a "Head First" book on Design Patterns. The "Head
First" series is SO good - SUCH a great way to learn something,
especially when you've already got a resentful attitude, and you're
going to need some help making it fun.

Try to go down to a bookstore to see this book in person:
http://www.oreilly.com/catalo...
... or at very least download the two sample chapters in PDF, there.

I can highly recommend it, and if you look over at Amazon, you'll see
that almost everyone else does, too.



17 Answers

Tom Willis

3/29/2005 3:00:00 AM

0

I second Eckel

I fell the original posters pain. My work world is filled with long
forgotten .net apps and J2ee apps that I have to patch at a moments
notice.

Having scripting languages has helped me nonetheless with the
exploration of ideas in a timely manner, working out algorithms and
protocols etc...



On Tue, 29 Mar 2005 11:20:21 +0900, Albert Chou <achou@tealeaf.com> wrote:
> I'm not anything like a Java expert, but I do refer to Bruce Eckel's
> _Thinking in Java_ most of the time when I need to look up a language
> feature (as opposed to just understanding some API via its Javadoc).
> It's freely downloadable via his Web site(s); I always remember
> http://Bruce... most easily.
>
> Al
>
>
> -----Original Message-----
> From: Miles Keaton [mailto:mileskeaton@gmail.com]
> Sent: Monday, March 28, 2005 6:09 PM
> To: ruby-talk ML; shalev@simplyphysics.com
> Subject: Re: Java for Rubyists
>
> > I have been forced by the powers-that-be to learn Java.
> > Is there some book out there somewhere that will teach Java without
> > making me go mad from comparing it to Ruby?
>
> Shalev -
>
> I recently bought a "Head First" book on Design Patterns. The "Head
> First" series is SO good - SUCH a great way to learn something,
> especially when you've already got a resentful attitude, and you're
> going to need some help making it fun.
>
> Try to go down to a bookstore to see this book in person:
> http://www.oreilly.com/catalo...
> ... or at very least download the two sample chapters in PDF, there.
>
> I can highly recommend it, and if you look over at Amazon, you'll see
> that almost everyone else does, too.
>
>


--
Thomas G. Willis
http://paperbac...


Lyndon Samson

3/29/2005 2:55:00 PM

0

> I fell the original posters pain. My work world is filled with long
> forgotten .net apps and J2ee apps that I have to patch at a moments
> notice.

I'll never get this attitude, why is programming in a more powerful
language almost more enjoyable than in a less powerful language?

Do C kernel hackers grumble they are not writing in zsh or Scheme?

Personally I find many languages enjoyable to program in, even low
level languages where you are producing alot more LOC than you
otherwise might using a HLL.



--
Into RFID? www.rfidnewsupdate.com Simple, fast, news.


Patrick Hurley

3/29/2005 3:09:00 PM

0

On Tue, 29 Mar 2005 23:55:08 +0900, Lyndon Samson
<lyndon.samson@gmail.com> wrote:
> I'll never get this attitude, why is programming in a more powerful
> language almost more enjoyable than in a less powerful language?

I cannot claim to speak for the writer, but I will say that some
languages are just more fun than others -- and this is not entirely
limited to "higher level" verses "lower level" languages. For me it
often maps to using a language well suited to the task. Although there
is little call for it today, I still remember the pure pleasure of
writing well tuned assembly code. I experienced pleasure writing well
tuned server code in C and C++.

Of course that all having been said, for whet is Java well suited? It
always feels like a dynamic language fighting its static typing to me.
It has some wonderful dynamic features that I always miss when using
C++ (dynamic class loading, reflection, etc), but the static type
checking seems to bog them down in syntax. In addition the majority of
Java frameworks seem to lean very heavy on configuration files (not
that externalizing options are a bad thing) to compensate for the lack
of meta data -- hopefully Java 1.5's meta data system will help in
this.

My $0.02, worth exactly what you paid for it
Patrick


Peter Hickman

3/29/2005 3:12:00 PM

0

Lyndon Samson wrote:

>>I fell the original posters pain. My work world is filled with long
>>forgotten .net apps and J2ee apps that I have to patch at a moments
>>notice.
>>
>>
>
>I'll never get this attitude, why is programming in a more powerful
>language almost more enjoyable than in a less powerful language?
>
>Do C kernel hackers grumble they are not writing in zsh or Scheme?
>
>Personally I find many languages enjoyable to program in, even low
>level languages where you are producing alot more LOC than you
>otherwise might using a HLL.
>

I think you are confusing several things here: more powerful language /
less powerful language != low level language / high level language. A
language can be low level and powerful just as a language can be high
level and less powerful.

Imaging trying to attach a post it note to a fridge, there are two
approaches:

Approach 1 (powerful languages):
1) attach post it note to fridge

Approach 2 (less powerful languages):
1) Write an XML file stating the precise location that the note will be
locate
2) Obtain, in writing, permission to attach the note to the fridge
3) Find a subcontractor to attach the note to the fridge
4) Write an XML file stating the tasks that need to be undertaken by the
contractor
5) The contractor does the work

Now if I were building a skyscraper then approach 2 is entirely
appropriate but for a post it note approach 1 is the way to go. Trouble
is that some languages treat every project like a skyscraper and the
programmer like a complete idiot.



Christian Neukirchen

3/29/2005 3:13:00 PM

0

Lyndon Samson <lyndon.samson@gmail.com> writes:

>> I fell the original posters pain. My work world is filled with long
>> forgotten .net apps and J2ee apps that I have to patch at a moments
>> notice.
>
> I'll never get this attitude, why is programming in a more powerful
> language almost more enjoyable than in a less powerful language?
>
> Do C kernel hackers grumble they are not writing in zsh or Scheme?

It's a matter of level. When you write a low-level app (kernel), C is
perfectly fine. When you write a (very) high-level app (script, even)
in C and you don't gruble, something's wrong with you, I guess. :-)

J2EE apps can be abstracted rather well (I think), but Java doesn't
allow going high-level enough to make coding bearable. You notice
that as soon as code generation, XDoclet etc. gets used.

> Personally I find many languages enjoyable to program in, even low
> level languages where you are producing alot more LOC than you
> otherwise might using a HLL.

The right tool for every job.

> Into RFID? www.rfidnewsupdate.com Simple, fast, news.
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneuk...


Nicolas Delsaux

3/29/2005 3:20:00 PM

0

On Wed, 30 Mar 2005 00:13:17 +0900, Christian Neukirchen
<chneukirchen@gmail.com> wrote:
>
> J2EE apps can be abstracted rather well (I think), but Java doesn't
> allow going high-level enough to make coding bearable. You notice
> that as soon as code generation, XDoclet etc. gets used.

Not to enter a J2EE sucks (not) flamewar, but one shouldn't confuse
misconceptions in J2EE with Java's own abstraction level.
As a Java/J2EE developper, I do think they are two completely
different things. Java is quite a good programming language. Simple,
elegant, and powerful. But J2EE is all crap ! Nobody should ever have
to write a single line of those fugly XML files. And, for that,
annotations can be the best thing in Java5.
But I'm here really off-topic.



--
Nicolas Delsaux
"Un langage de programmation est censé être une façon conventionnelle
de donner des ordres à un ordinateur. Il n'est pas censé être obscur,
bizarre et plein de pièges subtils (ça ce sont les attributs de la
magie)."
Dave Small



Christian Neukirchen

3/29/2005 4:46:00 PM

0

Nicolas Delsaux <nicolas.delsaux@gmail.com> writes:

> On Wed, 30 Mar 2005 00:13:17 +0900, Christian Neukirchen
> <chneukirchen@gmail.com> wrote:
>>
>> J2EE apps can be abstracted rather well (I think), but Java doesn't
>> allow going high-level enough to make coding bearable. You notice
>> that as soon as code generation, XDoclet etc. gets used.
>
> Not to enter a J2EE sucks (not) flamewar, but one shouldn't confuse
> misconceptions in J2EE with Java's own abstraction level.
> As a Java/J2EE developper, I do think they are two completely
> different things. Java is quite a good programming language. Simple,
> elegant, and powerful. But J2EE is all crap ! Nobody should ever have
> to write a single line of those fugly XML files. And, for that,
> annotations can be the best thing in Java5.
> But I'm here really off-topic.

I have no idea about J2EE, really; but I dislike Java enough on it's
own. If Java was as meta-programmable as Ruby, J2EE wouldn't need XML
for configuration.

> Nicolas Delsaux
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneuk...


Lyndon Samson

3/29/2005 5:49:00 PM

0

On Wed, 30 Mar 2005 00:13:17 +0900, Christian Neukirchen
<chneukirchen@gmail.com> wrote:
> Lyndon Samson <lyndon.samson@gmail.com> writes:
>
> >> I fell the original posters pain. My work world is filled with long
> >> forgotten .net apps and J2ee apps that I have to patch at a moments
> >> notice.
> >
> > I'll never get this attitude, why is programming in a more powerful
> > language almost more enjoyable than in a less powerful language?
> >
> > Do C kernel hackers grumble they are not writing in zsh or Scheme?
>
> It's a matter of level. When you write a low-level app (kernel), C is
> perfectly fine. When you write a (very) high-level app (script, even)
> in C and you don't gruble, something's wrong with you, I guess. :-)

Hmm I can draw a further distinction, between coding for enjoyment,
and coding for more pragmatic reasons ( for payment, volunteer work
etc ).

I can code high level apps ( like roguelike games for example ) in C
for fun, because the delivery timeframe is to infinity and beyound :-)
I dont even need to use the stdlib or other fine examples of code
reuse although I probably should.


>
> J2EE apps can be abstracted rather well (I think), but Java doesn't
> allow going high-level enough to make coding bearable. You notice
> that as soon as code generation, XDoclet etc. gets used.
>
> > Personally I find many languages enjoyable to program in, even low
> > level languages where you are producing alot more LOC than you
> > otherwise might using a HLL.
>
> The right tool for every job.
>
> > Into RFID? www.rfidnewsupdate.com Simple, fast, news.
> --
> Christian Neukirchen <chneukirchen@gmail.com> http://chneuk...
>
>


--
Into RFID? www.rfidnewsupdate.com Simple, fast, news.


Lyndon Samson

3/29/2005 5:56:00 PM

0

On Wed, 30 Mar 2005 01:45:57 +0900, Christian Neukirchen
<chneukirchen@gmail.com> wrote:
> Nicolas Delsaux <nicolas.delsaux@gmail.com> writes:
>
> > On Wed, 30 Mar 2005 00:13:17 +0900, Christian Neukirchen
> > <chneukirchen@gmail.com> wrote:
> >>
> >> J2EE apps can be abstracted rather well (I think), but Java doesn't
> >> allow going high-level enough to make coding bearable. You notice
> >> that as soon as code generation, XDoclet etc. gets used.
> >
> > Not to enter a J2EE sucks (not) flamewar, but one shouldn't confuse
> > misconceptions in J2EE with Java's own abstraction level.
> > As a Java/J2EE developper, I do think they are two completely
> > different things. Java is quite a good programming language. Simple,
> > elegant, and powerful. But J2EE is all crap ! Nobody should ever have
> > to write a single line of those fugly XML files. And, for that,
> > annotations can be the best thing in Java5.
> > But I'm here really off-topic.
>
> I have no idea about J2EE, really; but I dislike Java enough on it's
> own. If Java was as meta-programmable as Ruby, J2EE wouldn't need XML
> for configuration.
>
Something else I find interesting. The hatred towards non programmatic
configuration files.

Programmatic configuration is great for programmers, but where would
the average application user be without simple, hard to mess up
configuration, like sendmail.cf for example :-)

Or perhaps the bile is directed only at the overly verbose XML?

> > Nicolas Delsaux
> --
> Christian Neukirchen <chneukirchen@gmail.com> http://chneuk...
>
>


--
Into RFID? www.rfidnewsupdate.com Simple, fast, news.


james_b

3/29/2005 7:22:00 PM

0

Lyndon Samson wrote:
...

>>
>
> Something else I find interesting. The hatred towards non programmatic
> configuration files.
>
> Programmatic configuration is great for programmers, but where would
> the average application user be without simple, hard to mess up
> configuration, like sendmail.cf for example :-)
>
> Or perhaps the bile is directed only at the overly verbose XML?

Certainly seems so, at least for some.

Angle-brackets and explicit begin-end markup are bad,
significant-indentation is good. Unless the significant-indentation is
part of a programming language, then it's bad, and explicit begin-end
markup is good.

Whether XML is "overly verbose" may depend on how you interact with it.
For people who criticize it for leading to carpal tunnel syndrome, I
would invoke the "Eclipse defense" [0]: Use an editor, such as vim with
an XML plug-in, that does auto end-tag completion or otherwise assists
in editing and rendering XML.

Whether one is doing XML push-ups or YAML squat thrusts may not be the
real issue, but instead whether the people responsible for configuration
have a means to describe their intent with a minimum of fuss. For
some, that may mean using the same language the program is written in;
for others, verbose (but easily validated) markup is the better choice.


James

[0] So-named in honor of those who justify assorted Java grievances by
insisting that these issues go away if you assume a sufficiently
powerful IDE.