However, developing, testing, and debugging multithreaded programs can still be very difficult; it is all too easy to create concurrent programs that appear to work, but fail when it matters most: in production, under heavy load. Java Concurrency in Practice arms readers with both the theoretical underpinnings and concrete techniques for building reliable, scalable, maintainable concurrent applications. Rather than simply offering an inventory of concurrency APIs and mechanisms, it provides design rules, patterns, and mental models that make it easier to build concurrent programs that are both correct and performant.
This book covers:
Brian Goetz is a software consultant with twenty years industry experience, with over 75 articles on Java development. He is one of the primary members of the Java Community Process JSR 166 Expert Group (Concurrency Utilities), and has served on numerous other JCP Expert Groups.
Tim Peierls is the very model of a modern multiprocessor, with BoxPop.biz, recording arts, and goings on theatrical. He is one of the primary members of the Java Community Process JSR 166 Expert Group (Concurrency Utilities), and has served on numerous other JCP Expert Groups.
Joshua Bloch is a principal engineer at Google and a Jolt Award-winner. He was previously a distinguished engineer at Sun Microsystems and a senior systems designer at Transarc. Josh led the design and implementation of numerous Java platform features, including JDK 5.0 language enhancements and the award-winning Java Collections Framework. He holds a Ph.D. in computer science from Carnegie Mellon University.
Joseph Bowbeer is a software architect at Vizrea Corporation where he specializes in mobile application development for the Java ME platform, but his fascination with concurrent programming began in his days at Apollo Computer. He served on the JCP Expert Group for JSR-166 (Concurrency Utilities).
David Holmes is director of DLTeCH Pty Ltd, located in Brisbane, Australia. He specializes in synchronization and concurrency and was a member of the JSR-166 expert group that developed the new concurrency utilities. He is also a contributor to the update of the Real-Time Specification for Java, and has spent the past few years working on an implementation of that specification.Doug Lea is one of the foremost experts on object-oriented technology and software reuse. He has been doing collaborative research with Sun Labs for more than five years. Lea is Professor of Computer Science at SUNY Oswego, Co-director of the Software Engineering Lab at the New York Center for Advanced Technology in Computer Applications, and Adjunct Professor of Electrical and Computer Engineering at Syracuse University. In addition, he co-authored the book, Object-Oriented System Development (Addison-Wesley, 1993). He received his B.A., M.A., and Ph.D. from the University of New Hampshire.
Reactive Streams in Java explains how to manage the exchange of stream data across an asynchronous boundary—passing elements on to another thread or thread-pool—while ensuring that the receiving side is not forced to buffer arbitrary amounts of data which can reduce application efficiency. After reading and using this book, you'll be proficient in programming reactive streams for Java in order to optimize application performance, and improve memory management and data exchanges.
What You Will LearnDiscover reactive streams and how to use them
Who This Book Is For
Experienced Java programmers.
Author Anders Goransson demonstrates the advantages and disadvantages of each technique, with sample code and detailed explanations for using it efficiently. The first part of the book describes the building blocks of asynchronous processing, and the second part covers Android libraries and constructs for developing fast, responsive, and well-structured apps.Understand multithreading basics in Java and on the Android platformLearn how threads communicate within and between processesUse strategies to reduce the risk of memory leaksManage the lifecycle of a basic threadRun tasks sequentially in the background with HandlerThreadUse Java’s Executor Framework to control or cancel threadsHandle background task execution with AsyncTask and IntentServiceAccess content providers with AsyncQueryHandlerUse loaders to update the UI with new data
The Go Programming Language Phrasebook
Essential Go code and idioms for all facets of the development process
This guide gives you the code “phrases” you need to quickly and effectively complete a wide variety of projects with Go, today’s most exciting new programming language.
Tested, easy-to-adapt code examples illuminate every step of Go development, helping you write highly scalable, concurrent software. You’ll master Go-specific idioms for working with strings, collections, arrays, error handling, goroutines, slices, maps, channels, numbers, dates, times, files, networking, web apps, the runtime, and more.
Concise and Accessible
Easy to carry and easy to use: Ditch all those bulky books for one portable pocket guide
Flexible and Functional
Packed with more than 100 customizable code snippets: Quickly create solid Go code to solve just about any problem
Register your book at informit.com/register for convenient access to downloads, updates, and corrections as they become available.
Are you looking for a deeper understanding of the Java™ programming language so that you can write code that is clearer, more correct, more robust, and more reusable? Look no further! Effective Java™, Second Edition, brings together seventy-eight indispensable programmer’s rules of thumb: working, best-practice solutions for the programming challenges you encounter every day.
This highly anticipated new edition of the classic, Jolt Award-winning work has been thoroughly updated to cover Java SE 5 and Java SE 6 features introduced since the first edition. Bloch explores new design patterns and language idioms, showing you how to make the most of features ranging from generics to enums, annotations to autoboxing.
Each chapter in the book consists of several “items” presented in the form of a short, standalone essay that provides specific advice, insight into Java platform subtleties, and outstanding code examples. The comprehensive descriptions and explanations for each item illuminate what to do, what not to do, and why.
Highlights include:New coverage of generics, enums, annotations, autoboxing, the for-each loop, varargs, concurrency utilities, and much more Updated techniques and best practices on classic topics, including objects, classes, libraries, methods, and serialization How to avoid the traps and pitfalls of commonly misunderstood subtleties of the language Focus on the language and its most fundamental libraries: java.lang, java.util, and, to a lesser extent, java.util.concurrent and java.io
Simply put, Effective Java™, Second Edition, presents the most practical, authoritative guidelines available for writing efficient, well-designed programs.
At any given moment, someone struggles with the same software design problems you have. And, chances are, someone else has already solved your problem. This edition of Head First Design Patterns—now updated for Java 8—shows you the tried-and-true, road-tested patterns used by developers to create functional, elegant, reusable, and flexible software. By the time you finish this book, you’ll be able to take advantage of the best design practices and experiences of those who have fought the beast of software design and triumphed.
What’s so special about this book?
We think your time is too valuable to spend struggling with new concepts. Using the latest research in cognitive science and learning theory to craft a multi-sensory learning experience, Head First Design Patterns uses a visually rich format designed for the way your brain works, not a text-heavy approach that puts you to sleep.
Java Generics and Collections covers everything from the mostbasic uses of generics to the strangest corner cases. It teaches youeverything you need to know about the collections libraries, so you'llalways know which collection is appropriate for any given task, andhow to use it.
Topics covered include:Fundamentals of generics: type parameters and generic methodsOther new features: boxing and unboxing, foreach loops, varargsSubtyping and wildcardsEvolution not revolution: generic libraries with legacy clients andgeneric clients with legacy librariesGenerics and reflectionDesign patterns for genericsSets, Queues, Lists, Maps, and their implementationsConcurrent programming and thread safety with collectionsPerformance implications of different collections
Generics and the new collection libraries they inspired take Java to anew level. If you want to take your software development practice toa new level, this book is essential reading.
Philip Wadler is Professor of Theoretical Computer Science at theUniversity of Edinburgh, where his research focuses on the design ofprogramming languages. He is a co-designer of GJ, work thatbecame the basis for generics in Sun's Java 5.0.
Maurice Naftalin is Technical Director at Morningside Light Ltd., a software consultancy in the United Kingdom. He has most recently served as an architect and mentor at NSB Retail Systems plc, and as the leader of the client development team of a major UK government social service system.
"A brilliant exposition of generics. By far the best book on thetopic, it provides a crystal clear tutorial that starts with thebasics and ends leaving the reader with a deep understanding of boththe use and design of generics."
Gilad Bracha, Java Generics Lead, Sun Microsystems
--Guy Steele, Sun Fellow and coauthor of The Java™ Language Specification
"I laughed, I cried, I threw up (my hands in admiration)."
--Tim Peierls, president, Prior Artisans LLC, and member of the JSR 166 Expert Group
How well do you really know Java? Are you a code sleuth? Have you ever spent days chasing a bug caused by a trap or pitfall in Java or its libraries? Do you like brainteasers? Then this is the book for you!
In the tradition of Effective Java™, Bloch and Gafter dive deep into the subtleties of the Java programming language and its core libraries. Illustrated with visually stunning optical illusions, Java™ Puzzlers features 95 diabolical puzzles that educate and entertain. Anyone with a working knowledge of Java will understand the puzzles, but even the most seasoned veteran will find them challenging.
Most of the puzzles take the form of a short program whose behavior isn't what it seems. Can you figure out what it does? Puzzles are grouped loosely according to the features they use, and detailed solutions follow each puzzle. The solutions go well beyond a simple explanation of the program's behavior--they show you how to avoid the underlying traps and pitfalls for good. A handy catalog of traps and pitfalls at the back of the book provides a concise taxonomy for future reference.
Solve these puzzles and you'll never again fall prey to the counterintuitive or obscure behaviors that can fool even the most experienced programmers.