~/talk

Tidy Up Your Code

Talkat WordCamp Nagpur 2022 · on Saturday, 2022-11-12· [php, developer-experience]
slides:none on file

Practical PHP rules and concrete refactors: enforce PSR formatting with PHP CS Fixer, add spacing and a blank line before return, prefer return early to drop nested else blocks, limit methods to about 5–10 lines, and split a large product-import into fetchProducts, saveProducts, saveProductImages so each step is testable. Use clear English names, avoid needless words and unclear abbreviations, prefer timestamps instead of booleans to record when state changes, and refactor to reduce cyclomatic complexity.

AI-written summary · about

  1. 0:00Introduction to readable code
  2. 3:44Improving code appearance
  3. 12:02Naming conventions and clarity
  4. 23:15Code formatting and refactoring
  5. 33:55Smart variable assignment
  6. 36:26Q&A and closing remarks
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.