One thing that has recently puzzled me with my discoveries of the Yii PHP framework is to do with how authentication rules work. (In particular RBAC)

I have been recently working on a big project for work that is quite complex with quite a few different systems that are all…

Vancouver is an amazing city. So alive and vibrant. It has an arty feel to it. Its bigger than Adelaide but the main shopping areas felt emptier and less alive compared to say Rundle Mall in Adelaide.

I spent most of my time in Granville St in the Samesun backpackers…

I am currently really enjoying working at Bigwig wired in Adelaide doing web development for them. I really enjoy working with a team of designers and then turning the designs into reality and integrating them into CMS’ for clients.

I have very quickly accelerated my knowledge of css, and JavaScript…

I am currently working on a website that requires some scrollable elements on it. The design specification is to do away with the scroll bars to allow for a better more simplistic design. Now I remember this being done in the past in flash, but I wasn’t going to be…

Recently while working on a particular project we had some strange errors that came up. In the usual php like way, the error messages where not very helpful and didn’t allude to what the actual problem was. Have you seen an error like this before?

**Headers Already Sent on line 392


Invalid argument supplied for foreach()

Well, this handy functionality that I discovered in php made my life easier.

var_dump(debug_backtrace()); die;

I placed this right before the code that was complaining, and it allowed me to see where this function was being called from. I was then quickly able to fix the problem and be on my merry way.

Originally published at

I had a bright idea for an improvement for the app I am currently working on. I have a Rails model that has only 2 rows in the database and the data is never changed, it has quite a lot of relationships and is used quite extensively. My idea was to remove the database out of the equasion and create a Model that would be entirely self dependent. Here I will show you my methods of maddness:

def MyModel include ActiveModel::Validations include ActiveModel::Conversion extend ActiveModel::Naming def self.attr_accessor(*vars) @attributes ||= [] @attributes.concat( vars ) super end def self.attributes @attributes end def initialize(attributes={}) attributes && attributes.each do |name, value| send("#{name}=", value) if respond_to? name.to_sym end end def persisted? false end def self.inspect "#<#{ self.to_s} #{ self.attributes.collect{ |e| ":#{ e }" }.join(', ') }>" end end

Originally published at

Kieran Andrews

I enjoy building software, making web applications, surfing, snowboarding and cooking!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store