Category Archive: Tech

Jun 25

Wrapper functions make programming easier.

One of the things I have come to learn with any programming language is that more often that not you will be making changes to code and a lot of the time this will be in multiple places. One of the Code Smells for Refactoring is repeated code and one method to fix this is …

Continue reading »

Apr 04

Javascript Dropdown

Back when i was working at UBC one site i had to develop wanted a dropdown box for selecting colour like that from another website. the method i did was to use a jquery addon which turned a select drop down into a div one just to add icons to the options, not to mention …

Continue reading »

Mar 23

Default Values for Argument Arrays

One of the nice things about arrays in programming is that they allow you to infinity increase the argument limit of a function when you are able to pass them. ie in PHP. if you tried to call the function without specifying the argument you’d get a warning and notice in PHP, in some stricter …

Continue reading »

Jan 22

Auto Submitting Checkboxes

Assume you have a couple of lists of checkboxes. generally at the end of the lists you would have a submit button to then post the data. but assume you have something like a search from. general web design suggests that things should be done with the minimum number of clicks1 The three-click rule or …

Continue reading »

Dec 26

Explode string in MySQL

If you know your PHP there is this nifty function called explode which allows you to turn an string into an array by splitting it. quite sure Javascript has a similar function called split which you call from a string like an object. Now if you wanted to do the same thing in MySQL you’d …

Continue reading »

Dec 26

MySQL Number Sequence Generator

So we know that we can use the following to generate a sequence of numbers during a SELECT from a table but this works because our variable’s value is being altered for every row we get from our SELECT so what do we do when we have when we want a sequence but no table …

Continue reading »

Oct 03

Making a Random Image Banner


So noticed how the banner at the top chnages? want the plugin? Well your out of luck as i didn’t make a plugin but this guide will show you can make it yourself. i should point out that while this code is ment for child themes you can apply it to brand new themes if …

Continue reading »