Deleted a custom number-abbreviation helper in our frontend repo today and replaced it with new Intl.NumberFormat('en', { notation: 'compact' }). It formats 12,400 into 12.4K natively in the browser and handles edge cases without a single regex.
Md. Khorshed Alam
@robelsust
Full-stack engineer and entrepreneur building native developer tools and modern web applications for the Laravel and WP ecosystem.
- RS Software
- Dhaka, Bangladesh
- www.therssoftware.com
- github.com/robelsust
- Joined October 2026
Commit activity
237 commits in the last 30 days
longest streak 20 dayscurrent 20
4,584 XPMaximum rank (UID 0)
Today
Inheriting a legacy database where core business rules hide inside SQL stored procedures and triggers is my least favorite debugging experience. Keeping state transitions in version-controlled PHP actions where Pest tests and static analysis can actually see them makes…
Adding DB::prohibitDestructiveCommands(app()->isProduction()) inside AppServiceProvider takes one line of code and blocks migrate:fresh, migrate:reset, and db:wipe from ever running on a live server when you have multiple SSH tabs open.
Still run into schemas that use plain TIMESTAMP instead of TIMESTAMPTZ in Postgres and then wonder why scheduled jobs fire an hour off whenever Europe or the US shifts clocks. Storing UTC instants with TIMESTAMPTZ and converting at the display layer saves so many timezone bugs.
Storing timestamps without timezones is like storing "somewhere within this day" the worst way possible
Yesterday
Whenever multiple worker processes need to claim pending rows from a database table without colliding, SELECT ... FOR UPDATE SKIP LOCKED in Postgres and MySQL 8 is unbeatable. In-flight rows get skipped immediately instead of blocking other workers.
Postgres DISTINCT ON (user_id) paired with ORDER BY user_id, created_at DESC is still my favorite SQL feature when I just need the most recent row per user. It reads way cleaner than a window function subquery and hits a composite index in a single pass.
Added a lightweight crawler check in middleware before recording pageviews into our analytics table after noticing headless scanners were inflating traffic numbers by 40%. Dropping known datacenter ASNs and bot User-Agents before touching the database keeps product metrics…
Keying RateLimiter::for('login') on both the lowercase email input and the client IP in Laravel stops credential-stuffing bots rotating through proxies while also keeping a shared office NAT from locking out a whole team.
Created a dedicated read-only Linux user on our servers that can inspect journalctl, ps, and docker stats without sudo or write access. Whenever you need fast diagnostics during a memory spike, you never have to worry about a mistyped command or script restarting a live service.
Tue, Nov 3
Adding a foreign key constraint to a twenty-million-row Postgres table will lock writes while it scans every existing row unless you append NOT VALID to the ALTER TABLE statement. You can enforce the constraint on new writes immediately and run VALIDATE CONSTRAINT right after…
Got bitten by MySQL's default group_concat_max_len = 1024 byte limit today when an export query silently truncated a list of tag IDs without throwing an error. Switching to JSON_ARRAYAGG() avoids the 1KB ceiling and returns a clean JSON array.
When generating S3 presigned upload URLs for user avatars, always include a content-length-range condition in the policy document. Otherwise a client can take a valid presigned URL meant for a 2MB image and upload a 5GB file straight into your bucket.
Starting a route prefetch on hover or mousedown gives the browser a 60 to 100 millisecond head start before the mouse button even releases. By the time the click event fires, the response is already in memory and the page transition feels local.
Switched our high-volume event tables over to time-ordered UUIDv7 via Laravel's HasUuids trait instead of random UUIDv4 strings. B-tree index inserts append sequentially at the end of the page instead of fragmenting random disk pages across the whole table.
Mon, Nov 2
Adding Cache-Control: public, s-maxage=60, stale-while-revalidate=300 on our public changelog and directory endpoints has been the easiest CDN speedup. Visitors always get an instant edge hit while the proxy refreshes the origin cache in the background.
Checked a newly provisioned MySQL server today and realized innodb_buffer_pool_size was still sitting at the default 128MB on a 16GB machine. Bumping it up to 11GB so the working set and indexes stay in RAM dropped disk IOPS to almost zero.
This is one important setup in any server. However it also means this RAM is never free-ed, so you may run out of memory quicker if your server performs heavy file reading or process big payload…
Sun, Nov 1
Dropped @tanstack/react-virtual into an activity feed component today that was choking on two thousand DOM nodes when users scrolled back a few days. Rendering only the fifteen visible rows plus a small overscan buffer brought scrolling back to a locked 60fps on mobile.
Configured systemd socket activation ahead of our internal worker daemon today so the kernel buffers incoming connections while the service restarts. Deployments don't drop a single in-flight request even on a single-node VPS.
Used Postgres jsonb_to_recordset() today to unpack a 500-item webhook array directly inside a single INSERT ... SELECT statement. Unnesting JSON on the database side avoids building massive parameter binding arrays in PHP.
Sat, Oct 31
Added composer audit --locked as a required step in our GitHub Actions workflow right after composer install. It adds less than two seconds to the run and blocks the merge immediately if any transitive package in composer.lock has a known security advisory.
pair it with composer 2.11's cooldown and most bad releases never even reach the lock file 🔥