I’m not doing a whole lot of performance optimization these days, but when I do, I will definitely return to this awesome blog post about using the standard library’s Benchmark module: http://rubylearning.com/blog/2013/06/19/how-do-i-benchmark-ruby-code
People in the Rails community talk about RESTful routes all the time. Here is a good resource for understanding what that means: http://everydayrails.com/2010/07/18/understanding-rest-and-routes.html
If your routes are in fact restful, they will by default look something like this:
URL of post 1: myawesomesite.com/posts/1
URL of post 2: myawesomesite.com/posts/2
URL of post 100: myawesomesite.com/posts/100
1, 2, and 100 correspond to the primary key of each of those records (1st, 2nd, and 100th records in the database).
At thoughtbot, many of our clients are start-ups. Actually, some of them are even pre-start-ups. We are helping them prototype something out to introduce to a few interested parties or test users. In that case, the default URLs above feel awkward. Do you really want people to know that they are creating the 5th ever post on your system? Not a great way to engender trust. So, I’ve noticed that we frequently use either random strings (“slugs”) to cover up the primary key number or vanity URLs so that the URL reads like a sentence rather than an integer.
Treehouse has a great blog post out on how to create vanity URLs in Rails. I will definitely be referring to it in the future: http://blog.teamtreehouse.com/creating-vanity-urls-in-rails
Ah Memoization. You are such a hard word to say or correctly spell (because muscle memory always makes me type "memorization" – ironic, no?) but you are so nice to use.
I haven't blogged in a little while and I don't want to say that blogging more is my new years' resolution, because then I will surely never do it more.
This isn't exactly programming related, but it is making my life better, and that's what programming is all about, right? Make lives better!!
When I first started learning Ruby, one of my favorite ways to “learn” was to go to meetups or other social-y tech events and ask people how I should learn. This not only played to my strength (socializing) but was a nifty way of feeling productive when I was really just putting off the hard stuff (actually learning).
Over the past few weeks, I've been learning a lot about git. People often confuse git and GitHub: git is a version control system, GitHub is a web app that will take all of your code versions (saved through git) and make them easily shareable across teams.
A long long time ago when I was doing marketing (aka – in June), a/b testing was something I was deeply involved in. While I mostly focused on a/b testing our automated and marketing campaign emails, we also used services like Optimizely to a/b test our marketing website.
Thanks to this blog post from a current Dev Bootcamp student: http://flavorite.tumblr.com/post/33774572841/ruby-inject
Had my first meeting with my Dev Bootcamp mentee yesterday. At first I was kind of dreading the idea of having a weekly commitment on top of my existing schedule, but it was great chatting with him and learning about what brought him to DBC and what his goals are.