The Artima Developer Community
Sponsored Link

Weblogs Forum
The departure of the hyper-enthusiasts

262 replies on 18 pages. Most recent reply: Dec 20, 2006 11:11 AM by Carlos Neves

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 262 replies on 18 pages [ « | 1 ... 2 3 4 5 6 7 8 9 10 ... 18  | » ]
leouser leouser

Posts: 9
Nickname: leouser
Registered: Dec, 2005

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 12:01 PM
Reply to this message Reply
Advertisement
Quality API's are hard to do. The more time you pour into something the better it may/should become. There is always going to be use cases that don't fit your vision of generality. Ive been frustrated by API's in any language Ive programmed in.

leouser

Alex Bunardzic

Posts: 546
Nickname: alexbunard
Registered: Oct, 2005

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 12:05 PM
Reply to this message Reply
> I'm a happy amateur in lots of things. I was using the
> word in the sense of "not-well-thought-out." Perhaps
> there's a better term, but the point is that there are
> things in the list class and in Java 1.0 libraries that
> don't appear to be very well thought out.

Thanks for the clarification. The way I look at it, the world is littered with carcasses of well-thought-out things. Ruby is so lovable precisely because it frees us from the tyranny of well-thought-out things.

Not-well-thought-out things are problematic only if there is no other choice. For example, Ruby array offers this interface element:

array.pack(aTemplateString) -> aBinaryString

This may or may not be well-thought-out (depending on one's makeup, or shall we say one's personal taste). If you happen to think it's not well-thought-out, what's the big deal? You are free to ignore it. So long as there are alternative ways to achieve the same things, an innocent extra little method cannot hurt.

Most bureaucratic-minded people fail to appreciate Ruby's lenience (a.k.a. the 'smart servant' paradigm). For example, the beautiful little feature where you can ask an array for its size as well as for its length (beautiful because it doesn't terrorize you into having to remember the exact precise syntax; it approximates it, which is the way most humans actually work), seems to rile non-amateurs. They seem to lack the imagination needed for perceiving the beauty in such a simple solution.

leouser leouser

Posts: 9
Nickname: leouser
Registered: Dec, 2005

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 1:45 PM
Reply to this message Reply
'For example, the beautiful little feature where you can ask an array for its size as well as for its length (beautiful because it doesn't terrorize you into having to remember the exact precise syntax; it approximates it, which is the way most humans actually work),'

you've intrigued me, which means I might be one of those programmers who lacks the imagination to see the difference between an arrays size and its length. :D What exactly is the difference?

leouser

Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 1:55 PM
Reply to this message Reply
> For
> example, the beautiful little feature where you can ask an
> array for its size as well as for its length (beautiful
> because it doesn't terrorize you into having to remember
> the exact precise syntax; it approximates it, which is the
> way most humans actually work), seems to rile
> non-amateurs. They seem to lack the imagination needed for
> perceiving the beauty in such a simple solution.

I guess you can argue this as a matter of taste, and even go so far as to say that it's an example of Perl's "more than one way to do it" philosophy. But providing multiple equivalent ways to do something is not necessarily a good thing when reading code. Now you have to know that "length" and "size" mean exactly the same thing and that people choose to use one or the other. I don't think that arbitrarily adding mental clutter is a good thing (and far from wonderful), and it is precisely why Perl programs are unreadable. You could argue that this is only a small thing and that people can figure it out, but the road to hell and all that.

Cedric Beust

Posts: 140
Nickname: cbeust
Registered: Feb, 2004

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 2:24 PM
Reply to this message Reply
> Note also that the post before it:
> http://zephyrfalcon.org/weblog/arch_d7_2003_07_12.html#e284
>
> Shows how Python was designed as an OO language from the
> beginning. Version 1.0 supported classes, virtually the
> same as they appear today.

Fair enough, Bruce, I stand corrected.

I still don't understand why self was made mandatory, though. I used to think that backward compatibility was the reason, but now I'm completely at a loss. The only reason I can think of is that this is how we emulated classes in C (passing a pointer to this to the function) but C++ was already fairly established by then, so it's not as if it was a brand new technique.

Also, I'm still bothered by the fact that you declare a method with n arguments (self being the first one) but invoke it with n-1 arguments.

I also dislike how crowded the code becomes when you read "self" everywhere, which is very non-pythonic. I like significant space indenting for that reason (it saves you from all these "end" keywords that I dislike in Ruby) but the omnipresence of self ruins a lot for me.

--
Cedric

Alex Bunardzic

Posts: 546
Nickname: alexbunard
Registered: Oct, 2005

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 2:34 PM
Reply to this message Reply
> I guess you can argue this as a matter of taste, and even
> go so far as to say that it's an example of Perl's "more
> than one way to do it" philosophy. But providing multiple
> equivalent ways to do something is not necessarily a good
> thing when reading code. Now you have to know that
> "length" and "size" mean exactly the same thing and that
> people choose to use one or the other. I don't think that
> arbitrarily adding mental clutter is a good thing (and far
> from wonderful), and it is precisely why Perl programs are
> unreadable. You could argue that this is only a small
> thing and that people can figure it out, but the road to
> hell and all that.

You talk like a machine when arguing the above point. Don't you realize that for all English speaking humans, it is obvious beyond a trace of a doubt that 'size' and 'length' of an array are equivalent? You should allow some meaning, some semantics to enter the picture when parsing a computing language statement. Allow yourself to go a bit beyond syntax.

This is exactly why we cannot compare Ruby with Perl, Java, C#, C++ et al. Those other languages are strictly formal. Ruby is common-sense oriented, and thus much less formal. Java, C# et al. are High Level Languages (HLL). Ruby is a Very High Level Language (VHLL). Comparing HLL with a VHLL is like comparing apples to oranges. It's like comparing Low Level Languages (an Assembler) to HLLs.

Alex Bunardzic

Posts: 546
Nickname: alexbunard
Registered: Oct, 2005

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 2:42 PM
Reply to this message Reply
> 'For example, the beautiful little feature where you can
> ask an array for its size as well as for its length
> (beautiful because it doesn't terrorize you into having to
> remember the exact precise syntax; it approximates it,
> which is the way most humans actually work),'
>
> you've intrigued me, which means I might be one of those
> programmers who lacks the imagination to see the
> difference between an arrays size and its length. :D What
> exactly is the difference?

There is no difference. The terms are synonymous. Ruby, being a common-sense oriented language, allows for synonymous terms without throwing a fit. It accommodates the way humans tend to think.

Java is the exact opposite. It is very stern, very non-commonsense oriented. It will throw a fit if you send the message 'length()' to an ArrayList. Although in the commonsense world, we all know what the meaning of the question: "what is your length?" should be for an ArrayList. Still, Java bureaucratically insists that our question is dead wrong, and that we should be asking it for its 'size()'. Java is absolutely non lenient.

Now, if you ask me, such boneheaded bureaucratic mindset is very dumb, very stupid. This is why anyone who develops in such bureaucratic languages feels their debilitating effects. And that's why switching to Ruby feels like a full-blown liberation!

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 2:52 PM
Reply to this message Reply
> Most bureaucratic-minded people fail to appreciate Ruby's
> lenience (a.k.a. the 'smart servant' paradigm). For
> example, the beautiful little feature where you can ask an
> array for its size as well as for its length (beautiful
> because it doesn't terrorize you into having to remember
> the exact precise syntax; it approximates it, which is the
> way most humans actually work), seems to rile
> non-amateurs. They seem to lack the imagination needed for
> perceiving the beauty in such a simple solution.

But what about amount, amplitude, breadth, capacity, height, magnitude, range, and spread? Can I get the length using those names? What about other languages?

The thing that I don't like this is that Java's interfaces are meant to be implemented. The more methods you add to the interface the more you burden the implementor. From what I am reading here and elsewhere, Ruby sounds more and more like a confining language where you don't have many options. This may not be fair, but those kinds of languages bring thoughts of incompent developers merrily coding away; comfortable and safe in not having to understanding what the code they are writing really does.

I also find this fairly amusing. Is this really a big problem that many programmers face? To me it seems like the silliest reason for choosing a language. 'Terrorize'? A little melodramatic, don't you think? I also like you suggestion that only amateurs can grasp the beauty. Maybe that should tell you something. Generally, I go to a professional if I want something done right. I don't hire an amateur plumber or electrician, nor do I go to an amateur doctor.

"You need a triple bypass. Dr. Patel will be doing your operation and is our most experienced heart surgeon."

"Experienced? I'll pass. Can't you find an amateur? You know, someone with 'imagination'."

This actually brings up another question. Why is it that Software Development the only field (that I know of) where experience is often considered a handicap? "Don't put the experienced people with proven results on the new software design. Get some new people who've never written any production code on it." What if we built bridges and buildings that way? Maybe then they would have the (high) failure rate of software.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 2:56 PM
Reply to this message Reply
> Java is the exact opposite. It is very stern, very
> non-commonsense oriented. It will throw a fit if you send
> the message 'length()' to an ArrayList. Although in the
> commonsense world, we all know what the meaning of the
> question: "what is your length?" should be for an
> ArrayList. Still, Java bureaucratically insists that our
> question is dead wrong, and that we should be asking it
> for its 'size()'. Java is absolutely non lenient.

And then what? You give up? You go and cry? The world explodes? I don't get it. What's the big problem. You try to compile, the compiler says, "sorry, I don't get your meaning" and you correct the mistake. Is that really a soul-crushing experience? And that's in the stone-age when we didn't have IDEs for Java. Now you type '.' a list comes up and you select the appropriate method. Not that difficult.

Joao Pedrosa

Posts: 114
Nickname: dewd
Registered: Dec, 2005

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 3:19 PM
Reply to this message Reply
How many times have your project enabled you to create reusable components?

Without blackboxes, you will always be starting over and creating as many parts from scratch as needed.

Take Rails, for example. It's a framework built from components. One person was responsible for creating the main components, like HTTP Interface, ORM, general framework, etc. One person only! And the components were so good that people were able to use them with extreme ease (now known as "hype").

How many Java projects could have enjoyed a way to create good components, instead of poor frameworks and libraries that barely work together? I would say most Java projects could enjoy a componentized approach because they generally involve lots of very skilled people and lots of resources. :-)

What's a component compared to a library or a module? A component is a code that has a published interface and works like a blackbox -- you don't need to know how it works, only that it works. Even a single object can be a component, like said by Anders Hejlsberg (C#, Delphi):

"Anders Hejlsberg: The great thing about the word component is that you can just sling it about, and it sounds great, but we all think about it differently. In the simplest form, by component I just mean a class plus stuff. A component is a self-contained unit of software that isn't just code and data. It is a class that exposes itself through properties, methods, and events. It is a class that has additional attributes associated with it, in the form of metadata or naming patterns or whatever. The attributes provide dynamic additional information about how the component slots into a particular hosting environment, how it persists itself—all these additional things you want to say with metadata. The metadata enables IDEs to intelligently reason about what a component does and show you its documentation. A component wraps all of that up."
http://www.artima.com/intv/simplexity3.html

So, to me, components are truly the fine-grained units of code reuse. With Ruby, I not only can create my own components in a succinct way, but also can use its Domain Specific Language capabilities to create easy interfaces to use and exercise the components. All this happens in Rails. All this happens in my own libraries. And all this happens in the libraries of people who use Ruby. We are not starting our projects from scratch and hopping for the best. We are enjoying some powerful programmability!

Alex Bunardzic

Posts: 546
Nickname: alexbunard
Registered: Oct, 2005

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 3:29 PM
Reply to this message Reply
> > Java is the exact opposite. It is very stern, very
> > non-commonsense oriented. It will throw a fit if you
> send
> > the message 'length()' to an ArrayList. Although in the
> > commonsense world, we all know what the meaning of the
> > question: "what is your length?" should be for an
> > ArrayList. Still, Java bureaucratically insists that
> our
> > question is dead wrong, and that we should be asking it
> > for its 'size()'. Java is absolutely non lenient.
>
> And then what? You give up? You go and cry? The world
> explodes? I don't get it. What's the big problem. You
> try to compile, the compiler says, "sorry, I don't get
> your meaning" and you correct the mistake. Is that really
> a soul-crushing experience? And that's in the stone-age
> when we didn't have IDEs for Java. Now you type '.' a
> list comes up and you select the appropriate method. Not
> that difficult.

This is how people who spend most of their life working intimately with machines, serving the machines, think. They see no problem whatsoever in serving the machines day in, day out.

So the machine makes me its bitch, and all you can say is "I don't get it. What's the big problem."

The problem is, I feel insulted, devalued and downright degraded if a $500.00 dirt-cheap little machine makes me its bitch. I don't like that. I simply can't stand it. Maybe you can, in which case my hat, nay my wig goes off to you.

After almost 20 years of software development experience, I have built a lot of equity into my career, and by now I think that only hundreds of thousands, if not millions of dollars, are needed before I become someone's bitch.

Alex Bunardzic

Posts: 546
Nickname: alexbunard
Registered: Oct, 2005

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 3:34 PM
Reply to this message Reply
> Generally, I go to
> a professional if I want something done right. I don't
> hire an amateur plumber or electrician, nor do I go to an
> amateur doctor.

You make a great point. Yeah, if you happen to have some extra money in the bank and it's posing you considerable problems so that you can't wait to dispose of it, there's hardly a better way to promptly get rid of it than hiring a professional. Be it a plumber, or an electrician, or a lawyer, an accountant, a dentist, a doctor, etc., all these professionals know how to relieve you of extra cash in no time flat. They are the real experts in that domain.

leouser leouser

Posts: 9
Nickname: leouser
Registered: Dec, 2005

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 3:48 PM
Reply to this message Reply
> > 'For example, the beautiful little feature where you
> can
> > ask an array for its size as well as for its length
> > (beautiful because it doesn't terrorize you into having
> to
> > remember the exact precise syntax; it approximates it,
> > which is the way most humans actually work),'
> >
> > you've intrigued me, which means I might be one of
> those
> > programmers who lacks the imagination to see the
> > difference between an arrays size and its length. :D
> What
> > exactly is the difference?
>
> There is no difference. The terms are synonymous. Ruby,
> being a common-sense oriented language, allows for
> synonymous terms without throwing a fit. It accommodates
> the way humans tend to think.
>
> Java is the exact opposite. It is very stern, very
> non-commonsense oriented. It will throw a fit if you send
> the message 'length()' to an ArrayList. Although in the
> commonsense world, we all know what the meaning of the
> question: "what is your length?" should be for an
> ArrayList. Still, Java bureaucratically insists that our
> question is dead wrong, and that we should be asking it
> for its 'size()'. Java is absolutely non lenient.
>
> Now, if you ask me, such boneheaded bureaucratic mindset
> is very dumb, very stupid. This is why anyone who develops
> in such bureaucratic languages feels their debilitating
> effects. And that's why switching to Ruby feels like a
> full-blown liberation!


wow, that's weird. :D I wouldn't dream of making synonyms for operations. Does this philosphy pervade all of Ruby's libraries? Geesh, how hard is it to remember that you get a List's size with size()? I guess Ive been programming in Java and Python too long. :D

leouser

Alex Bunardzic

Posts: 546
Nickname: alexbunard
Registered: Oct, 2005

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 4:06 PM
Reply to this message Reply
> wow, that's weird. :D I wouldn't dream of making synonyms
> for operations. Does this philosphy pervade all of Ruby's
> libraries? Geesh, how hard is it to remember that you get
> a List's size with size()? I guess Ive been programming
> in Java and Python too long. :D

It's not that it's hard to memorize that "size()" gets you the List's size, it's more that the fact that array for some godawful reason insists on "length" instead of "size" is throwing a nice curveball at the unsuspecting coders. After a while, we humans tend to blur the two, because, in our minds, we make an abstraction that we're dealing with a collection of sorts (be it a list or an array or whatever), so which one expects which message? It's an unnecessary burden on our short term memory buffers.

Ruby resolves that beautifully by allowing for a bit of common-sense. Sort of like the leniency in the java.util.Date (this leniency in the Date is the only occurrence of common-sense that I was able to detect in Java, so far). Ruby simply says: "Hay, 'length', 'size', same difference. I hear you. And I know what you mean!"

Bill de hÓra

Posts: 1137
Nickname: dehora
Registered: May, 2003

Re: The departure of the hyper-enthusiasts Posted: Dec 20, 2005 4:08 PM
Reply to this message Reply
"Also, I'm still bothered by the fact that you declare a method with n arguments (self being the first one) but invoke it with n-1 arguments."

You mean like arrays?... ;)

Flat View: This topic has 262 replies on 18 pages [ « | 2  3  4  5  6  7  8  9  10 | » ]
Topic: The departure of the hyper-enthusiasts Previous Topic   Next Topic Topic: Java Applets + Ajax = ?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use