• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retraining Brain for Certification

 
Kenneth Inman
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been developing in Java for a while now and recently have decided to pursue my Certs. I learned Java on the Job, converting from a VB 6.0 programmer.

The biggest issues I'm running into is:
1. Because of on the Job learning, I've had to stick to very strict Check-style rules. I look at an improperly indented or basic syntax of a function and my mind automatically thinks its wrong.
2. Also, implementation is usually based on business requirements. To explain, no one says hey go build an immutable object or static methods etc... I get requirements, I build, and the output matches those java key words, I just am not as familiar with the text book key words. Hopefully that makes sense.

I've read some books and am getting a better grasp of applying my business knowledge of Java to the Certification requirements of Java but still having trouble because of the above issues.

Any suggestions on retraining the brain for the test, while obeying the rules for my job, at least enough to do great on the exam?

Thanks
 
Simon Roberts
Author
Ranch Hand
Posts: 170
7
Java Linux Netbeans IDE
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting question Kenneth... The exam has some questions in it that are perhaps a little "tricky" but it does not, in my experience at least, use bad indentation. The formatting is pretty much according to the long standing coding style that Sun originated. I don't think you'll have major problems from that.

However, the exam does require intense attention to detail (sometimes, unfortunately, requiring you to spot things that the compiler or IDE would spot). Now, attention to detail is a good thing in any programmer, so this isn't really completely unfair, but you'll have to practice paying attention to what's actually there, not what you think is there, or what you think ought to be there. My guess is that taking all the practice questions you can is the best way to help you get used to this. You'll find such questions all over the place, including on this forum.

As to the things you mention like static and immutable, these are pretty important. They're the tools that you use to create a solution, and recognizing the names, and more importantly what they do and why will be important to you in your programming career, not just the exam. You're probably using these concepts, or many of them, anyway, but it seems likely that you might not be using them well, or in ways that make for "good design". Some of these are trickier things to learn. I address many of these issues in my videos, but if you are completely new to them, you might need more practice, and more feedback from a sat-next-to-you mentor, to really get them down.

Not sure how helpful that was, sorry!
Cheers,
Simon
 
Alex Torson
Greenhorn
Posts: 7
IBM DB2 Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

On my opinion, using java in job is definetaly NOT enough to pass exam (especialy on high mark) you need to prepare exactly for it.
BUT when you pass at least OCA it will be rather helpful in job, you'll see it


 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kenneth Inman,

First of all, a warm welcome to CodeRanch!

Kenneth Inman wrote:2. Also, implementation is usually based on business requirements. To explain, no one says hey go build an immutable object or static methods etc... I get requirements, I build, and the output matches those java key words, I just am not as familiar with the text book key words. Hopefully that makes sense.

I agree with Simon on this one. It's important for your job that you know things like a static method and immutable objects. Developers use these names (jargon) to communicate with each other. If I ask you to create a class method, I expect that you are able to do it correctly and thus know what it's all about. The same applies to method overloading, method overriding, immutable objects and so on.

Kenneth Inman wrote:I've read some books and am getting a better grasp of applying my business knowledge of Java to the Certification requirements of Java but still having trouble because of the above issues.

Could you tell us which books you already have read?

Kenneth Inman wrote:Any suggestions on retraining the brain for the test, while obeying the rules for my job, at least enough to do great on the exam?

I think it would be a good idea if you purchased the Enthuware mock exams of the OCA certification of your choice. Then you can take one test and the score will give a very good indication about your Java knowledge and your readiness for the actual exam. Based on that score, you'll maybe have to improve your Java knowledge (e.g. use a study guide, write lots of code snippets without an IDE,...) or maybe you are ready for the exam and you'll can take some other tests to get more exam practice.

Hope it helps!
Kind regards,
Roel
 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think "Retraining Brain" is a good way to put it. The questions are like for example there is an interface with a method and a class that implements the interface. You are asked what the output will be. But what you must realize is that the method in the interface is public even though it's not marked so in the interface. Since it isn't marked public in the implementation, compilation fails. It's not enough to know everything about interfaces and implementations...you much "catch" what they were doing there. And I agree you must pay extreme attention to the questions. I think the best way to practice doing that is with Enthuware. Widely held belief. I secretly believe nobody ever passed this test and that the test scores result topic is there to make you think it's possible. I failed by two or three points -- the right score to give someone to make them want to purchase it again.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guillermo Ishi wrote:The questions are like for example there is an interface with a method and a class that implements the interface. You are asked what the output will be. But what you must realize is that the method in the interface is public even though it's not marked so in the interface. Since it isn't marked public in the implementation, compilation fails.

That's indeed a true classic!

Guillermo Ishi wrote:I failed by two or three points -- the right score to give someone to make them want to purchase it again.

If you comment on this certification exam, you always tend to be very negative. Why? Still gutted about failing the test? If you fail with 2 or 3 points, then you simply didn't answer enough questions correctly. It's definitely not because Oracle wants you to purchase the exam again. If that really would have been their intent, then every fail grade would be with just 2 or 3 points (and that's clearly not the case).
 
Simon Roberts
Author
Ranch Hand
Posts: 170
7
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question described, where a default access method fails to satisfactorily implement an interface method is an interesting one.

You can make an argument that a) the compiler will tell you, or b) "that's just learning irrelevant syntax", and I can sympathize with this.

However, I have a different perspective on what's really going on with questions like this, and I believe they're valid.

One of the paramount characteristics of a programmer, in my opinion, is attention to detail. And while much of your time programming "in the field" is spent using an IDE, and silly details like this just get flagged and fixed in a heartbeat, the reality is that many other issues (the things that cause bugs in your code) are not so easily spotted. So, the ability to pay close attention to syntax for 150 minutes seems like a reasonable substitute for testing your ability to pay attention to details and think through _exactly_ what something means, as distinct from what it looks like it means.

Another aspect of this question is that there's an underlying point to this question that's not, perhaps, so obvious. That is the notion of Liskov substitution. If you _understand_ this concept, and the rules of Java that directly derive from it (the "overrides may not be less accessible than their precursors" and "overrides may not throw checked exceptions that are not legal for the precursor") then you'll be just a little more ready to spot this issue. Particularly when you're in an exam and are forcing yourself to demonstrate your ability to pay attention to small details.

Is the exam perfect, heck no. It was written by humans, so it would be crazy to expect it. Is there room for practical improvement, yup, that too. Is it unfair, nope, it's the same for everyone. Is it broadly a valid estimate of a programmer's skill and learning? I believe so.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent post Simon which I fully agree with. Have a cow!
 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
Guillermo Ishi wrote:The questions are like for example there is an interface with a method and a class that implements the interface. You are asked what the output will be. But what you must realize is that the method in the interface is public even though it's not marked so in the interface. Since it isn't marked public in the implementation, compilation fails.

That's indeed a true classic!

Guillermo Ishi wrote:I failed by two or three points -- the right score to give someone to make them want to purchase it again.

If you comment on this certification exam, you always tend to be very negative. Why? Still gutted about failing the test? If you fail with 2 or 3 points, then you simply didn't answer enough questions correctly. It's definitely not because Oracle wants you to purchase the exam again. If that really would have been their intent, then every fail grade would be with just 2 or 3 points (and that's clearly not the case).


I might save the word "gutted" for loss of a child...

The problem I have with the test is that you can know the material and fail the test. It's that simple.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guillermo Ishi wrote:The problem I have with the test is that you can know the material and fail the test. It's that simple.

I don't agree! If you have a solid understanding of the material, you'll pass the exam without any doubt. But it requires a good understanding pf the exam objectives and being able to fully concentrate for 120 (or 150) minutes.
 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
I don't agree! If you have a solid understanding of the material, you'll pass the exam without any doubt.

I can think of a dozen thought experiments to prove it. For example, are not parts of the tests more difficult than other parts, without regard to the difficulty of the material itself?
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guillermo Ishi wrote:For example, are not parts of the tests more difficult than other parts, without regard to the difficulty of the material itself?

I have taken several certification exams so far and I must say I had a feeling the different topics were evenly distributed across the exam. Only with the OCPJP 1.6 I encountered a bunch more "compilation fails" questions than on the other exams. That's why I considered that exam to be easier as the other ones, but someone having difficulties spotting compiler errors might find this batch of questions much harder.

But you probably refer to questions on overloaded methods being much harder than those about overriding methods (or vice versa). And thus if someone gets 7 questions on overloading and 3 questions on overriding, this candidate will have a more difficult exam than someone who got 3 questions on overloading and 7 questions on overriding. I don't think this is an actual issue, because if you even fail to answer all hard overloading questions, you still have 60 questions on other topics to pass the exam.
When I took the OCAJP7 certification exam, I didn't encounter a significant difference in difficulty between the exam questions. A few times the code seemed to be very complex, but when glancing at the possible answer options the question was actually not so hard (e.g. accessing an element in a 2D array) and there was no need to evaluate that complex code.

PS. OCAJP is about Java and OO basics, that's why in my opinion the passing score of 63% (65%) is too low. In the beginning the passing score was 77% for the OCAJP7. I liked that number much more for this entry-level exam (as it also improves the value of your certification).
 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
Guillermo Ishi wrote:For example, are not parts of the tests more difficult than other parts, without regard to the difficulty of the material itself?

I have taken several certification exams so far and I must say I had a feeling the different topics were evenly distributed across the exam. Only with the OCPJP 1.6 I encountered a bunch more "compilation fails" questions than on the other exams. That's why I considered that exam to be easier as the other ones, but someone having difficulties spotting compiler errors might find this batch of questions much harder.

But you probably refer to questions on overloaded methods being much harder than those about overriding methods (or vice versa). And thus if someone gets 7 questions on overloading and 3 questions on overriding, this candidate will have a more difficult exam than someone who got 3 questions on overloading and 7 questions on overriding. I don't think this is an actual issue, because if you even fail to answer all hard overloading questions, you still have 60 questions on other topics to pass the exam.
When I took the OCAJP7 certification exam, I didn't encounter a significant difference in difficulty between the exam questions. A few times the code seemed to be very complex, but when glancing at the possible answer options the question was actually not so hard (e.g. accessing an element in a 2D array) and there was no need to evaluate that complex code.

PS. OCAJP is about Java and OO basics, that's why in my opinion the passing score of 63% (65%) is too low. In the beginning the passing score was 77% for the OCAJP7. I liked that number much more for this entry-level exam (as it also improves the value of your certification).


No, I'm not referring to one objective or topic being harder than another. I'm referring to the opposite -- questions that are harder than others for extraneous reasons. If you think the passing score should be raised to 77% with the test as-is, good for you. I think the questions should be changed from hairballs to conceptual questions, and then the passing score adjusted after the problem is corrected. You can excuse the hairballs and even argue they need to be there, but what I'm defending is "you can know the materials and not pass the test."
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guillermo Ishi wrote:I'm referring to the opposite -- questions that are harder than others for extraneous reasons.

I'm still wondering which kind of questions you are referring to. If you have a good understanding about a certain topic (exam objective) you'll be able to answer most questions on this topic correctly. I honestly have no clue how a question can be harder than others for extraneous reasons. And even if this kind of questions exist (maybe testing some specific cases like I encountered on the SCJP6 exam), it will definitely be a minority on the exam. And for OCA7 you'll need to answer 45 questions (out of 70) correctly in order to pass, so you are allowed to make some mistakes.
 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
Guillermo Ishi wrote:I'm referring to the opposite -- questions that are harder than others for extraneous reasons.

I'm still wondering which kind of questions you are referring to. If you have a good understanding about a certain topic (exam objective) you'll be able to answer most questions on this topic correctly. I honestly have no clue how a question can be harder than others for extraneous reasons. And even if this kind of questions exist (maybe testing some specific cases like I encountered on the SCJP6 exam), it will definitely be a minority on the exam. And for OCA7 you'll need to answer 45 questions (out of 70) correctly in order to pass, so you are allowed to make some mistakes.

I could write you a test covering "beginner material" that you would fail. The secret of doing it would be hairballs+ running out of time. Easy.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guillermo Ishi wrote:
Roel De Nijs wrote:
Guillermo Ishi wrote:I'm referring to the opposite -- questions that are harder than others for extraneous reasons.

I'm still wondering which kind of questions you are referring to. If you have a good understanding about a certain topic (exam objective) you'll be able to answer most questions on this topic correctly. I honestly have no clue how a question can be harder than others for extraneous reasons. And even if this kind of questions exist (maybe testing some specific cases like I encountered on the SCJP6 exam), it will definitely be a minority on the exam. And for OCA7 you'll need to answer 45 questions (out of 70) correctly in order to pass, so you are allowed to make some mistakes.

I could write you a test covering "beginner material" that you would fail. The secret of doing it would be hairballs+ running out of time. Easy.

I'm always in for a challenge...
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3817
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is at least one good thing about preparing for these kind of exams that I particularly like. It improves your chances of not requiring another programmer to see your code and tell you what's wrong with it and you going, "duh!", even though in your heart you know you didn't know that's how it is supposed to work.

From my experience, I can tell you that it is not a good thing. Over the years, I have been called by several programmers, new and experienced, stuck with some stupid looking error, which in reality is not that stupid. IMHO, it creates a bad impression when you try to mask your lack of understanding with "silly mistake" smile. Many people can't even figure out what the helpful hints given by IDEs mean and how to utilize them to improve the code.

Preparing for certification helps you get your basics straight and helps you learn how run the code mentally and avoid such "silly mistakes". What is the point of knowing something if you can't apply it when it matters?
 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Anilprem wrote:There is at least one good thing about preparing for these kind of exams that I particularly like. It improves your chances of not requiring another programmer to see your code and tell you what's wrong with it and you going, "duh!", even though in your heart you know you didn't know that's how it is supposed to work.

From my experience, I can tell you that it is not a good thing. Over the years, I have been called by several programmers, new and experienced, stuck with some stupid looking error, which in reality is not that stupid. IMHO, it creates a bad impression when you try to mask your lack of understanding with "silly mistake" smile. Many people can't even figure out what the helpful hints given by IDEs mean and how to utilize them to improve the code.

Preparing for certification helps you get your basics straight and helps you learn how run the code mentally and avoid such "silly mistakes". What is the point of knowing something if you can't apply it when it matters?

You'd like not to certify somebody as a java programmer who just answered questions about java, even hard ones, but had no experience with code. But -- that is allowed to happen out there. In Montana there was a complicated written test you had to take to become an electrician. An electrician there was telling me that the guy who had scored the highest score of all time on it was a kind of idiot savant who couldn't pull wires through a conduit to save his life... You have to figure they thought that was the preferable situation.

Roel De Nijs wrote:
Guillermo Ishi wrote:
I could write you a test covering "beginner material" that you would fail. The secret of doing it would be hairballs+ running out of time. Easy.

I'm always in for a challenge...

And I'm always in for letting somebody else do the work -- go take the ocajp8 but just give yourself 15 minutes
 
Henno Vermeulen
Ranch Hand
Posts: 40
2
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(Mostly in reply to the original question)

I agree that the exam is MUCH more focused on recognizing correct and incorrect Java constructs/syntax than in learning how to properly implement business requirements in Java.
Yet it does teach you the fundamental nuts and bolts of the language. You do have to think more like a compiler than someone implementing a piece of business logic. Still, having that knowledge doesn't hurt and you don't have to give up your higher-level knowledge to learn it... I have years of experience writing Java code and still the exam questions (and especially mock exam questions) were challenging because they also test you on things that the compiler normally catches so that you fix it without a blink of the eye, some things you may never use in practice and some things you can quickly look up. Still I found it a nice experience to learn some of these details. It improves how I can analyze a piece of code and know what is legal and what is not, and being able to explain why this is so without having to guess. So I do have the feeling it made me a better programmer, though it won't hugely affect my performance on the job.

Others have made a valid point that passing the exam can also prove to others (including a possible employer) that you have a good grasp of the Java fundamentals, that you have a good attention to detail and can concentrate for a longer period of time.

As to retraining the brain: I scored 98% on the OCA, more than I could ever hope for! So I guess I did manage to do this... What I did is first going back to the basics. Even though I knew how to use many of the topics in practice, I still carefully read a study guide (the K&B book), as well as the Java tutorials listed by Oracle for the OCA. This allowed me to pick up details I didn't know before. But more importantly: I made all of the practice questions and mock exam questions provided with the study guide, as well as bought and made the Enthuware mock exams. I focused on the mistakes I made and made notes on how to prevent these type of mistakes in the future. This is either memorizing a detailed piece of knowledge I had missed, or learning how to better tackle the exam questions, e.g. by checking for certain pitfalls. See also my tips on this post I made.

Good luck with studying!
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guillermo Ishi wrote:And I'm always in for letting somebody else do the work -- go take the ocajp8 but just give yourself 15 minutes

That's bonkers! Why would I want to do that? There is a reason why you get 150 minutes for 77 questions

Still wondering what you see as a hairball question. Still wondering which kind of questions will make you fail the test although you have a good understanding about a certain topic (exam objective). You mentioned it a few times, but never provided a concrete example. It's time to put your money where your mouth is...
 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
Guillermo Ishi wrote:And I'm always in for letting somebody else do the work -- go take the ocajp8 but just give yourself 15 minutes

That's bonkers! Why would I want to do that? There is a reason why you get 150 minutes for 77 questions

Still wondering what you see as a hairball question. Still wondering which kind of questions will make you fail the test although you have a good understanding about a certain topic (exam objective). You mentioned it a few times, but never provided a concrete example. It's time to put your money where your mouth is...

Hairballness is the difference between how much time it takes to answer a question posed two different ways.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guillermo Ishi wrote:Hairballness is the difference between how much time it takes to answer a question posed two different ways.

I assume this question would have no hairballness.

Does this compile?A. True
B. False


But if this method declaration was used in a class with a few other methods, some instance variables and a few loops; this question would score pretty high on the hairballness scale.
 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
Still wondering what you see as a hairball question.


Here are a couple from K&B book.



The actual question there^ is simply what does null.toUpperCase give?





What is being tested for there could be tested for with this, or even less really. This is probably better than the original question because the original would do the same whether it was an object or primitive, because of assigning its return value.


 
nick woodward
Ranch Hand
Posts: 370
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guillermo Ishi wrote:
Roel De Nijs wrote:
Still wondering what you see as a hairball question.


Here are a couple from K&B book.



The actual question there^ is simply what does null.toUpperCase give?


An employer probably cares just as much, if not more, that you can spot the mistake. The same with your last example. It isn't just the knowledge that is important, it's being able to put it to use. The exam questions aren't perfect, but they demonstrate application of the knowledge much better than your suggested replacements do, in my honest opinion.

From what I've read of your posts you definitely seem to know the topics well, perhaps you just need to concentrate on how to pass the exam, not the actual subject matter? To be honest it's a skill that applies to all examinations. Look at it this way, this exam is valuable precisely because of its pedantic nature.

I feel your pain though!
 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nick, I think you might think the original is better basically because it's more complicated. In reality if something was written incorrectly, you would track down the error -- pretty much the opposite of asking what will happen. I know there's overlap... A good next generation test would be to write code that does something the assignment asks for. I've done that in several classes, actually. You write something and try to make it pass validation.

I'm pretty sure I will pass the test. I failed it by 3 points I think it was, and I was suffering from hypothermia and there were kids running around, and there were other things. Most importantly, I didn't know the previous month they had changed the style of questions so I had kind of been studying for the wrong test. I don't know when I will be able to take it though. I don't have enough control over my time to get into a rhythm But if they just asked topical questions I would take it tomorrow and get about a 95.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guillermo Ishi wrote:The actual question there^ is simply what does null.toUpperCase give?

Absolutely not true! This question tests way more than invoking a method on a null reference. It tests your knowledge about:
  • a valid class declaration
  • a valid main method declaration
  • running an application from the command line and passing program arguments
  • how program arguments are passed to the main method
  • an array declaration
  • initializing an array element
  • a for loop
  • how to get the length of an array
  • an if statement
  • difference between a code block with curly braces (for loop) and one without curly braces (if statement)
  • a print statement
  • the toUpperCase() method of String
  • invoking a method on a null reference
  • And this all in just 1 question!

    Guillermo Ishi wrote:What is being tested for there could be tested for with this, or even less really. This is probably better than the original question because the original would do the same whether it was an object or primitive, because of assigning its return value.

    And of course the same applies to this question as well. Each question tests much more than one single thing which could be tested solely in one or two lines. Besides covering more than one topic per question, these exams are intended for Java programmers. So in your daily job as a Java programmer, you'll probably have to evaluate a code snippet of 10-20 lines to track down a bug/issue in the code. So from this point of view, it makes much sense to not limit the code snippets to only 1-2 lines.
     
    Guillermo Ishi
    Ranch Hand
    Posts: 789
    C++ Linux Python
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    To my way of thinking, what's being tested is your ability to find the null.toUpperCase needle in that "all in just one question" haystack with the stopwatch running.
     
    Roel De Nijs
    Sheriff
    Posts: 10662
    144
    AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Guillermo Ishi wrote:A good next generation test would be to write code that does something the assignment asks for. I've done that in several classes, actually. You write something and try to make it pass validation.

    This certification already exists! The Oracle Certified Master, Java SE 6 Developer Certification is exactly wat you are looking for. I took it 5-6 years ago and it was lots of fun and very, very instructive!

    The problem with this kind of exams is that grading is a lot harder than with multiple choice questions. With a multiple choice question the answer is correct (1 point) or wrong (0 points). But with some code, it's a lot harder to determine the score. You could of course have a test suite and if the code passes, it's working correctly. But is correctly working code enough to get 1 point? I don't think it is! Let's assume the very easy example to print each element of an array on a seperate line. And here are some solutions from different studentsAll will pass the test suite, but not every student should get full marks.
     
    Guillermo Ishi
    Ranch Hand
    Posts: 789
    C++ Linux Python
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Roel De Nijs wrote:All will pass the test suite, but not every student should get full marks.

    There's a school of thought that goes if it meets all the requirements, it's good enough...
     
    Roel De Nijs
    Sheriff
    Posts: 10662
    144
    AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Guillermo Ishi wrote:
    Roel De Nijs wrote:All will pass the test suite, but not every student should get full marks.

    There's a school of thought that goes if it meets all the requirements, it's good enough...

    Not in my book! Only student2 should get full marks, followed by student1, then student3 and last (and definitely least) student4.

    When you are writing code, there is much more than correctly working code, for example readibility and maintainability of the code.
     
    Guillermo Ishi
    Ranch Hand
    Posts: 789
    C++ Linux Python
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    There's a school of thought that goes correctly working code is hard enough by itself...
     
    Roel De Nijs
    Sheriff
    Posts: 10662
    144
    AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Guillermo Ishi wrote:There's a school of thought that goes correctly working code is hard enough by itself...

    Volkswagen also thought it was hard enough to produce emission-compliant diesel engines, so they made the engines pass the official emission tests without any problem
     
    nick woodward
    Ranch Hand
    Posts: 370
    11
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Guillermo Ishi wrote:There's a school of thought that goes correctly working code is hard enough by itself...


    works for who though?

    working code is just the tip of the iceberg in my humble opinion.

     
    Guillermo Ishi
    Ranch Hand
    Posts: 789
    C++ Linux Python
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Roel De Nijs wrote:
    Volkswagen also thought it was hard enough to produce emission-compliant diesel engines, so they made the engines pass the official emission tests without any problem

    No amount of clarity and maintainability would have fixed it ;)
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic