Tiberius Marius

Ranch Hand
+ Follow
since Dec 27, 2013
Merit badge: grant badges
For More
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 Tiberius Marius

Hello Allen & Chris

I am interested in accelerating my java learning process and i am always looking from good books .I have a few questions :

1. What would be the target reader that you aimed for with this book and what would be the type of reader this book is not for ?

2. I am a bit of a self learner and what helps me learn and keeps me motivated is validation of my effort aka exercises and tests where you can reverse/use what you read from a different angle and at the same time validate the effort you made . Does your book focuses on this and if so how ?

3.This is a more of an esoteric question . I think there is a difference from someone that has great proficiency and talent in a domain and someone that is a great teacher . How do you see this yourselves and how you implemented being a "great teacher" in this book ?

My last question is not related to the book but it's something that bugs me recently . I m a java novice , all i know so far was obtained via self study from books . I m working as a QA engineer that sometimes feels the shoes of an automation engineer. I know more theory then most of my colleagues but i m not as proficient at writing code as half of them. Being from a non technical background education wise and just starting java less then 2 years ago what do you advice me to do to gain more actual code writing skills . ( write code is almost implied as an answer here but i find it hard to find meaningful stuff to write code about ,at a level useful from my current skill level - i would love a more structured approach).
7 years ago

Stephan van Hulst wrote:Well, it depends on the format of your resource file. There are APIs out there that deal with INI files, XML files and .properties files, for instance.

I would dissuade you from storing your resource in a String, while it's in memory. Write a class that strongly types the properties of your resource.

It's a text file that stores some options for a different project . I cannot modify it apart from changing the values in there . I m trying to create an automation test but for that i have to first modify some values in one of the configuration files that i then move to the location where the system under test runs.
7 years ago

Campbell Ritchie wrote:Do you mean you want to write an additional line in the file? That can easily be done with a buffered writer. If you pass a FileWriter, you can use a boolean argument to its constructor which changes it to append mode, rather than overwrite mode.
You usually create Properties as a sort of Map, so you can implement your options as a Map. The System class has various methods allowing you to alter the standard properties. You would have to work out what format the properties and resources are in, so you can write the additional lines in that format.

No , i want to modify a value there aka remove something from a line and add something in it's place.
7 years ago
I want from Java to modify a resource text file to locate a string , lets say date=<value> and to change the value . I have an idea of how i can read the whole file and save it in a string where i add the last line read each time. When i find the line with date i modify it and then add it to the rest of the string and then i completly rewrite the file. I will try to code this approach and post it here but would appreciate if someone can suggest a more simpler approach using a library that makes this whole thing take a few lines. Something on the side of less complex is desired.
7 years ago

Stephan van Hulst wrote:I don't understand your use case, or what you mean.

Resources are supposed to be static, and their location is supposed to be known ahead of time.

It's for test automation , anyone can know the format of the name representing future resources but their location in the projects may not be known yet . Aka i have resources now that represent opportunity table data (in a opportunity table folder) but later on i may have something else. If i require only resource name inside my method i can write code now that will not need modification.

8 years ago
Hello everyone ! I need to get the relative path of a resource in the project while knowing only the resource name .I am looking for something that can dynamically look in my project file structure and find the resource with the name i specified . Ultimately i need to create a file object using the relative path .

Any suggestion is much appreciated .
8 years ago
The problem was the regional settings on my computer . Once set to US the section i posted outputs expected results , aka the exact line from the csv file.
9 years ago

I need to read a csv file from the disk and manipulate the data inside.My problem is that if the csv (excel format) contains "" in any of it's values the whole string line gets saved/displayed incorrectly . For example for the line in the csv file :

1,393275,57319 57321 57323 57325 57327,5_5,200000,393277,57329 57331 57333 57335 57337,3_3,200000,400000,"gi,gi",,,,,,BASS/2.4,,1

it gets read in java as :

"1,393275,57319 57321 57323 57325 57327,5_5,200000,393277,57329 57331 57333 57335 57337,3_3,200000,400000,""gi,gi"",,,,,,BASS/2.4,,1";;;;

instead as :

1,393275,57319 57321 57323 57325 57327,5_5,200000,393277,57329 57331 57333 57335 57337,3_3,200000,400000,"gi,gi",,,,,,BASS/2.4,,1

My code is :

What am i doing wrong , how can i read a csv file (excel saved) without getting "" added incorrectly ?
9 years ago
Congratulations! Taka Maruyama

Guillermo Ishi wrote:Be careful interpreting these numbers. I was getting consistent 80s on the mocks but got 60 I think on the actual. Some of my mock score may have been due to memorization but on the other hand all the questions I got right I did understand so I don't know if memorization actually benefited. This was not recently - it was just as the test changed to the new one.

If you get 80 in a Enthuware mock exam you will not fail the real exam .Guillermo please do not induce people in error on this , if you want to use mock exams as verification on readiness for exam you should not take the same test multiple times and draw the wrong conclusions . You also said that the questions on the exam are longer then the ones in the Enthuware and this thing too proved false when i passed the exam.
9 years ago
As a general rule after taking/passing the exam i can safely say that the exam is almost perfectly in sync with the exam objectives.(and more then some mocks out there) The only two things i found as new was a type of unchecked exception i ve never seen before (i was able to deduce the correct answer by eliminating the wrong answers) and Type List used to reference ArrayList objects which for some people is not new but for me it was .

LE.Noticed after that it's 808 not 803 .Even if the objectives are almost the same there is no guarantee the exam will not have a different format/difficulty .

I m going to start by saying that my preparation experience would probably only be useful for someone who is starting programming and Java now .If that's not the case you might want to skip this block and just read the exam experience .

My exam preparation and advice for starting programming:

I started learning Java/programming 5+ months ago with the aim of both getting a good foundation in java/programming and getting the first Java certification . Initially i decided to divide my time in 2 , first start by learning the basics of java ( i estimated about 2.5 months) using only books and practice and then study for the certification ( i estimated about 2 months). I still think this is by far the best approach as while it is possible to start directly with the certification is significantly harder to succeed like this and you would not get any kind of problem solving skills( which are essential together with a strong understanding of the programming language and principles if you want to apply your knowledge of Java ) Be advised that i spent on average 4.5-5 hours a day every day ( that's about 750 hours ), starting without any experience in programming .Now i can safely say that putting the time and making the effort is the hardest part of learning Java . I m sure some people can do it much faster but here you go , that's how long it toke for me .I used and i advise using books for learning Java ( especially if coming from a no programming-knowledge background )

The books i recommend:

1. The Art and Science of Java , the best explanations i found anywhere but not very systematic in it's approach of learning .Focuses on basics of programming more then on Java . Also uses heavily some libraries that will create confusion for new people when they move to normal java code - i used this my first 1.5 month

2. Think in Java 4th edition , I have not read this book but it comes highly recommended and it's approach is OOP first before procedural stuff which i think is better . The Enthuware site recommends this book.

3. Intro into Java programming 10th edition . This did the trick for me as it's excellent for practice and validation , every chapter have allot of exercises(to get some problem solving skills) and a ~ 40 questions quiz . Also it's systematic in it's presentation of Java and well organized . (I think it's made mostly for CS students having over 1000 pages - someone that is interested in OCA-1Z0-803 need to read the first 13 chapters/ 500 pages )I used this book after "The Art and Science of Java" for about 1.5+ months and then for certification study as i found the chapters Inheritance and Exception Handling more clear and better explained then in Mala Gupta's book.

There are allot of books to introduce into Java and most are decent but my advice would be whatever book you chose try to do allot of exercises . Just readying theory will never be enough i think (what why i values books with lots of exercises here)

The second part of my preparation was focused on the certification and Mara Gupta's book OCA Java SE 7 Programmer I Certification Guide . I think i spent about ~ 2.5 months on this .I think i ve read the book at list 3 times and after a few iterations of this i ve made a summary of every chapter . This helped me incredibly much as i would sometimes forget stuff( usually related to inheritance and exception handling) As you probably know the best way to learn and retain information is to use that information in different and interactive ways ( exercises , examples , quiz or just viewing/phrasing the information in different angles ) . Not list it helps allot to read something at different intervals of time as opposed to focusing one week on it and then forgetting about it for the next month . As a general idea Mara's book is good but i don't find it as good as some people here argue it is , for example the last 2 chapters are not as good in my opinion . For me Inheritance and Exception handling was explained much more clearly and completely in Intro into Java programming . Also Mara's book will not cover every piece of information that you might encounter in the exam(which is somewhat to be expected) , just take an Enthuware mock exam and you ll see what i m talking about . That being said it's probably the best book at the moment and it's good enough , providing smart analogies for relations and behavior in Java .

As you study for the OCA-1Z0-803 you ll want to validate yourself and in general measure your readiness for the exam . I advice you get the enthware tests as a must and maybe whizlabs if you want more . After taking both the first Enthuware mock exam and the exam i can safely say that the exam is easier in the sense that Enthuware have some very hard questions (around 10) that the exam will not have .The hardest questions on the exam are 1 level bellow the ones in mock tests . The question length and the code size is very comparable with the exam.

One more thing , coderanch is an incredible resource and you should use it . I ve asked allot of dumb question in my java journey and i was never put down for it through i was directed to the Java docs a few times

I hope i covered most of it but if there are questions feel free to ask.

The exam

I did not feel ready for the exam , especially the ArrayList/StringBuilder/String sections but i did want to finish as 5 months is a long time . At this point i still hadn't done any mock tests except the chapter based ones in Mara's book through i did look over a number of questions in the Enthuware mocks . So i decided to do the first Enthuware mock exam and if i pass it i would schedule a few days later . I did pass it with 69% finishing in the last minute . I understand this is not the best way to use the mock exams but i wanted a shot at the exam right way . Today i toke the exam and passed it with 80% . I m happy that i manage to finish even if i did not do allot of mocks and a final refresh of the topics. I think that if i would have had the patience to do all the mocks and review what i did wrong i could have added at list 5% to my grade but i m not at all sorry .

My impressions about the exam :

- it's easier then Enthuware Test1
- the question /code length is very close to Enthuware Test1 and nothing to be scared about
- my biggest problem were nerves and time , i had to randomly select a question at the end as i did run out of time
- the hardest type of question on the exam was of type "Here is a section of code , select the block of code to be added at line X so the output is X and Y etc " , using a number of nested loops to make it harder but the question could have been about ArrayList or Arrays .
- on inheritance/polymorphism i expected much harder questions but there ware kinda basic (understand the basic cases when an method is overridden and how you can correctly invoke those methods)
- i think it helps to understand the logic behind rules in java as much as to understand the rules , this way you can answer questions that contain never before seen situations
- the vast majority of questions ware in scope with what i read in Mara's book but there ware a few exceptions ( a few exception classes ; using the Type List to reference ArrayList and a few more) But not as much as with the Enthuware mock where i found allot of things that ware not present in Mara's book
9 years ago

Alex Drummond wrote:I'm working towards a new career goal of developing apps for android as a complete beginner to computer science. Could you help me structure my learning better/more comprehensively by reviewing my rough plan below?

My rough plan so far is as follows:

1. Learn programming principles and its fundamentals.

2. Learn about clean code and working with others.

3. Then learn how Android works (Java) and put it all together in a simple app.

Are there steps I might not be aware of? if you were breaking these down into sub-goals or knowledge to learn for each section what would it be?

Any help would be much appreciated!


You need to start small and focus on small increments at a time . Your plan from where you are now it's like deciding what car to buy your unborn kid when he turns 18 when your not even in a relationship , not to mention conceiving a child ... A much better and productive focus of your attention would be:

1. Having realist expectations and goals (anyone can learn to program but it takes time ) , if you don't have realistic expectations you ll most probably quit along the path as you ll start doubting you ll get there .Also let me tell you that from your level you cant make a clear detailed plan because your estimations will be wrong .That why focus on the problems you have now and increment (including your estimations )
2. Planing to /finding the time to study hours a day for java ( you need more then 5 h a day if you want to make money from java after ~ 1 year of study if you start with no knowledge of programming)
3.Finding the right approach to learning Java ( what books , how to validate yourself , finding interactive ways to learn (aka exercises) etc
4.Ways to make java study fun as we are not machines and how much fun you get from it is that much easier to push yourself more

You can check other topics on this , one recent one is https://coderanch.com/t/638289/java/java/learn-Java

But yes , there is no question about the fact you can get there if you put in the effort , that is the hard part ....
9 years ago
I m thinking of taking the OCA 8 exam mostly because it's cheap and 150 questions will do me good + the off chance(hope decent) i might pass . But i have some questions first. I understand you will find out the score 11 weeeks after the end of the beta , does that mean you will find out if you passes at the same time or only the score will be showed then ? Can you still take OCA 7 after beta OCA 8 (even if they did not inform you of pass or fail ) ? Third question is concerning the number of questions and the time , and this question is mostly directed at Jeanne. OCA 8 has about double the current number of questions and a reduced time of 60 sec per question. To be honest there is no way i can answer 20+ lines of code questions in less then 1 min , i lack the experience to go trough code that fast . Do you think the format has changed too for those questions making them less time intensive then OCA 7 ?

Also i looked more carefully at the OCA exam topics and more then 2 new sections(Write a simple Lambda ... / Create and manipulate calendar data using classes from java.time... ) have been added and/or changed :

-Compare and contrast the features and components of Java such as: platform independence, object orientation, encapsulation, etc.
-Use call methods on user-created wrapper class objects
-Describe the hierarchy of implementing inheritance

Aravind Kumar Thoomu wrote: I have been going through "IVOR HORTON's Beginning Java 2 (JDK 5)" for some time and I was looking for a book which describes- All the contents of OCA Java 7, and the features newly included in Java 7, and their need of emergence, and what Java did with these respective requirements before Java 7?

I advice Intro into Java Programming 10 th edition , it has everything you need for OCA and beyond , it has allot ( usually over 15/20 ) exercises for every chapter and other forms of validation ( a 40+ questions quiz on each chapter for example) . If you already master most of the topics of the exam(the hardest being imo inheritance and polymorphism) and obviously you know java you can just jump in and start using an exam specific book.

I m a fellow candidate for OCA.

First of all do not panic . You don't need more mock exams at this point and you don't have time for full review of all exam topics ( it might even be a mistake to try that with less then a week time available) . My advice is simple , take the Enthuware mocks and do the tests that are chapter only ( i think you have about 50 question per section) , review what you got wrong by reading the section for Mala Gupta's guide that covers the answer( that is if you did not make a mistake because of lack of attention etc) . Even write down what you got wrong (aka the correct knowledge for that section) . Then after reviewing all wrong answers retake that section again(and fast review any other mistakes or things that are not clear) . Try to to this for every section but if you feel you don't have enough time choose just the sections/chapters you feel your not best with . Also very important , take breaks and do something you really like , preferably a group activity !

Other then this have a plan with how to deal with time management at the exam , the easiest thing to do is if you bump into questions your not sure or you don't know the answer set them for review , mark the answer you think has the most chances of being correct and move on . Don't spend more then 3 minutes on a question , no matter what .

Also tell us how it went in a few days any feedback for the rest of us is welcomed .