Draw More

When I see an opportunity for someone on my team to share an idea on one of our whiteboards, I get excited knowing that knowledge is going to be shared and lead to discussion.  I’ve found that both complex and simple topics benefit from visual representations.  It helps keep conversion structured, flowing, and is an interactive visual aide that several people can actively take part in.

In this article, I attempt to explain my experiences with flowcharts and diagrams.  At some point in the future, I would like to do a deep dive into a variety of diagrams.  My goal in this article is to convince developers or managers to diagram more to avoid risks and friction within teams and projects.

My Experience

The junior developers that I help train and mentor can be overwhelmed by a new job, new technologies, real world experiences, and actual business domain.  I find that explaining things in multiple formats is handy, as everyone learns differently and comprehends at different levels.  Diagraming has been my favorite tool to use when working with others, especially junior developers.  Diagramming allows us to break down topics into pieces that can individual explored and explained.  We’re able to ask and answer questions back and forth to make sure that concepts are understood so that the tasks they are working on make sense and can be seen as valuable to the organization.

Diagramming also comes in handy when working with a team of managers each with over 15 years’ experience at a business over 40 years old.  I’m still learning the processes and domain, and the managers can forget some things that go on in the business.   When a process is changing and technology is being used, I like to document the existing process as well as I can with the help of the other managers.  On a separate copy, I ask them to adjust (using different colors at least) the diagram to fit their intended objectives.

Luckily, by diagramming, we’ve simplified processes which were extremely helpful to understaffed departments.  Simplification came from removal of steps that didn’t have value as well as automation with technology.  In this organization, a few minutes of diagramming lead to happier staff members and higher quality of work.

Cold Fusion Update March 2019 and CFHTTP

Another work story!

Yesterday we upgraded to Upgrade 17 + 18 of Cold Fusion 11, and ended up with a ton of errors that evening while scheduled tasks were running.

We have a service using CFHTTP which requests data from another local service with a complex query string. The step after this was failing, as the result from the CFHTTP request was very odd.

We did some production level troubleshooting, and found that the result was actually a Connection Failure.

We tested the same thing on Development, and the result was Connection Failure. Invalid Characters provided.

After that, we checked the url string, and discovered that there are spaces in the url. This was it. Spaces in a CFHTTP url parameter are no longer allowed.

Early 2019 MS SQL and Laravel

I never imagined my first and second blog post would involve MS SQL.

At work we recently had another developer jump into our Laravel projects and setting up the development environment (Homestead) was a breeze. Getting MSSQL drivers installed, was a bit annoying.

We followed the directions line for line from the Microsoft PHP website for PHP, but were still experiencing the ‘driver not found’ error.

What ended up working for our Laravel 5.6 app, running on PHP 7.2, was downloading the compiled PHP extensions directly from Microsoft.

Here are the steps we followed…


#!/bin/sh

PHP_MSSQL_DRIVERS=Ubuntu18-7.2



# Download and extract phpmysql drivers

sudo wget “https://github.com/Microsoft/msphpsql/releases/download/v5.3.0/${PHP_MSSQL_DRIVERS}.tar” -O – | tar -x



# Change Directory

cd $PHP_MSSQL_DRIVERS



# Change owner/group

sudo chown root:root php_pdo_sqlsrv_72_nts.so

sudo chown root:root php_sqlsrv_72_nts.so

# Modify permissions

sudo chmod 644 php_pdo_sqlsrv_72_nts.so

sudo chmod 644 php_sqlsrv_72_nts.so



# Move files

sudo mv php_pdo_sqlsrv_72_nts.so /usr/lib/php/20170718

sudo mv php_sqlsrv_72_nts.so /usr/lib/php/20170718



# Cleanup

cd .. && sudo rm -rf $PHP_MSSQL_DRIVERS



# Create new .ini file

sudo touch /etc/php/7.2/mods-available/pdo_sqlsrv.ini

echo “extension=php_pdo_sqlsrv_72_nts.so” | sudo tee -a /etc/php/7.2/mods-available/pdo_sqlsrv.ini > /dev/null



# Create Symlinks

sudo ln -sfn /etc/php/7.2/mods-available/pdo_sqlsrv.ini /etc/php/7.2/cli/conf.d/20-pdo_sqlsrv.ini

sudo ln -sfn /etc/php/7.2/mods-available/pdo_sqlsrv.ini /etc/php/7.2/fpm/conf.d/20-pdo_sqlsrv.ini



# Enable PHP extension

echo “extension=php_sqlsrv_72_nts.so” | sudo tee -a /etc/php/7.2/cli/php.ini > /dev/null

echo “extension=php_sqlsrv_72_nts.so” | sudo tee -a /etc/php/7.2/fpm/php.ini > /dev/null



# Install Microsoft ODBC Driver 17 for SQL Server requirements

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add –

sudo sh -c ‘curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list’

# Update package lists

sudo apt-get update

# Install Microsoft ODBC Driver

yes Y | sudo ACCEPT_EULA=Y apt-get install msodbcsql17



# Restart services

sudo service php7.2-fpm restart

sudo service nginx restart

We found this from an issue on github, here.

Hope spreading the bash helps someone else!

Empty HTML Input field for time

Ugh. Here’s another one of those mySQL to SQL Server headaches while using Laravel 5.

One application I’m currently supporting has extremely simple schedule tracking for users.  My users table simply had days of the week, shift begin, and shift end.  See the related migration below.

Schema::table('users', function ($table) {
    $table->integer('monday')->default(0);
    $table->integer('tuesday')->default(0);
    $table->integer('wednesday')->default(0);
    $table->integer('thursday')->default(0);
    $table->integer('friday')->default(0);
    $table->integer('saturday')->default(0);
    $table->integer('sunday')->default(0);
    $table->time('shift_begin')->nullable();
    $table->time('shift_end')->nullable();
});

When I deployed the application, Laravel created the table with the datatype of time, with the precision of 7 decimals.  Below is what the bug looked like to the user after a modified user has previously been set to something like, 13:00:00 to 15:00:00 — both with 7 decimal places.

To fix the issue, I removed the precision from the time datatypes from shift_begin and shift_end.

Hope this helps someone else at some point.