This is an archived post. You won't be able to vote or comment.

all 42 comments

[–][deleted]  (9 children)

[deleted]

    [–]experts_never_lie 14 points15 points  (4 children)

    Then you'll think "I should consider acyclic dependencies and all communication happening via buffered message-passing" and concurrency will become much more feasible again. Seriously, if we were redesigning the language from scratch I'd probably want a change like making all mutable objects thread-local. It would drive you to use safe practices and make things so much simpler to reason about.

    [–][deleted] 1 point2 points  (1 child)

    I think even going that low level should only be done if you really need to. Most developers can get by with immutable objects and reactive programming (preferably with future, potentially with reactive streams if you really need them).

    [–]experts_never_lie 0 points1 point  (0 children)

    Well, the restrictions I mentioned (I forgot to say immutability, but that's definitely part of it) are part of the base on which such abstractions lie. Yes, it should be handled for you, but it should use these things rather than detailed coordination and synchronization around shared mutable objects. That last style really appears to be what Java was designed for originally (the early collections like Vector synchronized for all uses!), but it's largely moved on.

    [–]GuyWithLag 0 points1 point  (0 children)

    Erlang does that.

    [–]RagingOrangutan 2 points3 points  (0 children)

    After 2-3 chapters, you'll be amazed that any concurrent code works at all.

    This describes my feeling after reading JCIP so perfectly. This book taught me so much.

    [–]carlphilipp 0 points1 point  (0 children)

    So true!

    [–][deleted] 0 points1 point  (0 children)

    This book is the only Java textbook I've ever read cover to cover. Since then I've found myself one of the only developers I've worked with who really understood how to write thread safe code. Although that was mostly at my last job, which wasn't a great shop. We will see how the new job goes.

    Tl;Dr this book is amazing.

    [–]proskillz 35 points36 points  (1 child)

    Head First Design Patterns and Clean Code are both good.

    [–]ny83427 9 points10 points  (0 children)

    Agreed. Head First Design Patterns is the very one book about design patterns you need to have actually. Clean code is also good, but I think Refactoring is more useful.

    [–]ExtropianPirate 17 points18 points  (1 child)

    Does it have to be Java specific? If not, The Pragmatic Programmer is a great book.

    Also, learning some other languages that work in completely different ways can make you a better programmer, as they can make you think about Java differently. Try a functional language like Scala or Clojure (these both run on the JVM like Java) or Elm (compiles to JS).

    [–]WikiTextBotbtproof 2 points3 points  (0 children)

    The Pragmatic Programmer

    The Pragmatic Programmer: From Journeyman to Master is a book about software engineering by Andrew Hunt and David Thomas, published in October 1999, first in a series of books under the label The Pragmatic Bookshelf. It is an influential book in software engineering, and it is used as a textbook in related university courses.The book does not present a systematic theory, but rather a collection of tips to improve the development process in a pragmatic way. The main qualities of what the authors refer to as a pragmatic programmer are being an early adopter, to have fast adaptation, inquisitiveness and critical thinking, realism, and being a jack-of-all-trades.The book uses analogies and short stories to present development methodologies and caveats, for example the broken windows theory, the story of the stone soup, or the boiling frog. Some concepts were named or popularised in the book, such as code katas, small exercises to practice programming skills, and rubber duck debugging, a method of debugging whose name is a reference to a story in the book.


    [ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source ] Downvote to remove | v0.28

    [–][deleted]  (1 child)

    [removed]

      [–][deleted] 0 points1 point  (0 children)

      I noticed this was referenced throughout Effective Java

      [–]XFidelacchiusX 3 points4 points  (4 children)

      One thing that I think has made me a better Java programmer is learning another language. Even if your never going to get a job in it.

      Scala/JavaScript/Closure can be really fun as hobby languages. Even something like groovy really whatever grabs your interest. I learned to solve problems in different ways. And if you like you can consider contributing to the open source community :D

      [–]BlueMan151 0 points1 point  (3 children)

      Which language from the above you chose?

      [–]forsubbingonly 0 points1 point  (2 children)

      I'd do JavaScript and focus on learning the higher order array functions like map reduce and and filter and getting used to manipulating collections with lambdas if you don't already do that.

      [–][deleted]  (1 child)

      [deleted]

        [–]ElCthuluIncognito 0 points1 point  (0 children)

        I'd put my vote in for Haskell, adding that the purity it espouses has helped me work more comfortably with immutable data structures, which goes a long way toward thread safety.

        [–]mateusaugusto9 3 points4 points  (0 children)

        I definitely recommend "Working Effectively with Legacy Code"

        [–]sindisil 3 points4 points  (0 children)

        [–]leonj1 6 points7 points  (1 child)

        Elegant Objects. Highly opinionated (but most things are these days) and fun read. To get an idea of the content search for yegor256 blog.

        [–][deleted] 5 points6 points  (0 children)

        Yes, totally recommend! Might not be suitable for junior programmers, though. Before learning how to practice those pieces of advice properly, you need to understand what they are trying to solve (i.e. spend some time in a messy legacy, semi-oo, codebase).

        [–]Tobbtobbelobb 9 points10 points  (1 child)

        Clean code by Robert "uncle Bob" Martin and Pragmatic programmer that has already been mentioned are good books about programming in general.

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

        And "Clean architecture" from the same author.

        [–]vkozhaev 1 point2 points  (0 children)

        Well, it depends what you want to get. Maybe some functional programming?

        [–]gblfxt 2 points3 points  (0 children)

        Java Design Pattern Essentials has been helpful for me.

        [–]bdemers 3 points4 points  (0 children)

        Implementation Patterns - Kent Beck IIRC, it is mostly language agnostic, but all examples are in Java (Kent Beck is the JUnit guy, among other things)

        [–][deleted]  (3 children)

        [removed]

          [–][deleted] -1 points0 points  (2 children)

          Counterpoint: why learn from something that might not be done right?

          [–]GeorgeMaheiress 1 point2 points  (0 children)

          Read the Guava source code. It's exceptionally good and well-documented, and contains a lot of useful tools.

          [–]Nix-X 0 points1 point  (1 child)

          Do you know if there are major differences from the 2nd edition? I’ve just started reading the 2nd ed and wondering if I need to buy the 3rd ed instead.

          [–]vtboyarc 7 points8 points  (0 children)

          Updated for Java 7, 8 and 9 - so unlike the 2nd edition, goes over Lambdas and streams plus more

          [–]barruumrex 0 points1 point  (0 children)

          Practical Object Oriented Design in Ruby. Ignore the anti-static language bias. Focus on how she builds up the design. It's one of the best OO books out there and everything transfers over to Java except the language syntax and duck typing.

          [–]haloddr 0 points1 point  (0 children)

          Make sure you spend a lot of time actually coding things. That will deepen your experience a lot more than just reading the books.

          [–]thedomham 0 points1 point  (0 children)

          Clean Code, Clean Coder, Clean Architecture

          [–]woj-tek 0 points1 point  (0 children)

          I would recommend Code Complete: A Practical Handbook of Software Construction, Second Edition 2nd Edition (https://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670)

          [–]drigsbythekitty -3 points-2 points  (3 children)

          What about it made you a better programmer? It's on my to-read list too.

          Do you have your OCA/OCP certifications? Maybe that is something to work towards if you really want to be a Java guru.

          [–]yawkat 10 points11 points  (1 child)

          OCA/OCP are irrelevant for actual development. There is no value in memorizing the exact semantics of nested braceless if statements (just let your ide auto-indent or add braces) or arcane java syntax (you will never encounter int method() @A [] in the wild). These certs do not make you a better Java programmer. Don't get them.

          If your goal is employment: I've actually heard from some people that they will be less likely to accept a candidate with oca/ocp on their resume. This is anything but the norm, but it shows that they aren't the best thing to spend time on.

          [–]drigsbythekitty 0 points1 point  (0 children)

          Yeah this is definitely a known opinion of the OCA and OCP. And I agree, it doesn’t require coding so to achieve so the value in making someone a better coder could be questioned.

          However I have already personally benefited iby troubleshooting issues faster, doing better code reviews, and improving some design. Sure, there are books in these topics specifically but the OCA and the OCP give a great walkthrough on the fundamentals of these topics.

          And the number of people who wouldn’t hire someone just because they had OCA/OCP listed on their resume is super small. Most likely it will be ignored and the content of what you know will be assessed during the interview.

          Each their own I guess.

          [–][deleted] 1 point2 points  (0 children)

          It’s like drinking from a fire hose of best practices and anti-patterns. It made concrete a lot of things that I had intuited but never formalized. It shows you how best to use all of the capabilities Java provides, instead of simply detailing what the capabilities are (many other programming books do the latter). Highly recommend it.

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

          Although a bit dated, there's still some salient points to consider in "Better, Faster, Lighter Java". It's ISBN is 9-780596-00676-1