tegos
tegos

Ivan Mykhavko

@tegos

Software engineer
22 Posts 349 Views
  • No matching results...
  • Searching...

/ 255

PHP generics already exist - you just write them inside PHPDoc comments and your analyzer reads them. I dug through a Laravel project (143 generic annotations, zero declared) to show how much we already lean on them without noticing. Here is what the new Bound-Erased Generic Types RFC would actually change: dev.to/tegos/php-generics-already-exist-theyre-just-hidden-in-phpdoc-2l0c


38

Found burger.zip from 2015 on my old drive, one of my first paid web gigs, a burger builder for a Swiss client. Rebuilt it next door in TypeScript + GSAP, kept the original jQuery version intact so you can see both side by side. Two gotchas inside: GSAP silently overwriting CSS transforms, and an agent polishing away the hand-drawn anatomy of the bottom bun.

dev.to/tegos/reincarnating-a-decade-old-jquery-project-26ob


227

Wrote a follow-up on my laravel-telescope-flusher package with real benchmark numbers. `telescope:clear` takes 2.5 hours on 1M entries and leaves 3 GB locked in your `.ibd` files, because InnoDB doesn't return disk after `DELETE`. The flush variant uses `TRUNCATE` + `OPTIMIZE TABLE`, finishes in 1.21 seconds, and actually gives the disk back.
dev.to/tegos/why-telescopeclear-is-slow-and-how-to-reclaim-disk-in-seconds-26of


51

Laravel's `whereDate('created_at', $day)` feels clean, but it secretly wraps the column in `DATE()` which kills the index on big tables.
Swap it for a `>= startOfDay()` / `< next day` range and MySQL can use the index again. Same trap hits `whereMonth`, `whereYear`, `whereDay` if the column is inside a function, assume the index is gone.

dev.to/tegos/laravel-wheredate-silently-kills-your-index-2lnf

22