Monthly Archives: May 2011

Git For Subversion Users: Article And Presentation

I’ve been doing a lot of talking / presenting / writing about git in the last year or so, and I’ve been lucky in the last month to have a couple of high profile things related to this.   Code … Continue reading 

Posted in Uncategorized | Leave a comment

Sometimes It’s Better To Use A Ruby Hash Than Create A Custom Class

The Eloquent Ruby book talks about the use of hashes and arrays vs classes. One of the things it covers is how hashes and arrays are often used by experienced ruby developers in place of custom classes. Coming from a … Continue reading 

Posted in AntiPatterns, Model-View-Controller, Pragmatism, Principles and Patterns, Ruby | 6 Comments

Don’t Do Role-Based Authorization Checks; Do Activity-Based Checks

I’ve built a few dozen security mechanisms in my career. Unfortunately, I kept getting it wrong, hence the need to keep building them. Over the years, though, I learned a number of different ways that a security system can be … Continue reading 

Posted in .NET, Analysis and Design, AntiPatterns, C#, Model-View-Controller, Rails, Ruby, Security | 49 Comments

Git Branches: A Pointer, With History And Metadata

A few months ago, I had an “AHA!” moment working with git. I was doing one of my usual fixes for a mistake I had made and I had the realization that a named branch in git can be thought … Continue reading 

Posted in Git | 2 Comments

Mongoid: Polymorphic Find Or Create New On Embedded Document Collections

In the old v2.0.beta.20 version of Mongoid, I was able to call .find_or_create_by on an embedded document collection and pass a type as a second parameter to the method. This would allow me to create a document of a specific … Continue reading 

Posted in Mongoid, Ruby | Leave a comment

Don’t Worry About Where To Start. Just Start.

When writing a blog post or an article, the most horrifying thing in the world is the blank page. Where do I start? How do I make sure to capture interest to keep people reading? Should I talk about ??? … Continue reading 

Posted in Analysis and Design, AntiPatterns, Bootstrap, Goals | 5 Comments

Don’t Build A Security System Until There Is Something To Secure

I know a lot of people give credit to the idea of “time to login“. Personally, I don’t think that’s the right way to look at starting an app. (Note: As Joshua Flanagan pointed out in the comments below, I … Continue reading 

Posted in AntiPatterns, Bootstrap, Goals, Risk Management, Security | 9 Comments

Re-learning The Meaning of ! in Ruby Methods

Hugo Bonacci has been tweeting a lot about the Eloquent Ruby book, so I decided to pick up a copy. In spite in my year or two of working with Ruby, I still feel like a n00b most of the … Continue reading 

Posted in Community, Ruby | 6 Comments

Multiple External Monitors On MacBook Pro: Don’t Bother… Yet

I’ve been running a 3-monitor set up on a macbook pro for the last year and a half. Here’s a pic of what it looks like; The model of macbook pro that I have only has one mini display port. … Continue reading 

Posted in OSX, Product Reviews, Tools and Vendors | 11 Comments

Embracing Conventions With Namespaced Models And Partials

Six months ago when I started working a contract with Joey Beninghove, I had never done full time rails work. I had played with it a few times and built a few small example apps just to get the hang … Continue reading 

Posted in AntiPatterns, Model-View-Controller, Philosophy of Software, Principles and Patterns, Rails, Ruby | 3 Comments