Personal Development Environment

Choice of development environment is often a choice that is preordained, either by your job or by the project. When I get home and just want to explore on my own, I've come to appreciate things a particular way.

I use the following for my personal projects:

Host OS - Windows 7

One of the best Windows versions in my opinion, appears better than the past. This is augmented by Microsoft's free virus protection software, Microsoft Security Essentials. The UI is very responsive with a minimalist system tray. I take the minimalism a step farther by removing all icons, including the Recycle Bin, from the desktop. The search bar under the 'Start' button is also so quick that I don't ever navigate the 'All Programs' start menu manually. To top it off PowerShell gives you a terminal with a lot of the Unix goodness plus objects, to make scripting much more palatable in Windows.

Virtualization Tool - Virtualbox

If you're going to go exploring on your personal machine, you need a safety net. If you spread out all your tools on your Host OS, for multiple technology stacks, you'll end up with a slow buggy mess. Virtualization lets you divy stacks between environments, so no one steps on anyone else's toes. You screwed up an install? Nuke the OS. It isn't like it will prevent you from using your Host OS.

Virtual Machine OS - Ubuntu

I love Windows, but it really doesn't do everything I need it to. Actually, outside of being a consumer of programs or developing against the CLR, Windows still is pretty bad. Too many open source projects have a Linux first mentality. Also, I'm in it to learn something when I'm playing around at home. Linux is a foreign land to me still in a lot of ways, so I still have plenty to learn. It also doesn't hurt that it is free (as in beer).

Version Control - Git

Version control is a godsend when exploring a new technology stack. Not only can you save your work, but with Github you have a way to present it to the world. It also is the method of choice for open source projects, which I want to contribute more to. Also I use Mercurial at work and Git is just different enough to be a good learning target.

Text Editor - Vim

Beautiful. Powerful. Arcane. More learning that I'll probably be able to do in a lifetime. Vim proficiency is a life goal and my free time is when I can justify looking up a new text editor command every ten minutes. Also, it forces me to think in Regex.

Web Browser - Chrome

I use it everyday, at work and home, and I still have a lot to learn. The Chrome developer tools have depth that I have not begun to fathom.  It makes browsing and developing web applications a pleasure.


Choice SQL Statements

I've been tossing around a few ideas about SQL in my head lately. None of them seem to be bubbling to the top, so I'm writing this blog post to help sort out this stew of statements in hopes of finding the choice ideas to pursue.

SQL CRUD is a fact of life for a modern developer. Simple operations can take an inordinate amount of time to complete, which is one of the reasons why ORM tools have made such a splash. For a company that can afford to lose performance and access to vendor specific SQL constructs, they can be a big win. In my current job, it seems we can't afford either. So while we have some very interesting and elegant stored procedure code for the hard problems, we also end up writing a lot of CRUD by hand.

One of the issues I have with CRUD is that often I have a partial object, or more correctly, I have a few columns of a table that I need to update which could come from a complete object, partial object, or multiple objects. The mapping of tables to objects simply isn't 1 to 1 in our code. So how do I persist my data?

Well I could write custom SQL inline.

Or I could write custom SQL stored procedures.

But this leaves me with a N! set of SQL to write. Instead I'd like to write one piece that takes 1 to N columns of a table and updates them as needed. It also would be swell if it would insert if the row didn't exist.

It can be alleviated a bit by writing SQL stored procedures with optional parameters, but...it's okay. I generally don't like seeing huge amounts of options in my code completion tool. I also have an unfortunate habit of having wide columns. I really just one argument object that gives me the buffet of optional parameters to choose from.

So I could use XML.

Somehow this feels inordinately inelegant. We have a generated data access layer already for our custom stored procedures. I shouldn't be writing custom serialization code for every CRUD operation.

Somehow I should be able to divide up the parts of a table into units of columns that are dependent and mark the others as optional. My generated code should know about that and give me suitable CRUD operations, or more suitably Upserts or Saves paired with soft deletes. I shouldn't have to think about this.

But I do.