Never miss a beat

Join my newsletter.

The Archives

Flutter routing inside of the Scaffold

Published: 8/11/2020

If you’re coming from React Native to Flutter, one of the first things you’ll likely ask is “How do I do routing?” First, I’d ask you to consider if you actually need routing. Instead, could you just have a global state that determines which screen to show? In most cases, probably. But if you want things to feel right when building Flutter for Web (or want decent deep linking support), you’ll probably want to build your flutter app with routing. Routing can easily be accomplished via the…

TypeScript Tuples

Published: 4/9/2020

TypeScript offers a plethora of types for developers to leverage, but some of the types may be ones that you’re unfamiliar with. Take the tuple, for example. JavaScript doesn’t have a concept of tuples , so figuring out how and when to use one might feel tricky. Thankfully, Tuples are pretty simple and are used by popular frameworks, like React. What is a tuple? Tuples allow you to express an array with a fixed number of elements of which each element may be of a different type. For example…

Arrow Functions in PHP 7.4+

Published: 3/31/2020

PHP is finally getting arrow functions (also known as Short Closures)! I know, I know. I’m just as excited as you are. Here’s everything you need to know about arrow functions in PHP. First, arrow functions are an approved RFC for PHP 7.4. If you’re using a version of PHP that’s lower than 7.4, you won’t be able to use arrow functions. Second, arrow functions can only contain one single expression. The goal with arrow functions ( as stated in the RFC ) is to help reduce verbosity and multi-line…

Building a simple URL Shortener in PHP with Laravel

Published: 3/12/2020

I’ve recorded a quick Youtube video for you! In this video, we walk through building a simple URL shortener (think bit.ly) in PHP with the Laravel framework. This originally started as part of my Laravel foundations course (link coming soon) but I felt that we could quickly get through an example on Youtube, too. In the course, we dive into things and go a bit slower to really get a grasp on how everything works, but this less than 30 minute video should get you started down the right path. If…

How to read from a file in PHP

Published: 3/9/2020

Reading from a file in PHP is an extremely common problem to solve. You may keep configuration variables in an environment file, or perhaps you pull in HTML from another file. Either way, you need your PHP code to read the contents of those files. Good news: It’s actually a fairly simple task to perform! What’s interesting is that there’s actually quite a few ways to read from a file in PHP. We’ll cover two common cases here and talk about why you’d use one over the other. Heads up: If…

What is Laravel's Homestead?

Published: 2/29/2020

Laravel is, as far as PHP frameworks go, extremely popular. In their guide, the Laravel community recommends you use Homestead as your local development environment. But what is Laravel’s homestead and why use it? Laravel’s Homestead Homestead is Laravel’s suggested development environment for building Laravel applications in PHP. Homestead is packaged as a vagrant box (a virtual machine) and is aimed to simply the initial setup of your Laravel project. Why use Homestead? Laravel actually has a…