Posts

Building Your Cron Tasks Inside Your Application

PHP Logo At some point, it’s going to be necessary for you perform some scheduled tasks in your application. Here are three options for how to do this in PHP.

Read More

Link Post and Podcast Roundup: May 2018 Edition

Link Post Logo

May’s links.

Read More

Unintended Consequences

A generic picture

The other day one of my old clients contacted me because an application I had developed for them (5+ years ago) was slow. My first step was to download New Relic to their server but I found their configuration wasn’t supported anymore. I had to start building a footer that displayed page rendering information (makes me even happier to use New Relic in my other projects) and what I found shocked me.

They have a list of vendors which are then picked in various select elements through the site. When we originally created the system they had ~100 vendors. In the past five years they’ve entered 1,500+ vendors. Some pages had multiple (in one case 10+) vendor selects which caused the page to be 35 MB of just option elements and because everything was written using classes it caused 15,000+ classes to be instantiated and then used. I do love PHPs speed though, on my local machine this still didn’t take more than a second to generate and it was really only a problem when using the page through the Internet.

As programmers it’s impossible to tell how our systems will be used. When we originally created this system we used the information they had given us to create the best system we could for their budget. Even now I wouldn’t have tested their system with as many vendors as they’ve managed to enter but it’s important for us to build systems that scale.

My Experiment with a Vertical Monitor

My Experiment with a Vertical Monitor Header

The last time I rearranged my desk and decided I would try using one of my monitors vertically instead of horizontally. I’ve spent a year using it this way I thought I would talk about what I’ve liked and what I’ve disliked.

What my vertical monitor looks like]

Read More

Fixing "Instead of sudo/sudo_user, use become/become_user" Error

Fixing "Instead of sudo/sudo_user, use become/become_user" Error header

I’m working on updating an Ansible configuration that was originally developed using Ansible 1 and I’m now running under Ansible 2. When I did this I kept receiving the following error message:

Instead of sudo/sudo_user, use become/become_user and make sure become_method is ‘sudo’ (default). This feature will be removed in version 2.6. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

The trick to fix this is to change “sudo: yes” in the following:

- hosts: os_CentOS
  sudo: yes

to:

- hosts: os_CentOS
  become: yes
  become_user: root
  become_method: sudo

Running a Quality Online Book Group For Your Directs

Running a Quality Online Book Group For Your Directs

As I discussed in Let’s Invest in Ourselves For 2018, I think that reading is an important part of professional development. I’ve been having my directs read a book each quarter for the last several years and for the last year or so we’ve been reading the same book as a group. I wanted to share my lessons learned while we went through this process.

Read More

Fixing Vagrant Up Error that "laravel/homestead" could not be found

Fixing Vagrant Up Error that "laravel/homestead" could not be found

The other day when I was performing a vagrant up I received the following error:

Scotts-Air:laravelVsSymfony scottkeckwarren$ vagrant up
Bringing machine 'laravelvssymfony' up with 'virtualbox' provider...
==> laravelvssymfony: Box 'laravel/homestead' could not be found. Attempting to find and install...
    laravelvssymfony: Box Provider: virtualbox
    laravelvssymfony: Box Version: >= 5.2.0
The box 'laravel/homestead' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/laravel/homestead"]
Error: The requested URL returned error: 404 Not Found

The only trick to this was to update Vagrant to the current version. I’m hoping this will help someone else who runs into this problem.

Onward and Upward

Onward and Upward

This is some bittersweet news for me but as of Friday I’m no longer an employee of Zimco. I’m super proud of what we were able to create with STAGES and I’m glad to have been able to work with the amazing team there to create a really amazing product. It’s too bad its time is drawing to a close.

The good news is that I’ve been hired by Wellspring Lutheran Services to work on their WeCare Connect product that I built while I was at Zimco. I’m looking forward to working with the team there to improve the product. It’s been a great learned experience over these last few years and I’m sure it will continue to be.

Link Post and Podcast Roundup: April 2018 Edition

Link Post Logo

April’s links.

Read More

How I'm Implementing Robert Martin's Clean Code: A Handbook of Agile Software Craftsmanship

Implementing Robert Martin's Clean Code Header

As part of my Let’s Invest in Ourselves For 2017 post I said I wanted to read Clean Code: A Handbook of Agile Software Craftsmanship by Robert Martin. I had a hard time writing a post about what I learned in that book because it’s mostly just a laundry list of things you should (or shouldn’t) do in order to create easier to read code. I’m rereading it with the other programmers at work (at my suggestion) and I realized that there were a lot of things that I’m still not doing that could improve the quality of my code.

To that end I’ve started a new process. Every Friday, I’m going to pick 5 items from the book and place them on my monitor. Before I make a commit, I’m going to review all my changes and make sure any new code fits those items. The idea is that instead of trying to focus on 100 items all at once I’ll focus on 5 and then

I’m also posting these to Twitter with the hashtag #ImplementingCleanCode.

RSS

Join Our Mailing List!

View previous campaigns.

Top Posts

  1. Working With Soft Deletes in Laravel (By Example)
  2. Fixing CMake was unable to find a build program corresponding to "Unix Makefiles"
  3. Upgrading to Laravel 8.x
  4. Get The Count of the Number of Users in an AD Group
  5. Multiple Vagrant VMs in One Vagrantfile
  6. Fixing the "this is larger than GitHub's recommended maximum file size of 50.00 MB" error
  7. Changing the Directory Vagrant Stores the VMs In
  8. Accepting Android SDK Licenses From The OSX Command Line
  9. Fixing the 'Target class [config] does not exist' Error
  10. Using Rectangle to Manage MacOS Windows

subscribe via RSS

All content copyright This Programming Thing 2012 - 2021
Blogging about PHP, MySQL, Zend Framework, MySQL, Server Administration and Programming in general