Recent Blog Posts
Lighthouse - GraphQL with Laravel
Recently I been investigating using GraphQL over using REST. I have been using Laravel as my backend php server to serve JSON. It's pretty easy to setup and Laravel is great as a web framework. I decided to explore using GraphQL and found out there is something called Lighthouse that works with Laravel. This won't go through Laravel or GraphQL in depth, because each of those alone is very in depth, I'll just go through the basic setup of Lighthouse with Laravel which was pretty easy to setup. more ...
Posted on by Phonexay Singharatsavong
MySQL Index Hinting
Today we'll explore mysql index hinting. I've come across this a few times in my life programming. Mostly due to using a table with a lot of indexes that were created on it, especially in a team setting, where multiple developers added their own indexes. This will give the query optimizer issues on figuring out which indexes to use, so this can be helpful, but the overall and better solution is to clean up the indexes or make them more efficent, saving memory and space. Index hinting only works with 'SELECT' and 'UPDATE' query statements. more ...
Posted on by Phonexay Singharatsavong
PHP 7.2 Object Type Hinting
In PHP 7.2 we now have the ability to type hint an object. In previous versions of PHP we can type hint such things as a boolean, array, etc.... Having the ability to type hint is pretty useful if you are working on big teams this can be helpful with readability. more ...
Posted on by Phonexay Singharatsavong
MySql Storing Types as enum vs tinyint
When I first started using mysql, I was using the enum type by default to store strings that you knew what the values were ahead of time. Years later I would read about using tinyint stored in a relational table to store the string. There are pros and cons to each one. more ...
Posted on by Phonexay Singharatsavong
Git Merging Vs Rebasing
When I first started using git I would always merge the code with a: ``` git merge 'branch-to-be-merge' ``` However recently I discovered a second way by rebasing, which is ``` git rebase master ``` more ...
Posted on by Phonexay Singharatsavong
PHP Type Hinting
I have been programming in PHP for awhile, I started programming with PHP when it the version was 4.0 and now it's 7.2. One of the things that you didn't need to worry about to much in PHP was the types you passed to a function, versus a language like Java. Recently, I've been using type hinting more and more in PHP and have grown to like it. It was introduce in PHP 5.0, but has grown to allow more types. more ...
Posted on by Phonexay Singharatsavong
Remote Mob Programming
Starting a new position in February I was introduce to a new form of software development called Mob programming. I have worked on pair programming teams before and have spent most of my life working as the single programmer in mostly an agile environment. I didn't really know what to expect and term Mob can mean a lot of things, so far it has been an interesting ride. more ...
Posted on by Phonexay Singharatsavong
Using Shopify Webhooks
I recently was asked to go help on retrieving data from Shopify and I discovered Shopify had webhooks. They are simple to use and I have had to help on a few projects with them. more ...
Posted on by Phonexay Singharatsavong
Setting up PHP October CMS
PHP has been around for a long time and the battle for a CMS seems to fall into two camps, Wordpress(which is a blog, but people use it for CMS) and Drupal, there are a few others, but these two, especially wordpress account for a lot of the CMS. I have a few Wordpress sites I run, but a few months ago, I decided to look into what might be out there. more ...
Posted on by Phonexay Singharatsavong