Working from Home without Losing Your Mind

I’ve been working from home for a little over two years, and adapting to this new work style has really been a challenge.  Honestly, I don’t think that working from home is always the easiest, or even the best, for everyone.  Before taking a remote position, it is definitely a good idea to consider some factors about your own personality and make sure that you have everything you need.

Creating A React Native App for iOS

React Native is a great JavaScript framework for creating cross-platform, native apps. With one single codebase you can support both Android and iOS. A fellow PHP developer created React and it’s sidekick React Native to help make better front-end software, so let’s look at how to create a React Native application, focusing on iOS (but that is completely possible to run on Android as well)!

Implementing Abstract Classes and Interfaces with Traits

There are some very helpful ways to organize classes and objects in PHP. Interfaces, Traits, and Abstract Classes can work together to make code that follows the rules of abstraction. Using these OOP features in PHP allows us to create code that is easy to extend and maintain, saving time and money down the road.  Let’s look at what these structures are as well as how and when abstract classes, traits, and interfaces can be useful in Object Oriented PHP.

Storing Passwords the Right Way

How should passwords be stored? The short answer is: DON’T! I see countless posts on reddit and around the web from people who are trying to figure out how to use PHP’s “new” password functions.  These new functions are awesome in that they have finally made it so that those who are not security specialists can start managing passwords the right way.  PHP’s password functions do things the right way and give us a means by which to ensure our sites can continue to stay secure.

Generators in the Real World

Generators are one of the coolest things in modern PHP! They were introduced in PHP v5.5 and expanded even more in PHP 7.  I’ve read a lot about concurrency and how many event loops utilize these generators to interrupt code to do a little bit of everything at (seemingly) the same time.  However, this is not the most useful point of generators in typical PHP applications.  Let’s take a look at a couple ways that Generators can make life easier in typical, synchronous, PHP applications.

Living with Legacy Code

Chances are you have some legacy code that you have to deal with.  If not, then I’m guessing you haven’t been programming very long and are doing everything on your own.  Legacy code is old code – it uses older technologies, generally has some technical debt, and takes longer to modify than packages you create from scratch.  Since we all deal with this, but to some varying degree, I’m going to approach the topic as if you are coming into a project that may not be your own and is rather old and clunky!

Creating a Composer Library with PHPUnit and TDD

I recently decided to create a library that could handle asynchronous SQL queries and realized in the process that, while I am very comfortable using composer to install other people’s libraries I actually had no clue how to make and publish my own library!  I’m by far no expert on this, but let’s take a look at how I went about getting it set up and testing things.

Recursive Code to Parse Recursive Form Data

Recursive code can be very confusing and frustrating at first, but is a necessity if you are trying to accomplish certain tasks in an expandable, decoupled way.  I recently needed to make a function that could build a multi-dimensional array from a form.  The problem is that the depth of the array is completely fluid as the form is made by nested “rules” which play off each other, allowing the user to build a very complex rule set.  Without going into the details of of the proprietary code for my company, let’s take a look at the technique I chose and …

Resources I Love

There are a lot of great PHP resources out there.  I wanted to take a few minutes to simply put my favorites out there and allow this to be a place you can find good resources – both mine and other users! Add your favorites to the comments section below as a service to your fellow coders! Websites/Blogs: PHP Weekly.  This is a great email service that sends out an email every Thursday that has announcements and helpful articles.  It’s not its own blog per se, but more of a place to find great blog articles. I recommend this as …