Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
Any good books on Java? I've been using Java off and on, mostly for school projects, for almost seven years now, so I'm extremely comfortable with it, but I want to make sure I'm familiar with all the basic things you would expect someone with a lot of experience to familiar with it. Essentially, I want to get rid of any holes in my knowledge that I'm not aware.

I saw Effective Java, but that seems more like an "advanced" book, rather than a book that will make sure I know basic language stuff like "there are four levels of class access, public, private, protected, and package-protected."

Effective Java is certainly on my list of books to read, but it's not really the book I'm looking for here.

Adbot
ADBOT LOVES YOU

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
Alrighty. I'll just read that instead. Thanks!

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
Let's say that I claimed in an interview that I was a Java wizard, and this set my interviewer off on a mission to ask me increasingly difficult questions about Java to if I was lying. What kinds of questions/topics would I be asked about?

Out of all the languages I've used, I've got by far the most experience and am most comfortable in Java, so I figured that it would be best to focus on improving the area I'm good at if I want to get the best job I can when I graduate this Spring. What knowledge separates good, highly-experienced Java-using software engineers from the rest?

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
Did not know about weak references. Or soft or phantom references. Weak references sound extremely useful if you're doing a lot of work with Collections. I don't understand how a senior developer wouldn't be using them, or why I'm just hearing about them now. Thanks!

Safe and Secure! fucked around with this message at 02:25 on Jul 29, 2012

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
I was excited for Java 7 until I found that we still wouldn't be getting real closures.

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
I just want to do whatever will look best on my resume for a couple of years before I run off to teach English in some other country for a couple years, so that I can find a job when I get back.

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
While we're on the topic, any favorite Java mock libraries?

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
Is there anything like RSpec or Jasmine for Java? All the BDD testing stuff I'm finding is for acceptance testing, which is definitely not what I'm looking for. I just want something that makes my unit tests a little more human-readable.

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013

RockyB posted:

Not quite what you're looking for, but if you aren't using it already the FEST fluent assertions interface makes stuff a lot more readable: https://github.com/alexruiz/fest-assert-2.x/wiki

This is pretty much exactly the sort of thing I was looking for. Thank you!

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
Neat, I've never heard of persistence in data structures before. Are persistent data structures commonly used in concurrent applications?

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
Yeah, the most that I ever got learning about the JVM through school is when my professor spent a few minutes comparing Java bytecode to x86 assembly in our assembly class.

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
So what is "modern" Java web development like? It's all enterprise stuff, right? And JSP is considered ancient, as is the slightly more recent JSF? I guess Spring is where modern, enterprise Java development is at, but isn't that just a dependency injection framework with a lovely MVC module available if you hate yourself? Never used Spring, that's just the impression I got from when I was looking for a Java web framework a while ago before I said "gently caress it" and decided I'd rather have some fun with Scala.

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
I want to know how the JVM works, especially garbage collection. I've been going through the JVM spec, but it looks like the way garbage collection works depends on the specific implementation. So is there a single implementation I can take to be mostly canonical? Like, if I learn how Oracle's implementation works, and then maybe how the JVM used by Android works, then that's enough? What would I even want to Google here to find specific information on both of those implementations work?

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013

Dijkstracula posted:

Depending on how much language runtime knowledge you have, you might want to work up to OpenJDK-specific stuff by starting with the JRockit book, which does a great job of covering the fundamentals of stuff like JIT compilers, generational GCs, etc.

Sadly, there used to be a lot of great Sun blogs about OpenJDK internals but the Oracle rebranding means most URLs are dead ends. :( After the above, I'd actually recommend Charlie Hunt's Java performance book, as it's pretty tightly coupled to OpenJDK and gives a pretty solid informal description of the major GCs (the Parallel collector, CMS, and G1).

After that, frankly, the source is pretty readable and that's where I'd point you to next (modulo C2, the server compiler, which is straight-up :pcgaming:)

edit: forgot to mention that if you're interested in a denser, GC-specific read that isn't tied to any particular runtime, you can't go better than The Garbage Collection Handbook.

Was there anything in particular you were interested in? Up until recently I was paid to hack on OpenJDK so I can probably point you in the right direction if you can't find what you're after.

Thank you for this!

I don't have anything in particular that I want to know, I just feel that I don't understand my tools as much as I'd like to.

Adbot
ADBOT LOVES YOU

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
code:
public class Account {

	private static double annualInterestRate;
	private static int id;
	private static double balance;
	private static Date dateCreated;
Why did you make these fields static? If someone asked you, and you couldn't look it up, how would you explain hat the static keyword does? It would be helpful to find out what it does, but it might also be helpful to check what you think it does so we can tell you the appropriate way to do what you want it to do.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply