• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Passed SCJD with 400/400

 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Long time no see, but i was on a 10-day vacation to Bulgaria I needed to relax a bit after 4-5 months hard work on the scjd assignment. I submitted my assignment on May 15th and took the essay exam 45 minutes after submitting the assignment. Just before leaving for 10 days I checked the certification manager, but no score yet. So I didn't know if I deserved the little vacation. But I checked Monday (my last but one vacation day) the certification manager and was delighted to see the P, and I was completely to see that I passed with the perfect score and according to the report I did an excellent job, so that means the little vacation was certainly deserved The date taken is June 12, so I guess it is the date when the assignment was graded (exactly 4 weeks after taking the essay exam).

So first of all let me thank some people who helped me a lot with the assignment (and i wasn't able to get such a score without their highly appreciated help):
  • Andrew Monkhouse for the excellent book and sample project he provided
  • Roberto Perillo for his excellent guidance, clear explanations and his superb data locking test class (that test class, maybe together with the small app to read the data file should be made sticky or a link should be put into scjd faq or reading materials)
  • K. Tsang, pramod karnani, Anne Grace, Pete Palmer and all the other ranchers for answering my questions and sharing their thoughts to some enlightning discussions.


  • No need to give the per section score, because that's quiet obvious, but I will shortly describe how I handled my assignment: I started January 2009 with the SCJD-assignment and started with the Data-class (implementing sun's interface) and i made my own test providing 100% test coverage: a test-case for each possible situation (normal run of method, exceptions that could be thrown,...). Then i used Roberto Perillo's test-case to make sure my locking mechanism won't result in a deadlock. Each time when i made a change to Data I ran those tests again, to make sure changes don't have any effect on the program. I chose to use a seperate business layer, so i made my local implementation (+ full coverage test) and my RMI implementation (+ full coverage test + a test to see if my booking process is flawless). And then I created my GUI. During development i used a wip (=work in progress)-package and if my class was finished i javadoc'ed it completely and moved it to the appropriate package. So a finished class is really finished and i don't have to spend extra time to javadoc afterwards.
    I created also an ant build file to create my submission jar (based on a build file found on this forum) and also a test-case to see if all required files are present and in the correct directory. If people are interested I will share/post my test to see if booking process is working ok, the ant build file and the test case to validate the submission jar, just let me know.

    Some facts and figures about the code i submitted:

    - 43 java files in total with almost all in gui and db
    - userguide = 16kb (295 lines, max 80 chars per line, with a lot of white space because it's a userguide so it should be very readible)
    - choices = 36kb (519 lines, max 80 chars per line, with almost no white space, just seperating the different sections, these sections are almost the same as the different marking areas mentioned in the instructions file)

    Finally I will give a quick overview about things I did (or did not):
    Data class
  • created my own interface (extending the sun interface)
  • used a record cache
  • reused deleted record numbers
  • singleton with all methods marked synchronized


  • GUI
  • kept it very simple (no use of icons for example)
  • used simple text boxes for the search criteria (with enter-enabled searching)
  • used mnemonics on every button, menu, menu-item
  • limited the number of characters in the input fields (according to the database schema)
  • blocked invalid characters (for example: no characters in port number field)
  • disabled buttons whenever they where not applicable (for example: booking an already booked room) or when the provided information by the user was not valid
  • used custom table model


  • Network
  • used rmi
  • generated stubs (not needed anymore from Java 5, but it is a must in the instructions and I didn't want to fail automatically so i didn't take the risk of not generating them and mentioned exactly the same in my choices.txt)


  • Other
  • used a business service (exposing just 2 business methods)
  • used logging in my Data class and my 2 business service implementations: just writing a message at the start (with parameters if applicable) and at the end (with result if applicable) of each method
  • did not implement the 48 hours rule


  • That's all folks! If i forgot something important or you want to know something, just ask and i will try to answer your question.

    Kind regards,
    Roel

    [edit] changed/extended the list with my do's and don'ts
    [edit] exactly 10 days (not business days) after my score appeared in the certification manager, the result appeared also in the sun certification database (and the certification date is May 15, the day I took the essay exam)
     
    Bartender
    Posts: 2292
    3
    Eclipse IDE Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Howdy, Roel!

    Congratulations, my friend! I'm just really happy for you! I am very glad that I was able to help you during this journey! I already knew you were going to get an amazing score... and you got a perfect score! Congrats for this great achievement!!!
     
    Ranch Hand
    Posts: 497
    2
    Spring Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Roel

    Congratualtions my friend !!
    Perfect score !! Awesomeeeee !!!
    See you around.
     
    Bartender
    Posts: 3648
    16
    Android Mac OS X Firefox Browser Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congrats Roel for your perfect score.
     
    Ranch Hand
    Posts: 114
    Eclipse IDE Tomcat Server Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congratz
     
    Ranch Hand
    Posts: 168
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    congrats,
     
    Ranch Hand
    Posts: 106
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Roel,

    Many congatulations on an outstanding score and one that is totally deserved.

    Regards

    Pete
     
    author and jackaroo
    Posts: 12200
    280
    Mac IntelliJ IDE Firefox Browser Oracle C++ Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congratulations Roel - fantastic score.

    I'm glad the book helped.

    I had to laugh at your taking a vacation after the SCJD: I did exactly the same thing. The day after I did the written exam, I left for a 2 week vacation on the Great Barrier Reef - partly chosen just because we would have zero access to a computer while there (let alone internet).
     
    Greenhorn
    Posts: 9
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congratulations Roel. Great score. You deserve it.

    Vijay
     
    Greenhorn
    Posts: 19
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congratulations for getting the perfecr score.
     
    Fernando Franzini
    Ranch Hand
    Posts: 497
    2
    Spring Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Roel

    I have some doubts...Whould you mind or anyone.....help me ?

    1. How did you reuse record id ? I' mean...wich was your ideia ? Cause I've thought that could appear a lot of problens with remote clients having "ghost records" using concurrents..if you reuse ids......I really dont know.....
    2. Why did you reuse record id if you didnt expose insert method ? You said that exposed just 2 bussines method ? Nobody will insert new record ?...right ??
    3. What's "48 hours rule" ? I've never heard about !

    Regard.
     
    Roel De Nijs
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Fernando,

    1. Assuming you have a fully functional application (deleting, adding, updating,... records is possible) it is indeed possible to have some problems with reusing the record numbers, but I didn't think about these problems (also not mentioned anything about it in my choices.txt) and so i didn't handle them in my program, because they can't occur in the actual application and they should be addressed when records can be deleted and created.
    2. The code (to reuse space and record number of a deleted record) is present in the create-method of my Data class, but this method is not called anywhere in the application, because you must only have 2 functionalities: find rooms and book a room.
    3. 48 hours rule is something from the URLyBird assignment you can read about in the section "Background" of the assignment: "They take bookings only within 48 hours of the start of room occupancy."

    I hope your doubts/questions are answered now.
    Kind regards,
    Roel
     
    Fernando Franzini
    Ranch Hand
    Posts: 497
    2
    Spring Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks again Roel
     
    Ranch Hand
    Posts: 39
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Wow, you are my hero. Congratulations.

    1) "the test case to validate the submission jar". What is this? Can you explain (may be post), please?
    2) what is the deal with generated stubs? I think I read about them in old posts, but never thought it would be a problem in java 6.
    3) why did you choose to have a separate business layer? what functionality did you put in there?
    4) how does your gui look like? Did you implement observer pattern?

    FYI I have just finished the coding part of my project. I noticed that a lot of your decisions are influenced by

    Thanks in advance and congratulations again. You are the man.
     
    Roel De Nijs
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Vasya,

    Thanks! Let me try to answer your questions:

    1) It is a junit test case testing the submission jar. It is absolutely not rocket science, just some checks like: are the required files (choices.txt, version.txt,...) in the correct directories, is my Data class implementing sun's interface, are the exceptions of sun's interface in the correct package, do they have the required constructors,... I can post this class if you want, and depending on your assignment you will have to do some small changes depending on your instructions.

    2) according to my instructions: "You must provide all classes pre-installed so that no dynamic class downloading occurs", so you should generate stubs (if you use RMI as network protocol. But from JDK 5 it's not necessary anymore to generate them (it happens automagically for you behind the scenes), but if you don't do it, you are ignoring a "must"-requirement which could lead to automatic failure. But for example Roberto Perillo didn't generate them, mentioned it clearly in his choices.txt and he didn't fail. I did not want to take the risk of automatic failure and generated them: I used an ant build file, so just 1 line has to be added to the build script to generate automatically these stubs. And i did mention in my choices.txt it's not necessary anymore to generate them as of JDK 5, but I did because it's a "must" requirement in the instructions.

    3) my business "layer" contains just 2 methods: one for booking a room and one for searching rooms matching the specified user criteria. And these classes contain all the business logic, like for example checking if a room is not already booked, filtering the records returned from my database only returning the exact matches. Only these business layer methods are exposed to the client, so used a thin client approach. I have 2 implementation classes for this business interface: one for using in local mode, one for using in networked mode.

    4) I kept my GUI as simple as possible (just like the rest of my application). So i have a menu bar (containing 1 menu and that menu contains 1 item to quit application). Then i have my search form: 2 simple text input fields (with labels of course) and 2 buttons (one to search, one to reset input fields). In the middle i had a simple JTable showing the hotel rooms (custom table model, no sorting, no filtering,...). Under this table I had a button bar containing all possible actions on a hotel room (so only a book-button, but you could easily add unbook button, update button,...). I created also a room dialog showing all details of the hotel room and only appropriate input fields (according to the chosen action) are enabled (so when user wants to book, only customer field is enabled to enter customer-id). For the configuration settings I followed the example from Andrew's book (with the Observer pattern). and as explained in my first post my GUI was highly restrictive: if it is not allowed or has no use, user can't do it.

    Vasya Pupkin wrote:
    FYI I have just finished the coding part of my project. I noticed that a lot of your decisions are influenced by


    I think this sentence is missing some words

    Hope my reply is helpful to you (and maybe many others)
    Kind regards,
    Roel
     
    Vasya Pupkin
    Ranch Hand
    Posts: 39
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Roel, thanks again.

    1) and 2) : It would be awesome if you post your build scripts. Since they are not a part of the submission, I think it does not violate the rules of this forum.

    Roel De Nijs wrote:

    Vasya Pupkin wrote:
    FYI I have just finished the coding part of my project. I noticed that a lot of your decisions are influenced by


    I think this sentence is missing some words


    Damn it.
    I noticed that a lot of your decisions are influenced by Andrew's book. Once you read the book, it is very hard to get away from these solutions. All the compliments to the authors.
     
    Roel De Nijs
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    If i have time this evening, I will post the build script and the test case this evening. Otherwise I certainly post it this weekend. So keep an eye on this forum
     
    Ranch Hand
    Posts: 430
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Amazing!!! thanks for sharing!
     
    Ranch Hand
    Posts: 88
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congratulations Roel,

    I am very happy for you.


    Regards,
    Pramod
     
    Roel De Nijs
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks all for your congratulations! And of course I will still be a regular visitor of the SCJD forum to help others with their assignment.

    Vasya Pupkin wrote:
    1) and 2) : It would be awesome if you post your build scripts. Since they are not a part of the submission, I think it does not violate the rules of this forum.


    As promised, you can find the build script and the test case here.

    Kind regards,
    Roel
     
    author
    Posts: 9050
    21
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congrats Roel!

    Let's slide this over to the results forum,

    Bert
     
    Sheriff
    Posts: 7134
    1360
    IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congratulations Roel
     
    Ranch Hand
    Posts: 1880
    Firefox Browser Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    congrats!!
     
    Ranch Hand
    Posts: 158
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congratulations!
     
    Ranch Hand
    Posts: 64
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congratulations!
     
    Ranch Hand
    Posts: 317
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congrats. Can you do me a favour and replace your name with my name on the certificate?

    cheers
    Bob
     
    Greenhorn
    Posts: 26
    Eclipse IDE Spring
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congratulations !! really Good Score
     
    Ranch Hand
    Posts: 48
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congrats!!
     
    Roel De Nijs
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Bob Wheeler wrote:Can you do me a favour and replace your name with my name on the certificate?


    Let me think about that one ..... No

    But I will try to help you and answer all your questions to the best I can, so you can achieve the same score (or even a better one ).

    Kind regards,
    Roel
     
    Ranch Hand
    Posts: 56
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congratulations! that is a perfect score!
     
    Bob Wheeler
    Ranch Hand
    Posts: 317
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Roel De Nijs wrote:
    But I will try to help you and answer all your questions to the best I can, so you can achieve the same score (or even a better one ).


    Ok, new target 401 out of 400

    cheers on you
    Bob
     
    Ranch Hand
    Posts: 55
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi, Congrats. Great score.

    How much experience do you have in Software industry? Any experience will helpfull to acheive this score?


    Cheers,
    Venkata.
     
    Vasya Pupkin
    Ranch Hand
    Posts: 39
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Venkata Saraswathi wrote:Hi, Congrats. Great score.

    How much experience do you have in Software industry? Any experience will helpfull to acheive this score?

    Cheers,
    Venkata.

    Venkata, are you banned from google?
    http://www.linkedin.com/pub/roel-de-nijs/4/222/a30
    http://users.telenet.be/hysterio/
     
    Roel De Nijs
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Vasya Pupkin wrote:Venkata, are you banned from google?
    http://www.linkedin.com/pub/roel-de-nijs/4/222/a30
    http://users.telenet.be/hysterio/



    Oh oh oh, someone of the FBI has tracked me down

    The LinkedIn profile could also be found on this easier link: http://www.linkedin.com/in/roeldenijs. And the link to my personal is also in my signature (so not a problem if you are banned from google ) and it has also an easier link: http://www.hysterio.be

    But I will summarize it in short:
    - I studied Applied Informatics from 1999-2002, graduated magna cum laude.
    - In 2004 I started working at the IT department of Aquafin NV: first 6 months were VB and VB.Net, then for 2.5 years I did webdevelopment in Java (Struts, jsp).
    - In 2007 I changed to MSP nv (now it is Cegeka Industrie nv) and I work there as a Java consultant: I worked already for different companies on a lot of different technologies (jsf, facelets, spring, hibernate/jpa, eclipse/rcp,...)

    So working with different technologies in different environments/companies is very instructive and you will learn a lot being a consultant. And of course also the SCJD forum was a great help. And one of the characteristics of my personality is my drive for perfection: if i do something, I 'm always trying to do it flawless. Intentionally I was planning to make a very simple GUI, mainly based on the example from Andrew's book and spend very few time on it (because it's just 40 points), but when it was time to start developing the GUI I just couldn't do that So I developed the GUI with the same attitude as the other components of my application.

    And as a final remark, some pointers I always kept in the back of my head:
    - keep things as simple as possible (think about the junior developer)
    - don't do anything that is not required (you won't earn bonus points for it, you can only lose points if you made a mistake)
    - make sure new features and/or changes can be easily made to your program
    - you will have to make a lot of choices/decisions (use a record cache or just write/read to file, use rmi or sockets,...), and there isn't really a bad one. just justify your choice in the choices.txt and you will be fine and don't only mention the pros, but also mention the (possible) cons and how you could/would handle them in future releases.

    Kind regards,
    Roel
     
    Ranch Hand
    Posts: 223
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Awesome!!! I knew you'd pass with a high score, but perfect, that's incredible. I'm so happy for you.
     
    Fernando Franzini
    Ranch Hand
    Posts: 497
    2
    Spring Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Roel

    Did you use any "Resource bundles" to get and throw server error messages ? or in GUI labels ?
    My assignment dont say anything about that or internationalisation stuff.....so I've thought in use everthing just hard-code !!
    Any comments ?

    Regards
     
    Roel De Nijs
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Fernando,

    Because using ResourceBundles wasn't a must requirement, I didn't use them. I only did what was required (the "musts"), except for the DAO factory pattern. That was not needed but I implemented/used it, so in the future it will be very easy to cope with a customer file or make a change of database and use MySql for example instead of the flat file.

    I just had a class containing only public static final String members (constants) which hold an english label, tooltip, caption, error,... For example:



    This approach makes it (very) easy to add internationalisation (ResourceBundles) when needed in the future with a minimum of changes.

    Kind regards,
    Roel
     
    Fernando Franzini
    Ranch Hand
    Posts: 497
    2
    Spring Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    But did you create one class with all messagens or one class per layer ?
     
    Roel De Nijs
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Fernando,

    in the gui-package I have just 1 class keeping all messages that are (or could be) shown in the GUI. Of course I also use messages in my Data class, but these messages are not supposed to be shown to the user, just used for logging purposes.

    So i did something like this (using a stupid example, so you have to do a bit of thinking yourself);


    Kind regards,
    Roel
     
    Fernando Franzini
    Ranch Hand
    Posts: 497
    2
    Spring Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I got !!!
    Thanks again Roel...

    Regards.
     
    reply
      Bookmark Topic Watch Topic
    • New Topic