Manage Git-driven Packages with Bower

Bower is a handy tool by Twitter that serves as a front-end package manager. It's based on node.js and compliments other related tool such as Grunt that became popular in the WordPress Core project itself. Bower uses Git to manage repositories, and given the popularity of GitHub (and other git-driven projects, for that matter) it makes the component management much easier. You've probably used Composer already, which is a dependency manager for PHP. There are various libraries that could be found in both repositories, but Composer is more of a backend-centric manager while Bower is mostly used for frontend libraries.… Continue Reading

The Low Barrier of WordPress

Coen Jacobs wrote a post recently, asking Is WordPress Too Easy? I was about to follow-up on that, but due to time constraints, my thoughts flew away, but I felt the urge to do a part 2 on that series, with some other thoughts. What is WordPress? No, I'm not going to define that as most people are already in the industry. But I keep getting various mixed signals from other people around me. The casual one that you've already heard is: "but WordPress is just a simple blogging platform". I'm fine with that and I have a few canned… Continue Reading

Is WordPress Always the Right Tool?

tl;dr readers: no, but yes :) Read below for more brainstorming. Last year most people around me who are not involved in the WordPress community kept saying: "WordPress is a simple blogging platform and wouldn't work for large projects". I gave a talk in April that shed some light on few of the largest platforms/sites available out there, based on WordPress. Now most folks are either still into the "simple blogging platform" thing, or "WordPress is too large for a simple site/blog", which is kinda not what I expected - transition that would skip a whole phase/branch among various people.… Continue Reading

Theme Reviews, Guidelines and Community

I've accidentally started a long discussion due to a small and fairly insignificant bug that turned out to be more than enough for several major theme authors, reviewers and theme lead devs to chime in and share their thoughts. I usually try to avoid those scenarios, but every now and then the tension needs to be released. These are my observations, thoughts and ideas based on my experience over the past 2.5 years with the theme directory. Theme Reviews in 2011-2012 I have joined the WPTRT in 2011, after doing a dozen reviews as a "candidate reviewer" before getting my… Continue Reading

My Paradox With The Switch Statement

Ever since high school, I have always been suspicious when it comes to the switch statement in programming. It is quite intuitive if you think about it, but in my opinion it has various limitations in some scenarios: it's error-prone by missing a break; clause here and there chaining cases isn't always intuitive to read, in addition to the break; thing different languages have different rules for switch - such as the allowed switch types for input variables (Java used to disallow strings at all), objects, and especially what could be put in each case There are a few more,… Continue Reading

Local Setup of Multisite on LAMP

I had some issues this month setting up locally several multisites on LAMP so I've decided to draft my complete flow for further use (and get other opinions on it as well). The sites were different in nature, some were running on Apache, others - on nginx, running on subdomain or subfolder-related structure. Placing the data and the database I place the WordPress folder in my server's DocumentRoot folder, such as /var/www or /opt/lampp/htdocs.  I'm also creating a database and importing the dump over there: [sql] CREATE DATABASE somedb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; [/sql] [bash] mysql -umydbuser -p --database=somedb… Continue Reading

Git and GitHub for SVN developers

My latest post on contribution tips I learned from scribu was mostly influenced by his work on GitHub on projects such as WP-CLI or wp-posts-to-posts, and his setup over there. I also had a few related contribution-related posts before than (and several more to come in the next few months). Ajay commented on one of them asking for some tips for migrating his work to GitHub (while he has numerous plugins on WordPress.org now). I'll post some of my favorite links I send to fellow colleagues starting with Git. My first SVN-revisioned work was in 2006 and I started working with Git… Continue Reading

Deployment Environment and Toolkit, and Automation

Mark Jaquith gave a great talk at WordCamp San Francisco called "Confident Commits, Delightful Deploys". It was quite helpful as many developers in the WordPress ecosystem are not used to setting up a proper environment for development, including: IDE, debugging and profiling tools, automatic server setup, proper version control toolkit, VM setup, browser testing services and so forth. Part of that was covered by Mark: Hearing that from the Don Draper of WordPress I would definitely give his tips a try (if you're not using them already). Don't forget to check few other talks on deeper engineering (toolkit or code-related) -… Continue Reading

On WordPress and Release Cycles

The annual State of the Word session by Matt covers the latest updates on the platform - usage, coming updates and new features from the past year and other valuable stats so that WordPress experts could see their place on the map and see if there are any business decisions to be taken for the next few months (or a year). The platform/application direction makes sense for the next level of growth for the WordPress platform. Matt had a great slide for the structure and architecture of WordPress as a framework for building various components and extend in the future: [tweet… Continue Reading

Wrong in many ways

I'm occasionally working on building plugin bridges or integrating some third party APIs on WordPress. Just as often I struggle with unmaintainable code. Seems like too many people have read the "How To Write Unmaintainable Code" article so I'd better elaborate on this one. Today I've been working on a project using a plugin for various WordPress components, one of them being a search form. I've always had a thing about search forms, as being too general as a concept and too vague at all - you will always get to the point that you need another field to search… Continue Reading