Longhorn PHP 2025 Day 2
Scott Keck-Warren • October 28, 2025
The Immutable Laws of Software and Life: Code Accordingly by Cory House
10 Software Laws
The first law of ecology - you can never merely do one thing
We're here at the conference and not at home. Our career gets better but family life worse.
"If something is hard, do it more often"
Shipley's Six Dimensions 1. Brevity of code 2. Featurefulness 3. Speed of execution 4. Time spent coding 5. Robustness 6. Flexibility
Iron Triangle * Good * Fast * Cheap
Pick 2
Books: Essentialism Range: why generalists triump in a specialized world
- T shaped developer
- Monorepo
The fundamental Theorem of Software Enineering - can solve any problem by introducing another layer of abstraction
DRY - reduces locality of behavior
Conway's Law - Org stucture affects system structure
Reverse Conway Meneuver - reorg to foster system restructure Example split team to split monolyth
McLuhan's Law - we shape our tools and our tools shape us
Make the thing you want to do easy
Goodhart's Law - When a measure becomes a target, it ceases to be a good measure
House's Law - The thing hardest to measure are the most important
Hick's Law - the more options a user has, the longer it takes to make a decision
The paradox of choice - ted talk by Barry Schwartz
Cunningham's Law - to get the right answer, post the wrong one
The law of Diminishing Returns - The point when benefits gained are less than the amount invested
KCDC Conference
Beyond the ORM: Practical Database Optimization Strategies for Modern Developers
Optimzation Practices: 1. Identify inefficeincies 2. Reduce stored data 3. Reduce requested data
1. Identify inefficeincies
Monitoring toolds Profiling tools
2. Reducing stored data
- Archive rearely accessed data
- Removed unused columns
- Remove unused indexes
- Logical or materialized views
- Partitioning and sharding
3. Reduce requested data
- Limit results with TOP/LIMIT
- select on the columns you want
- Create indexes
EXplain analyze select display_name, location from user where location = "USA";
Covering index:
-- index on (display_name, location) can make it a covering index
EXplain analyze select display_name, location from user where location = "USA";
Partial indexes only add indexes on smaller data set. Only when active case logic
- Use join/on and not join/where
- Use HAVING appropriately BAD
having users.display_name like 'A%'; -- not optimized
Can AI Write Better SQL Than You?
Best if you think of data in sets and not rows AI is working with your data and most of them are hosted remotely. Ollama - popular on prem and open-source MySQL World database
Vibe Coding Laravel with Claude
Vibe coding name from feb 2025 Treat AI tools as you would a Jr Dev * More upfront planning * Settings rules and expectations * Emphasis on clean code, linting, standards * Run tests after making change * Breaking up complext projects into small tasks * DDD for example * Microservices
SuperClaude - Smart Personas (architect, developer, security person) - Context7 MCP - Sequential MCP - Magic MCP - Playwrite MCP Laravel Boost
"@filepath" dumps file into claude shift + tab 2x - plan mode serena ollama taaft newsletter