Tips & Tricks

Don’t use Design Patterns just because you can, you Cargo Cult Programmer

Have you ever stumbled across a project and just think to yourself why does this class exist, or more specifically why did they use this design pattern? Recently I happened across one of those projects, in it the project used a Factory class that’s purpose was to instantiate and return a single class. In essence

How to perform a batch delete in T-SQL

Database maintenance can be a full -time job when working within a large corporation. Cleanup or deletion of records can especially be time-consuming and error prone when dealing with large data tables with millions of records. Often developers will try to run a basic delete statement without knowing about batching or truncating the activity log.

How to use XCOPY command from windows dos prompt to copy files and folders

XCOPY is a dos command used to copy files or directories from one location to another. Most Windows user may never need to use the dos command prompt to migrate files between network drives but those of us that utilize both mac and pcs may find the need. Recently I obtained a new Windows 7

The Constant Interface Antipattern – How not to define constants

When working in applications that utilize a lot of variables I often come across interfaces containing nothing but constants. Instead of creating a class containing the constants the developers choose to define them in an interface that can be implemented by a class so that constants don’t need to be qualified to a class in

Tips & Tricks: How to utilize triggers to batch migrate data between tables

Transferring data between tables is a common task of database maintenance. It is used when updating database schemas or when you need to migrate data to a log or history table. There are 2 common methods for performing the transfer the first is done by use of a WHERE NOT EXISTS sub query, while the

WordPress Tips & Tricks: How to create a sub page navigation.

Until the release of WordPress 3.0 due out later in the year, creating a sub navigation is still a somewhat obscure and tricky task. To hopefully shed some light on how to create a Sub Navigation for your own needs I am going to walk-through how you can output a pages child or sub pages.

Java Code Snippets: Performing a Single line or Inline if else statement

For some reason I have the utmost trouble remembering how to do a single line or inline if else statement. This article is mainly for myself so hopefully I will remember the next time I want to do an inline if else statement. The usual format for performing an if else statement is: if( $val1

WordPress Tips & Tricks: How to use conditional tags to create custom sidebars

WordPress has many nice built in features and helper functions for us to use in our websites. Some of the basic conditional functions like is_page, is_single, and is_home are perhaps the most versatile and useful to developers and site owners. These functions simply return true or false for if you are on a page, post,

Tips & Tricks: How to tell Google your page’s content should not be available after a set date

Promotions are a very common aspect of store websites. Most promotions you create will have a set amount of time they are valid for. As a responsible site administrator you may want to know how to stop the promotional page from being displayed in Google’s search results after it expires. To let you do this

Tips & Tricks: How to tell google not to archive your web page.

In some instances you may have content on your website that you don’t want Google to archive. Google understands this and provides various META tags for you to use in notifying their crawler in how to handle your website’s content. Two such tags are NOSNIPPET and NOARCHIVE. NOARCHIVE The NOARCHIVE META tag is used to