So, as I mentioned in my last post, things have been going well at 50onRed. I am now working full-time as a CMS (read ‘WordPress’) developer for the content team. I manage three viral content sites, and the majority of my work is diving into depths of WordPress.
The WordPress database is not as scary as it looks.
A lot of my early mistakes were based on misunderstandings of what should be stored in the database, what should be hard-coded in the theme, and what really belongs in a plug-in. The database scared me at first. So many tables, so many relationships. Where the hell are these damn widget settings stored?! Ugh, I just spent three hours hard-coding an ugly hack when all I had to do was change one setting in the admin panel! Aside from finally learning what is what in the database, I’ve also learned much about the separation of concerns in a WordPress install (more on that in a future blog post).
There ARE tools for developing WordPress.
Yes there are, and they have changed my life (I little over the top, I know)! The biggest life changer was Varying Vagrant Vagrants (a.k.a VVV). Vagrant was a tool I had learned to use while developing in Python, and I had grown comfortable having this nice little web server in my computer, separate from everything else. Did I really want to go back to putting things in
/var/www, and having my WP databases mixed in with everything else on my local MySQL install? It just felt wrong at this point. VVV is awesome in that it provisions everything for you and has a lot of options and configuration choices. It is made even better with it’s companion, Variable VVV (or VV, confused yet?), which has automated scripts for quickly setting up new WordPress installs within vagrant.
PHP is powerful
Sure, it has been around the block, but there is something to be said for a language that is powering 80% of the web. One big lesson I have learned in PHP to take an object-oriented approach in writing my code. Something that threw me off with PHP at first was polluting the global namespace. I soon learned to prefix all of my functions with a namespace, but in my opinion, it is ugly and makes code hard to read. I recently took the odd collection of functions and action hooks, all awkwardly prefix-namespaced, and moved them into methods of a singleton class. Much cleaner!
Of course, there are other lessons too: I’ve had the chance to manage a multi-site network, setup custom rewrite rules, and integrated with Facebook, Instagram, and Jazz (formerly Resumator) APIs to name a few more. And there are more lessons to be learned as well. WP-CLI? Yes, a useful tool I need to learn Unit Testing? It’s on my to-do list, I swear! SASS/componentizing my CSS (I’m embarrassed to say that the LOC for my CSS file has five digits. Yikes!) Better get on that stuff. Thanks for reading!