PHPNews

SMS admin in 8 lines of code

Written by Jason McCreary - Published on Jason McCreary
Aggregated on Wednesday September 20, 2017 - Permalink

I’m passionate about the products I build. But I try to balance my time between them. This can be difficult with a SaaS product. Especially a paid SaaS product like Laravel Shift . You don’t want to miss out on revenue. While Shift is a fully automated service, there are times where human intervention is required. For example, if a customer uses an alternative form of payment or a Git related …

Continue reading »


Committing to the wrong branch

Written by Jason McCreary - Published on Jason McCreary
Aggregated on Tuesday September 5, 2017 - Permalink

Lately CodeRabbi has been tweeting some Git aliases. We all know where I stand on aliases . Be that as it may, his recent tweet received a lot of replies proposing different solutions. This contributes to the steep learning curve with Git - what’s the proper way to do something? I try to address in Getting Git by showing different ways Git commands may be used. In this case, an …

Continue reading »


References from "Writing Clean Code"

Written by Jason McCreary - Published on Jason McCreary
Aggregated on Thursday August 24, 2017 - Permalink

I held my first of a series of Workshops by JMac yesterday on Writing Clean Code . I plan to edit and release a recording of the workshop over the weekend. In the meantime, I wanted to share some of the references I made during the workshop. Implementation Patterns by Kent Beck Filled with principles and practices focused on improving code readability. The first few chapters …

Continue reading »


Writing Clean Code

Written by Jason McCreary - Published on Jason McCreary
Aggregated on Monday August 14, 2017 - Permalink

I recently started a new job. With every new job comes a new codebase. This is probably my twentieth job. So I’ve seen a lot of codebases. Unfortunately they all suffer from the same fundamental issue - inconsistency . Likely the result of years of code patching, large teams, changing hands, or all of the above. This creates a problem because we read code far more than we write code . As …

Continue reading »


You changed the code, you didn't refactor the code.

Written by Jason McCreary - Published on Jason McCreary
Aggregated on Wednesday July 5, 2017 - Permalink

There was a good discussion on Twitter yesterday regarding a code contribution to the Laravel framework . It ended with some good questions about the distinctions between “refactoring” vs “changing” code. While I want to focus on these distinctions, let’s first focus on the code change. Here’s the original code: public static function before($subject, $search) { if …

Continue reading »


Starting an online workshop for Git

Written by Jason McCreary - Published on Jason McCreary
Aggregated on Wednesday July 5, 2017 - Permalink

A few years ago I helped a development team switch from SVN to Git. I was responsible for converting over 100 repositories to Git, establishing a workflow, and training the team. The first two were actually the easiest. The Shrek blog post and svn2git helped convert the repositories and for 99% of projects GitHub flow (or master/feature) is the workflow to follow. The third task - …

Continue reading »