Free sample

The Software Engineer Creativity
Free sample
The Software Engineer Creativity
by Ferry Desmond
Enjoyed this sample? Get the whole book — only at SamEnrico.comeBook · $11.99 Audiobook · $9.99 Paperback · $12.99 Hardback · $19.99

Chapter 1: The Obvious Trap

–- Every working programmer remembers the moment they stopped believing in hard work. For me, it happened at 2:47 AM on a Tuesday, three weeks into a startup death march. I had been staring at a pagination bug for eleven hours. The API returned inconsistent cursors. The database was Postgres 9.6, ancient by modern standards.

The frontend team was screaming about duplicate records. My vertical thinking—logical, sequential, depth-first—had produced exactly four attempted fixes. All of them worked locally. All of them failed in production. I was not stuck because I lacked intelligence or effort.

I was stuck because I was digging the same hole deeper, convinced that the solution lay just one more logical step away.That night, I did something desperate. I closed my laptop, walked to the whiteboard, and wrote the problem in one sentence: "Given a cursor, return the next 20 items without duplicates or gaps." Then I wrote the opposite: "Given a cursor, return the next 20 items, but duplicates and gaps are allowed." That second sentence was absurd. It violated the requirement. But staring at it, I noticed something I had missed for eleven hours: the requirement itself was the problem. I did not need a better cursor algorithm.

I needed a way to make cursors idempotent. The solution came in three minutes: store the last successful cursor in Redis with a TTL, and on any failure, return the same cursor again. Duplicates would happen, but gaps would not. The frontend team could deduplicate in Java Script. The bug died.

I learned nothing about Postgres that night. I learned everything about how the mind traps itself.This chapter is about that trap and how to escape it. We will define elegance not as a mystical property but as three measurable characteristics. We will introduce the central meta-pattern of this entire book—Problem Restatement—and use it to reframe how you approach any coding challenge. And we will establish the taxonomy of constraints that will organize every technique in the chapters ahead.

By the end of this chapter, you will never look at a nested loop or a complex conditional the same…

This is the end of the free sample. Get the PDF to keep going. Buy now →

Free sample — not for resale · Full book at SamEnrico.com

About this book

Elegant coding solutions through lateral thinking.

Contents

  1. Chapter 1: The Obvious TrapFree
Get the whole bookThe Software Engineer Creativity · PDF

The first chapter is free. Buy the book to read every chapter, or subscribe to read and listen to the whole catalogue.

Details

Author
Ferry Desmond
Publisher
SamEnrico
Format
eBook / PDF / Paperback / Hardback / Audiobook / Stream / Reading Course / Audio Course / Video Course / Course Bundle
Format identifiers
GGKEY 7XE795B51XK (Google Play)
Edition
1st edition
Language
English
Territory rights
Worldwide
Genre
Non-Fiction, Self-Help, Software Development
Released
2026-06-05
Pages (approx.)
145

Reader ratings

No ratings yet — be the first to rate this book.

Rate this book

Sign in to rate this book

One rating per reader, from readers with a SamEnrico account. Ratings only — no written reviews.

Read better in the ZLOADR app

Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.

More by Ferry Desmond

See all

You may also like

See all