You can’t write a large application without automating builds and launches. If your build process is repetitive and tedious, you have two options: pay a few full time employees to do nothing but configuration day in and day out, or pay one dude to write some elegant scripts for a few weeks. If you are lucky, your organization has well-rehearsed scripts and an operations team that speaks fluent Perl, Python, or bash. Your process involves continuous integration, and a product launch is a non-event - no one wonders if it is going to work. It just does. Read more…

Have you ever worked on a project that didn’t have automated builds and deployment scripts? Or, if you have worked on a project that was flawless, what technology did you use for your build and deployment process?

Any interesting views on SQL Server? Am I just plain wrong about Windows? If you love SQL Server, tell us why.

Continuous Integration is nothing new, the military has been doing this for years - they just happen to call it Military Readiness. Practice makes perfect, and you can’t afford to have the wheels fall off in the middle of a production release. Maintain your production readiness, and be ready to fight two wars on two fronts. Can you launch a product on one front, and develop new functionality on the other? Not if you’ve got to “right-click” your way to a product launch.

So, what are you waiting for? automate! Automate your zombie work, and go home early. I’d suggest Python as a great place to start if you are used to thinking about objects.

  • Automate - If you need to run it more than once and it involves more than 3 steps, automate it!
  • Integrate - Buy a machine, and run your production launch scripts every single day. If your application involves migrating live data to a new database schema - run that every day. Run it, even if it doesn’t work.
  • Improve - Find ways to simplify your production systems. Purchase enough Rube Goldberg books for the entire team, and make it required reading.

Great. So, you’ve got some serious Python scripts, and you are running Ant builds, building DLLs with GCC, and executing some T-SQL scripts when…

…Microsoft Gets in the Way….again.

If you are a very unlucky individual, your organization is using Windows as a production platform, and everything is a GUI. Your launch process is a series of dialogs to be clicked, and you’ve got a DBA that loves to draw pretty pictures instead of scripts… Enter Microsoft’s Data Transformation Services (DTS), an easy way to visualize tasks that deal with the database. Microsoft’s DTS literature says that DTS is a great choice for importing, transforming, and copying data. It is also a great way to “Send and Receive Messages”, and “Execute T-SQL statements”. If you love SQL Server this tool is just another great innovation from our friends in Redmond! Instead of working with a bulky set of text files, you can point and click your way to production! Easy, right? No more boring text files with SQL. What could be easier than putting some boxes on the screen and connecting the dots?

Unfortunately, they don’t tell you the other side of basing your build process on DTS packages. Instead of working with some standards-based script you can check into Subversion, you’ll have to work with a diagram that ends up looking like a rat’s nest of complexity. Your, once easy-to-understand, T-SQL script is now a series of colored boxes and lines. Found a bug? Instead of dealing with a line number, you get the name of a box on a diagram - “problem in SQL_DTS_TASK32″. And, did Machiavellisoft tell you that you can only export a DTS package to a Visual Basic program or a binary “structured storage file”. In other words, if you want to build a database which involves a DTS package, you’ll be executing Visual Basic generated by DTS. I’m not sure about you, but I’m not too excited about a huge chunk of critical Visual Basic code that is maintained via a GUI tool. It seems a fragile solution at best, and as the DTS package starts to grow in complexity, we’ll have an inefficient and cryptic script to debug in our application. This isn’t just a simple VB GUI tool, this is critical business process

DTS is very “easy”. Every time I hear the word “easy” at work, I get worried. Nothing is “easy” - especially when it involves manipulating customer data and working with a complex production network. When someone says, “oh, that’s easy”, I translate this statement to, “oh, I can easily screw up the whole system by right-clicking on this menubar, then you will all need to come into work on Saturday to make up for my mistakes”.
If you want portability and standards, consider adopting another database altogether. Oracle or MySQL provide great alternatives, and while Oracle is not open-source, it is a more “open” product. Larry Ellison is not trying to trap you in a strategic spiderweb called .NET.

The Moral of the Story

Automation will save you hassle, and continuous integration will make stressful launches a thing of the past. But bad technology selection can handicap scripting and automation. Choose technologies that encourage automation and provide open iterfaces, and you will run into few roadblocks. When developing for the server-side, avoid technologies which depend on GUI interfaces for configuration as you will end up spending entire weekends right-clicking on pretty dialogs and opening Windows “Explorer”. Store all of your configuration in files and scripts which are stored in version control, and automate everything.

Run server-side applications on something resembling Unix. Unix power users are more familiar with automation; you will not find an experienced Linux or Solaris admin who doesn’t know a few good scripting languages very well, but you will find Windows admins by the dozen who don’t know much about JScript. Find people comfortable with the prompt, and a good text editor.

Post Script: Did I mention that Microsoft’s JDBC driver leaves much to be desired? People who use Java with SQL Server usually end up paying several hundred dollars per server for the privilege of connecting to the database it via JDBC. Ridiculous, but true - another reason to avoid SQL Server altogether.