I am using the jQuery slideUp and slideDown transitions with a Twitter Bootstrap Well and while it was functional, it felt very jerky at the beginning of the slideDown transition and at the end of the slideUp transition. You can see an example of this here: http://jsfiddle.net/tWTB6/ . After doing some digging on the interwebs, I found several posts about how the css margin and padding properties…
Introduction Metaprogramming is both fun and challenging all at the same time. Metaprogramming with Ruby is easier than some other languages due to its dynamic nature. However, testing metaprogamming code can be a real challenge especially covering various edge case scenarios. In these situations, I ve come to appreciate RSpec Shared Examples to make testing metaprogramming code easier. For the…
This is not a post about customer validation as defined in The Lean Startup book. Rather it is a post about who your actual customers are when you are creating a new product, especially early on in the development process. A product can be something that you are creating for your employer, for a client you are freelancing for, or even something your are making for your own personal use. A customer…
When I started creating my CanBe gem, I realized that I would need to test fully functioning Active Record models. This would ensure that the gem would function correctly when used in a Rails app. However, I didn t want to force myself or anyone else to setup a database on their local system when developing. A SQLite database seemed to fit the bill. Anyone developing functionality for my gem would…
For as long as I can remember, I ve spent the majority of my spare time to learning new technologies and shipping stuff with what I ve learned. I love learning new stuff and I ve always done it under the pretense that I will use my new found knowledge where I work. For the most part that has been a problem for me since my jobs haven t always lined up with what I wanted to learn. For example, when…
I started working on a personal project in Ruby on Rails , that probably will not see the light of day. I had an Active Record model that could have different attributes depending on the type of record that it was. In Rails, there are different ways to create your models to handle data in this manner. For example, you could have a different model for each type of record. However, this creates some…
Well that sounds like a really ambitious title, doesn t it? It is, but it s something I ve wanted to do for a long time. However, I have one really big problem - I m not confident in my writing ability. I ve always avoided writing and it s always been challenging for me. This goes back to grade school for me. That s all about to change! I m going to start writing on this site more.I m a life long…
I have started working with Rails , Backbone.js and mongoDB . I chose Mongoid as the ODM to handle all of my ActiveModel needs within my Rails app. The biggest challenge I ran into, with this configuration, was trying to get all of the syncing functionality working between Backbone.js and Rails. Fortunately, the URL scheme that Backbone.js uses for syncing data matches perfectly with Rails…
Recently, I started working on my first Ruby on Rails project at work. The project is also using Backbone.js . The Rails And Backbone communities are very active. I felt that I needed to keep up with everything that was going on in the communities. I tried to accomplish this by researching and possibly trying every new gem that came out so I could completely understand and choose the best options…
Recently I ve been working with Python at work. I ve had to create a very lightweight ORM and each model class derived from the base model class. However, to access the fields in an instance of a model class required some meta-programming. This was pretty straight forward since Python provides the __getattr__ that gets executed when a field is not found. But I did run into one gotcha! In my…
Lately, I ve had a desire to use CoffeeScript to create a one page application, utilizing Backbone.js . So I decided to take this opportunity to learn Node.js and use the Express framework for the application server. While doing this I realized that I was going to have a lot of CoffeeScript code that would be used on the client side. For this, I wanted a Ruby on Rails 3.1.x style asset pipeline .…
mongoDB affords you the ability to store documents within a single collection that can each have their own schema. This is a drastic change if you have a background in relational databases. In a relational database, you have a static schema per table and you cannot deviate from without changing the structure of the table. In the example below, I have defined a Person class and a…
Introduction Implementing a many-to-many relationship in a relational database is not as straight forward as a one-to-many relationship because there is no single command to accomplish it. The same holds true for implementing them in mongoDB . As a matter of fact you cannot implement any type of relationship in mongoDB via a command. However, having the ability to store arrays in a document does…