Master functions and discover how to write functional programs in R. In this concise book, you´ll make your functions pure by avoiding side-effects; you´ll write functions that manipulate other functions, and you´ll construct complex functions using simpler functions as building blocks. In Functional Programming in R , you´ll see how we can replace loops, which can have side-effects, with recursive functions that can more easily avoid them. In addition, the book covers why you shouldn´t use recursion when loops are more efficient and how you can get the best of both worlds. Functional programming is a style of programming, like object-oriented programming, but one that focuses on data transformations and calculations rather than objects and state. Where in object-oriented programming you model your programs by describing which states an object can be in and how methods will reveal or modify that state, in functional programming you model programs by describing how functions translate input data to output data. Functions themselves are considered to be data you can manipulate and much of the strength of functional programming comes from manipulating functions; that is, building more complex functions by combining simpler functions. What You´ll Learn Write functions in R including infix operators and replacement functions Create higher order functions Pass functions to other functions and start using functions as data you can manipulate Use Filer, Map and Reduce functions to express the intent behind code clearly and safely Build new functions from existing functions without necessarily writing any new functions, using point-free programming Create functions that carry data along with them Who This Book Is For Those with at least some experience with programming in R.
Master the fundamentals of Scala and understand its emphasis on functional programming that sets it apart from Java. This book will help you translate what you already know in Java to Scala to start your functional programming journey. Learn Scala is split into four parts: a tour of Scala, a comparison between Java and Scala, Scala-specific features and functional programming idioms, and finally a discussion about adopting Scala in existing Java teams and legacy projects. After reading and using this tutorial, you´ll come away with the skills in Scala to kick-start your productivity with this growing popular language. What You´ll Learn Tour Scala and learn the basic syntax, constructs, and how to use the REPL Translate Java syntax that you already know into Scala Learn what Scala offers over and above Java Become familiar with functional programming concepts and idioms Gain tips and advice useful when transitioning existing Java projects to Scala Who This Book Is For Java developers looking to transition to Scala. No prior experience necessary in Scala.
An indispensable collection of practical tips and real-world advice for tackling common Python problems and taking your code to the next level. Features interviews with high-profile Python developers who share their tips, tricks, best practices, and real-world advice gleaned from years of experience. Sharpen your Python skills as you dive deep into the Python programming language with Serious Python. You´ll cover a range of advanced topics like multithreading and memorization, get advice from experts on things like designing APIs and dealing with databases, and learn Python internals to help you gain a deeper understanding of the language itself. Written for developers and experienced programmers, Serious Python brings together over 15 years of Python experience to teach you how to avoid common mistakes, write code more efficiently, and build better programs in less time. As you make your way through the book´s extensive tutorials, you´ll learn how to start a project and tackle topics like versioning, layouts, coding style, and automated checks. You´ll learn how to package your software for distribution, optimize performance, use the right data structures, define functions efficiently, pick the right libraries, build future-proof programs, and optimize your programs down to the bytecode. You´ll also learn how to: - Make and use effective decorators and methods, including abstract, static, and class methods - Employ Python for functional programming using generators, pure functions, and functional functions - Extend flake8 to work with the abstract syntax tree (AST) to introduce more sophisticated automatic checks into your programs - Apply dynamic performance analysis to identify bottlenecks in your code - Work with relational databases and effectively manage and stream data with PostgreSQL If you´ve been looking for a way to take your Python skills from good to great, Serious Python will help you get there. Learn from the experts and get seriously good at Python with Serious Python!
This new and completely updated edition is a comprehensive, easy-to-read, ´´how-to´´ guide on user research methods. You´ll learn about many distinct user research methods and also pre- and post-method considerations such as recruiting, facilitating activities or moderating, negotiating with product developments teams/customers, and getting your results incorporated into the product. For each method, you´ll understand how to prepare for and conduct the activity, as well as analyze and present the data - all in a practical and hands-on way. Each method presented provides different information about the users and their requirements (e.g., functional requirements, information architecture). The techniques can be used together to form a complete picture of the users´ needs or they can be used separately throughout the product development lifecycle to address specific product questions. These techniques have helped product teams understand the value of user experience research by providing insight into how users behave and what they need to be successful. You will find brand new case studies from leaders in industry and academia that demonstrate each method in action. This book has something to offer whether you are new to user experience or a seasoned UX professional. After reading this book, you´ll be able to choose the right user research method for your research question and conduct a user research study. Then, you will be able to apply your findings to your own products. Completely new and revised edition includes 30+% new content! Discover the foundation you need to prepare for any user research activity and ensure that the results are incorporated into your products Includes all new case studies for each method from leaders in industry and academia