Modern C: Covers the C23 standard. 3 Ed

Modern C: Covers the C23 standard. 3 Ed

Modern C: Covers the C23 standard. 3 Ed
Автор: Gustedt Jens
Дата выхода: 2024
Издательство: Manning Publications Co.
Количество страниц: 553
Размер файла: 7.4 MB
Тип файла: PDF
Добавил: codelibs
 Проверить на вирусы  Дополнительные материалы 

Contents

Introduction

Section 1: Auditing

What's Covered?

Planning Your Auditing Strategy

Getting Into the Right Mindset

Recording Your Findings

Automated Tooling

PHP Insights

Enlightn

Larastan

Style CI

Code Coverage

Manual Auditing

Investigating "raw" Database Queries

Finding Incorrect Authorisation

Checking Validation

Finding "Fake Facades"

Finding Business Logic in Helpers

Finding N+1 Queries

Finding Controllers That Use Other Controllers

Finding Logic and Queries in Blade Views

Finding Hard-Coded Credentials

Check Open Package Routes

Reviewing Project Documentation

Section 2: Testing

What's Covered?

Planning Your Testing Strategy

The Benefits of Writing Tests

Spotting Bugs Early

Making Future Work and Refactoring Easier

Changing the Way You Approach Writing Code

Tests-As-Documentation

Prove That Bugs Exist

Structuring Your Tests

Directory Structure

Choosing What To Test

Test Structure

Data Providers

Writing the Tests

Prioritising Mission-Critical Tests First

Writing the Rest of the Tests

Benefits of Writing the Easy Tests First

Preventing Test Fatigue

Testing Your UI with Laravel Dusk

Installation

Testing a Simple Form

Dusk Pages and Selectors

Running Failed Tests and Groups

Creating a CI Workflow Using GitHub Actions

Using an .env.ci File

Running the Test Suite

Larastan

Laravel Dusk

Output

Section 3: Fixing

What's Covered?

Planning Your Fixing Strategy

Using an Error Reporting System

Types of Errors

The Benefits of an Automated Error Reporting System

Error Reporting Using Flare

Uptime Checking, Queue Monitoring, and Scheduler Monitoring

Uptime Monitoring with Oh Dear

Scheduler Monitoring with Oh Dear

Queue Monitoring with Oh Dear

Updating PHP, Laravel, and Packages

Upgrading in Small Increments

Automating the Upgrade Using Laravel Shift

Planning Upgrades Early

Using a Suitable Local Development Environment

Using Tests to Fix Bugs

What is Test-Driven Development?

The Advantages of Test-Driven Development

The Disadvantages of Test-Driven Development

Fixing a Real Bug Using Test-Driven Development

Safely Removing Dead Code

Checking the Version Control History

Scream Test

Logging or Reporting the Usage

Removing the Code with an Atomic Commit

Section 4: Improving

What's Covered?

Planning Your Improvement Strategy

Making the Most of PHP's Type System

Using Type Hints and Return Types

Union Types

Type Hints and Return Types in Closures

DRYing Up Your Code

Advantages of DRYing Up Your Code

When to DRY Up Your Code

Refactoring Conditions

Reducing Indented Code

Replacing if and elseif with match

Using the Nullsafe Operator

Using Database Transactions

Adding the Database Transactions

Manually Using Database Transactions

Tips for Interacting with Third-Party Services

Using Automatic or Manual Transactions

Dispatching Queued Jobs inside Database Transactions

Improving the Testability of Your Code

Using Objects Over Arrays

Final Words

Discount Codes

Flare

Oh Dear

StyleCI

Laravel Security In Depth

For programs that need to be small, fast, and reliable, C is the gold standard. Whether you’re writing embedded code, low-level system routines, or high-performance applications, C is up to the challenge. This unique book by Jens Gustedt, a member of the ISO C standards committee, gets you up to speed with C23.

In Modern C, Third Edition you’ll:

  • Learn C basics, core features, and advanced concepts
  • Leverage major C23 improvements for security, reliability, and performance
  • Write portable code that runs anywhere
  • Build multi-threaded applications with atomics and synchronization
  • Create robust and resilient software with error handling
  • Use type-generic programming for reusable code

In Modern C, Third Edition you’ll learn to harness C’s full potential using the latest tools and techniques. After a quick review of the fundamentals suited for coders who haven’t used C in a while, this book guides you to mastery of C23, the latest ISO standard.

About the Technology

From code running on the smallest embedded devices to the low-level libraries behind popular programming languages like Python and Ruby, the software world depends on C. And even after 50 years, it’s still getting better! The new C23 standard adds improvements for security, reliability, and performance. In this thoroughly-revised new edition, author Jens Gustedt gives you an authoritative inside view.

About the Book

Modern C, Third Edition is a fast-paced introduction to the C language, with special attention on its most modern features. It starts with a quick review of structure, grammar, and execution and then progresses quickly to control structures, data types, operators, and other core language features. Fully revised for C23, this expanded Third Edition covers compound expressions and lambdas, new insights into approaching program failure, and how to transition smoothly to C23.

What’s Inside

  • All major C23 features
  • Portable code that runs anywhere
  • Multi-threaded applications with atomics and synchronization
  • Use type-generic programming for reusable code

About the Readers

For readers with intermediate skills in any programming language.


Похожее:

Список отзывов:

Нет отзывов к книге.