Thursday, June 24th, 2010
Well the new WordPress has been out for a week now and it’s time we give out our two cents. Named after the famous jazz musician Thelonious Monk (I would’ve named it “Satchmo” after my favorite jazz musician Louis Armstrong), this major release is a big sigh of relief for all WordPress developers out there. Finally we can give the user some flexibility without being flooded with update requests.
Posted in News, Programming | No Comments »
Tuesday, May 4th, 2010
Trying to edit your theme or test a new theme can be very difficult without a testing server or a dev location. Dev Theme Test allows you to create a password protected and non-password protected subdomain such as dev.yoursite.com in order to make modifications to your current theme or a new theme while still displaying your original theme to site visitors. Test drive your themes and use our theme tester!
Posted in Programming, Scripts | 8 Comments »
Wednesday, April 28th, 2010
Did you know you can run Javascript on any page? It’s easy. All you do is type javascript: in the navigation bar of your browser and then your Javascript code and it will run it on the page!
Posted in Programming, Tutorial | 1 Comment »
Tuesday, April 20th, 2010
Here is the secret to using GoTo in ANY programming language:
Yes, that’s right. You will be eaten by a raptor! So don’t use it!
Tags: c++, goto, humor, Programming
Posted in Programming, Tutorial | 1 Comment »
Tuesday, April 20th, 2010
It’s about time that PHP joined the band wagon of anonymous functions. Anonymous functions, also known as closures, are functions with no specified name. These functions are stored in variables and can be passed around. Anonymous functions have been in other programming languages like Javascript, so if you know Javascript then anonymous functions are nothing new.
Tags: anonymous, closure, functions, php 5.3
Posted in Programming, Tutorial | 2 Comments »
Monday, April 19th, 2010
If you don’t know what ternary operators are then you are missing out! The day I learned about ternary operators I nearly passed out. There are so many wasted lines of code if you don’t know about them. This is what a standard if ... else ... statement looks like using C, Obj-C, C++, C#, Java, or JavaScript:
Tags: c++, javascript, obj-c, ternary operators
Posted in Programming, Tutorial | 5 Comments »
Monday, April 19th, 2010
Colon syntax is another way to style your PHP code. Instead of using curly braces you use colons. Below I have included an example of a couple different curly brace styles and also each statement using the colon syntax. I don’t know of any performance benefits or loss to using this syntax over any other. Please comment here if you have any more information about its affects on performance.
Tags: colon syntax, perl, php syntax
Posted in Programming, Tutorial | 6 Comments »
Monday, April 19th, 2010
When I started programming I only learned about do ... while statements and I didn’t know about while statements. There are some times when my code would’ve been a lot cleaner if I had known about while statements. To save you all the trouble of what I had to go through I’m writing this post. For those of you who already know the difference between while and do ... while I have included a little-known trick that may interest you. Just skip on down to the bottom.
Tags: functions, loop, php, syntax, while
Posted in Programming, Tutorial | 6 Comments »
Monday, March 1st, 2010
I made this for my wife cause she had thousands of pictures she wanted to share with a client of hers. So instead of mailing a CD or using a service like flickr I had her use an FTP client to upload the files to her website in a subdirectory and then I added two files to the parent directory of her files (not the root directory of her site) and it gave her client a simple interface to browse through folders and see thumbnails of all the images in there along with any documents.
Tags: directory index, htaccess, php
Posted in Programming, Scripts, Web Tricks | 2 Comments »
Thursday, February 18th, 2010
Since PHP5 was released, PHP programmers have been blessed with a decent support of object-oriented programming. With this ability many programmers have used classes in many if not all of their projects. A very common practice for OO programmers is to place each class in an includes folder. There have been many times when I have seen a config file full of includes and/or requires. They will include every class in their includes folder whether or not they use it in a particular script. This causes many unnecessary includes.
Tags: autoload, classes, oop, php, Programming
Posted in Programming, Tutorial | No Comments »