The Artima Developer Community


Scala Puzzlers cover

Published
November 26, 2014
264 pages

Scala Puzzlers
The fun path to deeper understanding

by Andrew Phillips and Nermin Šerifović

Getting code to do what we want it to do is perhaps the essence of our purpose as developers. So there are few things more intriguing or important than code that we think we understand, but that behaves rather contrary to our expectations.

Scala Puzzlers is a collection of such examples in Scala. It is not only an entertaining and instructive way of understanding this highly expressive language better. It will also help you recognize many counter-intuitive traps and pitfalls and prevent them from inflicting further production bug hunt stress on Scala developers.

The PDF eBook is ready for immediate download.

If you purchase the combo, the paper book will be shipped when it is printed. The estimated date it will be shipping is December 23.

You can purchase just the PDF eBook for $25.00 or get both eBook or Paper Book by purchasing the PDF/Paper combo at a discount for $59.95. If you purchase the PDF eBook or combo, you will be entitled to receive periodic updates as errata are fixed, for no additional charge. Also, by purchasing the PDF eBook you can for no additional charge (once they are ready) download Mobi or ePub versions of the eBook that look great on your Kindle, Nook, iPad, or other reading device. Currently only the PDF eBook is available, and you cannot yet purchase just the Paper book. Once that is ready to ship you'll be able to purchase just the paper book here for $38.95.)

Buy It Now

Format
Quantity Volume
Discounts

Table of contents

Contents vii
Foreword xiii
Acknowledgments xiv
Introduction xv
1. Hi There! 17
2. UPSTAIRS downstairs 22
(download free sample chapter PDF)
3. Location, Location, Location 27
4. Now You Don't See Me, Now You Do 33
5. The Missing List 41
6. Arg Arrgh! 45
7. Caught Up in Closures 50
8. Map Comprehension 55
9. Init You, Init Me 59
10. A Case of Equality 68
11. If at First You Don't Succeed... 75
12. To Map, or Not to Map 79
13. Self: See Self 84
14. Return to Me! 88
15. Implicitly Surprising 94
16. One Bound, Two to Go 100
17. Count Me Now, Count Me Later 106
18. Information Overload 112
19. What's in a Name? 118
20. Irregular Expressions 123
21. I Can Has Padding? 128
22. Cast Away 134
23. Pick a Value, AnyValue! 142
24. Double Trouble 148
25. Type Extortion 153
26. Implicit Kryptonite 158
27. A Case of Strings 165
28. Adaptive Reasoning 171
29. A View to a Shill 177
30. Great Expectations 182
31. Accepts Any Args 187
32. Set the Record Straight 192
33. The Devil Is in the Defaults 199
34. The Main Thing 204
35. Quite the Outspoken Type 211
36. Size It Up 216
Bibliography 222
About the Authors 223
Subject Index 225
Index 228

About the authors

Andrew Phillips

Specializing in concurrency and high-performance applications, Andrew developed large-scale systems while working for a succession of multinationals. A long-standing open-source developer and community member, he worked on Multiverse, the STM implementation originally used in Akka; contributes to Apache jclouds, the leading Java cloud library; and co-maintains the Scala Puzzlers website, http://scalapuzzlers.com. He regularly writes for developer sites and speaks at conferences and meetups.

Andrew studied Artificial Intelligence and Mathematics at the University of Edinburgh and maintains a keen interest in machine learning, quantum computation, and computational neuroscience.

Nermin Šerifović

Nermin Šerifović has more than 10 years of experience building enterprise software applications using Java technologies. For most of his career, he has focused on architecting, designing, and developing backend platforms. Nermin has been a Scala enthusiast since 2009 and practicing it professionally since 2011. He has given talks at various conferences, including JavaOne, Scala Days, and Northeast Scala Symposium, as well as at local Scala and Java user groups.

Nermin is also an active Scala community member. He is an organizer of the Boston Area Scala Enthusiasts user group and was part of the Northeast Scala Symposium founding team. Further, he is a co-creator of the Scala Puzzlers website.

Nermin holds an M.Eng in Computer Science from Cornell University and his areas of interest include distributed systems along with concurrent, reactive, and functional programming.

Copyright © 2014 Artima, Inc. All rights reserved.