Programming Stupidity: Database Schema

I’m often working on little personal projects alongside the projects for work. Personal projects though, gives me a chance to try new things, experiment, learn new techs, etc. I’m also much less careful so end up doing really stupid things (in hindsight). So I thought it’ll be nice to share some of those… adventures. Keep in mind, I’m no pro… so if you know of better ways of doing something, let me know in the comments!

Working on a trouble ticket system the other day, calling it Tick-IT ha! Get it????? From experience, whenever I write projects that uses a database I always end up adding new features that require modifications to the table schema. The changes usually involves one of two options: 1) adding a new table that shares a key with the existing tables in the best case 2) requiring the adding of a new column which means migrating all existing data in the table into a temporary table, deleting the original, then creating the new table, moving the data from the temp table to the newly created one. A total pain in the fucking ass.

In an attempt to be smart, I decided that I would only have 3 columns in the tickets table which holds all ticket information: ID (unique ticket ID), ticket number, and ticket data (JSON blob that stores all other information on the ticket). Brilliant right? Need to add new fields? Just add to the JSON object! Nope… See, the problem that I didn’t think about was the JSON data isn’t searchable using SQL. It would require a full text search. So… Not so smart after all. 

Till next time…

It’s a New Year, And We’re Back!

Disclaimer: I wrote all this on my phone while “shopping”. Please excuse any misspellings or grammar problems.

It’s a new year and a new start for the server that runs The process took far FAR longer than I originally expected. This was because I was learning while doing. So what changed?

First off, no longer runs on bare bones. What I mean is that the server that hosts the site is now a VM. The physical server is the VM host, it runs Debian. The hypervisor as you can probably guess is KVM. The VM that runs the site is running Ubuntu still because I didn’t want any distro changes to affect my scripts, custom web apps, etc. The process of getting all this setup was actually easier than expected. Only took a few days to get it all configured and ready for deployment. 

What really took a long time was getting the VM setup. I wanted to learn configuration management using either Puppet or Ansible. Puppet was the obvious choice being that it was so popular, but as I quickly learned it wasn’t the right solution for me. The time spent learning Puppet though (about a week) was worth it for sure. The biggest problem with learning something new while attempting to apply it to a “production” system at the same time is you’re almost guaranteed to make mistakes or do things that aren’t exactly “best practices” first time through. And that’s exactly what happened. 

A few days ago, everything was set and all tests were passing. I switched the DNS back thinking it was time to bring things back to normal. I was wrong… First I wanted Ansible to handle everything including restoring files (like the pics of the beautiful ladies ;)). While writing the playbook for that, I decided to update everything to follow “best practices” which I learned the same day. Finally late into New Year’s Eve, I had everything updated and finished. Ran one more test to make sure I didn’t accidentally screw something up (I did) before going to sleep. Checked in the morning and well, I made a couple mistakes in regards to restoring of files. Simple fixes but still annoying. 

As you can see today though, everything is fully operational and all managed by Ansible. Best part is if I ever needed to rebuild its just a few steps and less than 30 mins to do. There’s still a couple things to do, I don’t have VM backups setup yet for instance, but all the major work is finished. Quite happy with the setup right now but if you know me you’ll know I like to keep changing things. I get bored real easy 🙂

Till next time… 

EDIT: Fixed a spelling error.

Scheduled Downtime

I’m a tinkerer. Never one to leave well enough alone. So sometime this month, I’ll be rebuilding the server again for at least a couple days. I’m SURE you all have questions!

Why rebuild again?! Because I want to learn new shit.

What are you learning?! Uh… quite a few things 🙂

What’s changing?! Nothing that you’ll notice dear reader… maybe…

Are you going to fuck up and end up losing all these pics of beautiful models?! No… hopefully not. Assuming I remember to back everything up first :p

Why don’t you have backups?! I’m lazy…

Will the new rebuild include a backup system?! Hell YES!

When will this happen?! When I’m not lazy. Currently aiming for next week, but we’ll see.

When will you post new pics of pretty ladies?! Soon after the rebuild… If I’m not lazy 🙂

Don’t know if anyone even looks at this blog now but in case there is, you’ll know. 

Photo Shoot w/Roxxana Popescu 31/08/15

Did a photo shoot with the lovely Roxxana on Monday. It was a pretty simple shoot, some head shots, some full body. Had a good time and got some good images which I will be posting in the coming week. For now though, here are some behind the scenes pictures.

Roxxana Popescu Photo Shoot
Reviewing pictures on the back of the camera aka chimping :p
Roxxana Popescu Photo Shoot

Roxxana Popescu Photo Shoot


Roxxana Popescu Photo Shoot
Come to me! Haha, I don’t remember what we were doing when this picture was taken but it was fun.

Stay tuned for the final images. Till next time…


Photo Shoot Flash Back 3

One of my very first photo shoots and first beach shoot was an interesting experience. At the time the only lighting gear I really had was a Canon 430EXII with omnibounce and a reflector. The flash was triggered via a Canon 580EXII on camera.

Behind the Scenes from Beach Shoot
Checking pictures. Beach shoot.
Behind the Scenes from Beach Shoot
Wading into the water to get pictures out in the rocks.
Behind the Scenes from Beach Shoot
This shot was taken by Ron Fu who was my assistant for this shoot.

And one of the final shots from the shoot:

Beach Shoot Final
Final image.

Till next time…