Win a copy of Head First Android this week in the Android forum!

Marcus Moreno

Ranch Hand
+ Follow
since Aug 17, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Marcus Moreno

In the classical book "Reliable Software Through Composite Design" (1979) Myers  defined the different types of coupling.

Unfortunately, I don't (yet) have the book, but the different types of coupling
are referred to all over the web, e.g. on Wikipedia:
Wikipedia says:
... message coupling can be achieved by state decentralization (as in objects) and component communication is done via parameters or message passing.

Not fully sure what exactly they mean with "state decentralization".

So, how exactly can "message coupling" be realized?
   A) A method without parameters
   B) A method with only primitive/immutable parameters
   C) A method that does not allow to change the state of the (immutable) object
   D) Communication through remote Message (SOA)
   E) Asynchronous communication through Message Queues
   F) All of the above?
   G) Something else???


3 years ago
Maybe we can say:"excessive cohesion will lead to high coupling"?

What I mean here - if we create highly cohesive units, but units that are too small for the given business case?
Then we have units that have many dependencies to other units, in other words, we have a highly coupled system.
But then again - for such a given system, I don't think we could see such units as "highly cohesive" either - because
they are not using the right level of abtraction - for the given system  - as I think - what is - and what is not cohesive, strongly
depends on the given business case..
What do you think?
But also the question must be "what types of coupling are there"? I guess.
Like I know of accidental coupling - and temporal coupling for example.
Accidential coupling is the coupling as we know it - and temporal coupling is coupling of the order we have to call a number of methods -
if we call them in the wrong order, this may lead to an invalid state - but in essence, I would say this is also a problem of low cohesion - the wrong level of abstraction was choosen for a number of methods,
which allows to call them in the wrong order...
I perfectly know what each term - encapsulation, cohesion and coupling mean -
but I still am trying to find out how EXACTLY these terms relate to each other.

Let me tell you what I (think) I already know:
Strong encapsulation requires information hiding, actually, it can even be used synonymously to information hiding.
I know there are a lot of different opinions on the topic, but I went so far to read 50 year old articles that coined the term,
and it seems there is a strong consent that the two can be used interchangeably. The more you hide, the strong encapsulated your unit is.
You can hide attributes and methods, you can hide by using visibility modifiers or abstraction like interfaces. Also, you can hide by using packages and modules, or even a different webservice can be used to hide.
On this assumption, I say:
1. Strong encapsulation does not guarantee high cohesion nor low coupling, but it supports BOTH concepts.
What is hidden, cannot be used, so this indirectly can help to achieve higher cohesion and lower coupling.
2. High cohesion, (on the right level of abstraction) leads to lower coupling between the strongly cohesive units.
A highly cohesive unit is a strongly "autonomously working" unit. It can do its job without requiring the help or much help from other units.
the components inside a cohesive units will usually have a stronger coupling to each other, imho I would even go so far and say "highly cohesive"
(which is the stickyness) means strongly coupled INSIDE the unit.

Now the question is, can you think of a system that does have only strong encapsulated, high cohesive code units
(modules, packages, classes, methods) but still is highly coupled?

The only way I could think this was possible if the units were cohesive on the wrong level of abstraction for the given task -
like with too small, or too large boundaries - but then, I wouldn't call them truly cohesive, either.

What's your opinion on this? How do the "magic 3" of encapsulation, cohesion and coupling relate to each other?

I am currently looking at the most basic and most important concepts of Object Oriented Design - such as
encapsulation, cohesion and coupling, and how they relate to each other.
So far, I always had a strong opinion that encapsulation necessarily INCLUDES information hiding. Now I found, there are different opinions on that.
There is an article on javaworld:

Which says encapsulation != information hiding. Encapsulation is such an old topic, I guess the idea just ALWAYS existed -
and I am not able to find the ROOT of the idea of the concept... so it is hard to say how to once and for all define it..
But, anyway. On the assumption that encapsulation does not include information hiding - I got the idea -
If encapsulation is just "putting a border around something" - then it is just like the bounded context of Domain Driven Design -
and then its just another form of modularization! And isn't composition (and aggregation) also just another form of modularization?
In this case, isn't composition / aggregation just another form of encapsulation?
Would love to discuss this with you / read your opinion on the topic.
3 years ago
Today I was finally able to sign up on pearson view, and to move my old SUN SCJP ID to the new system.
However, there a two things I noticed:

1) I still found the OCMJEA for 39 Euros - so is that still the Beta thingy? I have not prepared whatsoever for the OCMJEA yet,
but for only 39 Euros, I am thinking about giving it a go just to get an idea of what it would be like...
- However, if I would fail, or wouldn't like my passing score, coud I just re-do it (any number of times?!) ?

2) I also would want to the the OCMJD, the developer certificate. Using my browsers search function, I did find the essay exam,
bu I did not find the 1Z0-855 Assignment. Does this mean the system thinks I had passed it already, or does this mean the system hasn't linked my prior SCJP exam properly?!

I just checked in my pearson vue account, the history currently says:
Exam History
You have not previously taken any exams with Pearson VUE.

3) Is this correct, as I did my SCJP exam at Prometric, or this that wrong, as it should have been converted to Pearson VUE?

Thanks in advance,

Wow, you answer faster then I can fart (... and I fart damn fast! ;-)!
Thanks. I have now signed up with prometric, the form has accepted one of the 2 id's I had,
at the end they said it would take "a day until I get a signup email". Probably because a person is double checking my details,
as my post address AND email adress has changed (...this will get interesting to find out for them...).
So now let's wait and see.

Thanks again.

Thanks for your answers. Roel, as I did my certificate when Java was still SUN (and it was not yet mandatory to pay $$$ to Oracle !;-),
I do have my ID, but don't have an oracle account yet ( at least not an offical one I would want to attach to my certificates).

1. So when I sign up anew, how would they get get sure that my oracle account fits to the certificate id that I give them
(my address as also changed since I got my SCJP certificate...)?

2. I tried to sign up, but the oracle sign up process plainly sucks. It forces me to add a company name, when I am just doing it
for myself? Last but not least, it never wants to accept my phone number, not sure what's wrong with that form, seems like
the oracle guys who did that sign up process never did one of the certificates... ;-)
Any idea how the format for the phone number is?

Thanks a lot again,


Sorry, I would have some questions regarding the OCMJD...

1. now with the new requirement to take an obligatory training from oracle (yuck!),
I wonder - could I also do the exam and essay BEFORE I take (= pay...) at Oracle university.
Doing the exam before would be much easier for me, all you have to do is pay the voucher and start, I guess,
but for the training you first of all need a course taking place in your area...

2. If 1) is possible, how much time would I have left to finish the training after I have taken the exam and essay? Only 6 month also?

3. Is it okay to choose a training that would be valid for OCMJD AND OCMJA, so just paying once for both certificates,
or do they make you even pay twice?

4. I saw a Java Performance course would also be sufficient for the OCMJD - I have taken part in a java performance course from
Angelika Langer, who is one of the Java Champions(!) - but the course was not a specific Oracle course - could this still be sufficient?
(I guess not, as it's not about the knowledge, but the $$$ for Oracle...)

5. On my SCJP exam results, I found a registration id as well as a UserId, I did the exam at SUN / Prometric in November 2008.
Is there now an oracle site I can look up my details / login with one of these IDs, and or how and when are my SCJP details validated or the OCMJD.
Not that I would buy the voucher(s) only to find out there is a problem and they can't find my SCJP 6.0 details in the oracle system..

Thanks a lot,


Hi, after having done the SCJP 6 a few years back, I feel relaxed and strong enough to go for my next SUN/Oracle certificate..
At first I thought I would need to do the developer to do the architect certificate, but now it seems you can go straight for the architect certificate...
Besides improving my skills, another reason for doing those certificates, of course, is getting better jobs and so getting more $$$$$
Most employers don't have a clue about certificates, but when a certifcate calls you an architect, they are fine calling YOU an architect - which would tell me
to go straight for the architect certificate - after all, from what I've found out so far, it seems like they are not that much different knowledge wise -
the OCMJD handles Java SE only, as such handles stuff like RMI and Swing. RMI I have no clue about yet, SWING I used 6 years ago, so I guess I will need
some study / personal training for the OCMJD anyway. The OCMJA on the other hand, it seems there is a multiple choice test, like for the SCJP was,
plus some practical part where you just have to do some design diagrams, which sounds rather easier, or at least not harder then programming for the
SCJD. For my personal job, I am working with the Spring framework, so the new knowledge in RMI / Swing, as well as new knowledge for Java EE
(like ugly Java Server Faces) is both only slightly helping me for my job at hand. The worst thing about the OCMJA I have found out so far is that there
already seems to be a OCMCJA 7, but the first books specifically training you for the multiple choice questions will be out sometimes in August this year...

In short: Would you recommend to go for the Developer certificate before jumping on the architect certificate, or would it be okay to skip and go straight to the $$$?


If the OCMJD is Java Version independent, then why is the current certificate called OCMJD 6 at all?! This is rather confusing. Also, the books say you'd have to develop with a Java version that was not superseded by 18 month by a newer version - which for Java 6 is the case, Java 7 was published in July 2011, as I've seen. So in other words, we are forced to do the SCJD in Java 7, and then the certificate for potential employers
claims we had done in with Java 6 only?! Is it enough to just compile with Java 7 (and maybe to use some minor but usefull features like the new catch clause catching several exceptions at once,
or would they force you, to, for example, use the try-with-resources, a feature I really hate, as it doesn't give you the flexibility when and how to close your resources yourself - imho
this is a feature that was introduced for the lazy ones of us... ;-)

Okay, in short:
1. When will there be a OCMJD 7?
2. When doing the OCMJD 6, is it obligatory to use Java 7?
3. When using Java 6 or 7, is it enough to just compile with the new version, or do you have to use a BIG amount of the new version's features?
(4. YADA YADA YADA Isn't it lame that Oracle now forces people to do one of their lame courses, just to get MORE money out of you? There is a 2 days online training from Oracle, and they told me, just
paying and opening the online session without physically attending the course at all, was enough to pass it....grrr )
Nope. I think it will be released in february 2009 or so.
If you have only 50% in the mock exams, I would concentrate more on reading and on doing lots of programming exercises.

I realized that when you have done some mocks, just doing mocks won't make you any better (see e.g. see my results, they were always around 75%).
Imho it's better to take a result, see were you have to improve the most, then read everything related to this topic, and do some programming in this area. Also writing down the things you don't know and learning them by heart will def. help you.
I haven't really done the exam of this simulator - when it was released, I was already 99% finished with my preparation. I just had a look on it and was playing around with it. It def. gives you an idea of how it will feel like in the real exam - that's 99% what it looks like - e.g. I also welcomes you with your name, and it is also full screen - something ALL other simulators did not offer!

For more information of what I've done to score 84% in the SCJP 6.0, read:

Anyway, I would suggest to NOT study as much as I did - now I guess I could have received just the same score after maybe 6 month or so.
[ November 12, 2008: Message edited by: Marcus Moreno ]