browse the blogs

[ 13 Feb 2018 ]

Using “Not Quite JSON” with PHP:

One of the odd side effects of JSON’s wide spread success is how often you’ll run across data that’s not quite json A hello world example looks something like this {a: “Hello World”} If you look at that string, you might think Hey, it’s a JSON string! However, it’s not strict JSON — the a needs to be a quoted string. Consider the output of the following. $foo = json_decode(’{a: 8531329}’); var_dump($foo); //NULL $bar = json_decode(’{“a”: 8531329}’); var_dump($bar); //the object “Not Quite JSON” exists because JSON’s elevator pitch is We encode everything using javacsript objects This means there’s a ton […]

[ 6 Feb 2018 ]

Useful Magneto 2 JavaScript Helper Functions:

I had to fix a typo in it (thanks Vinai!), so why not squeeze a link out of my Magento 2: uiElement Standard Library Primer article from last year’s uiElements Internals series. I’m reasonably proud of that, and its predecesor UI Component series. I’m also diappointed (but not surprised) that frontend development in Magento 2 remains complicated, slow, and something most smart developers avoid.

[ 1 Feb 2018 ]

New Docs Site for PHP Internals:

A new documentation site for PHP Internals (the pile of C code that’s used to build PHP itself) magically appeared a few weeks ago and it’s pretty great. While the PHP Internals Book tries to give you the context you need to work in the PHP source code, this new PHP Internals site is trying to document every symbol and the broad hierarchy of systems that make up PHP’s source. If you’re the sort of programmer who needs a plain english understanding of something in order to have it click, this new site looks invaluable.

[ 30 Jan 2018 ]

Simple Command Line Image Manipulation is OS X/MaxOS:

File this one under old-but-new-to-me tech: OS X/Mac OS ships with a simple command line application named sips that lets you perform simple image manipulations like resizing, rotating, image flips, crops, etc.

[ 29 Jan 2018 ]

Large Configurable Products in Magento 2:

Magento 2, like its forbearers, starts to fall apart when you push larger amounts of data through its systems. One example of this is Configurable Products. Configurable Products allow users to pick options for a product (size, color, etc.), and have each configuration mapped onto a single Simple Product entity. In theory, there’s no limit on the number of simple products you can link to a configurable. In practice, Magento’s UI rendering code starts to choke when the number of simple products attached to a configurable product starts getting into the thousands. Certainly not the standard case, but its not […]

[ 28 Jan 2018 ]

Large Excel Data Dumps:

I don’t know much about its provenance, but this small python program is just the thing if you’re trying to export a large Excel spreadsheet to a far more usable/malleable CSV file. Particularly useful for folks with Macs, since Numbers, Libre Office, and Open Office don’t handle large files well (Numbers and Open Office couldn’t open the file, and Libre Office opened the file, it couldn’t muster the energy to save it in another format)

[ 24 Jan 2018 ]


It’s been long enough and I’m now old enough that I can’t quite remember when I started following Simon Willison’s work. He’s the co-creator of Django and one of those early online programming voices that were invaluable if you were cobbling together how all this stuff worked without direct access to the technology industry. He has a new project called Datasette, which creates a simple browser based UI for exploring sqlite databases, as well as tools for turning CSV files into sqlite databases and easy hosting of Datasette instances. Beyond being useful tools, its nice to see a set of […]

[ 23 Jan 2018 ]

Line On Sierra:

When it comes to retro gaming I’m mostly a dillitante, and I’m mostly chasing nostalgia. That probably explains why I’ve only just discovered this fantastic four year old series from a modern game critic (LIne Hollis) playing through the origial Sierra On-Line lineup. I mention this here, on a programming blog, because I think those early games ended up training more than one programmer in how to stumble their way through a compiler or interpreter.

[ 22 Jan 2018 ]

Unfriendly Fire:

One of the less fun parts about working in a C code base is dealing with the toxic machismo that’s still present in the wider culture. The people I work with are (fortunatly) great, but when I’m wading through the internet for answers I come across things like this time and time again. The top answer is a rant that spends half its time throwing shade at the question asker’s code, and the other half berating the authors of GCC for their choice of default warnings. The straight-foward answer (with three votes) lingers below.

[ 16 Jan 2018 ]

Mage TV Beta:

Vinai Koop has opened his service/channel as a free public beta. Right now there’s over an hour of free Magento 2 tutorials, and a roapmap for what content’s coming next. It’s also an interesting example of a single person’s vision for a video delivery system. These sort of systems are common, but are usually the product of an Enterprise Sales team or Global Digital Brand — both markets that lean away from simple straightforward software. If you’re working with Magento 2, I’d label anything Vinai puts out required viewing/reading.