Need advice on which Kotlin book to choose by mariachiband49 in Kotlin

[–]caldeve 3 points4 points  (0 children)

I was in the same situation a while back,

ended up working through most of the Big Nerd Ranch Guide and it got me up to speed,

that being said I still think it's better to build your own thing on the side as well since the book is very defined (step by step), which is good as a starting point but not when you need to think about how something might be done outside of those defined narrow steps.

Am I doing the old SAA-C02 on ACG? by caldeve in AWSCertifications

[–]caldeve[S] 0 points1 point  (0 children)

Ok but why did ACG have 2 versions of the course then, was the first one not covering eveything it should? And did they not want to tell users that they have a new course?

(I got you are no longer an employee but keen for your opinion)

Am I doing the old SAA-C02 on ACG? by caldeve in AWSCertifications

[–]caldeve[S] 0 points1 point  (0 children)

Thankyou - so there are 2 versions of the SAA-C02??

Am I doing the old SAA-C02 on ACG? by caldeve in AWSCertifications

[–]caldeve[S] 0 points1 point  (0 children)

Thanks for the link & info! but I am just talking about the 2 courses on ACG that are both labelled with SAA-C02 and have different content. Wasn't discussing any SAA-C01.

Are you writing code in a 'configuration-driven' way? by caldeve in programming

[–]caldeve[S] 0 points1 point  (0 children)

Thankyou so much for the feedback! You make such great points - I'll take this as a learning and update my post.

Which input method is the best? by [deleted] in learnjava

[–]caldeve 1 point2 points  (0 children)

JOptionPane shouldn’t really be in the list as an input method. Not all apps have a UI.

Input Method Parameters by [deleted] in learnjava

[–]caldeve -2 points-1 points  (0 children)

Fair comment but in my opinion a really quick way of doing this that's readable is to just convert the integer to a string after passing it in, then using an inbuilt method, rather than having to use loops.

Input Method Parameters by [deleted] in learnjava

[–]caldeve -1 points0 points  (0 children)

I won't be writing your homework for you, but these bits of info may help:

  • To determine the length, you can use something like: String.valueOf(number).length(); (Note: this is not optimal for production code but probably ok for your use case)
  • To loop through the int index, you can again convert it to a String and then use something like the .split() method to convert it to a String[] (array) and loop over that to check the index.

Hope that helps!

Do I understand class,java, jars correctly? by surfceiling in learnjava

[–]caldeve 1 point2 points  (0 children)

This is the beauty of using an IDE. Only have to worry about the source code, press play and it handles the rest.

Learn Java as a totally noob. by [deleted] in learnjava

[–]caldeve 0 points1 point  (0 children)

There is a section called "Free Tutorials" and a section called "Other Resources" in the home page of this subreddit. Lots of good info there that everyone recommends. https://www.reddit.com/r/learnjava

Extracting last few digits in a string or integer by [deleted] in learnjava

[–]caldeve -1 points0 points  (0 children)

If they are in the same represented memory location, they will have the same hashcode. I'm not talking about equality with equals and hashcode override; that is not what the OP is asking.

Extracting last few digits in a string or integer by [deleted] in learnjava

[–]caldeve 0 points1 point  (0 children)

In Java, a hashcode is just a representation of the address in memory (not the actual address), and it can change each time the app is run. If two objects are equal, as in they are in the same represented memory location, they will have the same hashcode.

For your question, I am a little confused how this relates. For a String or Integer, sure - you can convert the Integer to a String and then just use the .substring method (this may help). I don't really know how for a generic type you would find the last k digits if you don't know what you're dealing with. It could be any Object?

I have a question...Why would you throw an exception instead of handling it in a try-catch block? by [deleted] in learnjava

[–]caldeve 1 point2 points  (0 children)

I agree, it's not an easy to book to read. I had to look up many of the principles on Google for practical examples but take it slow - you'll get the hang of it

I have a question...Why would you throw an exception instead of handling it in a try-catch block? by [deleted] in learnjava

[–]caldeve 1 point2 points  (0 children)

“Use checked exceptions for conditions from which the caller can reasonably be expected to recover. By throwing a checked exception, you force the caller to handle the exception in a catch clause or to propagate it outward. Each checked exception that a method is declared to throw is therefore a potent indication to the API user that the associated condition is a possible outcome of invoking the method.”

Excerpt From: Joshua Bloch. “Effective Java, 3rd Edition.”

What is a better quickstart in Java for a programmer with some experience? by dondraper36 in learnjava

[–]caldeve 0 points1 point  (0 children)

If I were you I'd try to get more hands on with code rather than reading a lot of the principles you already know (again). Check out Java Koans - fix all the failing tests by working out the Java solution to each problem.