Colin Robinson

How do you measure productivity?

How do you measure your productivity while writing code? Judging a program’s success by lines of code (LOC) is like judging how successful an airplane is by its weight. Consider a more modern approach from Agile development called Weighted Micro Function Points.

Permalinks for Hierarchical Custom Post Types

June 2013 update:

This plugin is not actively developed. If you want to use this plugin with the latest version of WordPress, you should reference the source code on github and hopefully that will help you develop your own solution. I’m also open to pull requests.
End of update

I wrote a WordPress plugin that lets you have a hierarchy of custom post types where the post types are different. This is the plugin here. I see a few people marked the plugin is broken, it works, but its impossible to figure out how without instructions. I don’t know why the descriptions and stuff I added don’t show up on the WordPress site, so I’ll provide instructions and support on this blog.

Its worth pointing out that I made this other developers. If you’re looking for a plug and play solution, this isn’t quite it. But if you’re a developer with the same problem, I’ve done the heavy lifting for you.

Continue reading “Permalinks for Hierarchical Custom Post Types” »

Setting up a LAMP for local development on Arch Linux

Just installed Arch Linux (after leaving Ubuntu due to Unity/GNOME 3). Now I need to setup my development environment. This should work for most distros, not just Arch. I want Apache, MySQL, PHP, phpMyAdmin, and SSL. Because its easy and I’m lazy, we’re going to setting up XAMPP. As always, first reference the wiki (Xampp – ArchWiki).

The steps break down like this:

1) Download the latest version from here.

2) Extract and move to /opt/

# tar xvfz xampp-linux-*.tar.gz -C /opt

3) Set passwords for MySQL and stuff

# sudo /opt/lampp/lampp security

4) Only listen for local connections
– Open /opt/lampp/etc/httpd.conf
– Change “Listen 80” to “Listen 127.0.0.1:80”

You could stop here, but I’m going to make a virtual host (with SSL).

Continue reading “Setting up a LAMP for local development on Arch Linux” »

Quick CSS3 Fade Effect

Very simple fade effect for images that uses only CSS.

.box_transition {
  -webkit-transition: all 0.3s ease-out;  /* Saf3.2+, Chrome */
     -moz-transition: all 0.3s ease-out;  /* FF4+ */
      -ms-transition: all 0.3s ease-out;  /* IE10? */
       -o-transition: all 0.3s ease-out;  /* Opera 10.5+ */
          transition: all 0.3s ease-out;  
}

Demo

LESS: The dynamic stylesheet language

Wow, just wow. Imagine if you could use variables in CSS… now you can.

Here is the LESS website. The proposed method of using LESS is to write a style.less file and then include less.js which uses javascript to render your stylesheet dynamically. I really don’t like the idea of having to load an extra JS file and then generating the stylesheet on the fly. Talk about unnecessary overhead. But the LESS website loads quickly, even on my phone, so I guess the results speak for themselves. Visiting the page with javascript turned off was disappointing, but not unexpected. Thankfully they also made a command line tool that you can use to compile a .less file into a .css one. Use the compiler for production releases and the JS framework for prototyping. I’ll definitely being using LESS in my next project.

Continue reading “LESS: The dynamic stylesheet language” »

Unable to access phpMyAdmin

Quick entry today. I installed a LAMP on Ubuntu and when I accessed http://localhost/ on my browser it said “It Works” but when I tried to access http://localhost/phpMyAdmin/ I got a 404. The fix was simple, for some reason the phpMyAdmin config file wasn’t being loaded so I did a

sudo nano /etc/apache2/apache2.conf

then went to the end of the file (ctrl+w+v) and added the line

Include /etc/phpmyadmin/apache.conf

All good. Hopefully this helps someone.

,

How to install Eclipse 3.7 on Ubuntu 11.04

The Eclipse packages in Ubuntu are are very out of date. The latest version in the Ubuntu repos is 3.5.2 where as the latest version of Eclipse is 3.7. I’m posting this because Ubuntu 11.04 uses the new Unity desktop which uses overlay-scrollbars (scrolls bars that are hidden until you hover over them). For some reason Eclipse 5.3.2 doesn’t like to play nice with the overlay scrollbars, and I’d rather use the newest version anyways. With Eclipse, you can just download the tar.gz file from eclipse.org and run it no problem, but I like set things up in a cleaner fashion, so here’s how I did it.
Continue reading “How to install Eclipse 3.7 on Ubuntu 11.04” »

, ,

IE7… time to say goodbye

WordPress 3.2 was released July 4th 2011 and officially marked the end of WordPress support for IE6. Hooray! Now the crosshairs have landed on IE7 with WP 3.3 looking to cut support for Internet Explorer 7. To put things in perspective, IE6 was released when I was 11… and we’re finally starting to drop support for it. Luckily we’ve been upgrading the SU computer labs to Windows 7. Last summer they were still all running Windows XP, also released when I was 11…

I think its fair to assume that when the University stops supporting Windows XP we can stop worrying about it. See the thing is… wait for it… IE7 can’t run on Windows 7! Internet Explorer 7 makes up 7% of web browsers usage. Come August 1st 2011 Google will officially stop supporting IE7. The death of IE7 might come sooner then you think!

Next posts