Adam.Blog()
Adam Presley's blog
Roman Enumeration
While trolling The Daily WTF I came across a post called Roman Enumeration. It is basically about a shift to HR for hiring developers and the code produced by one such hire. In the article the writer talks about giving new hires a training task to write a program/function to...
OpenCF Summit 2012
I had the pleasure of attending the OpenCF Summit this year (http://opencfsummit.org/) in Garland, TX. Luckily I live down the road a piece in Allen, TX so it wasn’t a far trek for me. Summarizing the experience into a word for me would be “worthwhile”, but perhaps I am jumping...
Ooops! Skype and a Bad Template
While signing up for Skype today I noticed a slight bug in the form. I’m betting they actually want the asterisk character itself. Templating gone wrong!
Sublime Plugin: Compare
Not one to be completely happy with all existing features I found the diff tool in Sublime Text 2 to be… lacking. The built in diff tool allows you to select two files in the folder explorer, right click and choose Diff Files. This action will produce a unified diff...
Starting to learn Python
So I am starting to learn Python. The catalyst for this was the Sublime Text 2 editor, which is Python based, and has full plugin support written in Python. So as such I set out to learn more about this language. Initial impression is good. Since I am already fairly...
Awesome Code Comment: 9/21/2011
Came across this code in a query where the programmer clearly doesn’t want anyone to turn this feature on! <--- 2/7/06 TF: DO NOT !!EVER!! turn workflow on. Lest ye be kicked. ---> Love it.
Adam's JSON Formatter
Curious Concept’s JSON Formatter is a great JSON formatter and validator application. I found myself working with a JSON dataset that was larger than what this tool allowed, so naturally I set out and made my own. Adam’s JSON Formatter runs on CloudBees, a PaaS platform for running Java applications....
Sorting and Removing Duplicates in JavaScript Arrays: Part 2
Ok, so I said I’d do a follow up post, so here it is. I did some more playing around with the removal of duplicates. I figured since I was bothering to sort the array before removing duplicates I could improve the algorithm a bit, and I was right. In...
Sorting and Removing Duplicates in JavaScript Arrays
Today I had a need to sort and remove duplicate entries from an array in JavaScript. I figured I’d share the code for those interested. Here is the code for sorting. This uses a simple Bubble Sort. Array.prototype.sort = function(comparator) { var top = this.length; var newTop = 0, index...
SQL Server 2008 Batch Inserts and Identity Columns
As most are aware SQL Server 2008 supports batch inserts, much like MySQL has for a billion years. Basically this is the ability to insert multiple records in a single statement like so. INSERT INTO people ( firstName , lastName , age ) VALUES ( 'Adam', 'Presley', 32), ('Joe', 'Schmo',...