Blog
Go's new Iterators were released on August 13th with Go 1.23.
They've had just a minute to marinate. In some parts of the community they're unpopular. I don't particularly mind them. The old alternatives seem a little more "Go" to me, but the new iterators are largely fine.
I am mildly disappoin…
Read More / Comment »
I've been working as a developer for almost twenty years now. In that time I have had the pleasure of helping many developers, and helping them debug code. Some were new to the field, had vastly more experience than me.
While some are naturally somewhat gifted at debugging, it's important to unders…
Read More / Comment »
For basically as long as I can remember, I have been a staunch defender of permissive licenses over the more copyleft variety. I want you to use things I've written. On top of that I don't believe it's my place to force you to then open source things you have written that expand upon my source code…
Read More / Comment »
I've run into this problem a number of times where I'm developing frontend TypeScript and after I import a package, I suddenly find throughout my project I'm receiving:
error TS2322: Type 'Timeout' is not assignable to type 'number'.
If you are working on a node project rather than a front end pro…
Read More / Comment »
I have been playing with WebAssembly since Go added support for it in 2017.
For a very long time now, I've been wanting to be able to accept files from an end user and process them with Go on their local machine. Basically I just want to read files from file inputs. I knew it had to be possible, b…
Read More / Comment »
tl;dr
I recommend every developer turn off automatic garbage collection in git. It's one of the first things I do setting up a new machine - and you should do so too.
For a happier life, go to your terminal right now and run:
$ git config --global gc.auto 0
I promise you won't regret it.
The fu…
Read More / Comment »
Go has a problem. Go modules place a strange naming requirement on modules version 2 or greater. Module names on modules v2+ must end in the major version ala …/v2, and communication of this rule has been weak. It's non-obvious, and the community at large does not understand it.
I have seen many ve…
Read More / Comment »
It's not ideal, but until the whole SharedArrayBuffer debacle settles down, it's probably the best I can do right now.
Stuck in boring Zoom meetings? Have the perfect gif you want to use as your "Zoom Virtual Background", but Zoom won't let you use animated gifs?
Here's a tool to convert GIFs to M…
Read More / Comment »
In 2013 I wrote an unintentionally inflammatory post: Go Binary Sizes Are Growing out of Control. I had imagined no one would read it, but it took off. I wrote it because I noticed my binaries getting larger as I upgraded versions of Go and found it curious.
Much has changed since then; biggest of…
Read More / Comment »
A little under a year ago I wrote a walkthrough: Set up a Self Signed Certificate on macOS's Built in Apache.
Recently a new tool showed up called mkcert has come and made life way easier.
It's a wonderful tool that instead of building Self-Signed Certificates, sets your local machine up with a ce…
Read More / Comment »
While trying to compile PHP extensions after installing macOS Mojave, I was butting up against a ton of missing header file errors including php.h and zlib.
After several hours of beating my head against my desk and Googling/Stack Overflowing I found the solution.
Ends up you just need to force re…
Read More / Comment »
I recently purchased a .app domain for a side project; .app domains are interesting as they require SSL at all times.
I like to set up my dev environments as subdomains of my actual domain, such as local.donatstudios.com. It makes working with CORS and cookies a lot simpler for applications with A…
Read More / Comment »
To prevent developers from pulling down potentially unsafe packages, we now retire the namespace of any open source project that had more than 100 clones in the week leading up to the owner’s account being renamed or deleted.
This is a decent half step but I'd still love to see either permalinks o…
Read More / Comment »
I am someone who spends large portions of their time working in weakly typed languages. Namely, PHP and JavaScript. I argue that static analysis is a must-have when working with any weakly typed language. It is nearly impossible to make reliable code without it.
Static analysis makes up for the mi…
Read More / Comment »
Much of my professional work for the last 10+ years has revolved around handling, importing and exporting CSV files. CSV files are frustratingly misunderstood, abused, and most of all underspecified. While RFC4180 exists, it is far from definitive and goes largely ignored.
Partially as a companion…
Read More / Comment »
It would appear in a recent update Microsoft has added support for safely reading and writing UTF-8 CSVs to Excel. There is a new format in the save dialog CSV UTF-8 (Comma delimited) which is distinct from Comma Separated Values which is also still in there.
In my testing it appears to safely bot…
Read More / Comment »
In that same time range I had a handful of Apps purchased from the App store suddenly and mysteriously stop working. They just quit. No dialog, no error mesasage, nothing at all. Apps I paid for and depend on just stopped working.
The thing they all these Apps have in common is they are no longer a…
Read More / Comment »
I have a quite large iTunes library, and I’m rather anal about keeping my metadata clean and up to date. In an earlier release of iTunes 12 there was a bug. Every so often after a song played, the Play Count would fail to increment, but the Last Played would update.
Searching my library, I found 7…
Read More / Comment »
There's been a fair deal of hubbub in the community about version numbers, including what is and isn't Semantic Versioning, what qualifies as a breaking change and how to use version numbers.
Underscore.js released a second digit "minor update" that was actually a breaking update for some people. T…
Read More / Comment »
Should you run into errors related to missing php.h or other .h files, you should check out my post on fixing missing headers on macOS Mojave.
These directions are for working with the native installation of PHP. Your results may vary if you are using a brew, MAMP or otherwise installed version of…
Read More / Comment »
Every time I would upgrade OS X it took probably 45 minutes of fiddling with my Apache configuration to get it working properly. I'm writing this article in the hopes of saving myself and others some time.
The Setup
For the following examples, {username} represents your username.
Firstly, if you…
Read More / Comment »
I previously showed you how to Load a Github Gist with Composer, but sometimes you need to install code that isn't isn't even in a public facing VCS.
I for instance wanted to use a library only distributed by Zip.
It's actually fairly easy! In your composer.json file, you simply add a repositories…
Read More / Comment »
Lost in the shiny new features (see: namespaces and closures) PHP 5.3 also added the __invoke method. While not plainly apparent, it is secretly an amazingly useful 'magic method' .
If you're not taking advantage of __invoke, you should be. Why? It provides a uniform execution points for objects t…
Read More / Comment »
Over the weekend I went to a talk on Scala. The speaker said variety of harsh, inflammatory, and mostly wrong things about PHP and the PHP community.
One such example:
The PHP community doesn't care about things like lambdas, they just care about getting a site up as fast as possible.
This is j…
Read More / Comment »
A little over a year ago I wrote a post about using Beyond Compare on Mac via Wine. A native version is now in beta and open to everyone! If you haven't tried Beyond Compare, I suggest you do. If you have you already know how awesome it is.
I've been testing the Alpha for many months now and thoug…
Read More / Comment »
Note: This is not intended as a "Go Sucks" post. I love Go. I am not saying the developers are lazy or dumb or any of the things Reddit has implied. I am not implying I could build a better compiler. Rob Pike and the Go team are geniuses whom I look up to. The tone of this was intended to be a light…
Read More / Comment »
Composer is amazing for pulling in packages, but what if you find a Gist that isn't Composer aware? Fear not, as Composer has the magical ability to pull in repositories not explicitly set up in Packagist by defining them in the "repositories" section.
But what if you wanted to load a single class…
Read More / Comment »
Please Note
This tutorial only covers the default PHP installation that ships with Mac OS X / macOS. If you have installed a new installation this does not cover you.
For those using brew, you can simply brew install the appropriate brew formula for the extension.
These directions are verified t…
Read More / Comment »
If you are running OS X El Capitan or newer you will need to disable System Integrity Protection to modify system files and directories.
To disable System Integrity Protection, boot into recovery mode by restarting and then holding ⌘R as you hear the startup chime. Then start the Terminal from the…
Read More / Comment »
CoffeeScript is a programming language that compiles to JavaScript. Its mission is to "expose the good parts of JavaScript in a simple way". I've heard a lot of interest in it lately from various channels.
After a coworkers departure, I inherited maintenance on our deployment bot, and it was writ…
Read More / Comment »
I fell in love with a dead keyboard layout.
A decade or so ago while helping a friends father clean out an old building, we came across an ancient Sun Microsystems server. We found it curious. Everything about it was different from what we were used to. The command line was black text on a white ba…
Read More / Comment »
I switched from Windows to Mac for work a little over a year ago (I've been using Macs at home for years) and there is one program I still could not live without - Scooter Software's wonderful Beyond Compare. I've tried every single diff tool available and none have lived up to Beyond Compare. It t…
Read More / Comment »
In my professional work, we have a system that utilizes __call and __callStatic for caching of certain method calls. We have been running into a problem where calling an undefined method via :: within the class itself will trigger __call rather than the expected __callStatic.
The Problem
The follo…
Read More / Comment »
Working on a class in our application, I discovered that it was being included before a number of constants it used for its members were even defined. Puzzled on how this had never been a problem I started to experiment; echoing the member at the bottom of the class file after the class closed show…
Read More / Comment »
As Lead Developer at my previous company I interviewed many Developers. I wanted to provide some advice to Developers on how to come off more positively.
For the purposes of this post I, me and all other pronouns referring to myself refer to a hiring professional.
Some Basics Up Front
Google your…
Read More / Comment »
A hierarchy is a common structure, especially for structuring pages in web development. A problem with hierarchies is they often need to be flattened to be stored in a relational database, and then expanded again after being pulled out.
An Example Hierarchy
Top level item
Sub Item
Sub Sub Item…
Read More / Comment »
Today I decided to spruce up a VB.Net application I wrote in
college and still use almost daily. In the process of converting it
from .Net 2 to .Net 4 I wanted to add a splash of Windows 7 goodness; there were some
very simple operations I wanted to add to JumpLists. The problem I ran into with…
Read More / Comment »
Googles Page Speed “Optimizations” Make Learning Difficult
If you, as I, grew up during the web bubble we call the 90’s and were interested at all in web development my guess is that you probably didn’t learn most of your skills from a book or a class. You probably would run across a site that ha…
Read More / Comment »
Grid Style Sheets Must Die
I have been aware of Grid Style Sheets for quite a while, but I long ago dismissed them as a fad like CSS Resets. Recently though it came to my attention that OSCommerce 2.3 switched to the 960 Grid Style to replace its table based layout system. I spend most of my deve…
Read More / Comment »
In my work, I deal with a lot of very similar codebases - and often if I fix something in one project I'll want to fix it in many others. For a long time this has meant popping open Beyond Compare, which works, but isn't the simplest solution.
I use git on my projects - but they're not similar eno…
Read More / Comment »
With Google recently starting to involve load time in search rankings, there has been a lot of talk about GZIP. Google Webmaster Tools exclaims "Compressing the following resources with gzip could reduce their transfer size by XKB:". Many people listen to this, and go out looking for a quick fix…
Read More / Comment »
“There Isn't an App For That” - Windows Apps I haven't been able to replace in Mac OS X
For a very long time I was a Windows guy, I was once a DOS guy. I switched nearly exclusively to Mac for my home use about 4 years ago. I’ve been very happy with it. Its stable, well engineered, and - my favorit…
Read More / Comment »
After much ado, Donat Studios is finally live!
There are a few things left to complete. Eventually setting up the documentation and public git repository for CorpusPHP will certainly take up a fair amount of time. I'm still not quite sure what to put in my portfolio, I was thinking of for the time…
Read More / Comment »
I don’t want anyone take this the wrong way. I love JSON. It is so much simpler to parse than XML, and is an all around exceptional way to represent data. I have one caveat though, and that is “JSON with Padding” or “JSONP” as it goes by.
Building this site I wanted to bring in images from my Flick…
Read More / Comment »