The Obligatory Octopress Post

I finally migrated my blog from Wordpress to Octopress and given all the blog posts I came across while getting it setup it seems almost like a rite of passage to blog about it once you’ve migrated. Why make the move?! For the hacker street cred of course. But seriously, I was growing really tired with the performance of Wordpress and dealing with shared hosting on Godaddy and my colleague suggested I give Octopress a try and so here I am. »

Brandon Pugh

Checking if a dom element exists with JQuery [Byte sized tips]

This is a simple tip but one I feel makes my code a bit easier to read. I was never very pleased with the standard way of checking if a dom element exits in jquery: if($('#userName').length !== 0){ //do something with $('#firstName') } The solution I like is to create a very simple jQuery plugin to encapsulate this logic: // this extension reads better when selecting elements $.fn.exists = function () { return this . »

Brandon Pugh

How to use jQuery .on() instead of .live()

One of the most used features of jQuery is the easy methods it provides to to attach event handlers to dom elements like this simple example: $('.submitButton').click(function() { validateForm(); }); It doesn’t get much easier than that. However, a lot of times we’ll want to attach events to elements that were loaded after the initial page load such as from the result of an ajax request. This is where the . »

My thoughts on the Global Day of Coderetreat

Last weekend I attended the Global Day of Coderetreat in Dallas, TX which was not only my first Coderetreat but also my first time attending a developer community event and I have to say that it was a great and worthwhile experience. If you’re unfamiliar with the format of a Coderetreat you can read all about it at but its basically a code kata where you spend most of the day pairing up in 45 min sessions and attempt to solve Conway’s Game of Life (a fascinating problem by itself). »

Getting started with PetaPoco and Postgres

I’m currently working on a project I’ve inherited that uses a Postgres sql backend and I was looking for an easy way to make writing our data access layer less time consuming and painful. My first thought was to use a micro-ORM like Massive but while I’ve heard some really great things about Massive, I felt it might be a tough sell to my team members who aren’t too comfortable with Expandos and its dynamic nature (I know, but change in baby steps I suppose). »

GhostDoc [Dev tool of the week]

Thought I would try to make it a thing where I post about a particular tool I’m using that makes life easier for me as a developer. GhostDoc is a cool little Visual Studio plugin that makes commenting your methods and properties much easier. With a keyboard shortcut or right clicking on a method name, GhostDoc will automatically generate xml documentation comments by intelligently looking at the method name and parameters: »

Allow pasting multiple lines in IE textbox

You may have noticed before that if you try to paste more than one line of text into a textbox in Internet explorer it will on only paste in the first line and disregard the rest. Firefox and Chrome on the other hand will automatically paste all lines of the text onto the one line of the textbox. This issue came up in one of the projects I’m currently working on where we wanted users to be able to paste in a list of ID numbers they wanted to run a search on. »

VsVim [Visual Studio extension showcase]

I thought I might do an occasional series of posts on useful visual studio extensions that I use and I’m starting off with one of my must-haves: VsVim. Vim, for those of you who don’t, is a powerful command line based text editor that has been around for a long time. I had to learn it when I was a freshman at college and we had to compile our C++ programs on a central Unix server over SSH and I’ve been hooked ever since. »

Brandon Pugh

My development journal

After having just watched one Rob Conery’s excellent screencasts at Tekpub on going from Coder to Developer, I’ve finally decided to start my own blog. Rob suggested possibly making it something of a development journal if you’re learning a new language or technology and being relatively new to the industry and being a lead developer, it feels like I’m learning so much so fast. So this is my outlet for recording/sharing my experiences, knowledge, trials, triumphs, and mistakes with anyone who might find it interesting or useful. »

Brandon Pugh