Why Using Vim Will Improve Productivity

I’ve always been a casual VI/VIM user, I cut my teeth on FreeBSD as a server operating system and it was a guarantee that it would be installed. I learnt the basics of navigating around and editing and I did okay updating configuration files and paging through log files. I never adopted it as an editing tool, in fact up until recently I wrote off editing platforms that didn’t offer the power that a fully integrated IDE brings.

Read more

Using Alternative Html Template Drupal 7

I’ll start this off with a quick caveat that this is something really simple; that if you’re accustomed to Drupal then you’ll think, “of course, you don’t need to blog this”. However being fairly new to working with Drupal, this caught me out for too long, so if this helps just one other person I’ll be happy! The scenario was a fairly simple one, I have a page that isn’t powered directly by any data in the system but a MENU_CALLBACK function that needs to output a custom HTML template to integrate a popup with no header, footer and specifically no Drupal javascript.

Read more

Leveraging Yii! 2 Controller Actions and Behaviours

It all started so simple, a basic competition mechanic quickly became two different mechanics with more variations in the future. It could have quickly became a mess of code, multiple controllers each supporting different mechanics and with shared code being copied and pasted. Very easy to go down that road, especially when the time scales are short. A little bit of thinking and a look at what is available in the Yii framework soon led us away from this route.

Read more

Making Your Search Forms Keep State

We roll out so many CRUD (Create Read Update Delete) pages in the course of our projects and life for that matter. And so often there’s a list or grid view for all the existing entries and of course, there’s the obligatory search form at the top. How this should behave is probably up for debate but in my opinion the best way is that while you’re in that section of the site the search data should remain.

Read more

Custom Yii! Url Rules

Recently I had the requirement to have a route that was powered by the database, the Yii docs cover this, but having the create and parse run at the same point was problematic. The situation was that the route was just a controller and an action with search form parameters, of course the route parsed to createUrl() would be just “controller/action”; there was a normal “/” rule as well. If I wanted the createUrl() method to return the database powered slugs then the custom url rule would need to be above the generic rule.

Read more

Holidays and Open Source

I noticed over Christmas that open source projects seem to get work done when the developers are not at work. This makes perfect sense but I’d not noticed it really until now, two projects that I use both got updates over the holidays. K9 Mail, a mail client for Android, got updated, bugs fixed and features added that I never new I was missing. The new feature to go to the next message when you delete is nice though, thanks for that K9 team.

Read more

Site Development

Well here we go then! My site has languished with no love nor attention for many years. To be honest I had very little use for it, nor any desire to spend time working on it. Now, however, it’s time it became something more than it was, for a start, my recent review at work said that I had to start blogging on tech related topics, so I had to get a blogging platform.

Read more
About Me

Developer, musician and gamer; I love all three and have time for one. It's our work that proves our worth, not our words!

Senior developer at Tonik Energy