#148 in Computers & technology books
Use arrows to jump to the previous/next product
Reddit mentions of Effective Java
Sentiment score: 15
Reddit mentions: 26
We found 26 Reddit mentions of Effective Java. Here are the top ones.
Buying options
View on Amazon.comor
- JavaScript Jquery
- Introduces core programming concepts in JavaScript and jQuery
- Uses clear descriptions, inspiring examples, and easy-to-follow diagrams
Features:
Specs:
Height | 9 Inches |
Length | 7.4 Inches |
Number of items | 1 |
Release date | January 2018 |
Weight | 1.543235834 Pounds |
Width | 0.9 Inches |
Here's my list of the classics:
General Computing
Computer Science
Software Development
Case Studies
Employment
Language-Specific
C
Python
C#
C++
Java
Linux Shell Scripts
Web Development
Ruby and Rails
Assembly
Apparently the 3rd edition is listed on Amazon and coming out in October.
Anyone know if this was actually announced or is it more of a placeholder?
https://www.amazon.com/dp/0134685997/
It is a best-practice; by default java compares objects by reference, not 'by content'. That said, two objects representing the same logical entity (e.g. Order) are different objects instances (different reference in memory), but represent the same entity e.g. in DB (they have the same ID). Assume the following: equals and hashCode is *not* overriden. You read the same value by id from a DB using jdbc and put them into a HashSet. As these have different references there will by 2 items in a set. Do the same but override equals and hashCode to reflect the content of the object. The set will have only one item. Why and when this is important: if your system (application) relies on subsystem that manages identity of entities (e.g. SQL DB where you use IDs) and do *NOT* rely on actual object identities -- and this is pretty much common for most applications that use external storage (e.g. SQL).
Why to do it for *all* objects: assume we have 2 classes A and B, where A contains a collection of Bs . A has overriden equals and hashCode and compares with another A ; it also has to compare collection of Bs. How ever, collections of Bs will *only* be equal if all Bs are identical -- the same references but not values.
If you happen to use hibernate overriding equals and hashCode is a must IMHO as hibernate will rely on equality by content, not reference.
​
Good read (required :-) ) on the topic:https://www.amazon.co.uk/Effective-Java-Joshua-Bloch/dp/0134685997/ref=dp_ob_title_bk
Might want to wait for the 3rd edition, (October 2017, according to the publisher - (https://www.amazon.com/Effective-Java-3rd-Joshua-Bloch/dp/0134685997)
You honestly need to change your attitude if you want a successful career in development.
Red flags from this and your post in cscareerquestions:
If you don't have motivation to learn new tools and languages, that's bad. Good developers need to be innovating, creative and always learning (even if it's just on the job)
Ant/Maven are simply build tools, and relatively archaic ones at that. JUnit has been around for 20 some years and unit testing in general, way longer than that.
Why care what environment you program in? Every system has an ability to run bash. While some may be more frustrating than others, it shouldn't be something you tell a company or a recruiter or even a discriminator. It'd make sense if you were looking at system administration but not programming.
To start, I'd say you should grab a couple programming books and see if you actually want to do/work in this field.
http://www.codingdojo.com/blog/9-best-programming-books-read-right-now-want-distinguish/
If you read something like the pragmatic programmer and find it boring/uninteresting - find another field.
If you decide you want to continue, learn:
unit testing - Junit, Mockito, etc.
http://www.vogella.com/tutorials/Mockito/article.html
https://docs.spring.io/spring-batch/trunk/reference/html/testing.html
functional programming - Java 8+ streams, lamdas, write some javascript
https://www.amazon.com/Effective-Java-3rd-Joshua-Bloch/dp/0134685997
spring - dependency injection, inversion of control, annotations
https://projects.spring.io/spring-boot/
That said, the job you're looking for probably does exist if you brush up on basic java skills. It's pretty much a nightmarish hellscape of unmotivated developers and maintaining shitty code with people unwilling to keep their toolsets up to date while they watch the clock til retirement.
Effective Java is the bible of this language and has recently released it's third edition
See also the O'Reilly series filtered by language/product and release date
Fortunately a new version is supposed to be out this fall (Effective Java 3rd Edition)
There is nothing to tone down. I'm not questioning your technical competence. I'm just saying this is a design anti-pattern. If you read Effective Java you'll end up with a better design that will avoid the need to ever think of
Strings.isNullOrEmpty()
.* https://www.amazon.com/Effective-Java-Joshua-Bloch/dp/0134685997/ref=sr_1_1?keywords=effective+java&qid=1556330445&s=gateway&sr=8-1
To commentt on Effective Java, 3rd Edition comes out sometime soon (October, I think). It even has a preorder on Amazon.
I'd start with this article. Finding newer versions of the books mentioned here is going to get you going on the right path. Here's a few I've picked out that I've personally read over the years.
Java: A Beginners Guide - Doesn't really get much better than this as far as an introduction into Java. Clean examples, pretty easy to follow. Would be a great place to start
Effective Java - This has historically been an excellent reference for Java. It's not entirely beginner friendly, but if you have at least a working knowledge of Java it's an excellent book to have around. Note: The link is for the 3rd edition which is coming out soon, I assume it will be as good as the previous editions, but in any case the information from the previous editions is still worthwhile even if there are newer features in Java 7/8/9 which is covered by the 3rd edition
Java Concurrency in Practice - As you become more advanced this book can help guide you along the ways of concurrent operations in Java and pitfalls/issues you'll run into (and how to avoid them)
Read this book: Effective Java (3rd Edition)
https://www.amazon.com/Effective-Java-3rd-Joshua-Bloch/dp/0134685997/ref=sr_1_1?ie=UTF8&qid=1522620588&sr=8-1&keywords=effective+java+3rd+edition&dpID=51IcaSKfPAL&preST=_SX218_BO1,204,203,200_QL40_&dpSrc=srch
this thread is pretty good too: https://www.reddit.com/r/learnjava/comments/88lqyn/these_10_items_will_make_you_a_proficient_java/
Yeah, or if not just play around on your own with it for a weekend, it's pretty simple to pick up.
Something else I'd add to that list is dependency injection (which again might be covered under MVC-frameworks if they tell you about Spring).
Also, this is a useful tool for getting to grips with design patterns, and I can't recommend this book enough
I just want to point out something that's maybe a little beyond where you're at, but might end up biting you, so you might want to know about it.
In Java, all classes implicitly inherit from a class called
Object
. You don't need to do anything to cause this to happen; it's automatic. That class defines several methods, and because your class inherits fromObject
, you get those methods, too. One such method has this signature:boolean equals(Object other)
That is to say, all objects in Java have an
equals
method that you can call, and you can pass anything at all as the argument when you call that method.You are defining a different method with this signature:
boolean equals(LandTract lt)
As a result, instances of your class will have two different
equals
methods. You will get different behavior depending on which one you call.Generally speaking, if you call
equals
yourself, it will pick the correct one. If you pass aLandTract
as the argument, then it will call the "more specific" one (i.e. the one that takes aLandTract
). If you pass something else - say aString
- then it can't call the one that takes aLandTract
, so it will instead call the one that takes anObject
. (String
, being a Java class, also implicitly inherits fromObject
).However, there are common circumstances where the wrong one will get called. For example, any code that operates generically on objects will almost certainly call the
equals
that you inherited fromObject
. If you put a bunch ofLandTract
instances inside anArrayList
and then useindexOf
to try to find one, you might be surprised that yourequals(LandTract)
doesn't get called.In the book Effective Java, Josh Bloch argues (Item 10) that it's dangerous to create methods called
equals
that don't override the one fromObject
. It's easy to think that you've overridden that method, when in fact you've just provided an overload (a different method with the same name).It's sometimes safest to avoid creating methods called
equals
unless you're overriding the one fromObject
.That's already long enough, and I don't want to overwhelm you. If you want to know more, let me know.
If you're studying Java specifically I recommend getting Josh Bloch's Effective Java. It explains the rationale behind literally everything I think I've seen in that ecosystem, and is one of the better programming books I've read in general.
Effective Java 3rd Edition by Joshua Bloch is wonderful:
https://www.amazon.com/Effective-Java-3rd-Joshua-Bloch/dp/0134685997
He helped implement features for the language when working at Sun and has also worked at Google. :)
Josh Bloch is co-teaching 214 this fall, and he wrote the book on Java programming, so it might be a good experience to take it with him.
> Effective Java - This has historically been an excellent reference for Java. It's not entirely beginner friendly, but if you have at least a working knowledge of Java it's an excellent book to have around. Note: The link is for the 3rd edition which is coming out soon, I assume it will be as good as the previous editions, but in any case the information from the previous editions is still worthwhile even if there are newer features in Java 7/8/9 which is covered by the 3rd edition
I agree with this. Since 3rd edition is only a month away now after years of not knowing if/when there would be another edition, I'd probably say pre-order it and hold out for 3rd. But yes, 2nd has been a great help to me.
In general, a library without a using-program driving it is apt to not serve any domain particularly well. I understand that this is a series of etudes rather than expected to become the next jquery. Nevertheless, typing these method names in context could serve as an opportunity to consider renaming them.
For example, the methods in
search
have a search in them. But, as a caller, I don't generally care how it's done. I do care what's returned, anddoSearchXXX()
doesn't communicate what the method provides to me. As a caller, I'd prefer dealing with something likeint knownHighScore = 3;
int[] scores = { 7, 8, 10, 3 }; // or from file
if ( Search.contains( scores, knownHighScore ) )
{
System.out.println( "Student "
+" has the high score" );
}
Methods like
contains()
andposition()
are clearer to use than doLinearSearch() and ... I'm not sure what you'd call the latter in the current scheme. But, internal to the library, you could distinguish between the different searches by having contains() call binary or linear based on whether the input is sorted.There are a number of ways to improve what you've published, but I'll emphasize using this library from something with a main() method.
What about Effective Java?
Or is it considered too advanced?
Keep working at it. Launch a few apps in the app store, no matter how basic and try to get some users and address their feedback.
Go through Udacity's free Android dev course. Another good resource is CodePath's Android guide and Effective Java.
It's a lot of hard work but being able to point someone to something you've published and talking through developing it and decisions you had to make will help a lot more than just having a degree.
Good luck!
Have you read Effective Java? I'm reading it right now and enjoying it / learning quite a bit from it. I recommend it!
The third edition of Effective Java might be helpful. It was updated for Java 8 and 9. For 10 and 11, I suggest taking a look at some of Oracle’s articles. This one covers local variable type inference.
For java, check out Effective Java by Joshua Bloch. It's basically a book around this kind of stuff and should be read by every Java developer.
I would also advocate Joshua Bloch effective Java
He does a very good job of breaking down different Java tips into different chapters and each chapter has a set of items. He also goes one step further and instead of just instructing you to do one thing blindly he goes over the other options possible and why they are not optimal
Also as an added bonus, Amazon says there's a third edition being released in october
Effective Java (3rd Edition) https://www.amazon.com/dp/0134685997/ref=cm_sw_r_cp_api_ccmEzb08YXW4C
Rob Martin's clean code is another book I would recommend but it isn't specifically for any one type of project but it gives nice examples of how to cleanly structure your code(also has a nice set of "smells and heuristics" which you can use as a pocket reference) but given your past experience this book can probably be more of a skim.
Other than that I would agree with what other people are saying with learning a framework. I like spring boot and there's plenty of example projects on GitHub that uses it and spring's own documentation is also pretty good.
For concurrency I would recommend Brian goetz Java concurrency in practice.
If you want a refresher for data structures and algorithms and just some examples of it in java I recommend Robert Lafore's data structures and algorithms in Java but if you're more familiar with math/algorithms and want to do a deeper dive then the CLRS introduction to algorithms is the holy Bible.
Edit: one other thing that I have found extremely useful is online developer websites
My top three are:
Dzone - has fantastic refcardz which are like cheat sheets for different frameworks, technologies and even general principles as well as articles for general programming as well as specific topics (cloud, Db, iot, etc)
Tip - subscrbe to the dzone newsletter. They send you emails that are collections of 10 or so articles and I usually just look through them to see if there's anything interesting or relevant to me
Infoq - similar to dzone also has a great collection of articles and presentation videos
Oreilly - not really a website I know but if you look at their free ebooks there's a good collection of them that will help you get started depending on what topics you're looking at
Bonus - YouTube. There's just so many tutorials and videos starting from beginner levels all the way to advanced topics like scaling cloud architectures for google-like loads, microservices, deployment.
I don't think anything beats doing a personal project though. If anything you can fork a starter spring boot project(which generally revolve around a basic concept like an online book store) and re-write it to be about a concept you're interested in.
Also reactive extensions seem to be catching a lot of buzz these days. I don't have any personal experience working with them but could also be another interesting topic to look into since I think java is actually adding support for reactive streams in java 9
Of course! It's pretty easy, actually.
Start here: https://www.amazon.com/Java-Beginners-Hands-Project-Project-ebook/dp/B01LZOCVN9 (Kindle edition is free).
Then this: https://www.amazon.com/Effective-Java-Joshua-Bloch/dp/0134685997
...this... https://www.amazon.com/Introduction-Algorithms-Press-Thomas-Cormen-ebook-dp-B007CNRCAO/dp/B007CNRCAO
...and this... https://www.amazon.com/Computer-Architecture-Quantitative-Approach-Kaufmann-ebook/dp/B078MFDTX4
Do not skip on exercises - DO THEM!
The rest would be pretty much handled for you.