usable in any place a human can be used


Second System

[caption id="attachment_883" align="alignright" width="300" caption="Just a little more to the left...."]Cargo ship with containers crashing[/caption]

I've been working, both on the job and as a freelancer, right now my 9-5 is starting to enter that ever so exciting phase where one project enters maintenance mode and another project starts to spin up. The new project starting to spin up is to rewrite the CMS system that powers our various publication websites. Now for those of you not in the know, a CMS system is crazy complicated. I'm writing this current blogpost in a very specialized CMS system called WordPress, just for blogging. This software probably has had somewhere upwards of eleventy-billion man hours go into it (once you factor in themes and plugins and all that jazz).

Of course whenever you are faced with a complex problem that's been solved to death your best bet is to look around and see if anyone has done the heavy lifting for you already. So I started looking around, WordPress, Joomla, Drupal, all mature PHP CMS systems, none that I'm familiar with even a little. I started reading, out of the three I ended up liking Drupal the best, it seems well engineered, flexible, and very stable. I read and read and read about nodes and the way Drupal thinks about content and I started to think, ok maybe we can use this. The problem is that management is used to a level a flexibility that I won't have with Drupal for months, maybe even years. They want this flexibility from the beginning and that was making using Drupal seem less and less likely. Then some requirements filtered in and out and it looks like a custom solution is going to be best... c'est la vie.

Now this is in no way a slight against Drupal or Joomla or any other CMS system out there, I'm sure in the hands of Drupal Ninja or Joomla Gurus this would be easy as pie. For me though, building a solid system on my time tested and well worn toolbox of PHP, SQL, and Flourish will probably be the best way to deal with the constantly changing features and requirements that we need to support. Now I'm going to start building, start sketching out how things will work, how data will be thought of in the system, user models, documents, revisions, all kinds of fun stuff. It's a bit intimidating, but as a Software Developer this is really the stuff I live for, big gnarly problem, blank TextMate buffer, well known tools, get cracking.

The big problem I'm fighting right now is the dreaded Second-system effect. Watch out for this my dear friends, it's not a nice trap to get caught in. It works a little something like this.

  1. Build a system, this is the First-system, it works, celebrate and have a shot of Jack.

  2. That stupid "real world" comes in and messes up your data model, you add a little hack to compensate.

  3. Oh, it has to be able to do what? No, you said it didn't have to do that!! Fine, hack hack hack.

  4. Maybe some cleanup, probably some more hacking and bending.

  5. You've tried your best to keep First-system shiny and new, but the shine's off the apple.

  6. Crazy requirement, requires rewriting huge parts of the system, oh noes!

  7. Alright, now that we know so much more let's build Second-system.

Herein lies the danger. You get the go ahead to build Second-system, and you have all this experience from First-system, you really think you understand the problem domain a lot better, so far so good. Here's where things get hairy though, you start thinking about how you would build the system so that you don't run into the same problem First-system had, you start abstracting and abstracting, it gets more and more complicated, but you are now a master in this domain, you can handle it. Users who have been frustrated for months or years using First-system start throwing in their advice, things that have always bugged them, their nice-to-haves, and hell, you haven't built anything yet, chuck that automated-frog-boiler in your system plan.

Before you know it you've got a beautiful masterpiece, it handles everything, all the problems encountered in the First-system, all the nice-to-haves, everything, it is a theoretical thing of beauty. Now all you need is 6 maybe 7 years to build it.... oh shit. But there's something even more wrong about the Second-system, it has buried in it a dirty lie, that you understand the problem domain. You probably have a pretty good understanding of the problem domain, as it stands right now. Having already tackled this problem once does not make you clairvoyant, there will be changes to the system and your system will have to adapt to those new realities. This compounds the Second-system effect, because your Second-system is almost inevitably more complicated than the First-system and therefore harder to change and bend and make work in that pesky "real-world."

Right now I have to fight the urge to over-engineer, to outwit this problem, because I'm just not smart enough to solve this problem forever and ever into the future. So I'm going to focus on building a solid platform that let's me build out modules and snap them off when they aren't needed anymore. Something robust but simpler than the current system. Doing this will mean trading things off, it will mean making hard decisions upfront about architecture to meet our current needs but also look to the future, and this is what a good Software Developer is supposed to do. And once my current project is safely resting in maintenance mode, quietly humming along making my company money, I will begin building a Second-system and hopefully avoid Second-system effect.


Auto-timestamps in Flourish

This will be a short post, I just wanted to share a protip for anyone using Flourish and in particular using the fActiveRecord ORM. fActiveRecord is pretty awesome, with it and fRecordSet I find myself very rarely having to drop down to raw SQL, although for some reports it can't be avoided and then fORMDatabase::retrieve()->query() is your friend. Anyways one of the really cool features about fActiveRecord is that it has a plug in module based off of hooks and I wanted to pass along something that I've started doing as a convention that's worked out really well for me.

I like all of my model classes to have a created_at and an updated_at timestamp that automatically do the correct thing to provide a very basic audit trail. This does not let you off the hook for doing actual auditing, but it is a nice way to do sanity checks and get some instant information about records. fActiveRecord makes this pretty easy to do, let's dive into some code.

class someModel extends fActiveRecord {
* The fActiveRecord class provides the configure function to let you set-up Active Record hooks. Let's do that now
protected function configure() {
fORMDate::configureDateCreatedColumn($this, 'created_at');
fORMDate::configureDateUpdatedColumn($this, 'updated_at');

Easy as that you now have your created_ats and updated_ats working great for the someModel class. Here's the cool part though, because boilerplate code is stupid ugly code, if you want to use this across your project simply do the following.
class ActiveRecord extends fActiveRecord {
* For this project every model should record created_at and updated_at
protected function configure() {
fORMDate::configureDateCreatedColumn($this, 'created_at');
fORMDate::configureDateUpdatedColumn($this, 'updated_at');

Now when you need to create a new model simply extend ActiveRecord instead of fActiveRecord and auto timestamps are done.



[caption id="attachment_875" align="alignright" width="300" caption="I\'m not sure what this has to do with Freelancing, thanks Google!"]House made out of $50 bills[/caption]

I've been hard at work making sure that Faveroo keeps humming along, pushing out new features here and there and making sure everyone is happy. The growth we've seen has been steady and we are continuing to push forward. Work has been a little hectic lately, if anyone ever tells you that growing a product and a brand is easy, you just punch them right in the face, I don't care that it's your Grandma, do what I say, I'm a blogger. Anyways this blog post isn't about my 9-5 it's about my 6-10.

I do a lot of cool side projects, some of them like Prosper are just for fun, they scratch an itch I have and I think I might be able to use them later. Some never see the light of day, they lose momentum or turn into something that I can't figure out how to make any money or help anyone with so they just languish on my hard drive. Lately I've been trying to break into the freelancing stuff, I thought, how hard could this be, I have years of experience, I'm willing to work for a reasonable price, I write high quality code really fast, and I tend to think that I'm a fairly nice person to work with. Well its been an uphill battle so far, but I want to share my thoughts with you.

Online freelance boards just suck. They do, I hate you, I hate them, hate is really the only emotion I can feel about these boards. 90% of the posts are for ridiculously ill-defined or impossible jobs, 99.999% of the replies are someone in some third world country willing to write the new facebook for a shiny new nickel, and there is no way to get the point across to anyone that you get what you pay for. I've yet to find any useful paying work from these sites.

Craigslist is a mixed bag so far. When I started on this journey I got some help from a friend who basically just spammed me with every blog post they could find on the subject of freelance consulting. A nice thread on Hacker News, here's a Two part series by Ryan Waggoner on freelancing. One of the pieces of advice was to use Craigslist, so I tried that, there is a ridiculous volume of stuff in the Computer Gigs section, and since you aren't constrained by geography you can apply to a huge amount of them. I tried this for a few weeks but after sending out tens of emails, most custom written specifically for the project and only receiving one reply, I decided to try another avenue. I'm not giving up on the Craigslist approach yet, if for no other reason then the absolute mass of postings there.

Friends of friends. Right now this is where I've seen my only success. I'm currently working on a project for a friend of a friend and so far things are looking great. I'm enjoying the work, sweet lady PHP with my favorite unframework, Flourish, and I'm making great progress. It's been a good project to work on so far, the client has been great to work with, and the code has been flowing. I'm sure there's a downside to to this course, friends of friends will want you to do extra work for them for free or change things up as a solid, but so far so good.

Future plans. This blog post is part of it, but basically some self-promotion is in order. I'm going to be putting together an online portfolio of stuff I've done, Prosper is a nice large code base for someone to look at to see the quality of my PHP code. I realized I just need to get my name out there as an option, the current project I got was because I happened to tell my friend I'm trying to start consulting on the side, bam, first paying gig. I'm going to keep fighting the good fight on Craigslist, maybe come up with a more efficient system for submitting my name into consideration for postings.

If you need a good PHP programmer drop me a line in the comments or send an email to and maybe I can write some awesome code for you.


sanity please

I'm sure this tale of woe will be shared by many of my web development colleagues, it has to do with Facebook. As a web developer I have to pay a Facebook Tax, Facebook has an API (I think they might be up to their fourth API now) and they have 500 million people, and so management everywhere wants their product to integrate with Facebook. Here's the problem, Facebook fucking sucks at documentation.

There are as far as I can tell at least 4 competing technology stacks going on over at Facebook: FBML, Javascript SDK, Old REST API, and Graph API. There could be more, some of those might not be fully APIs and are just components, I'm not really sure. I've been reading the pages at the official documentation website for weeks now trying to wrap my head around this thing. Maybe it's just me, maybe I'm dense or something, but I can't seem to figure out what the fuck is going on or what I should be using.

Here's a great example, let's say you want to integrate Facebook Connect (if that's still a thing, I'm not really sure), but more succinctly you just want to allow users to sign in using Facebook as their identity provider. How are you supposed to do this. Well there is this section on Single Sign-On that looks promising. But then later on if you follow the link to learn more about the Graph API you will find a section about Authorization that will lead you to this page on Authentication which I think is showing you how to do the same thing, maybe.

The problem seems to be too many ways and pages explaining the same thing or slightly different things, I just want one canonical authoritative place to look that says, "This is the API you MUST use for Authentication." I don't think that is asking too much. But I'm sure once I finish my primer on OAuth 2.0 and figure out how the extended permissions works it will all be more clear.

The API could be forgiven for giving you more than one way to skin a cat, if it then gave you specific details on how this stuff actually works. Let's say I want to build a website that displays events and then let's people use my website to mark themselves as attending that event in Facebook, is that possible... I have no idea. Here's a section of the Graph API about Publishing data to Facebook and it might be in there somewhere, but I can't tell. I guess I'll have to play around with how this supposedly RESTful API works when I have some state, maybe if I've successfully negotiated an OAuth Secret Consumer Token UID then I can call /EVENT_ID/attending and that will mark me as attending the Event with EVENT_ID, it seems to make sense a little bit, but the extremely helpful description of "attend the given event" and the arguments of none make me have to play around to figure it out.

Seth Call is similarly frustrated and makes a very nice detailed case for why the Facebook API is so woefully inadequate. I couldn't agree more, and I hope that help is on the way.

The problem I'm running into now is frustration and discoverability. There doesn't seem to be a particular flow to these documents, they are just disparate documents hyperlinked together in no particular order. I'm new is there a tutorial or common use case section, maybe somewhere buried 9 links deep. If you are going to embrace and extend then at least have the common courtesy to make our lives easier as you try to take over the world.

Facebook seems to have too many developers working in the API space not communicating, the "Old" and "New" APIs overlap in some areas and miss each other in other areas, there's no definitive answer on when support will end for any of the "Old" APIs, is it safe to use the "Old" REST API for functionality the Graph API doesn't support or will they turn off the tap at some point. When trying to navigate through the documentation it just feels like they made someone do a braindump and didn't try to organize it in any fashion.

Well I'm going to head back in because with the draw of 500,000,000 potential users we can't afford not to pay the Facebook Tax, which is a real shame considering how shitty the Tax Code they published is.


2 months

[caption id="attachment_864" align="aligncenter" width="590" caption="that\'s a pretty sweet logo"]Faveroo Logo[/caption]

On June 3rd I typed the following into my Terminal.

mkdir faveroo
cd faveroo
git init

On August 15th I typed the following into my Terminal.

cd ~/src/faveroo
php deploy.php production

Then I watched and held my breath as my carefully crafted deployment script worked its way through 2 months of code and pushed them across the line. Then I fired up my browser and went to and waited for the now familiar homepage to show up... I'm sure it took less than a second to load, but it seemed like an eternity, finally it was up. I worked for the next few hours exercising the application through all its various operations, squishing little bugs here and there that popped up from being in a different environment. Two months of development, and finally it was live, and it actually worked. A few hours later we started hooking up people with sweet deals and putting money in the bank, mission accomplished. is my first project at my new job at 614 Media Group. It was a skunkworks project up through the end of July, so I couldn't come to this blog and talk about it. I did all of the coding for Faveroo and my colleague Jeff Guciardo did all the design work to make it look so pretty (it's probably the prettiest thing I've ever had the opportunity to create). The basic premise of the website is that our team of dedicated sales people go and find great local deals, then we throw them up on, and then we help people save some cash. When you buy a Faveroo you save some money, the business makes money, we make money, and 3% of the sale automatically goes to charity, it's win-win-win-win. But I'm neither marketing nor sales, so I will stick with what I know and what I knows is tech, so let's talk about that for a minute.

Faveroo is a PHP website that includes the public frontend, a private backend, and a series of maintenance scripts that make sure everything works like clockwork. When I was starting up the Faveroo project I was given carte blanche as to how to build it. All of our other web properties use the classic LAMP stack, so to keep operations fairly sane and because I deeply love PHP, I decided to build out Faveroo on a classic LAMP stack as well. The code is Object Oriented, nearly MVC, PHP 5.2 code. I looked around, had been for a long time, at various PHP Web Frameworks. I had just come off of working with rails on a side project and so I knew the joy and frustration of work with a framework.

As you may be aware, I'm crazy in love with Flourish and decided that I would use it as a major component. I have been a fan of Flourish for a while now, probably over a year, but this was the first big application I was going to use it on, and really the first large scale from scratch application I have ever written. Now don't get me wrong, I'm no rookie to this slinging code stuff, I've maintained huge legacy applications, built middle-ware up from nothing, and even rewritten large applications to the point that almost all of the original code has been replaced. But this would be the first time that if I didn't like something in my code, it was because I was the stupid jack-ass that made such a boneheaded decision. Well, not the first time, but the first time I couldn't easily blame someone else ;)

I want to say that the decision to go with Flourish is probably what made the rapid turn around time possible. It's a wonderful library that helps you do things right but doesn't force you to do anything you don't need. The thing that amazed me as I used it is I started off only wanting to pull bits and pieces, maybe some fCryptography here and a little fMessaging there, but as I got familiar (and boy howdy did I get familiar) with the docs, I just found more and more amazing functionality and a beautifully coherent system. Flourish was clearly written to be used, and by the end of the project I found I was using almost every class. It's clearly a tool written for real world use from real world experience.

Flourish and jQuery are really the 2 big external dependencies for Faveroo, the rest of the code was written by me. I found this minimal system worked very well for me. I wrote a router in about 100 lines of PHP code, it's nothing earth shattering but I think it has a few novel ideas. I've since built a new version of this router that is shorter and has less complex code paths. At some point in the future I may try to make a more generic version of this router and release it open source. All of the model classes are fairly straightforward using the excellent fActiveRecord as a base.

I spent about a week spinning up my minimalist framework, but it paid off big. I knew how the system worked every step of the way, and more importantly, I could alter it in minor ways to achieve dramatic results. All of this is possible with established frameworks, but here I got away without having to climb up a learning curve. This gave me more time to understand the problem domain and to learn how to best use Flourish.

With this experience under my belt I'm looking forward to continuing to learn, and hopefully to contribute back to, Flourish and PHP development in general. This project has shown me that in 2 months I can go from nothing to cash hitting the bank account. I feel reinvigorated to make cool things that add value to people's lives and reassured of my abilities as a programmer. After a long period feeling burned out and wasted, I remember why I love programming, and why I love creating, and why this is the only thing I can ever see myself doing.



[caption id="attachment_859" align="alignleft" width="204" caption="Flourish\'s sweet logo"]flourish logo[/caption]

Looks like my claim of writing fast and furious didn't come to pass, oh well. For the last few weeks I've been working on a hush hush project for work. It's not done yet but we are nearing the end of the road for the MVP to be released soon. I wanted to write a quick update to discuss what it's been like getting back on my developer feet after burning out.

First off I'm engaged in my work again. For months I had felt disconnected, on autopilot, just trying to get through the day and hit some milestones. Secondly, I enjoyed playing cowboy for a while but have cone to realize that not all the habits I picked up in Corporate America were bad. Thirdly, I'm back to getting serious amounts of work done and am solving interesting problems.

Enough touchy feely hippie bullshit, let's get down to some business. I've been building a largish scale php application for the last couple of weeks and I wanted to reflect on the process.

I started off looking at various php frameworks a few weeks before starting this new project. I had kept an ear to the ground in the php framework area since forever so I knew the big players. I had also dabbled in some ruby on rails so I knew the bliss of when a framework gets it right, and the frustration of running up against something you would have done differently.

I looked into several frameworks CakePHP, Symfony, Zend Framework, Fat Free PHP, Yii, Noloh, and Recess! to name a few. They were all quite interesting but they all felt oddly foreign. Imagine if ruby on rails came out and it was a port of .Net web forms for ruby, blech. All the frameworks I looked at felt like they were trying to pave over PHP and make it into ruby lite or .Net lite. Each one was well put together on the whole and with some effort I'm sure I could have become proficient in any of them. Then I remembered an old friend I had played with before, Will Bond's unframework Flourish.

If you haven't taken a look before I urge you to do so now. Flourish is exactly what PHP needs, a strong core of classes geared toward common web tasks, with an eye towards simplicity, security, and consistency. After having used Flourish for a few weeks I can do nothing but sing its praises. Let me say that working with the combination of Flourish + PHP is a completely different experience than just writing PHP. Flourish gives you a sane construct around which you can build high quality applications. Here's a list of things Flourish provides:

  • Cross Database support for DB2, MSSQL, MySQL, Oracle, PostgreSQL, and SQLite

  • An extremely good ActiveRecord implementation

  • Filesystem with psuedo-transactions

  • Safe consistent handling of Requests

  • Session handling with special resources for Authentication

  • Classes for creating HTML including a quality Templating mechanism

  • Great Utility classes (think ActiveRecord rails people)

  • Amazing Email support

  • Classes for handling Dates, Numbers, and Money

  • High quality Exceptions and Handling Facilities

The thing that you will notice with Flourish is that it's a library that's seen real world use. It provides a high quality core but understands that it shouldn't try to be everything to everyone. The components interoperate nicely but you also function in isolation quite capably. It truly hits all the high points you would want from a library, but there is even more.

DOCUMENTATION: The Flourish documentation is some of the best I've ever seen. There is full PHPDoc for every class, which is nice, but more importantly there is "Class Documentation" that explains how the class is intended to be used, with code examples to get you started. The documentation is written very well and is incredibly in-depth. You could sit down and read it like a book, it's that good.

COMMUNITY: The Flourish discussion boards are active and I have never seen a posting go unanswered. Will Bond himself usually answers within a few hours of your posting, I know he has more than once helped me fix some tricky bug or better explained how something worked to me. The ability to reach out and communicate with the author is amazing, it also makes you want to provide support for the project.

CONSISTENCY: The Flourish API is amazingly consistent. I keep finding myself saying, "That's how I would have written it" while using it. If you learn how fCookie works, you know how fSession works, and you even know how fRequest works. Flourish simplifies things to the point that it's worth it to go the extra mile to add a bit of security to your code, because it makes it dead simple. Then you look back and realize that it also has helped you write self-documenting code, and jesus, did it just fucking cut my lawn too, what the hell?

SECURITY: As I alluded to earlier, Flourish encourages writing secure code. Flourish takes security seriously enough to have an entire compendium on just that topic and how it relates to PHP. My code is definitely more secure now that I use Flourish, from better security in parsing Request variables, to easily preventing Cross Site Request Forgeries, Flourish has you covered.

Ok, so I didn't really expect this to turn into a huge love fest about how much I love Flourish but that's where we are at. I want to over the course of a few blog posts really explore Flourish. I haven't fully figured out what format these are going to take, but if you are a PHP developer who wants to take their code to the next level, stay tuned.


Out of the world

[caption id="attachment_853" align="alignright" width="400" caption="This smarmy bastard\'s finally come back to Ohio"]The sun[/caption]

I've been out of the world for a little while, approximately 40 some days. I unplugged from a lot of things to focus on some big changes in my life. There was a kind of, cliche alert, perfect storm of events that made me feel like dropping off the grid for a while and just relaxing.

First off, this blog, which brings immeasurable joy to so many (for free I might add, actually the hosting costs me money) got 1337 h4x0rz pwned. You see I made this mistake where by I tried to express myself... foolish bastard that I am. Someone decided that all the good will and popularity I had generated through months of concerted effort and promotion would be better used to sell some scummy fake AV software. I quickly fired up my ftp and an editor to find out what was going on, I was able to detect the hack right away (normally don't have giant evals at the top of my pages), some quick regex work and I was able to disable the attack within less than an hour of detecting it. But I had been compromised, and even though I had been able to address the immediate issue steps needed to be taken to protect my blog and the fine people that come and read it. I decided to take it down until I could get it cleaned up properly. I felt terrible, but I had taken steps to prevent such a hack from occurring, I couldn't figure out what had happened. Then I saw this and realized that is exactly what had happened to my site. I felt a little bit better that this wasn't my fault and I wasn't alone.

The second major thing is that I quit my job. I worked at HMB for just over 2 years, and I learned an immense amount, worked with some of the best people I've ever met, and went from Ramen Noodles on milkcrates to my comfy house and filet mignon (if Burger King is still putting filet mignon in their hamburgers). It was a fantastic place to work right out of college but towards the end I felt like it wasn't where I wanted to be in life. I found an opportunity to go work for a young media company in town that needed an experienced PHP programmer to take over for their "web guru." I'm incredibly happy to report that I took that opportunity and am currently running with it.

The third major thing is that I was burned out. My last project at HMB was difficult, difficult for me personally in every way I can think of. I realized near the end that I was at my breaking point, I was frustrated, angry, and plain unhappy. I felt like I had nothing left to give, I felt completely worn down, and I knew that something would have to give.

That's where I found myself a month and half ago, in a strange position where I was frazzled and broken but ahead of me sat this golden opportunity. I decided that I would unplug, unwind, and rebuild. I had become that proverbial Windows XP box with the 2 years expired Kapersky that was slowing to a crawl. My hardware was fine, but I needed to reformat (preferably with Ubuntu or maybe into a Hackintosh) and recover. One of the things that went on the chopping block was blogging, not intentionally at first, but once I stopped, well an object at rest tends to remain at rest...

I'm happy to announce with the relaunch of this blog that the "reformat" worked. What you see before your eyes is a fresh WordPress 3.0 install (with all the old content recovered from my numerous backups), a visual reboot (this is an out of the box cleanr right now, I'm planning on adding my own personality in gradually), but most importantly, a happy blogger typing. I've spent the last month and half settling into my new job at 614 Media Group. I'm not sure what my title is, on one piece of paper it says Web Guru, which I don't much care for, I've seen and heard "Head of Web Development and New Media" which I like, even though its a bit wordy. I can tell you though that I'm in charge of PHP development (along with iPad and iPhone development to come) and that I'm loving it. I have a swanky new office, I get to work in TextMate and git and PHP all day, it's a dream come true. I work with friendly, hip, funny people. I'm still finding my place there, but I have already figured out it's where I belong. For the first time in a long time, I'm building things, and it feels so good to build again.

I'm not really sure what else to put in this post, I plan to start up the blogging again, refreshed and reinvigorated. You can expect to see a heavier focus on PHP and Cocoa, but I will still go off on my other loves, Ruby, LISP, JavaScript, and probably fall in love with some more. And even though I'm happy and contented I will still have amusing rants (just ask Heather if you don't believe me.) I haven't decided how much I'm going to blog yet, I'm hoping for a couple posts a week, but I'm sure I have plenty of topics to cover from the time I was gone so it might be coming a bit fast and furious for a while.

In conclusion I just want to thank all the people that helped support me when I wasn't feeling at my best. My wonderful girl Heather, my dear friend Jeremiah, my family, and so many others. I also want to thank HMB for giving me a place to grow and learn, I'm still proud of the work I did there and proud of the work they do. I'm sorry I was gone for so long, if you come back and give me your eyeballs I hope to open them a little and maybe make you smile.


stir trek

[caption id="attachment_844" align="alignnone" width="539" caption="They are watching Iron Man 2 this time, but kept the Stir Trek name"]Stir Trek 2010: Iron Man Edition[/caption]

This post is a little bit late but c'est la vie. I will be talking at Stir Trek today about all the new goodness baked into the latest release of jQuery, version 1.4. I'm taking a page from this very cool HTML5 Presentation and have decided to skip the normal PowerPoint and do the whole presentation in HTML5. It was actually quite easy to do and since I'm showing off jQuery I can have live demos in my slides, so no fumbling between PowerPoint and a browser. I used the HTML5 Presentation as a template so you will notice that the look very similar, I've kept their stylesheet and their slide javascript. The presentation is functional in most modern browsers but is definitely fine tuned for Google's Chrome browser.

My presentation tries to be a quick redux of the information found at the jQuery 1.4 Launch Site, specifically the great introductory series jQuery 1.4 Hawtness by the very talented Paul Irish. I took the javascript code examples from the jQuery 1.4 Hawtness videos and built functioning demos around them to better illustrate how they work to an audience.

Keeping in the spirit of my open-source free-love hippie nature, the presentation is completely free for anyone to use. You can find the full source of it on github, feel free to download it or fork it and make it better. Well I'm going to go run through the things I plan on saying for the next couple of hours, so pardon the brief post. It's been an interesting time in my life recently and once everything settles down I'll have some big news for everyone, so stay posted.

Edit: Realized that I can host whatever I want on my domain so instead of just linking to the source code on github I can actually host the presentation on this server. If you want to check it out go to, remember it works best in Chrome but should work ok in other modern browsers, for IE users you will have to load up Chrome Frame.


saying nothing

[caption id="attachment_838" align="alignright" width="326" caption="Thank you, very helpful"]Dialog saying "Error: An Error has Occurred"[/caption]

As a software developer I have the great joy of making things that piss people off. Nothing makes someone angrier than after an hour of meticulously entering financial data, you hit the submit button and get back the error pictured to the right. In actuality, good software developers go to great pains to make their systems as resilient as possible. A large amount of the code written for any complex piece of software will be dealing with error conditions, recovering from the recoverable, and gracefully reporting fatal errors in a way that indicates exactly what happened and why and what to do about it.

One of the best features an error message can have is Google-ability. If the error has a prominent and distinct feature, then a Google (insert your favorite search engine here) Search will be able to deliver relevant results with a much higher degree of accuracy.

Good Error Message Example:

Error ERS1708A - Invalid Character
The field "Zip Code" should only contain numbers, "47CD101" is invalid.
Examples of valid input: 44130, 90210, 43220

Bad Error Message Example:

Form Invalid!!

The first error might be a little overkill, but the first part meets are Google-ability test. Typing ERS1708A into Google will pull up solutions for this problem. The error goes on to report exactly what went wrong in a user friendly way, it even goes so far as to give some samples of what correct input looks like. The second example gives you a vague idea that something bad has happened, something dealing with a form, and if that form happens to have 100 fields on it, well good luck figuring it out (maybe it's even one of those awesome programs that will clear your entire form on error). The problem is that you are equally likely to get either of these error messages from the same input depending on how much effort the programmer put into error recovery and reporting.

We all know that we should strive to help out the end-user and give them good error messages (even better if we can have robust recovery so we don't have to report errors). The problem is that programmers often have to be toolmakers as well. Sometimes when making a tool for other programmers to use we let our error reporting skills slip, these aren't mouth breathing users, these are 1337h4x0rz and will find your undocumented command line tool completely natural. I ran into this mentality today while troubleshooting a Windows Service installation problem. The Service works great on my development machine, works fine on other peoples laptops, but on the security locked down Mobile Data Terminals that the Service actually has to run on, no dice. The error that was being reported during installation was...

The system cannot execute the specified program

This fails in every way imaginable. Completely un-Google-able, go ahead and try it, you will find everything from people installing things on WinPE, to game development, web controls, Server installation.... a deluge of crap. The error message is amazingly useless, the system can't do something, what can't it do, I don't know, it doesn't even tell me. Can it not execute the install.bat file, maybe the executable called by the install.bat, maybe the executable that executable invokes, who knows?!

Well being a clever programmer and systematic debugger I was able to isolate each piece working towards the fact that what the message actually should have said was, "Although I have all the permissions necessary to access and execute all the programs you want me too, one of the programs requires that the system have the Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) installed on the machine before you try to execute it. If you install that, then I can find the dependencies I'm missing and everything will be cool, kthxbye!"

Error messages are one of the few times that we as programmers get to actually directly communicate to the user. Don't waste this opportunity by effectively saying nothing to the user. The error message is a traumatic thing for most users, happily working along until it pops up, keep it short, sweet, descriptive and helpful.



[caption id="attachment_827" align="alignright" width="300" caption="In case you didn\'t read it: None of Us is as dumb as All of Us."]meetings demotivational poster[/caption]


There is a lie we like to tell ourselves that goes something like this, "I am in control of my life." You are not, it's a cultural lie though, one of those things that we've all agreed makes us feel better so we politely nod our heads and lie to each other and all get through the day a little easier. It's similar to that radical 90's style lie I grew up with during school that went something along the lines of, "Everyone is special and magical and made out of ponies." Everyone gets a trophy, even if you didn't win, because you are special just for trying. It's a lie that everyone knows is a lie, but it makes people feel better, so what's the harm.

Well over the last few months it's become apparent to me that these things are lies, that I'm no more in control of what goes on in my life then my dog is of his own. At any moment someone could walk through the door and kill us all just for laughs, or someone could hand me a million dollars. The uncertainty of it all is unsettling and exciting. The one thing that has slowly crept into my life recently is the subject of my post, and that is the hallowed institute of meetings. Somehow I went from a code ninja hacking down mountains of whatever was thrown in front of me to a table jockey. I am now scheduled to attend no fewer than 8 meetings per work week.

That works out to 1.6 meetings/day, and rest assured there is at least 1 meeting everyday. I know people that do nothing all day but meetings, it boggles the mind. I would say that I "hate" meetings, but that really doesn't convey the depth of my loathing for them. Meetings are the bane of my existence, I could stomach maybe 1 a week, a short sweet status meeting, but what I can't handle is the bread and butter corporate meeting, and I'm going to detail why.

  1. Marketspeak: I don't know what the fuck happens to people when they get in meetings but everything, everything gets some fancy new moniker. Sure I could say that I'm working on some stuff, but wouldn't it be better to say that goal-forwarding has been achieved on several Tier-1 action items. There are no people anymore, just assets and resources, dehumanized by the cruel tongue of Marketspeak. Every concept, no matter how simple, is wrapped in shiny new clothes, as though you might confuse the dog turd covered in whipped cream as a delicious fudge sundae.

  2. Teleconferencing: There is always some person (sorry, meant to say "stakeholder touchpoint") who thinks its appropriate to call into the meeting on a 1992 Nokia Celfone while in the middle of a monsoon while driving through a tunnel. Bonus points if this person has a thick accent that makes even high-fidelity communication less than understandable. The other issue is having 10 people on one side of the conference line and 10 on the other, and the fun of each side trying to figure out who is talking.

  3. Pointless Status: Managing people is difficult, so management is obsessed with the idea of status. The problem is that status is normally not quantitative but qualitative, too bad that doesn't fit into the Holy Spreadsheet. People are forced to turn things into percentages, I'm 80% done reflanging the spline, even if that doesn't make any sense. Status reports are a proxy for involvement, they are a way to feel connected to a process you don't have any part in.

  4. Workturbation: Meetings are insidious, if you have 8 hours of meetings you will go home mentally exhausted, more than likely frustrated, and with a feeling that you've really put in a hard day's work. The problem is that when you try to figure out what you've actually accomplished the list is either non-existent or incredibly paltry. Meetings feel like work but rarely accomplish anything of actual significance. Meetings also have the incredible ability of spawning meta-work just for the sake of the meeting itself. Before the meeting you have to prepare whatever pointless agenda you have for your meeting, secure a place to have the meeting, work around everyone's schedules. Afterward someone prepares the minutes and it gets emailed to the companyname-all mailing list where inevitably the tiny list of things that were actually decided are rehashed again and again. Personal bikesheds are floated around, and more than likely all the chatter on the email list will require ANOTHER FUCKING MEETING to sort out.

  5. Punting: Punting is the amazing technique where something interferes with the meeting so it is moved down the road to another meeting. Punting is sometimes necessary when someone wants to discuss in detail some trivial point, but the best and most frequent kind of punting is the following. Design meeting is convened, difficult non-trivial thing is brought up that requires actual thinking and problem solving, meeting participants get frightened by the idea of actually having to dust off the critical thinking part of their brain instead of blithely parroting made up statuses of underlings, issue is tabled to be dealt with in the future, a piece of me dies inside. Keeping the meeting moving becomes MORE important than getting anything decided or accomplished.

The list is in no way exhaustive or universal. At the end of the day though, a meeting is taking up time you could be doing something, they should be looked at that way. All that time you are sitting in meetings talking about all the stuff that could be getting done if everyone wasn't stuck in meetings all the time... my head hurts. What we need are people with their hands on the problem empowered to make decisions and move things forward. Then we can meet once a week to talk about how things are going, instead of sitting around all week wondering why nothing is getting done.




[caption id="attachment_818" align="alignright" width="277" caption="Yea, I know it\'s on fire, but check it, I almost got Freebird down pat."]nero fiddling as rome burns[/caption]

As all good developers should know, one of the cardinal sins of software development is premature optimization. Premature optimization is bad for a whole host of reasons. But there is another set of optimizations that are in the same realm of bad, micro-optimizations.

I recall learning at some point that in C and C++ it is more efficient to use the pre-increment operator rather than the post-increment operator. Why is this the case, well it's because of the minor difference in behavior between the following two snippets.

int source = 10;
int destination = 0;

destination = ++source;

printf("Destination: %d", destination); //Prints "Destination: 11"

Compare with this snippet

int source = 10;
int destination = 0;

destination = source++;

printf("Destination: %d", destination); //Prints "Destination: 10"

WHA!? This is actually exactly what we would expect, pre-increment increments the value BEFORE assignment while post-increment increments the value AFTER assignment. What does this all mean, well basically that if you use post-increment you are executing more instructions, because the compiler has to keep the old value around to return to the assignment. That means that unless you are assigning the value and require the particular behavior that post-increment gives you, you can generate faster code by using the pre-increment operator (this may be handled by compiler optimizations these days).

All of the for-loops that you've written for(int i = 0; i < something; i++) are identical to and SLOWER than for(int i = 0; i < something; ++i). NOOOOO!!!!! Don't worry though, because this is a micro-optimization, its something to not care about, because in reality that one or two extra machine instructions isn't your bottleneck. Micro-optimizations are all those tricks that make code faster that in the vast majority of cases (although not all cases) don't really amount to any actual noticeable performance gain. A new processor can do something in the magnitude of 100,000 MIPS (Millions of Instructions Per Second). Every second it does 100,000,000,000 Instructions, that is 100 billion instructions. every. single. second. Changing from post- to pre- increment saves 1 or 2 instructions, so for every time that gets executed you have saved a 100th of a nanosecond.

Micro-optimizations are rarely worth the hassle, and, as with premature optimization, the solution is to benchmark and trace where your actual bottlenecks are and go about solving those. It doesn't matter if you're screaming through your increments saving a whole nanosecond if your crappy no index having table is taking a whole minute to read because you are doing a table-scan.

But wait, there's more. Micro-optimization, like everything in programming, can be directly applied to life in general. I work with a person who will spend 5 minutes discussing how to save 30 seconds, this is another incarnation of the micro-optimization. It's that shortcut you take home that actually takes longer, or some everyday voodoo that is draining your time without paying you back, or that client that provides you with 2% of your income but eats up 40% of your effort. Micro-optimizations abound all around us, in the little picture they seem ok, but in the big picture they are nonsense. Take a fresh look at the things and obligations around you and examine them for micro-optimizations, see if the things you do make sense in the big picture.


kids writing code

[caption id="attachment_810" align="alignright" width="311" caption="you doody head you forgot to clean up your EventStruct!"]3 children at a computer[/caption]

Last night I went out to get some dinner and as I sat in the drive-through waiting for the unbridled joy that is Cain's chicken I listened to the radio. WOSU's All Sides had a piece about child poverty and mentoring. It was interesting and thought provoking, one of the guests said something that rang true and made me think. (Paraphrasing because the audio is currently unavailable) He started to realize that the kids were excited to have him come talk to the class every week, not because they were interested in his stories about the Post Office, but because they wanted to know that someone cared about them. It was a powerful thing to remember, that children need to know that someone cares for them, and that not all children are that lucky.

In writing this blog one of my favorite memories is doing the research to write the teaching post. It reminded me of the heady days of my youth spending hours inside of the amazingly good QBasic help file trying to get something to work, stumbling and bumbling, put beaming with pride and a giddy happiness when I finally got the program to work. These days the amount of programming languages geared towards teaching have only expanded, and systems like Alice put LOGO's turtle graphics to shame (although I still love that LISP-laden turtle).

This started the old gears turning in my head, and although this thought is pre-pre-alpha, I thought I would get some feedback and just jot down what I'm thinking. What if there were an after school program for elementary school aged children where IT professionals donated their time and talent to helping kids learn how to program. Children need mentoring, the IT community has a wealth of talented and caring people, let's put these two things together and see if we can do some good. The logistics of this are a little daunting, but I want to lay out the reasons why now is the right time for just such a program.

Programming is the new literacy. Don't believe me, here is an article entitled Programming is the new literacy. As we move forward into an increasingly wired future, programming, scripting, mark-up, are going to become skills that are normal to have. Children are already more "plugged-in" then ever before, the benefits of understanding the machine they've been using since they were in diapers is apparent. As the information economy continues its march into the 21st century, people will need these skills. From a simple formula in an Excel Spreadsheet to whipping up a ruby script to do batch processing, these will become the differentiators of tomorrow, helping people achieve.

Hardware has never been more accessible. Moore's Law is a thing of beauty, I just bought a more than capable HP refurb for $150 to act as a media server. OLPC has shown that putting affordable computers into children's hands is possible, and it looks more and more likely that school districts in the Industrialized Nations will be following suit in the next decade or so. Companies routinely donate their old computers which means that if $150 is too much (which it is for a lot of low income families) then you can get a donated computer free. Children can also access computers at libraries and schools for free.

Software has never been more accessible. The number of languages specifically targeting teaching has only been growing. If you haven't already, go read the teaching post, it is a round-up of just a handful of the neat and nifty software meant to help kids learn to program. The learning curve has never been gentler, you can go from a learning language like Hackity Hack (which is based off of Ruby) to the full Ruby language fairly easily, and from there you can explore the whole world of Ruby development from Rails to Unicorn and back again.

Programming is about more than computers. Although the immediate goal of learning to program is to instruct a computer in how to perform a given task, the side benefits are immense. Programming teaches children a structured way to solve problems, learning about control structures teaches the ideas of Boolean Logic, writing formulae increases and reinforces the understanding of mathematics. Programming is also empowering, being able to sit down at a keyboard with nothing more than your wits and a good idea and turn it into something real is an amazing feeling for a child. Programs let children learn and explore, make mistakes and figure out how to solve them, with gentle encouragement and careful guidance a child can turn their ideas into reality, and that's a powerful lesson.

Where to go from here? I'm not exactly sure, the logistics of setting something like this up are a little out of my league. For right now this is just a good idea, I'm at step 3 of the idea ladder. Leave a comment, let me know what you think, if you are a parent, would this kind of program interest you? If you are an IT professional, would you volunteer at such an organization? If you are a business owner, would you support such an organization? If you are a child, would you like to learn to program?

I'm not sure where this idea will go from here, but I'm excited to find out.


let me google that for you

[caption id="attachment_805" align="alignleft" width="300" caption="I wonder what Google\'s legal team thinks of this website"]let me google that for you[/caption]

I was recently given the task of writing a Windows Service in Managed C++ (or C++/CLI I can't quite figure out what it's actually called). Having had 3.5 years of C++ experience from college and basic literacy I started clicking around in Visual Studio like a blind man searching for a nickle. Everything was going great until I got to the code it generated... there were ^'s and gcnew's and all kinds of craziness. It looked like the Standard Template Library and C# had gotten together with a bottle of tequila, the next day C++ was knocked up and throwing up carets all over the place. This was not the C++ I had learned back in college on our quaint little Unix box editing code in pico, this was some new monster that vaguely resembled an old friend. Undaunted I clicked this link and began the journey on the road of enlightenment. Right now I have a Windows Service that builds and hopefully over the next few days I can confirm that it actually works.

This got me to thinking about the vast wealth of information sitting literally at our fingertips. I recalled the phone call I had with my mom over the weekend that went something like this.

Mom: They asked me at work to archive some files by burning them to a CD.
Me: Oh, how'd that go?
Mom: Well I had to use a Mac, and I don't know those so I asked for help.
Me: Makes sense.
Mom: The only person who knew how to do it said to use Toast, but that wasn't installed. :(
Me: What did you do?
Mom: Well I thought, how hard can this be, googled it, and followed the tutorial, it was really simple.
Me: You've just taken your first step on the road to geekdom, congratulations.

The dirty little secret is that for anyone that's good with computers, unless you ask them a question directly in their area of expertise, they might have some vague notion but will more than likely just end up Googling it. "My computer crashed and the BSOD said STOP CODE 0xA70000084, what does that mean?" What you will hear on the other end of the phone is me biding my time while I type "STOP CODE 0xA70000084" into Google and look for the answer. Because, and this may surprise everyone who is not a computer person, having a CS or MSI degree does not mean that you programmed Windows. There is a world of stuff for us programmers to try to hold in our brains, and every error code shooting out of Redmond is low on the totem poll.

If all us nerds are just Googling things, then why don't normal people do it. We know that everyone Googles stuff: "Naked ladies", "Hot naked ladies", "Other naked ladies I haven't already seen", "How to erase your browsing history", etc. Why don't non-technical people think about typing that perfectly searchable error code into that happy little textbox? There are a litany of reasons from laziness to sloth, but I think the one that most people fall into is intimidation.

Google is power!!! You ask it a question and you get a list of a gajillion results. Don't believe me, I'm going to search for blue screen of death and it returns 9,710,000 results in less than half a second. If you are a non-technical person that is a sea of information, its even worse for technical problems, as the most relevant links are normally some discussion board with a thread 900 replies deep, the solution normally some incantation you chant over the motherboard while spraying the monitor with goat's blood. For the technical doing things like digging around in the System32 directory and clicking around is everyday no big deal stuff. For the non-technical, who normally have the "I hid this for your protection, don't touch these files or your computer will explode" screens still on, it can be a terrifying leap of faith.

[caption id="attachment_806" align="alignleft" width="300" caption="for a normal user this is like a grizzly bear with chainsaw arms"]system32 scare screen[/caption]

The thing that we can do to encourage our non-technical friends and families is to teach them to fish. Normally we just want to give them a fish and get on with our lives. When you take the time to explain how resilient a computer is and how easy it is to find the information, after a while they will come around to solving their own problems. And it's like sweet sexy meth when they do. Try to remember what it was like to have that thrill for the first time of being able to command the computer to do your bidding, once they get a taste they will want more, which may actually end up being more work for you, but it's the good kind of work that furthers another's understanding of the world.

Drop some lmgtfy love on your loved ones, help them help themselves, introduce them to the intoxication of solving their own technical problems. Once people realize that computers do what we tell them and not the other way around, the world will be a much better place.



[caption id="attachment_800" align="alignright" width="234" caption="In the future, we will rule this world!"]chimpanzee in classic thinker pose[/caption]

Ideas are interesting things, we have them all the time, we dismiss them frequently, and we value them heartily. Some people don't like to talk about their ideas, don't want people to steal their million dollar brain baby, and I can respect that, but a million dollar idea with zero execution is worth nothing.

Ideas, like misery, love company, if I tell you an idea your brain will immediately start thinking about it, having its own ideas and interpretations. Then you tell me your ideas that my ideas caused and I get more ideas and so on and so forth, this is the basis of a conversation. That our ideas can grow and change organically, that we can piggy back off of each other, this is the basis of our society. But let's get out of the woods of the abstract and into the city of concrete.

What I want to talk about today are those entrepreneurial ideas that we all have from time to time. Those things that you are certain will make you rich and famous, or the ideas that leap back into our minds when we see some new thing, a worldwide pornography distribution network, Tim Berners-Lee stole my idea! What should you do with these ideas, how should you handle them, and why and what and huh.

Every person will have their own way of handling the little lightning bolts that leap into their head but I want to take you through the path that I've found helpful for me.

  1. Write it down - I write down almost every business thought I have, no matter how far fetched, and no matter how overloaded with tasks I am. This seems a little silly, if you are actively working at one thing it can even feel disloyal to start thinking about something else, what am I a squirrel easily distracted by a shiny piece of tinfoil? No, in my opinion you can never have enough ideas in reserve. It doesn't take too much time to jot down enough information to be able to recall it later, and it doesn't mean you aren't serious about your current set of priorities. We would all like to think that everything we are working on will always work out, but you will never be sad that you have more ideas to fall back on.

  2. Percolate - Go do something else, even if you aren't actively thinking about something, after writing it down it will be floating around in your brain someplace. Great ideas refuse to fall to the wayside, if you find yourself coming back to something in your head more than a few times, move onto step 3.

  3. Talk it out - Share your idea with other people, sanity check it, see if they laugh at you. Don't get discouraged too easily though, great ideas can sound crazy and still be great ideas. After discussing it with a few people you can get a handle on how realistic it is and how excited you should be about your new idea.

  4. Prototype or Shelf - If you've made it to step 4 you have to look around and prioritize, it's easy to be swept up in the novelty of a new idea, but strive to objectively adjudicate whether or not you have the free time to move forward. If you do, grab some technology you are comfortable with and make a prototype, don't invest too much time or money. If not shelf the idea, keep a short list of things ready made to work on and add this idea to it.

  5. Focus Group Lite - If you made a prototype put it in front of some people, or float a pilot program. See how people react, sometimes an idea can sound great until you see it, then you realize some fundamental flaw. If this stage is good then move onto step 6.

  6. Jump in with both feet - Get cracking. If you have the time, passion, and indication that people could use your idea, go for it. It will be difficult and you will probably fail, but you will be better for it.

Ideas are nothing without execution, but they are still valuable. Make sure you save your ideas, bounce them off of other people, and if your gut and other people tell you to go for it, take the chance. You may not always succeed, but you will rarely be disappointed that you tried.


100th Post Review

[caption id="attachment_792" align="alignright" width="300" caption="smile for now, soon I will devour you!"]monkey and tiger[/caption]

Here we are, my 100th Post! I'm going to give you an unprecedented look behind the scenes of to see the magic that is my technology blog.

This blog started on October 2nd, 2009 (158 days ago). I have had a great time writing and have more or less kept up with my goal of blogging every weekday. I want to recap the numbers so far, talk about the best parts of the last 158 days, and talk about where I plan on taking this blog in the future.

By the numbers

  • Posts: 100

  • Comments: 440 (239 rejected as spam)

  • Subscribers: 183

  • Visits: 32,395

  • Pageviews: 46,664

  • Most viewed post: hustle

Best of the blog

It is hard to sum up what has been my best experience so far blogging. This blog has always served as a dumping ground for my day to day thoughts about developing software and exploring the fantastic world of technology all around us. One of the best outcomes of this blog is getting to know other bloggers, people who you may not always agree with but that are friendly and thought-provoking. Some of the great bloggers that I've had the pleasure of communicating with more through my blog have been:

I have had a few of my blog posts go viral mostly through the amazing community at Hacker News where I occasionally submit a post. My biggest honor by far though was having hustle featured in Lifehacker. It came as a big surprise to me, I got some pingbacks and before I knew it my server was feeling the squeeze, but thankfully (and with a little help from SuperCache) it stayed up.

If I had to pick my all time favorite post though, it would be one of my snarkiest, rantiest, and at least in my humble opinion, funniest posts to date. Making a sandwich, it's not a very funny title, but if you haven't read it, click through, it will at least make you smile.

This blog has been a great source of strength and a fantastic point of release for me over the last few months. I have used it to share my triumphs as well as my despair. It has been my megaphone, my confessional, and my soapbox. This has been the home of my baby and has sparked numerous discussions and debates that have made me a better person.

Into the future

After 100 posts, is there anything left to say? Of course there is, I plan on continuing this blog for as long as people still want to read it, and probably a good while past that as well. I recently attended codemash and the one thing I remember most was sitting at a table blathering away like normal and my good friend Jose says, "I didn't understand how you could blog everyday, but now that I've spent a few days with you I understand completely." Suffice it to say, I have a lot to say and I can't wait to start saying it. I'm not sure what I will fall in love with next, but rest assured you will be kept fully informed.


[caption id="attachment_795" align="alignleft" width="300" caption="the blogspot version of humble beginnings"]blogspot version of ihumanable[/caption]

Here is what I want you to take away from all of this. I started this experiment in social media with a simple free blogspot blog and a twitter account. I scaled out to this WordPress install on my own domain after I got a bit of a following. Then I just wrote, and I kept writing, and I promoted what I thought was important or particularly good, and you can too. For years I wanted to blog and just kept putting it off, one excuse or another would pop up. Then one day I decided to do it, and I made a deal with myself that I would blog every weekday, and I kept that promise (with a few extenuating exceptions).

There is no time like the present, if you have something to say, fire up a free blog and start typing. At first you may just be talking to yourself, but over time people will listen, people will comment, people will come to understand you and the things that are important to you in a way that they never could otherwise. There is no reason to hold out now, go out there and make a mark, you may be barking at the moon but it's better then staying quiet and wishing you had later.

Thank you to everyone that has taken this ride with me so far, the last 100 posts have forever changed the person that I am, and I'm excited to see where the next 100 will take me.


settling in

[caption id="attachment_787" align="alignright" width="209" caption="No, no, not you Hugh Laurie"]House surrounded by prescription bottles[/caption]

Here is a rare post, something not bitching and not about technology. Let's say that this is a meta-post, a kind of explanation for why my posting has slowed down the last week and some personal news. First to address the slow down. Last week I had the luxury of experiencing business travel for a whole week!. Now to the grizzled road warriors out there who do this all the time I will come off as a whiny little boy, but I didn't have the time (nor the internet connection thank you very much Merrillville Courtyard) to do much blogging with the 10 hours of meetings daily. Don't worry though I have some good thoughts ruminating from the experience.

Secondly I have just moved into my *fanfare goes here* new house with my lovely girlfriend Heather. Having these two events juxtaposed was a bit stressful and difficult, but we pulled through. Trying to merge all of our stuff together and get everything in order is a bit trickier than just git merge matt heather. Its very much worth it though as we now have a lovely little home to call our own and my dog has a backyard to play in instead of tearing up my apartment.

This is going to be a short one today, I've been keeping busy working my 9 to 5, my side projects, traveling and blogging and releasing point-releases of Prosper. Tomorrow I will post my 100th POST!!!. I hope to make it a good one, it will be full of numbers and analytics, lessons learned, people met, and the story of how my inability to shut up has turned into a somewhat successful blog. I hope you will all enjoy it, but you'll have to wait for tomorrow.



[caption id="attachment_781" align="alignright" width="216" caption="All I need are these everyday objects — a toothpick, some liquor, a gun with no bullets, bullets, and three of my MacGyver writers. "]McGyver[/caption]

So it's come to this, a blog meme post. Every so often in the hallowed world of writing content for free to be distributed to people that you don't know for no particular reason other than hearing your fingers clickity-clack, you meet someone else doing the same thing and they challenge you. Considering that this is a hobby built upon the sturdy foundation of honor, glory, and red bull, you must rise to meet this challenge, and write a themed blog post. David Stein started this and it continued to Brent Ozar who has called out my name in the darkness, to answer the call to write about: My MacGyver Moment.

Now I've written about my favorite MacGyver Moment before in a previous post toolmaker, the time that I wrote an automated PL/SQL to T-SQL translation program. In that post though the MacGyver moment played a small roll and didn't get the attention it deserved, so I will go into its history and explain it in greater detail.

The seed is planted

[caption id="attachment_782" align="alignleft" width="300" caption="This is how MacGyver would solve most of his problems in the future."]jack o'neill shooting a p90[/caption]

It was my last semester in college, I had finished up all the required course work and just needed to take some 400-level electives to finish off my degree. I looked through the catalog and found a course that looked interesting, "Language Design and Implementation." The course seemed exciting for a few reasons, the professor had worked as a professional compiler writer for years and was a decided brilliant and fun teacher, the course work included building a compiler, and compiling source code was a part of the development chain that I had a theoretical understanding of but was still somewhat of a blackbox. I signed up for the course, it was fun, it was hard, I built a compiler (for a made up language called LITTLE targeting the JVM), and I learned a lot. I learned about parsers, tokenizers, compiler optimizations, bootstrapping, and a hundred other interesting concepts. The value that I took away from the course was a litany of problem solving techniques and an appreciation for what runs under the gcc hood.

The problem

My company sold some software. Doesn't seem like a problem at first, in fact, it's how the company does all those little things like pay my salary, so it's actually a good thing. The problem was that the software was written to run on an Oracle backend and we sold it to an organization that only had a SQL Server backend. There we sit looking at a mountain of PL/SQL code that does everything from execute a simple search to closing out and actualizing a fiscal year. 60,000 LoC representing tens of man-years of effort. Take this and put it in an extremely aggressive timeframe for porting and limited resources... suddenly the problem is easy to understand.

Bubblegum, paperclips, and string functions

60,000 lines of PL/SQL needed to become T-SQL, looks like compiling code to me. I knew my source language and my target language, time to write up a parser, tokenizer, emitter, etc. Then I noticed something while scanning through the PL/SQL, the problem domain was constrained, although PL/SQL can be constructed in a number of permutations all syntactically different, this was not the case. This PL/SQL was very uniform in construction, I didn't need all the pieces parts of an actual compiler. I didn't need to tokenizer and parse into abstract syntax trees for emission into the target language, I could just cheat, there were only 3-4 syntactic structures present in the source file.

I began writing the translator, after quieting that part of my brain that was telling me I was wasting time, just trying to avoid the unpleasant task of translating this by hand. Hackity hack hack, code is complete, hack up some nifty progress bars, run run run... translation complete! I looked at it, not quite perfect but I would estimate that the success rate on translation was around 99%.

The lesson

Sometimes hacking up a kludge to transmogrify data is the best course of action. Shutting up the part of your brain that doubts your ability, or the part telling you to do something the "right way" is the best way forward. Learning something for no other reason than that it seems interesting can provide you with the tools necessary to solve thorny problems down the road. Sometimes you really can defuse the bomb with a rubber band, #2 pencil, and thumbtack.


prosper 0.8

[caption id="attachment_248" align="alignright" width="128" caption="prosper"]prosper logo[/caption]

As the "pay the bills" work has gotten more fast and furious these last couple of months, Prosper development has started getting less and less priority. Today though I would like to announce that Propser v0.8 is officially ready for consumption. This is still a pre-1.0 release so its use in your multi-million dollar project should wait a while still.

Prosper is currently very stable and its stability is increasing as Unit Tests are being written, ferreting out many tiny bugs. Right now the MySQL and SQL Server adapters are the most heavily tested adapters, but full test coverage is a priority before the 1.0 release.

There are a lot of new things to be excited about, a new AREL inspired way to handle result sets by making the query object itself iterable. This new semantic way of working separates processing from execution and provides a nice new way to interact with the data backend. Support has been added for the GROUP BY and HAVING SQL clauses.

Prosper has a new home which will be getting a snazzy new design just as soon as I free up a couple of hours to make one. I have worked with the incredibly talented Ashley Kruso to get a new logo designed for Prosper.

Big thanks to Ian Potter who provided bug reports and even some nifty patches that have been incorporated into this release. It's your turn to go forth, play with Prosper, and submit to me feedback. Happy PHPing.


road trip

[caption id="attachment_772" align="alignright" width="300" caption="sitting... check. staring... check. boredom... check. Looks like we\'ve got ourselves a good old fashioned road trip!"]road trip sign[/caption]

I have a road trip coming up, one of those magical adventures where you sit quietly staring at the vast cornfields of the rust belt trying to keep from falling asleep and crashing into a cow or something. I've been preparing for this road trip and decided that instead of trying to find 5 hours worth of music to listen to that I could multitask and read while driving!

No I'm not some sort of superhero that can both read a book and drive, I am of course talking about audiobooks. Being a nerd I already have some audiobooks, I have Jon Stewart's America and Steven Colbert's I Am America (And So Can You!) but I thought that I could get some sweet programming knowledge in my brain while on the road. And so I have set out to find the best programming audiobooks / podcasts around, and I need your help!

So here is the challenge, if you so choose to accept it. Help me assemble a sweet list of programming audiobooks / podcasts, then I will subject them to my brain for 10 hours and come back and write a review of the good, bad, and ugly. Together we can produce the go to list for programmer road trip aural stimulation. Leave a comment with any audiobook / podcast related to programming, software development, or any other sufficiently nerdy subject. Let the miracle of crowdsourcing begin!!!


blackbox revisited

[caption id="attachment_767" align="alignright" width="275" caption="Oh shit they\'ve miniaturized HAL "]blackbox[/caption]

The other day I wrote about the concept of the blackbox. I focused specifically on the idea of a blackbox as us programmers think about it. I've been thinking about it more and more though and realized that there are blackboxes all around us. There are processes that our often complicated, confusing, manual messes that our non-programming friends and family have to suffer through. If they knew a little bit of ruby or maybe some batch programming they would be able to save mountains of time and effort, but they don't, so that's where programmers can shine. The problem is that to help our friends and family we have to shine some light into their blackbox tasks and figure out what they do, that's not the easiest task for a programmer to take on.

Recently at work they announced a change to the timecard system that we use, all timecards MUST be submitted by 10:00am Monday morning. The old system was, they should be in sometime on Monday and if not then our very nice receptionist will send out a sternly worded email shaming you into submitting you timecard. Being curious (and being that the explanation was just a few more lines down in the email) I wondered what change had occurred to the system to require this 10:00am deadline. Ends up that our receptionist used to enter this data by hand from the system we enter it in into the accounting software. This was a tedious and error-prone task, once someone bothered to look at it they realized that with a little bit of code they could automate this all and get these programs chatting back and forth like old bridge partners. A couple hours of programmer effort later and now our receptionist is able to answer calls and do all the other receptionisty things that she is great at instead of spending time copying numbers from one program to another.

The blackbox, timecards turning into accounting information, was illuminated and the process was horrible, a little bit of code applied and BAM new productivity abounds. It gets me to wondering, how many other blackboxes are all around me, waiting for someone to shine some light in, see the inefficiencies, and offer up some soothing code. I've given myself a new little game to play when talking to my friends and loved ones, when they start complaining about something that they have to do in their day to day, instead of just offering a sympathetic, "Sucks to be you loser" I start digging deeper. "These reticulated splines are giving you a lot of trouble, how exactly do you make them?" Normally they will reply with a bit of hesitation, maybe even a polite, "Oh, its boring, you don't need to know about that." But if you keep on gently nudging, you can find out enough of the process to help.

It doesn't always have to be by providing code, sometimes just the general nerdy computer knowledge that we have can be incredibly beneficial. It's easy to forget that not everyone knows the little tricks to make the computer easier and more fun to use. I was able to save my mother hours a day by explaining to her that despite what her boss told her, she does not have to shut down Photoshop between opening every file. Until then she had been instructed and believed that she had to wait a good minute for Photoshop to boot up in between every file, opening hundreds of files a day, you do the math. By asking my girlfriend some questions about something she does at work I was able to throw together an Excel spreadsheet to save her a ton of time. The magic of VLOOKUP and some well placed formulas was all that was needed to take a boring repetitive task and make it much simpler and less error-prone.

For those in the computer-know it's easy to look at the computer as a simple tool, something to be mastered and leveraged to make our lives easier. For many people though, computers are blackboxes, confusing little machines that spit out weird error messages and are constantly fighting them to get things done. And there is the other edge of this sword, by shining light into a process blackbox and making life easier you do the double duty of helping illuminate the blackbox for a computer novice. You help show by example that the computer is not mean or frustrating (well sometimes they are frustrating) but just a tool that with careful skill, some essential knowledge, and most importantly a lack of fear, you can make bend to your will.

Go find the blackboxes around you, help someone save 15-20 minutes a day, show someone that computers are not just useful in general but can be made personally useful. You will be a technology hero to them, you will find an interesting puzzle to play with for yourself, and at the end of the day everyone will be better off. Find the blackboxes and start pouring in light, you will be pleasantly surprised at what you find.


to tweet or not to tweet

[caption id="attachment_758" align="alignright" width="300" caption="web 2.0 kids these days with their tweeters and facespaces, I used to have to text on a 12-button phone and I liked it!"]twitter bird[/caption]

Ever since I started writing so many many years ago (actually it was the beginning of October) I have tweeted the birth of every new blog post. For those who follow me (see the button at the top of the page to join the elite group of @ihumanable followers) I expect that you spend most of your day with bated breath waiting for the singular moment of glory that a new ihumanable blog post is ready for your consumption. I was pointed to an article today by Shawn Blanc about how to handle the tweeting of blog posts. The logic boils down to the following

  1. Some folks don’t care a dime about my nerdy posts, but have great concern about what I eat for lunch.

  2. Some folks are already subscribed to my RSS feed and would prefer to keep it there and nowhere else.

The solution Shawn Blanc comes up with is to have two separate twitter accounts @shawnblanc for personal "what I ate for lunch" tweets and @shawnblancnet for stuff about his blog. So the question that leaps to your mind is, should you immediately start following @ihumanablecom for all the updates about the great free content / ranting with oddly captioned pictures that I produce? No, no you should not, and I'm about to tell you why.

I have an RSS feed and twitter, some people would argue that I shouldn't tweet about blog posts because what if someone is both subscribing to my feed and following me (thanks to anyone who is so devoted). This poor unlucky bastard will get the grand news of a new post in gasp 2 different places.

This argument doesn't make much sense to me. Twitter is passive, it is the un-email. You follow people you like, you see their tweets, there is no "unread count" or really anything expected at all by the tweeter from the tweetee. This is why people love to tweet, its the best part of any conversation, the part where you are talking. Look at some of the recent important tweets.

Faught an old man for a parking spot at ihopp - AmandaSollenne

A man is a man when he can offer his hand. The Who - wealthmoneynow

Straight up doing nothing. Have a dentist appointment after school. then have to go to court for 5:30. Then have a bunch of homework. Great. - JamieBaskett

Now I'm not picking on these people (I don't even know them) I just went to the public timeline to see what was currently running through the tweet stream. The point is that these are low-value easily ignored communications. If something shows up in your tweet stream that you don't care about, at most its going to waste 140 characters of mental processing power.

The second argument is that somehow people could care more about what I had for lunch than my blog. What I have for lunch is some meaningless data point about my day it means nothing to me (although today's Grinders Chicken Parmesan Stromboli was amazing). This blog which I spend all kinds of free time and energy on actually means a great deal to me. I want to be out there promoting it and if you are following me on twitter I would imagine you would want to see the things that are important to me. If not then why are you following me.

I have people following this site on RSS and people following me on Twitter and I would imagine its not a perfect overlap. When I first started this blog I had no RSS subscribers because it was fresh and new, so I promoted it with a simple (usually less than 140 characters) tweet, one per day. Now I have people following me on twitter solely because of this website, and it would be a disservice to them to stop tweeting about the blog posts now, changing the rules all up midstream.

This blog is important to me, me @ihumanable. The things I write here are an expression of the frustrations, lessons, and victories that make up my life. I could easily start an @ihumanablecom (if its not taken) twitter account and tweet new posts out through that. But that doesn't make sense to me, @ihumanable is where I tweet things about me, is about me, and so tweets about will continue to be broadcast through @ihumanable.

The argument against blog post tweets fails to understand the very nature of twitter, it is a passive, non-blocking, stream of information. If someone is spamming hundreds of tweets a day about pointless blather (well then they are probably using twitter) then stop following them. If someone is trying to share something that they have worked hard on and care about once a day, then I would hardly think we need to erect walls of netiquette around it.