Author: Adam Zieliński

  • Short introduction to Unicode and UTF-8

    I’m fascinated with Unicode. This blog post is one I wish I had 20 years ago when I was starting to learn about text encoding. Around 2005, I struggled to use Polish words on my website. I would type in koło in Windows notepad, but in Firefox I would see ko³o. Why? Notepad used the

    Read article →

  • mysqli_real_escape_string() can be dangerous

    We’ve had prepared statements for years, but the WordPress ecosystem still relies on mysqli_real_escape_string() and it’s scary. Can you find the security issue in this, deceivingly simple, code snippet? It’s related to text encoding. Adding backslashes to $_POST[‘new_content’] string can corrupt the data at best, and open up a SQL injection vulnerability at worst. Here’s

    Read article →

  • Running PHP code after closing the HTTP connection

    Dennis Snell and I want to sync two WordPress sites and we’ve been looking for a way to run a continuous content indexing in WordPress. One idea was to reuse the PHP process that renders the site and do a little bit of indexing after every page render. We’d need to flush all the buffers, ship the

    Read article →

  • Code Contributions I’m proud of

    Creating WordPress Playground helped me grow as an engineer, leader, and product person. This post, focusing on the engineering side, highlights the technical contributions I’m particularly proud of.

    Read article →

  • WordPress as a git repo

    During my Christmas break, I’ve turned WordPress into a markdown editor, a git client, and a git server. It’s all dependency-free PHP code. It works in Playground, on any cheap hosting, and it could be merged into WordPress core. Why would I do that? I want Notion that’s free, offline first, and where I own

    Read article →

  • Moje Podsumowanie 2024

    Choć 2024 był intensywny, to był bardziej czilowy niż wiele poprzednich lat. Tym razem odpuściłem katowanie się osobistymi celami i bardzo polecam ten tryb. Tak czy siak robiłem rzeczy na których mi zależy, a nie musiałem się stresować tym, że się nie wyrabiam z tym czy tamtym celem. A co robiłem? Szczegóły poniżej 🙂 Warsztatowałem

    Read article →

  • Generating 1MB of PHP code with AI, a story of MySQL query parser

    I’ve used Google Gemini to generate a MySQL query parser in PHP and I’ll tell you exactly how. It took two nights, ~$520, and yielded a 1MB MySQLParser.php file that worked out of the box, but not without bugs. This post is just a summary. If you want the full story. check out the original

    Read article →

  • Cloning a Git Repository From a Web Browser Using fetch()

    For the last year, I couldn’t find a fast, low-transfer way of downloading Git files in a web browser. git is a server-side command and GitHub REST API, even if it was fast, doesn’t extend beyond GitHub, Yesterday it finally clicked – I needed a Git client built in JavaScript! This article explains how that

    Read article →

  • 3 Online Writing Mistakes That Almost Defeated Me – and How I Overcame Them

    Two years ago, I used to stress for 25 hours to write a short 500 words piece. Each time it was the same struggle, and no matter what I tried, it didn’t get any easier. I almost gave up on writing. But today, ~100,000 words later, I can write 500 words in an hour. There’s

    Read article →

  • Learn how to build PHP to WebAssembly in 10 minutes

    This may be my last WordPress-related post until I’m back from my Sabbatical on September 26th. Enjoy! WebAssembly is easier than you think. It is difficult to get started with, but then it’s not. I’ve spent the last 10 months learning that, and now I will save you that time by sharing how to build

    Read article →