You're a Rails programmer. You've developed your site and have a good set of features that you're delivering to your users. You use RSpec to test your application and have Cucumbers pushing WebDriver tests. You may even be doing some cool process things like continuous deployment. But, do you write Ruby or do you write Rails? Writing Rails Rails is a great web framework that has helped many teams deliver business value in a very short amount of time. It helped to create the mantra of Opinionated Software that exists in the Ruby community and has even started to trickle...
more
We have recently started to use a pattern on my project that I am currently in love with. While it is probably too early to call this a "Do This or Question Why You Do Not", I can see it rapidly becoming that way. The typical Rails controller The Rails controller that we typically see is something along the lines of the code below. In this code we are using some straight forward patterns of accessing objects from a database, showing them (through a template), checking to see if our new Post object is valid and handle the good and...
more
In case you are unaware or are in need of a reminder, this is a technical blog about software. I write my thoughts and opinions on how to write software. Today, I am going to continue that by talking about Women in Technology. "Not that dead horse." "It's been done a thousand times." "Why aren't you talking about something REAL like how to introduce a service layer peice by peice in a Rails application?" (I'll do it one day, I promise!) This, folks, is as real as it gets. If you thought this or anything along these lines then you're...
more
Continuous delivery is one of those goals that is very easy to understand but very difficult to implement. The gist of continuous delivery is that the development team delivers a feature as soon as it is ready. This reduces overhead and the lag time between the process of developing a feature and seeing it to the next stage. Overall, this is a good idea because it allows for features to be developed and deployed at a more rapid pace as well as enabling users to interact with the new functionality in as little time as possible. This is a great...
more
Before, I lamented about the testing story for Coffeescript in Rails. This is a description of a process that I am currently using. It is not perfect (and I'll end on why I do not think so) but it checks about 75% of the boxes on my Want list. Quick Start First, I just want to give a quick start guide for anyone that wants to just get shit done. I will dive into some details after this section--so if you're interested in how it works or are debugging something, that part will be of more interest. First, we're going...
more
When starting up our most recent project, my current project team decided on a set of development practices that included Continuous Delivery and Feature Branching (through Git Flow). There were some members of the team (myself included) that were excited by a true continuous delivery process. Others of the team were similarly excited about using Git Flow. The first obstacle we reached when we were setting up our continuous delivery pipeline was figuring out which branch to continuously deliver. We changed our minds a few times before settling on a pipeline that would run all the code from the development...
more
Yesterday I wrote a blog post about why Rails needs a better story for CoffeeScript development. Today, I'm going to describe a solution (not THE solution) for making it much nicer. We will be using CSpec and CSpec-Rails. CSpec CSpec is a RSpec-inspired library for CoffeeScript. The nice part about CSpec is that you are writing your tests in CoffeeScript for your CoffeeScript files. There is no need to compile either the specs or the code down to JavaScript. CSpec runs on top of NodeJS. I realize that this is a large dependency for CSpec and is one of the...
more
In Rails 3.1, CoffeeScript was introduced as the default language for client side interactions (and with vociferous discussion from all sides). I was very excited by the choice made by the Rails team and have been gnashing at the teeth to get my hands on a project with Rails and CoffeeScript working in gorgeous harmony. What I found was that for production code Rails and CoffeeScript work together swimmingly, but the development story is, at best, incomplete. Writing a feature in CoffeeScript A thought experiment: let's walk through the development of a feature. Let us try GitHub's "Command-T" functionality to...
more
Grab a beer. I did not intend for this to be as long as it is, but I geeked out a little. Hopefully you'll find this as entertaining as I did. There is a coffeescript implementation that runs on top of the Rubinius virtual machine. Without getting too into why that tingles my geeky insides, that's pretty cool. It started to get me thinking about the future of Rubinius, languages and the forthcoming platform race. Virtual Machines All code manages to get compiled down to machine instructions. These machine instructions are based on the architecture of your processor but look...
more
Team Foundation Server (TFS) from Microsoft is an application lifecycle management (ALM) solution that is deployed across many development teams and organizations. After working with TFS for 3+ years, I have come to the conclusion that organizations are better off without it and should look to adopting best of breed tools (of which, I claim, TFS is not part). This post addresses three topics: the technical flaws of TFS and its subsystems, the culture TFS encourages and strategies on how to get out. TFS Sucks For developers, tooling can inspire almost religious dogmatism and fanaticism. This is understandable. We work...
more