• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Execution in the Kingdom of Nouns - Thoughts and what is means

Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please read this article I found (it is a bit long, will take 5-15 minutes to read. It is a story talking about Java and comparing it to other languages) :

NOTE: I didn't know where to put this, so I put it here.

Let me know if this is what you thought (I am kind of confused) :
He is saying Java doesn't have closures (Java 8).
He is saying that Java can't implement machine language (thank goodness).
I don't get what else he is saying. I don't see his point. I know Java isn't the "all-purpose language", but is it really that bad?
If you could tell me what he is talking about, that would be excellent. If he has a valid point, I would like to know.

Posts: 4
VI Editor Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not so sure about the article's implicit meanings (as English isn't my mother tongue), but this is what I got from the article:

+ Lots of Java developers tend to over-engineer the code, in this particular case they don't simply write a method (member function) or functional method (static one) to do the operation. Rather, they begin to "generalize" and "add abstractions" to the method call, apply "design patterns" like Command, Adapter, Factory, ... and may go overboard. That eventually results in lots of classes, which call each other in the chain and finally do the task (hopefully no bug occurs). Those classes cause a "kingdom of Nouns" , which may have a few merits but some other drawbacks that grow into trouble the long run.

Posts: 1558
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Clearly, the person who wrote that blog is having some issues digesting object oriented programming concept (of if he has digested it well, he is clearly not very comfortable with those ideas).

As per him, C++ is good language 'because you can write program without classes'. Well, then what is wrong in C? Why do people use C++ at all?

Secondly, he forgets one very important thing - not all nouns are classes. There is a specific sub-type (sub-class? ) of noun - an actor. If a noun is not capable of 'doing' something (in generalized terms), then its not a good idea to have a class for it. e.g. what will be the methods of class DVD, or class Book? Apart from standard setters and getters? And how one would create a DVD or Book in Python or Ruby or whatever?

Further to that, this 'verb' thing is very nearly related to (tightly coupled? ) actor. A verb signifies an action - and an action is done by an actor - this is why it makes very much sense to have an action as part of an actor. That is why a 'driver' drives a car, and a 'parser' parses a connection and a 'factory' creates similar objects.

And then comes his 'for the lack of a nail' story - I mean, common, if we are measuring goodness of a language on the basis of freedom it gives to write a horribly bad code, then C++ is order-of-magnitude worse than Java. If you 'want' to write a bad code, nobody, and no language can stop you. I'm not talking against C++ or any language, but then some languages are not meant for doing 'everything'. Java is not meant to write operating system kernels, and C++ is not meant to write mission critical web applications.
Just writing some bad code in a language and whining about it is totally unfair.

It is absolutely fine to have a specific(maybe very high) level of affinity towards one programming language, but then it doesn't make other languages as bad (or Evil Kings).

And then he goes on asking about why there is special preference to noun, and why verbs are less important and so on. Oh man... actor 'does' perform action. A class (named after an actor) has to have (in most of the cases) some 'verbs' (or methods). And then developer has to 'implement' those methods (i.e. write some beautiful code - which has to be loosely coupled, scalable, thread safe et-cetera). So, who said that verbs are less important? All Java philosophy says that, behind an action, there is an actor, so why not associate that action to that actor? That's it.
Take any descent Java code, and check out percentage of number of lines which are part of any method - it would provide a nice statistics about what is 'importance' of 'verbs' in Java.

Of course, everybody is free to express his/her views, but just because someone feels that one particular methodology is not suited for his/her purpose, that doesn't mean that the methodology itself is wrong. A very good example is - Linux kernel - which is developed in C (not C++).

I won't say much - but which software, apart from JVM, runs on more than 3 billion devices?

Yes, I do love Java, and yes, I do respect other programming language also. I will not advise somebody to write a device driver in Java, or create a website using C++.

Finally, I do not intent any offense to anyone. Its just my opinion - that you should use the methodology best suited for you, instead of spending the energy in picking out the flaws of other methodologies.
lowercase baba
Posts: 13013
Chrome Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I couldn't read the entire article. I found it flawed very early on, so I didn't bother with the rest. I got to here:

If you're a normal, everyday, garden-variety, English-speaking person, and you're asked to describe the act of taking out the garbage, you probably think about it roughly along these lines:

get the garbage bag from under the sink
carry it out to the garage
dump it in the garbage can
walk back inside
wash your hands
plop back down on the couch
resume playing your video game (or whatever you were doing)

And found this lacking, for the simple reason that he is ignoring the implicit nouns here. This is really saying:

I get the garbage bag from under the sink
I carry it out to the garage
I dump it in the garbage can
I walk back inside
I wash my hands
I plop back down on the couch
I resume playing my video game (or whatever I was doing)

Every single action is attached to a noun. Note that the "I" above could be replaced with "You" or "Paul Wheaton" or "my maid service" (with the appropriate changes for pronouns, etc). I think he needs to go back to high school English class.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic