Open post
Keeping it Stupid Simple

Keep It Stupid Simple

A few months back, I struggled with finding an adequate ticketing system that tracked everything I needed to do in order to run Mad City Coders efficiently and ensure my clients weren’t being left to wonder what happened with their requests. I like to think I have a good memory, but I knew in order to provide better customer service for my clients, I needed to start tracking this stuff.

It also came at a time when my business was growing. I was developing 3 new websites, while still being contracted by my largest client on a weekly basis. Things were heating up and I didn’t want to let anything slip by, so I knew I needed a “ticketing” system to track everything.

At Full Compass Systems, we leverage RT (Request Tracker) to track all of our work. Out of the box, it’s a pretty simple and robust solution and I wanted to implement it for MCC. To keep costs low, I leveraged Docker and loaded up the environment locally, and started adding my tasks.

Everything was working great…

…until I lost everything…

Docker somehow lost the data I was using and I had to rebuild it. Not a huge problem as I was just getting started and didn’t have much in there. Maybe a dozen tasks or so. I re-entered all of my tasks and proceeded to move forward.

I lost everything again the next week.

Frustrated, I realized I was trying to track these tasks leveraging a very complicated setup that someone who needed to track a task wouldn’t normally go through the hoops of setting up. I then started to think about what I really needed.

  • A simple way to track was needed to be worked on by when
  • Log of completed tasks to report back to clients on work completed for the month

Enter Google Sheets.

I decided to go convert everything to a simple Google Sheet document. HOLY SMOKES! It was so simple! Then I started laughing and asked these questions:

  • Why was I trying to make it so complicated?
  • Why didn’t I start here to begin with?
  • Are there other things I am doing that are overly complicated that doesn’t need to be?

Keeping things simple can greatly increase your productivity and decrease your level of frustration. “Simple and Clean” is now my new secondary motto, right after “Keep Moving Forward!”

Open post

Dynamically Declaring PHP Variables

I faced an interesting problem today. I needed to find a way to dynamically generate a variable name based on how many items found in an array.

I was building a multi-threaded curl request application that could CURL x amount of URLs to y amount of domains by z iterations. My application needed to be flexible enough to take in a variable amount of URLs or domains and then add them to the multi-threader…but how do I accomplish that when PHP variables can’t be declared like:

$x$i = 123; // this throws an error in php

In PHP you can dynamically declare your variables by doing this:

$a = 1;
${'word' . $a} = 'hi'; // sets $word1 = 'hi'

Another way of looking at it:

$urls = [url1, url2, url3, ...];
$domains = [domain1, domain2, domain3, ...];

for ($i=0; $i<=count($urls); $i++) {
    foreach($domains as $domain) {
        ${'path' . $i} = $domain . $urls[$i];
    }
}

// sets $path1 = domain1/url1;
// sets $path2 = domain2/url1;
// sets $path3 = domain3/url1;
// sets $path4 = domain4/url1;
// and so on...
Open post
Backup your CMS today!

Backup your stuff!

Why do I need to backup my website?

It’s 7:00 am in the morning and you decide to power up your laptop and check out the latest activity on your website. You punch the URL into the browser and nothing. Your site is gone. Worse, you stumble across a website that doesn’t even look like yours. It’s been hacked and now your phone starts ringing off the hook because customers can’t access the things they need to off of your website. What do you do? If you have a backup of your website, breath! With a backup, you can safely get your site up and be running in no time, provided you grabbed the right files and database tables. But how do you know if you backed your website up properly?

No worries, you can safely get your site up and be running in no time, provided you grabbed the right files and database tables. But did you? How can you be sure you really have everything needed to restore your website if a catastrophic event occurred?

Hopefully, we can help make this process an incredibly easy and painless one for you.

Get the tools!

If you are not already backing up your WordPress or Joomla website, you can do so at no cost to you.

Head on over to Akeeba and download the appropriate plugin/component for your CMS. Akeeba is by far one of the best backup/restore/migrate site plugins I’ve ever seen, and I’ve tested quite a few. For being free this thing is loaded with features!

  • Include/Exclude Files
  • Include/Exclude Directories
  • Include/Exclude Database tables
  • Create profiles to allow different types of backups.
    • Example: Just backup the database or files.
  • On-demand backups
  • Simple site migration with Akeeba Kickstart

Ok, so how often should I backup my website?

That’s a great question! If your site is not generating a lot of new content and you only push out a new post once per month, then back it up on a monthly basis. On the flip, if you are pushing out new content daily, I highly recommend using this method:

  1. Before updating or installing any plugins, backup your website.
  2. Before posting any new content, backup.
  3. After updating or installing any plugins, backup.
  4. After posting any new content, backup.

Why so much!?

If you don’t backup your website before you update or install new plugins or publish a new post, and something goes drastically wrong, you have nothing to fall back on. It’s always a good idea to have an insurance policy on hand for when something is about to hit the fan. If it doesn’t break, perfect! Nothing loss. If it does, you will be glad you spent the extra time getting that backup.

If you don’t backup your website after you update the site and push out new content you risk losing those changes if someone hacks in and really messes up the site.

Ok, wouldn’t it make more sense to hire someone to do this for me?

Yes, and no.

Hiring someone to do this cost money. If you are strapped for cash, you can do this yourself. It just takes time and dedication on your behalf to implement and maintain this.

If you don’t have the time or don’t trust yourself enough with this process, please contact us today and we will be glad to sit down with you and discuss which Maintenance Plan would work best to meet your needs. We’ve successfully backed up, restored, and migrated hundreds of sites. You will be in good hands.

Best of luck and BACKUP!