Clean Code Cookbook


Book Description

Often, software engineers and architects work with large, complex code bases that they need to scale and maintain. With this cookbook, author Maximiliano Contieri takes you beyond the concept of clean code by showing you how to identify improvement opportunities and their impact on production code. When it comes to reliability and system evolution, these techniques provide benefits that pay off over time. Using real life examples in JavaScript, PHP, Java, Python, and many other programming languages, this cookbook provides proven recipes to help you scale and maintain large systems. Every section covers fundamental concepts including readability, coupling, testability, and extensibility, as well as code smells—symptoms of a problem that requires special attention—and the recipes to address them. As you proceed through this book, refactoring recipes and the variety of code smells increase in complexity. You will: Understand the benefits of clean code and learn how to detect code smells Learn refactoring techniques step by step Gain illustrative code examples in several modern programming languages Get a comprehensive catalog of common code smells, their impacts, and possible solutions Use code that's straight to the point, favoring readability and learning




The Carnivore Code Cookbook


Book Description

The essential companion to the best-selling The Carnivore Code, featuring more than 100 delicious recipes to help readers reap the incredible benefits of an animal-based diet. In The Carnivore Code, Dr. Paul Saladino revealed the surprising healing properties of a primarily animal-based diet. The carnivore diet is proven to help people lose weight, decrease inflammation, and heal from chronic disease. This essential cookbook makes it even more delicious to reap the benefits of the carnivore diet. Featuring satisfying mains like One-Pan Honey-Glazed Brisket and Grilled Mediterranean Lamb Chops, recipes for every craving like the Real Meat-Lover's Pizza, White-Sauce Zucchini Lasagna, and Carnivore Waffles, and even decadent desserts like Yogurt Cheesecake with Blueberry-Lemon Compote, this cookbook is sure to please every palate. Coming complete with a pantry guide to help readers rid their kitchens of toxic plants and so-called health foods, while stocking up on the least toxic fruits and vegetables (like squash, peaches, strawberries, and apples), this cookbook will be an essential resource for anyone interested in transforming their health with the carnivore diet.




PhpStorm Cookbook


Book Description

If you are a competent PHP developer who knows the basics of PHPStorm and intends to gain better knowledge of PHPStorm by learning and implementing pro-level practices, techniques, and solutions, then this book is for you. It is assumed that you already have a working installation of the software setup.




ASP.NET Core 5 Secure Coding Cookbook


Book Description

Learn how to secure your ASP.NET Core web app through robust and secure code Key FeaturesDiscover the different types of security weaknesses in ASP.NET Core web applications and learn how to fix themUnderstand what code makes an ASP.NET Core web app unsafeBuild your secure coding knowledge by following straightforward recipesBook Description ASP.NET Core developers are often presented with security test results showing the vulnerabilities found in their web apps. While the report may provide some high-level fix suggestions, it does not specify the exact steps that you need to take to resolve or fix weaknesses discovered by these tests. In ASP.NET Secure Coding Cookbook, you'll start by learning the fundamental concepts of secure coding and then gradually progress to identifying common web app vulnerabilities in code. As you progress, you'll cover recipes for fixing security misconfigurations in ASP.NET Core web apps. The book further demonstrates how you can resolve different types of Cross-Site Scripting. A dedicated section also takes you through fixing miscellaneous vulnerabilities that are no longer in the OWASP Top 10 list. This book features a recipe-style format, with each recipe containing sample unsecure code that presents the problem and corresponding solutions to eliminate the security bug. You'll be able to follow along with each step of the exercise and use the accompanying sample ASP.NET Core solution to practice writing secure code. By the end of this book, you'll be able to identify unsecure code causing different security flaws in ASP.NET Core web apps and you'll have gained hands-on experience in removing vulnerabilities and security defects from your code. What you will learnUnderstand techniques for squashing an ASP.NET Core web app security bugDiscover different types of injection attacks and understand how you can prevent this vulnerability from being exploitedFix security issues in code relating to broken authentication and authorizationEliminate the risks of sensitive data exposure by getting up to speed with numerous protection techniquesPrevent security misconfiguration by enabling ASP.NET Core web application security featuresExplore other ASP.NET web application vulnerabilities and secure coding best practicesWho this book is for This ASP.NET Core book is for intermediate-level ASP.NET Core web developers and software engineers who use the framework to develop web applications and are looking to focus on their security using coding best practices. The book is also for application security engineers, analysts, and specialists who want to know more about securing ASP.NET Core using code and understand how to resolve issues identified by the security tests they perform daily.




Microsoft Dynamics 365 Extensions Cookbook


Book Description

More than 80 recipes to help you leverage the various extensibility features available for Microsoft Dynamics and solve problems easily About This Book Customize, configure, and extend the vanilla features of Dynamics 365 to deliver bespoke CRM solutions fit for any organization Implement business logic using point-and-click configuration, plugins, and client-side scripts with MS Dynamics 365 Built a DevOps pipeline as well as Integrate Dynamics 365 with Azure and other platforms Who This Book Is For This book is for developers, administrators, consultants, and power users who want to learn about best practices when extending Dynamics 365 for enterprises. You are expected to have a basic understand of the Dynamics CRM/365 platform. What You Will Learn Customize, configure, and extend Microsoft Dynamics 365 Create business process automation Develop client-side extensions to add features to the Dynamics 365 user interface Set up a security model to securely manage data with Dynamics 365 Develop and deploy clean code plugins to implement a wide range of custom behaviors Use third-party applications, tools, and patterns to integrate Dynamics 365 with other platforms Integrate with Azure, Java, SSIS, PowerBI, and Octopus Deploy Build an end-to-end DevOps pipeline for Dynamics 365 In Detail Microsoft Dynamics 365 is a powerful tool. It has many unique features that empower organisations to bridge common business challenges and technology pitfalls that would usually hinder the adoption of a CRM solution. This book sets out to enable you to harness the power of Dynamics 365 and cater to your unique circumstances. We start this book with a no-code configuration chapter and explain the schema, fields, and forms modeling techniques. We then move on to server-side and client-side custom code extensions. Next, you will see how best to integrate Dynamics 365 in a DevOps pipeline to package and deploy your extensions to the various SDLC environments. This book also covers modern libraries and integration patterns that can be used with Dynamics 365 (Angular, 3 tiers, and many others). Finally, we end by highlighting some of the powerful extensions available. Throughout we explain a range of design patterns and techniques that can be used to enhance your code quality; the aim is that you will learn to write enterprise-scale quality code. Style and approach This book takes a recipe-based approach, delivering practical examples and use cases so that you can identify the best possible approach to extend your Dynamics 365 deployment and tackle your specific business problems.




The Obesity Code Cookbook


Book Description

New York Times bestselling author Dr. Jason Fung helped thousands of people lose weight with his groundbreaking book The Obesity Code. Now, he offers the ultimate companion cookbook, filled with zero carb recipes and intermittent fasting plans to help readers lose weight, manage type 2 diabetes, and increase longevity, all while eating delicious food. In his original bestseller The Obesity Code, Dr. Jason Fung showed us that everything about our metabolism, including our weight, depends upon on our hormones. He showed us that the hormone insulin triggers our bodies to store calories as fat, and that once we understand weight gain as a result of excess insulin and homonal imbalance in our body, we can begin to treat it by looking at what’s on our plate. Enter The Obesity Code Cookbook, a collection of mouthwatering recipes for your journey to lower insulin, lose weight for good, and reverse and prevent type 2 diabetes. More than a recipe book, it comes with bonus material including: A guide to stocking your pantry with the right foods (and ditching the wrong foods); Fung’s easy-to-understand explainers on how weight gain and weight loss really work; intermittent fasting FAQs and best practices; and meal plans for 16-hour, 24-hour, and 36-hour fasts. In other words, The Obesity Code Cookbook will not only show you what to eat, but also when to eat it—and why. But eating this way doesn’t have to bland. The Obesity Code Cookbook’s many delicious comfort foods include: Hearty breakfasts like the Everyday Omelette and Coconut Pancakes; Flavorful vegetable mains like Roasted Cauliflower with Turmeric and Tahini and spicy Thai Vegetable Curry Scrumptious seafood such as Scallops with Prosciutto and Chili Garlic Shrimp Meat-forward mains such as Gruyere Meat Loaf, Pork Belly with Star Anise, Roast Chicken Thighs with Lemon and Tea-Braised Duck with Fennel And don’t forget about desserts and snacks: Nut Bars with Chocolate Drizzle, Almond Fig Cake, and Walnut Power Balls are just a few of the delights you’ll enjoy while eating your way to a healthier, better you. Praise for Dr. Jason Fung: “The doctor who invented intermittent fasting.”—The Daily Mail “Dr. Jason Fung’s explanation of insulin resistance and the accompanying insulin model of obesity is original, brilliant and game changing.” —Zoë Harcombe, Obesity researcher, author of The Harcrombe Diet Dr. Jason Fung triumphs in explaining the core underlying causes of obesity and manages to simplify it in a way that anybody can understand. If more doctors and people were able to understand these causes and implement Dr. Fung's actionable advice then we would be able to start reversing the obesity epidemic tomorrow.” —Sam Feltham, USA Today World Fitness Elite Trainer of the Year “Fung zeroes in on why insulin resistance has become so prevalent and offers specific outside-the-box solutions that have emerged as the key to maximizing health.” —Jimmy Moore, author, Keto Clarity and Cholesterol Clarity




The Diabetes Code Cookbook


Book Description

The ultimate companion cookbook to The Diabetes Code from the New York Times-bestselling author and pioneer of intermittent fasting, Dr. Jason Fung. Dr. Jason Fung helped thousands of people lose weight with his breakout bestseller The Obesity Code. Next, he helped prevent and reverse type 2 diabetes with his groundbreaking book The Diabetes Code. Now, The Diabetes Code Cookbook makes it even easier to follow Dr. Fung’s proven advice for preventing and reversing type 2 diabetes through intermittent fasting and a low carb/high-fat diet. This cookbook features full-color photographs and includes: 100 simple and delicious recipes to help manage insulin and aid in weight loss Intermittent fasting schedules and plans (16, 24, 30, and 26-hour fasts) Grocery shopping lists A new intro from Dr. Fung with up-to-date information on insulin resistance and its connection to weight gain and type 2 diabetes Readers will come away with knowledge of their health and an arsenal of mouthwatering meals—because eating for type 2 diabetes doesn’t have to be bland!




WordPress Plugin Development Cookbook


Book Description

Create plugins for WordPress through detailed recipes that cover the creation of shortcodes, custom post types, and custom blocks, integrate data from external sources, and do much more with this recipe-based guide Key FeaturesCreate plugins that change and extend WordPress to perform virtually any taskExtend the WordPress Block Editor (Gutenberg) and other components with the help of detailed examples and explanationsCustomize WordPress to meet your project's needs and create plugins that benefit the entire communityBook Description WordPress is one of the most widely used, powerful, and open content management systems (CMSs). Whether you're a site owner trying to find the right extension, a developer who wants to contribute to the community, or a website developer working to fulfill a client's needs, learning how to extend WordPress' capabilities will help you to unleash its full potential. This book will help you become familiar with API functions to create secure plugins with easy-to-use administration interfaces. This third edition contains new recipes and up-to-date code samples, including new chapters on creating custom blocks for the block editor and integrating data from external sources. From one chapter to the next, you'll learn how to create plugins of varying complexity, ranging from a few lines of code to complex extensions that provide intricate new capabilities. You'll start by using the basic mechanisms provided in WordPress to create plugins, followed by recipes covering how to design administration panels, enhance the post editor with custom fields, store custom data, and even create custom blocks. You'll safely incorporate dynamic elements into web pages using scripting languages, learn how to integrate data from external sources, and build new widgets that users will be able to add to WordPress sidebars and widget areas. By the end of this book, you will be able to create WordPress plugins to perform any task you can imagine. What you will learnDiscover action and filter hooks, which form the basis of plugin creationExplore the creation of administration pages and add new content management sections through custom post types and custom fieldsAdd new components to the block editor libraryFetch, cache, and regularly update data from external sourcesBring in external data sources to enhance your contentMake your pages dynamic by using JavaScript, jQuery, and AJAX and adding new widgets to the platformAdd support for plugin translation and distributing your work to the WordPress communityWho this book is for This book is for WordPress users, developers, and site integrators interested in creating new plugins to address their personal needs, fulfill client requirements, and bring new capabilities to the WordPress community. Basic knowledge of PHP and WordPress is expected.




Scala Cookbook


Book Description

Save time and trouble building object-oriented, functional, and concurrent applications with Scala 3. The latest edition of this comprehensive cookbook is packed with more than 250 ready-to-use recipes and 700 code examples to help you solve the most common problems when working with Scala and its popular libraries. Whether you're working on web, big data, or distributed applications, this cookbook provides recipes based on real-world scenarios for experienced Scala developers and for programmers just learning to use this JVM language. Author Alvin Alexander includes practical solutions from his experience using Scala for highly scalable applications that support concurrency and distribution. Recipes cover: Strings, numbers, and control structures Classes, methods, objects, traits, packaging, and imports Functional programming in a variety of situations Building Scala applications with sbt Collections covering Scala's wealth of classes and methods Actors and concurrency List, array, map, set, and more Files, processes, and command-line tasks Web services and interacting with Java Databases and persistence, data types and idioms.




C# 6.0 Cookbook


Book Description

Completely updated for C# 6.0, the new edition of this bestseller offers more than 150 code recipes to common and not-so-common problems that C# programmers face every day. More than a third of the recipes have been rewritten to take advantage of new C# 6.0 features. If you prefer solutions to general C# language instruction and quick answers to theory, this is your book.C# 6.0 Cookbook offers new recipes for asynchronous methods, dynamic objects, enhanced error handling, the Rosyln compiler, and more. Here are some of topics covered: Classes and generics Collections, enumerators, and iterators Data types LINQ and Lambda expressions Exception handling Reflection and dynamic programming Regular expressions Filesystem interactions Networking and the Web XML usage Threading, Synchronization, and Concurrency Each recipe in the book includes tested code that you can download from oreilly.com and reuse in your own applications, and each one includes a detailed discussion of how and why the underlying technology works. You don't have to be an experienced C# or .NET developer to use C# 6.0 Cookbook. You just have to be someone who wants to solve a problem now, without having to learn all the related theory first.