My path through OCAJP

Hey,

it is about 9 months since I got OCAJP certified, but the desire to write a post just only for this single experience is still the same. Thing is I didn’t keep the promise to myself (posting about the experience as a whole) just after it finished, but I lately see that more and more people reach me only for this one, so, it was a matter “if not now, then never”. That is, in this post I will try to depict as better as I can my general experience and give some tips to anyone who thinks of getting certified.
1. Exam Topics
The OCAJP (1Z0-803) exam topics, are listed below:

  • Java Basics
  • Working With Java Data Types
  • Using Operators and Decision Constructs  
  • Creating and Using Arrays
  • Using Loop Constructs
  • Working with Methods and Encapsulation
  • Working with Inheritance
  • Handling Exceptions


2. Time Required
In my case, it was 2,5 full weeks, but I wasn’t employed in a full-time post, at that time, so, I could apply my own reading pace/tempo, which works better at night, so, the time I chose to get this certification was the best one, for my case, but one thing I would completely do in a different way, if I took this one from the beginning, is writing more sample programs/applications to get the understanding of what I was reading, instead of rereading the specified topic/paragraph/concept.

In general, I won’t provide any exact detail according to this, as it really depends on the experience. Ah, by experience, I don’t mean “years of experience”:

Figure 1. Years of experience nailed

The majority of people generally give an estimation range 240 – 320 hours. My position is that time isn’t a proper metric, as there is only one way to understand you ‘re ready for the exam and is mentioned in Mock Exams section of this post), but for your information, there is also an online time estimator, for that case.


3. Online Sources
For the above, one may still have unanswered questions going directly with a book, so, you will probably find yourself in a position that he needs more information. For this reason, the following links are considered a good idea:

  • Java API documentation
  • Coderanch Forum – good thing here is that usually the (certification) book authors are also members of the forum, so, it’s a good chance to learn from them. In addition, I believe this is the best place to ask a relative question, no matter how strange you think it is.

4. Recommended books
I found myself in a position that an in depth explanation book was required, as I was (still am 🙂 ) newbie to the language, so, I went for OCA Java SE 7 Programmer I Certification Guide: Prepare for the 1ZO-803 exam, as it’s well-written. It also covers all exam topics (so, by default, one could only go with this) including funny images and pictorial diagrams that help the candidate better understand the concept he’s going through, quizzes at the end of each chapter to better master the concept and two mock exams to let you know of your preparation level.

Moreover, there is also another side that believes Oracle’s OCA Java SE 7 Programmer I Study Guide (Exam 1Z0-803) is the best solution for succeeding, but I would only recommend this to more experienced candidates, not to juniors. as it contains a lot of errata, typos and even incorrect information, so you may go out the correct path. Thing is, I wouldn’t go for this one, even if I was a senior. The reason? It’s sure that I would spend some time to make clear that a specific topic was analysed wrong or the output of an example was wrong or a specification according to language was wrong, which means that I would need twice the initial time it would require me to understand what I was reading. Calculations are easy to make for a combination of the fore-mentioned errors and I don’t believe one would like to spend a life preparing for this certification, as it’s just the hall/prerequisite to others (and this is the only advantage I’m finding on this specific book: it covers both OCAJP and OCPJP) :

Figure 2. Java certification path


5. Notes
No matter of the book/books you’re gonna give a try to, always remember to take down your own notes as you make your path to the certification, as you ‘ll also notice by yourself that even after two or three times of reading a specific feature of the language, you either do not understand it or you have to reread it in order to refresh your mind. This is just usual, as we all may think that we know Java, but when it comes to certification, even the seniors may face language aspects for whoms existence they were never aware of. So, keep your own notes. Specifically, only the ones you find hard to memorize/understand at a first glance, as you are the final candidate and you will take the best notes for yourself. What I mean, is that you ‘ll obviously find several notes from individuals around the net, just like mine, but the fact these helped me, doesn’t mean that will also help you. Everyone writes down what he thinks is the best for him to remember/memorize; one could be good in concurrency for example (ok, foul, this is an ocpjp topic 🙂 ), and will not even have to write something down, but my very first reading about it was in the book I chose to be prepared for the certification with, so I have to keep somewhere the important from my perspective points.

6. Mock Exams
Many claim that due to the exam style, one can only be ready, after having gone through many mock exams. You may also hear that what here stands for the experienced ones, is just getting some good mock exams (and by good, I mean, solutions that explain in-depth each one of the possible answers of a question, even the correct one, as the candidate have to make clear why each one of the wrong ones is actually wrong, in order to avoid common mistakes and to also understand the correct one).

There are two solutions, one for those who prefer reading @ their pc and the other for the book-lovers. Fortunately, both will cost you no more than 13€.

When it comes to the software solution, the majority of people only proposes Enthuware’s solution, no matter of the exam. Same stands for the OCAJP. But, for the book recommendation, the solution hears to a title like OCAJP Oracle Certified Associate Java SE 7 Programmer Practice Exams, from Hanumant Deshmukh and I can verify that this product is the best for the OCAJP exam, as it provides five full mock exams with an in-depth approach to all the possible answers and the reason each one of them was right/wrong.

My advice through this one :

  • Always read all of the possible answers’ explanation, as you ‘ll find yourself like being in a position of unlocking new aspects of the language.
  • On the other hand and in conjunction with the above point, repetition on failing tests will help you enhance the memorization required.
  • Don’t go through to the next exam if you didn’t get a passing score in the current one; that is, the exam is long enough (take+review) to forget many things, so, there is also a case that you ‘ll fail more than once.
  • Getting scores on the border line is a good sign for this book, as it’s considered more hard than the actual exam, so if you don’t care about your final score itself and just want to get the certification, book an exam taking, when on border line!

7. Examination
You first have to book an exam through PearsonVue. Nowadays, the word is so spread that when I was in the same position, I even found 3 supporting test centres in Thessaloniki, Greece and one of them offered this exam once every two days, so, I wasn’t worried about the booking, but you obviously have to make an investigation first, to see what’s going on, according to your location and to decide whether or not should you care about the booking.
Exam fee is 230€ and you have to reach the examination center 30′ earlier, for the required identification process.
During the exam you are given a piece of plastic whiteboard (about 30cm x 25 cm) with a black highlighter. (debugging, etc.). If there’s anything you want to ask (non-technical – bathroom, etc.), you can raise up your hand and the responsible person from the training center will enter the examination room, ready to help. That is, there is a camera in the examination room.
A final and more related to the technical part of the exam point is that you are informed from the examination system that there are 2-3 questions that will not be countered to the results, but you don’t actually know which one of them.

Good luck!

Advertisements

Create your own movie database easily with SmartMovieDB!

You can directly jump to the git repository that hosts this project 🙂

There’s a pretty nice source over the internet, regarding the creation of your own movie database.
You can read in detail its usage and functionality over the fore-mentioned link, but, generally, the following schematic explains how it works:

That is, you give as an input a text file that contains the desired movies’ names and with the help of the perl scrapper, you get an output of an sql format with all the sql commands that need to be done to your database.

This means of course some extra effort, so why don’t we go for an automatic process? What about an sql script runner, which takes as an input an SQL file, connects to the specified database and runs the generated from the scrapper script, queries?  It would be nice if we could stick with Perl, but I didn’t had the luxury to waste a lot of time on Perl-MySQL connection, so I chose the easy way, which is Java and fortunately, there is an easy way to do it, again with the support of an open source project (we ‘ll here need only one part of it, as you noticed, too).

I’m choosing to start with the Java project, which is responsible for reading an sql file and executing the included queries to a given database connection:

  • DatabaseConnection.java defines a valid database connection.
  • ScriptRunner.java is responsible for the convertion of sql statements into databse queries.
  • MainClass.java coordinates the game, as the script runner’s instance needs a connection argument, which is actually passed by calling the getConnection() static method of DatabaseConnection.java

And that’s is! We ‘re good to go with the script runner’s part.

What is left now, is to find a way to connect the script runner (that takes an sql file and executes the existing queries into a db) with the perl scrapper.

According to the scrapper’s part, I’d firstly like to introduce a small parenthesis: I support open source software, so I’m here using the OMDB Api, instead of the iMDB’s API, so, together with some updates that had to be done to the scrapper script, here is the updated version of getMovieData.pl:

#!/usr/bin/perl -w
use strict;
use XML::Simple;
use Data::Dumper;

my $xml = new XML::Simple;

die "Please make that you the movie title is provided into quotes!\n" if(!@ARGV);
my $movie = shift;
$movie =~ s/\s/+/g;

my $cmd = "curl http://www.omdbapi.com/?t=$movie&y=&plot=short&r=xml";
my $movieData = `$cmd`;
my $data = $xml->XMLin( $movieData );

my $released = escapeSingleQuote($data->{movie}->{released});
my $rating = escapeSingleQuote($data->{movie}->{imdbRating});
my $director = escapeSingleQuote($data->{movie}->{director});
my $genre = escapeSingleQuote($data->{movie}->{genre});
my $writer = escapeSingleQuote($data->{movie}->{writer});
my $runtime = escapeSingleQuote($data->{movie}->{runtime});
my $plot = escapeSingleQuote($data->{movie}->{plot});
my $imdb = escapeSingleQuote($data->{movie}->{imdbID});
my $title = escapeSingleQuote($data->{movie}->{title});
my $votes = escapeSingleQuote($data->{movie}->{imdbVotes});
my $poster = escapeSingleQuote($data->{movie}->{poster});
my $year = escapeSingleQuote($data->{movie}->{year});
my $rated = escapeSingleQuote($data->{movie}->{rated});
my $actors = escapeSingleQuote($data->{movie}->{actors});

my $tstamp = time();

print "INSERT INTO movie_collection VALUES (NULL , '$title', '$year', ";
print "'$rated', '$released', '$genre', '$director', '$writer', '$actors', '$plot', ";
print "'$poster', '$runtime', '$rating', '$votes', '$imdb', '$tstamp');\n";

sub escapeSingleQuote {
my $str = shift;
$str =~ s/\'/\\'/g;
return $str;
}

Once the sql file creation is done , we ‘ll make a system call from Perl to run the exported jar file of our Java project. This means that we need to add the following line in the end of the batch.pl script:   

#!/usr/bin/perl
while(){
my $cmd = "perl getMovieData.pl \"$_\"";
system($cmd);
}
system "java -jar absolute/path/to/the/exported/jar/file.jar"

Finally, everything is fired up from command line, so, keeping in mind the exact locations of the required files (movies list, jar and generates sql’s file), execute the following command:

perl batch.pl movielist.txt > sqlInserts.sql

For more details, there’s also a git repository that hosts this project 🙂