MySQL Workbench
MySQL Workbench

My love affair with MySQL has spanned over a decade.  I wondered what the repercussions of Oracle buying MySQL would be, still not sure.  There are conspiracies out there, like this article which helps fuel the fire of skepticism.  It’s a little scary because MySQL was supposed to be the open-source solution to the corporate, Microsoft-style domination of administrating, managing, housing, and operating essential databases to keep little companies and their websites competitive and not be beholden to the corporate behemoths and their licensing and restrictions.  After all, a database is nothing more than a collection of a series of records that in their simplest forms are nothing but lines of data one could type and duplicate in a simple text editor, right?  It’s what the engine and software can do to access, manipulate, and assemble with the data that makes the databases powerful, though.  That’s where databases are separated from simple storage facilities of bits, bytes and files.

Try before you buy — oh, yeah, it’s still completely free, forget the “buy” part! 🙂

 

First, if you have not been familiarized with MySQL Workbench, it is a pretty good GUI tool that allows you to help express in visual terms the visual scope and relationships between database tables.  As George Carlin said, “everyone needs a place for their stuff.”  Data in databases are no exception.  I suggest going to Oracle’s MySQL site and download this tool to try it out.  It’s a great cross-over tool to help set up databases and map them so laymen in your organization, people not verse in database and web systems, to be able to actively participate in the design, creation, implementation, maintenance, and operation of your company’s databases.  It helps document and visually map out the lifeblood of your information systems and website.  That’s a very powerful thing to bridge the gap between the technical and management.  It’s imperative for companies to have people who understand how their data and systems all work together, the better the documentation and the more clear the relationships are visually for humans to interpret, the better off your company will be.

You will be able to quickly navigate around this simple tool by creating an EER diagram (Enhanced Entity Relationship).  Click the icon that looks like a table, then click on the grid and it will place a table container on the grid, expand it with the handles to accommodate the fields, which you can add and edit to by double clicking a table.  A simple list will appear below that will allow you to add any type of data for each field.  Handling relationships, including adding foreign keys (fk) are almost automatic with an eyedropper.  Hover over the relationship lines that bind any two tables and the fields that reference each other will highlight — a quick way to help “follow the money” sort of speak, by following the string of related data.  The visual cues and layout in a flowchart will inevitably help you build a much cleaner, efficient, and effective database for any system of almost any scope.  Observe how clean and easy it is to follow once I added another table as I began to layout the crowd-funding and social media site for entrepreneurs called “Prolific Futility”:

MySQL Workbench and table relationships
MySQL Workbench and table relationships

 MySQL Workbench isn’t just a thin design tool

Oh no, this actually is a very powerful interface to your databases.  You can do so much, we haven’t scratched the surface, but let’s say you design and critique then update your database schema and you’re convinced you’re ready for prime time to deploy to a development server for testing.  All you have to do is go to “Database” choose “Manage Connections” and set up your database credentials and you can “Forward Engineer” what you’ve designed to your database.  Be sure you open up your IP address to be allowed to access the database, this is a common issue.  Once you’ve connected to your database with “Test Connection” you are only seconds away from creating your entire base from your flow chart models!  MySQL Workbench is easy to use, it’s intuitive, and powerful.  I highly recommend exploring this tool and add it into your mix, especially if you are working a on a new project where there is uncertainty as to how all the data, like user accounts and information that is collected that is related to users that needs to be stored and later be effectively and securely retrieved.  It has been quite a help in promoting good database design principles, the foundation for any company’s data infrastructure both on the web and in intranet environments.


Sometimes your server will get locked up before completing an update task, activating a new theme, or installing a new plug-in.  What happens is WordPress temporarily will place your site in “Maintenance Mode”.  If you go onto a WordPress website that shows a page with the message “Briefly unavailable for schedule maintenance.  Check back in a minute.”  This is what is happening.

Occasionally, you won’t be able to get out of maintenance mode.  If this happens, your site won’t come back up.  First, remember the last task you were working on, chances are it did not update or install properly so you’ll have to remove or repeat the task.  Second, go to your WordPress root folder through FTP and delete the file “.maintenance”.  This will get your site out of maintenance mode.


In your .htaccess file, replace “prolificfutility.com” with your own website.

The second set of rewrite conditions will allow search engines to crawl your site but redirect other requests from external sites to a single image or feel free to redirect them to another site!


<IfModule mod_rewrite.c>

#  Force www in website address
RewriteCond %{HTTP_HOST} ^prolificfutility.com
RewriteRule (.*) http://www.prolificfutility.com/\ [R=301,L]

# Prevent hotlinking and bandwidth stealing:
RewriteCond %{HTTP_REFERER} !^http://([^.]+.)?prolificfutility.com[NC]
RewriteCond %{HTTP_REFERER} !google. [NC]
RewriteCond %{HTTP_REFERER} !search?q=cache [NC]
RewriteCond %{HTTP_REFERER} !msn. [NC]
RewriteCond %{HTTP_REFERER} !yahoo. [NC]
RewriteCond %{REQUEST_URI} !^/hotlink.gif$

RewriteRule .(gif|jpg|png)$ /hotlink.gif [NC,L]

</IfModule>

 


I taught web design and 3D animation at Southwest Florida College for six years, sometimes part-time then full-time. With a decade of television, video and ad agency experience, I joined their marketing department and became their media strategist/media buyer but still had the opportunity to teach classes. It was an amazing experience. Often, the students challenged me and tested my knowledge. That was great because it puts pressure on the teacher to strive to know a lot more than the students. Having used most Adobe and Apple creative and production products on a professional level since 1995, there was almost nothing I hadn’t seen before. I was the go-to troubleshooting teacher who could help hundreds of students, many not even in my class, to find solutions to their unique challenges and problems. To make the job even more interesting, the student body at this career-oriented college was highly diversified in age, race, and income. The students taught me a lot, I was amazed at the creativity that surfaced and was proud I was part of inspiring them to express themselves often on a level that would help them get a job on a professional level.

Though I was probably just an average college instructor, I gained a lot of insight and learned so much about myself because of the diverse students and personalities I had to teach and mentor. They made me a better teacher, production artist, web professional, 3D animator, and a more patient person. It was a very satisfying job, you’re helping people who want to learn — they actually want to be there! Unlike high school where many teachers have to deal with the fact attendance in their class is often compulsory and there’s nothing worse than dealing with a teenager who didn’t like to be told to do anything, much less attend your course!

There is likely a school like Southwest Florida College in your area. I had students who were on their second or third careers. Often, you could sense the excitement that they were finally embarking on the a learning journey and career path that really aligned with their passions. If you are looking at changing your career, these kind of schools could be a great fit. Keep in mind that they have every incentive to make sure you are successful — that usually means that students who graduate get as much support, advice and assistance to get a job in the field they committed so much of their time and energy studying in.

If you are in the Greater Fort Myers area, I highly recommend looking into Southwest Florida College. Their website is at www.swfc.edu.


Your customer’s really happy with the latest website you deployed as their web developer.  One day, they contact you and complain the website is sluggish, it’s even timing out.

So you check the error logs and notice a few fatal errors, but those scripts were exceeding the timeout limit.  Probably because something else is slowing down the site.

So you check the “slow query MySQL logs” and find nothing.  One query three weeks ago — oh yeah, that was a test query for a report during dev.  What the heck is going on?!

What scripts were changed since it started acting sluggish?  You check the latest code commits in your Git repository (or SVN) and see they indeed had made quite a few changes and alterations to the code you had left them with.

Hmmmm, but the logs weren’t showing any “smoking guns”.  Chance are, during page load the order of certain resources have changed and things that could be loaded asynchronously are loading synchronously so one resource, like the JQuery library and a few JQuery plug-ins and perhaps a social widget are all loading synchronously on the page.  Of course, the order of resources being loaded matters, especially when one resource depends on the other, like JQuery.  You can’t load a JQuery plug-in or execute custom JQuery code without loading the JQuery library first.

So here are 3 basic rules that can help you get out of a jam quickly:

  1. Combine and minify as much CSS as possible and have it loaded after any meta-tags but before any other tags within the page’s <<head>> tag.
  2. Combine and minify your JS into two groups — synchronous and asynchronous.
      • Then have the JS scripts load as late as possible on the page, often just before the close <<html>> tag
  3. Lastly, check the images, very frequently customers will add new images and they won’t be optimized.
      • Combining images into a single images and “slicing” them with CSS is much more efficient.  Google “sprites” and while you’re at it, make sure you are optimizing your images by tailoring the format and compression for optimal display and load time.