Win a copy of Securing DevOps this week in the Security forum!

Liutauras Vilda

+ Follow
since Nov 12, 2014
Liutauras likes ...
software developer, moderator at coderanch, a father, husband and nintendo switch owner
London, United Kingdom
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 Liutauras Vilda

Alex Guld wrote:class Party

Alex Guld wrote:But when i try: javac it returns:

Alexanders-MacBook-Air:~ alexander$ javac
javac: file not found:

Hi Alex. One subtle thing. Best is to have filename in sync with a class name (including upper/lower cases). That means, if your class is "Party", filename better if would be and not Not sure whether you made a typo and file actually was - in such case would be clear that it indeed that was a problem. But, since your class Party isn't public, Java let's you have filename and class name not in sync, if class were public - names would need to match (class's and file's).

These are for you to know. Look up on internet for more detailed and comprehensive information what I'm talking about.
5 days ago

Junilu Lacar wrote:consider also recommending Corey Haines' "Understanding the Four Rules of Simple Design"

I can second that. When the first time I read it I thought: "fine, not bad, concise", when I read it second and third times after a year or so, I thought: "tremendous how many good lessons can be fitted to 70 pages".  Book has its charm, I find it to be very different from any other book, need some time to understand it and start loving it.
5 days ago
Flags do even more. When you flag thread (yourself), you can easily access all your flagged threads from your public profile. Look for "Flagged threads" item.
5 days ago

Ted Gress wrote:@Vilda: Absolute value is a different operation from what I am doing here.

Couldn't quite catch that. Absolute difference is absolute difference. Campbell and myself, we showed alternate ways of doing that instead your Difference.Diff(last, next); call. I think we were correct. Your solution also seemed to be correct for that part.

Ted Gress wrote:I posted the code in the beginning of this thread. The application is throwing an exception on:

next = row.get(i);


Ted Gress wrote:It is clear in my code I posted first.

Apparently it isn't, as nobody so far got resolution.
5 days ago

Campbell Ritchie wrote:I would probably have written that method differently

Same here.

My first instinct would be probably:
5 days ago
Welcome to the Ranch

You seemed to learn exam codes well. Un/Fortunately there is much more behind these. Glad to see your enthusiasm and a good mindset to get more knowledge.

Campbell is right. First and most important is your degree at the moment probably, for the rest tasks - how time permits.

I'd say put away thoughts about OCPJP (for the time being), that's almost certain. It must be fairly difficult exam, which requires much broader knowledge than OCAJP. Beware, OCAJP isn't easy too, but doable, taking in account that you also studying. Apparently there are students who want to learn programming not just during the classes time but also outside - that's exemplary.

Agh, nearly forgot your questions. No, there are no pre-conditions for being graduated in order to sit an exam. However, there is condition for OCPJP. You can sit OCPJP without sitting first OCAJP, but you get accredited with OCPJP only after you pass both exams (OCAJP and OCPJP). Once again, I'd recommend to start with OCAJP.

Good luck!

Is by any chance you are trying to pass standalone Integer to this method, and moreover trying to execute uncompileable code?

I'm a bit puzzled with the error you get, from the code you posted.

Campbell is right. Post the current code.

Or, could you post the line which matches in your environment with the line number specified in the error message? line 23 I think it was.
5 days ago

John Sanderval wrote:Ugh nevermind can you just tell me what subject i should look up so i can just look up this stuff myself, reddit is just as bad as this.

The bad thing is when you start looking to your job (studies) from this perspective. Meaning "I'll go on internet and somebody will do job for me". Try to re-assess importance of learning, that is the best advice I could give you as of now.
6 days ago
In which case nice to meet you all three here
6 days ago
What is the return type of this function? Difference.Diff(first, second)
6 days ago
After reading one of the sample chapters, I've decided to win the book. Pre-ordered on amazon.
6 days ago
Welcome to the Ranch.

JavaDocs generates documentation you have written as a javadoc comments in the source code files. i.e.:

So this gets generated into the web documentation.

Alberto Solano wrote:the links to methods or classes of the Java API Specification are not available.

Could you please clarify what exactly you mean by API specification?
I caught myself in several posts that my thoughts may sound negative about the certificates. Just to be clear - not at all. I'm just saying that candidate shouldn't stop researching the field after gaining OCA and OCP.

Giedrius Ceinorius wrote:And I definitelly can‘t argue that when you are learning for a certificate it makes you to know a lot of stuff, so here‘s big plus...
In my opinion the biggest plus of the certificate to show to yourself and to employer the endeavour you make.


Giedrius Ceinorius wrote:Curious to know whether these certificates does some kind of impact for employers..

I'd think only to some extent. First, and most important - it does for you. Confidence about the language questions during interviews, perhaps easier to conform with syntax validity during your daily coding.

Anything else I'd say is very difficult to measure what kind of impact it does - whether it makes you a better programmer? Maybe. But I'd say it gives you only the sense of the language (in case of OCA), and understanding about the more advanced language constructs (in case of OCP), but there are other equally important (mostly would agree with me - more important) areas to know so you could write quality software.
And unfortunately when it comes to these areas (i.e.: code readability, ease of maintenance, flexibility for extension, overall design), I think certificates are of little use.

Even such things need to be considered whether programmer can solve logical problems with confidence. Regardless he/she holds certificate or not.

All over, if there is a chance to have certificate (why not), of course 2 "sort of equally" good candidates and one with certificates while other without - perhaps odds to get hired are better of the former candidate, but then again - things comes to candidate's personality, how possibly he could fit to team, et cetera. I know that some companies and managers in particular are even suspicious about the candidates who hold several various certificates.
Welcome to the Ranch again

Don't forget to think about the slightly unusual cases. For instance:

  • what to do if there are no elements in a list
  • what if there is only one element in a list
  • how calculate if the two adjacent elements are -4 and -4
  • how calculate if the two adjacent elements are 4 and -4
  • how calculate if the two adjacent elements are -4 and 4

  • Probably there are more cases to think about.
    1 week ago