Ruby

  • Most Topular Stories

  • My Avatar

    Free PeepCode Blog
    5 Jul 2011 | 7:00 pm
    This article is heavily styled and is best viewed at PeepCode! by Geoffrey Grosenbach & Paula Lavalle The Hooligan In 2004 I worked at a grade school that hosted a highly anticipated field day every year. I decided to paint my face with my team’s flag for that year: South Africa. For the next few weeks, kindergarteners told me they had nightmares because of it. The following year, I coached the team representing the USA. I carefully painted a flag on my face, only later to realize that I had put the stars on the wrong side (damn mirrors!). Fortunately no one noticed since I had…
  • Stupid Simple Debugging

    RailsTips by John Nunemaker
    John Nunemaker
    31 Aug 2011 | 10:00 pm
    There are all kinds of fancy debugging tools out there, but personally, I get the most mileage out of good old puts statements. When I started with Ruby, several years ago, I used puts like this to debug: puts account.inspect The problem with this is two fold. First, if you have a few puts statements, you don’t know which one is actually which object. This always led me to doing something like this: puts "account: #{account.inspect}" Second, depending on whether you are just in Ruby or running an app through a web server, puts is sometimes swallowed. This led me to often times do…
  • Refactoring: be eager, not reckless

    has_many :through
    Josh Susser
    19 Oct 2011 | 11:54 am
    The illustrious Chris Eppstein recently tweeted: If some code should be refactored, stop what you are doing and refactor it. I was about to respond, but realized I had more to say than would fit in a tweet. (Waiting for someone to fix that problem!) (Then I got distracted and didn't finish this article for a few days, oops.) Now, Chris is really smart and probably doesn't mean exactly what he said, but it's easy to misinterpret his advice. I'll agree with him that you should be eager to refactor code when you discover the need. Don't let that technical debt accrue interest longer than…
  • Deploying Rails 3.2 with Ruby 1.9.3 on Heroku

    RubyFlow
    26 Jan 2012 | 7:16 pm
    Heroku offers Ruby 1.9.2 as a default with its newest stack. But did you know you can use Ruby 1.9.3 (Ruby's current recommended stable release)? Here's how to set up an app with Rails 3.2 and Ruby 1.9.3 on Heroku. See Deploying Rails 3.2 with Ruby 1.9.3 on Heroku.
  • My Command Line Prompt

    Free PeepCode Blog
    5 Jan 2012 | 3:00 pm
    This article is heavily styled and is best viewed at PeepCode! by Geoffrey Grosenbach & Paula Lavalle Current Path More Last Command Status More Uncommitted Git Changes More RVM Config More Git Branch More Advanced Git!One hour video.Only 12! More Info… Your Command Line Dashboard In 10 years you’ll probably be writing code in a different language, building web apps with a different framework, and wearing a different pair of underwear. But the command line prompt you use today could still be serving you well. Many of the elements of my command prompt were snitched from…
  • add this feed to my.Alltop

    RubyFlow

  • Deploying Rails 3.2 with Ruby 1.9.3 on Heroku

    26 Jan 2012 | 7:16 pm
    Heroku offers Ruby 1.9.2 as a default with its newest stack. But did you know you can use Ruby 1.9.3 (Ruby's current recommended stable release)? Here's how to set up an app with Rails 3.2 and Ruby 1.9.3 on Heroku. See Deploying Rails 3.2 with Ruby 1.9.3 on Heroku.
  • Guide to Installing Rails 3.2

    26 Jan 2012 | 7:10 pm
    Detailed instructions (with advice) on how to install the latest release of Rails 3.2. See a Guide to Installing Rails 3.2.
  • Rails v3.2.1 has been released (with minor fixes)

    26 Jan 2012 | 7:06 pm
    Rails v3.2.1 has been released to provide minor fixes to the previous release. See the Ruby on Rails v3.2.1 Changelogs.
  • Upgrading to Rails 3.2.0 from Rails 3.1.3

    26 Jan 2012 | 4:17 pm
    I just wrote a small how-to about upgrading to Rails 3.2.0 from Rails 3.1.3. It's not so hard as I thought it'd be and new Rails bring us some cool new features. Enjoy :)
  • test_engine - A library to make it easy to test engines.

    26 Jan 2012 | 2:58 pm
    Rail's engines can be a bit of a pain to write tests for. Since they don't run in the full Rails stack it requires a bit of pain to setup anything but the most basic testing. test_engine solves this problem by making it almost as easy to write tests in your engine as it is to write tests in your Rails app. If you have been holding out on testing your engines because you don't know a good way to implement it maybe this is your ticket to get back on track.
 
  • add this feed to my.Alltop

    Dempsey Marketing Blog

  • The 5 Ingredients for Brainstorming an Awesome Business Idea

    Adarsh Thampy
    28 Jan 2012 | 4:00 am
    Do you know what is so cool about having your own business? For me, more than the feeling that I am an entrepreneur, it’s the thought that others are receptive of my idea. What’s even better is that I get paid for my own idea as well. Coming up with a cool, or trendy idea [...]
  • Is American Manufacturing Failing Small Business?

    Robert Dempsey
    27 Jan 2012 | 4:00 am
    In the course of curating the stories of entrepreneurs to share with you I have noticed a trend from those inventing physical products. The trend is this: even though they would prefer to manufacture their products in the United States, they have no choice but to go overseas. The question is why is this? In [...]
  • The Past And Future Of PR With Christine Pietrlya

    Robert Dempsey
    26 Jan 2012 | 4:00 am
    In this video I speak with Gold Referral Partner Christine Pietryla, a business-2-business PR consultant and a friend of mine. During our conversation with discuss: Where PR used to be How social media has effected the field of public relations Why social media isn’t really causing the changes in PR and what is And more [...]
  • Curation Traffic: Branding Bonus

    Robert Dempsey
    25 Jan 2012 | 4:00 am
    Last week I told you about the awesome new WordPress curation theme – Curation Traffic – created by my friend and long-time content curator Scott Scanlon. This week I’ve got a bonus deal for you to help with your branding. As part of the purchase price of this theme you receive a series of videos [...]
  • Jason Bridges Proves Superior Customer Service Builds Businesses

    Robert Dempsey
    24 Jan 2012 | 4:00 am
    Jason Bridges built his company by providing a unique experience and highly-personalized follow up to his customers. He did it so well that many of his fellow business owners on Nantucket  are happy to refer him business without compensation. In this interview – part of the ongoing Entrepreneur Video Series –  Jason talks about how [...]
  • add this feed to my.Alltop

    Ruby Inside

  • This Week in Ruby: Rails 3.2, Rails Tutorial, and Why You Should Learn Smalltalk

    Peter Cooper
    27 Jan 2012 | 7:35 pm
    It's the latest Web-based syndication of Ruby Weekly, the weekly Ruby and Rails e-mail newsletter (which just tipped 11K subscribers). Ruby Weekly now has a 'tips' page where you can submit links for potential inclusion so if you're releasing something or have written a cool post, fill out the form and you may be in Ruby Weekly next week :-) Headlines Rails 3.2 Released DHH has unveiled Rails 3.2! Not quite as big a deal as 3.1 but has a faster development mode, faster route recognition, a tagged logger, and more. With Rails master now aiming at 4.0.0, it seems 3.2 may be the last version of…
  • This Week in Ruby: Nominate Your Ruby Heroes, Include/Extend, Ruby on Netbeans, Jekyll-Bootstrap, and more

    Peter Cooper
    20 Jan 2012 | 10:32 am
    Welcome to this week's Web-based syndication of Ruby Weekly, my Ruby e-mail newsletter. Headlines Vote for your 'Ruby Hero' in the Ruby Hero Awards The Ruby Heroes awards run each year and present 6 community nominated 'heroes' with an award at RailsConf. Nominations are now open so go and drop your nomination for the Rubyist whose code has brightened up your life the most in the past year. Heroku Receives InfoWorld's Technology of the Year Award Sorry it's just a press release but it's great to see a company that came up from the Ruby world continue to do well. Congrats to the Heroku team.
  • The Last Week in Ruby: RSpec 2.8, Redcar 0.12, Torquebox 2.0 beta, articles and more

    Peter Cooper
    16 Jan 2012 | 5:36 am
    Welcome to this week's Web-based syndication of Ruby Weekly, the Ruby e-mail newsletter. While I have you, be sure to follow @RubyInside on Twitter as I'm going to be posting news more frequently there than on the Web site in future. Follow @RubyInside Also, if you're interested in getting one interesting programming related quote or link each day on Twitter, check out @codewisdom. Follow @CodeWisdom Headlines RSpec 2.8: The Popular Ruby BDD Tool Goes Supersonic RSpec 2.8 and rspec-rails 2.8.1 have been released and some users have been reporting significant performance improvements. Other…
  • RSpec 2.8: The Popular Ruby BDD Tool Goes Supersonic

    Peter Cooper
    7 Jan 2012 | 7:53 am
    RSpec 2.8 has been released, along with rspec-rails 2.8.1 for the full Rails 3.x integration experience. RSpec is a BDD-focused testing tool that's particularly popular in the Rails world where everyone except DHH is using it (if you believe the hoopla). RSpec has faced accusations of being less than speedy in the past, but it seems 2.8 has had a performance firework shoved up its tailpipe: David Chelimsky, the creator of RSpec, also notes that in RSpec 2.8: the documentation has been significantly improved there's improved support for tags and filtering random example running order support…
  • The Past 2 Weeks in the World of Ruby: 40 Links to Bring You Up to Speed (January 2012)

    Peter Cooper
    6 Jan 2012 | 9:03 am
    Ruby Weekly has just tipped over 10,000 subscribers but I know not everyone is into getting their news via e-mail, so here's the latest frequent roundup of the latest Ruby and Rails news for you, all on the Web :-) Key News, Releases, and Headlines Hungry Academy Application Process Closes This Weekend LivingSocial's 'Hungry Academy' will provide a paid, on-site 5 month Ruby and Rails learning experience and mentorship program to a small group of lucky applicants. Interested? You've only got a few days left to apply. DOS Attack Vulnerability Found in Ruby 1.8's Hash Algorithm Ruby 1.8.7-p352…
 
  • add this feed to my.Alltop

    RailsCasts

  • #318 Upgrading to Rails 3.2

    Ryan Bates
    23 Jan 2012 | 2:00 am
    Rails 3.2 sports many new features including automatic explain queries, tagged logging, key-value store in Active Record, improve migration generator and more. Learn all about these new features in this episode.
  • #316 Private Pub

    Ryan Bates
    16 Jan 2012 | 2:00 am
    Private Pub makes it easier than ever to publish and subscribe to real-time events in a Rails app. You can use publish_to with a block of JavaScript or supply a hash for use with JSON.
  • #314 Pretty URLs with FriendlyId

    Ryan Bates
    9 Jan 2012 | 2:00 am
    If you are tired of model ids in the URL, overriding to_param can only get you so far. The friendly_id plugin can help by making it easy to generate a URL slug and maintain a history.
  • #312 Sending HTML Email

    Ryan Bates
    2 Jan 2012 | 2:00 am
    HTML email can be difficult to code because any CSS should be made inline. Here I present a few tools for doing this including the premailer-rails3 and roadie gems.
  • #310 Getting Started with Rails

    Ryan Bates
    26 Dec 2011 | 2:00 am
    Learning Ruby on Rails can be overwhelming, especially if you are new to programming. Here I will take you on a tour through various resources to help get started with Rails.
  • add this feed to my.Alltop

    Hivelogic

  • Mute Means Mute

    Dan Benjamin
    15 Jan 2012 | 5:30 am
    This should be about choices. Please see the updates at the end of the article. John Gruber writes: I think the current behavior of the iPhone mute switch is correct. [...] if the mute switch silenced everything, there’d be thousands of people oversleeping every single day because they went to bed the night before unaware that the phone was still in silent mode. Andy Ihnatko presents an argument for total muting: No. I should slide the switch to “Mute,” and then the phone goes SILENT. If I miss an appointment because I did that, it’s completely on me. If my phone disrupts a…
  • Introducing Big Week

    Dan Benjamin
    10 Nov 2011 | 7:41 am
    As I do research for my shows on 5by5.tv, I save the links, articles, quotes, and interesting tidbits we'll be discussing, collecting them on a little blog which I never thought to publicize. Yesterday I mentioned this during a live show in the chat room, and the listeners seemed curious about it, so I thought I'd share it here as well. If you'd like a preview of the links and topics we'll be discussing on our shows, or if you'd like to share a link with me, you can do that over at bigweek.co. I also cross-post the links to the @reallybigweek Twitter account.
  • Halloween 2011

    Dan Benjamin
    31 Oct 2011 | 7:00 pm
  • You are part of the Rebel Alliance and a traitor

    Dan Benjamin
    7 Sep 2011 | 6:00 am
  • Marla June Benjamin

    Dan Benjamin
    16 Aug 2011 | 6:00 am
    On Friday, 12 August 2011, my wife gave birth to our second child, a healthy baby girl, Marla June Benjamin. My wife and the baby are both doing great. Joel, now 3.5 years old, is incredibly excited to be a big brother, and is very gentle and sweet with his tiny sister. He loves seeing her and talks about her all the time. I'll be taking a couple of weeks off and while I'm out, my friend and fellow podcaster Ryan Irelan will be standing in for me as co-host of my shows on 5by5. Please direct any questions, comments, or concerns to my Producer Faith via our contact form or Twitter.
 
  • add this feed to my.Alltop

    Dyn

  • Five Tips For Creating Your Company Yearbook

    Julie Parenteau
    27 Jan 2012 | 9:00 am
    Given that our yearbook was such a hit among Dyners (see some visuals in my previous yearbook post), I encourage your company to take on this endeavor and see what comes of it. It may seem like a daunting task, but to help out, I put together five thoughts to make your own yearbook creation process smooth. Outline Dyn Yearbook's front cover. We knew that we wanted each employee to have their own page in the book, so from the outset, we were looking at a 100 page book. Since we weren’t planning on making the book a part of the fitness program, we kept the additional content down to a…
  • Culture-Con Preview: From Disney To Dyn, Employees Matter

    Mikel Steadman
    26 Jan 2012 | 10:56 am
    I have glanced at many of Dyn’s culture blogs recently and thought about a story I heard several months ago from a reliable source in the world of customer service, budgeting, planning, and business practice: my wife, Lisa. It is about a company who had very humble beginnings, nearly closing its doors on a regular basis in its early years and then expanded beyond even the belief of its owner and board members. It is a business that is particularly good at driving a brand through every one of its employees, 133,000 and growing. Here’s the story that you’ve also likely…
  • Improving Sender Reputation With The Joan Jett Law Of Email Delivery

    David Lemaire
    25 Jan 2012 | 10:31 am
    It’s hard for me to think about sender reputation without having Joan Jett’s “Bad Reputation” getting stuck in my head. When it comes to being a sender of email (unlike Joan’s recommendation), you really should give a damn about your reputation! Sender reputation is a combination of many elements. That reputation is critical to getting your messages into the inbox. So how do I get a bad or good reputation? Here’s a slew of suggestions on email content, volume, bounces, complaints and more that will give you some insight in improving your reputation or…
  • Five Common Questions About Moving Email Delivery Services

    Mike Veilleux
    23 Jan 2012 | 1:16 pm
    Change can be scary, especially when it comes to Internet Infrastructure. Even when switching would be a better solution in every possible aspect, being comfortable and taking the path of less resistance is an easy way out. We’ve all done this, both at work and in our personal lives. How many times have you thought about trying a different service but stopped because of the path to get to your final destination? We get it and when it comes to DNS & Email Delivery, we often hear the question, “How easy is it to move to Dyn?” That’s why Chris Gonyea and I are going…
  • Fit & Hustle: Making The Final Call On Customer-Facing Positions

    Kyle York
    20 Jan 2012 | 1:32 pm
    All of you potential candidates of Dyn looking to work in client services, biz dev, marketing or sales, let me tell you a little secret. If you’ve made it through our phenomenal screening / interview process and got to me for a sit down, you’re in damn good shape but don’t drool on yourself when we actually meet up. I’m literally just looking for two things from those sitting across of me: fit and hustle. Will you match the brand and culture and will you work your a$$ off to achieve big things? (Yes, those dollar signs are on purpose.) When it comes to building…
  • add this feed to my.Alltop

    Free PeepCode Blog

  • My Command Line Prompt

    5 Jan 2012 | 3:00 pm
    This article is heavily styled and is best viewed at PeepCode! by Geoffrey Grosenbach & Paula Lavalle Current Path More Last Command Status More Uncommitted Git Changes More RVM Config More Git Branch More Advanced Git!One hour video.Only 12! More Info… Your Command Line Dashboard In 10 years you’ll probably be writing code in a different language, building web apps with a different framework, and wearing a different pair of underwear. But the command line prompt you use today could still be serving you well. Many of the elements of my command prompt were snitched from…
  • Geek Gift Guide 2011

    13 Dec 2011 | 3:00 pm
    This article is heavily styled and is best viewed at PeepCode! We’ve all seen the geek gift guides put out by major publications. Somehow all geeks, regardless of their connection to technology, like star wars legos, rubix cubes, and light-up keychains. Seriously? Not here. Not us. Many geeks appreciate well-designed, thoughtful products. We know this because it’s our bottom line. So here’s our gift guide for classy geeks. Filter: All 1–20 20–60 60–100 100–200 200–800 Gifts from 1-20 Single PeepCode Gift Card 12 A single screencast for your developer friends or…
  • Free Ryan Singer UI Sketching Video

    6 Oct 2011 | 6:00 pm
    This article is heavily styled and is best viewed at PeepCode! Read More & Buy This Video Front-end Prototyping When we started the Play by Play series, we wanted not only to learn how skilled back-end developers work, but also how front-end developers get work done. Ryan Singer of 37signals was at the top of our list and he certainly delivered. We did an hour of sketching and an hour of prototyping with HTML and CSS (and even a bit of Rails 3.1). Ryan’s process is an incredible mix of back-end theory (such as test-driven development) and front-end utility (sketching and prototyping).
  • My Avatar

    5 Jul 2011 | 7:00 pm
    This article is heavily styled and is best viewed at PeepCode! by Geoffrey Grosenbach & Paula Lavalle The Hooligan In 2004 I worked at a grade school that hosted a highly anticipated field day every year. I decided to paint my face with my team’s flag for that year: South Africa. For the next few weeks, kindergarteners told me they had nightmares because of it. The following year, I coached the team representing the USA. I carefully painted a flag on my face, only later to realize that I had put the stars on the wrong side (damn mirrors!). Fortunately no one noticed since I had…
  • CoffeeScript in Motion

    19 May 2011 | 1:00 pm
    This article is heavily styled and is best viewed at PeepCode! In Motion Learn it!One hour video.Only 12! More Info… COFFEESCRIPT: jQuery -> '#entry'focus JAVASCRIPT: jQueryfunction '#entry'focus 1. A simple function   Engineering + Creativity In his book Rise of the Creative Class, Richard Florida defines a list of creative professions that includes graphic designers, sculptors, architects, and…software writers. It’s hard to think of a better place to see creativity and engineering than in CoffeeScript, a little…
  • add this feed to my.Alltop

    RailsTips by John Nunemaker

  • What a Year

    John Nunemaker
    1 Jan 2012 | 12:00 pm
    The last 12 months have been nuts. My health and professional/personal life were completely at odds. Between January and August, I had three hernia surgeries. As if that wasn’t enough for one year, the last few months of the year I’ve been plagued by a few other ailments (which are still giving me a hard time). Definitely a rough stretch. I will never take health for granted again and really look forward to getting back to “normal”. Quite the contrary to my health, Ordered List grew from 2 to 5 people, helped Zynga launch Words with Friends on Facebook, launched Gauges…
  • Acquired

    John Nunemaker
    5 Dec 2011 | 11:00 am
    Several times over the past few years, I have stated that GitHub is probably the only other place I could see myself working. Today, it is official. All of Ordered List has joined GitHub. Maybe someday I’ll write about what Ordered List has meant to me, but today I am going to fully enjoy the present, instead of rambling about the past. I have no doubt great things will come of this. You can read more at GitHub and Ordered List.
  • Creating an API

    John Nunemaker
    1 Dec 2011 | 8:00 am
    A few weeks back, we publicly released the Gauges API. Despite building Gauges from the ground up as an API, it was a lot of work. You really have to cross your t’s and dot your i’s when releasing an API. 1. Document as You Build We made the mistake of documenting after most of the build was done. The problem is documenting sucks. Leaving that pain until the end, when you are excited to release it, makes doing the work twice as hard. Thankfully, we have a closer on our team who powered through it. 2. Be Consistent As we documented the API, we noticed a lot of inconsistencies. For…
  • Stupid Simple Debugging

    John Nunemaker
    31 Aug 2011 | 10:00 pm
    There are all kinds of fancy debugging tools out there, but personally, I get the most mileage out of good old puts statements. When I started with Ruby, several years ago, I used puts like this to debug: puts account.inspect The problem with this is two fold. First, if you have a few puts statements, you don’t know which one is actually which object. This always led me to doing something like this: puts "account: #{account.inspect}" Second, depending on whether you are just in Ruby or running an app through a web server, puts is sometimes swallowed. This led me to often times do…
  • Counters Everywhere, Part 2

    John Nunemaker
    31 Jul 2011 | 8:00 pm
    In Counters Everywhere, I talked about how to handle counting lots of things using single documents in Mongo. In this post, I am going to cover the flip side—counting things when there are an unlimited number of variations. Force the Data into a Document Using Ranges Recently, we added window and browser dimensions to Gaug.es. Screen width has far fewer variations as there are only so many screens out there. However, browser width and height can vary wildly, as everyone out there has there browser open just a wee bit different. I knew that storing all widths or heights in a single…
 
  • add this feed to my.Alltop

    Mislav on web development

  • Typing typographically correct characters

    Mislav
    17 Jan 2012 | 2:00 am
    With the Option () key on the Mac, you have access to a wide range of Unicode and international characters under your fingertips without resorting to the Special Characters picker. The information presented below assumes the “U.S. Extended” keyboard selected in Input Sources. Most of these shortcuts will work with standard “U.S.” input source but not all. Punctuation char name keystroke usage en dash + ranges, relationships & connections em dash + a break of thought horizontal ellipsis + double quotes + + quotations, irony single quotes + + quotations, apostrophe…
  • Vim: revisited

    Mislav
    12 Dec 2011 | 2:00 am
    I’ve had an off/on relationship with Vim for the past many years. Before, I never felt like we understood each other properly. I felt that the kind of programming I’m doing is not easily done without plugins and some essential settings in .vimrc, but fiddling with all the knobs and installing all the plugins that I thought I needed was a process that in the end stretched out from few hours to weeks, months even; and it the end it just caused frustration instead of making me a happier coder. Recently, I decided to give Vim another shot. This time around it was different –…
  • Dive into HTML5: In memory of Mark Pilgrim

    Mislav
    6 Oct 2011 | 2:00 am
    Mark Pilgrim is gone and with him all of his sites and work. I more than enjoyed his book “Dive into HTML5”. It was a bible of transitioning and progressive enhancement back when nobody was certain about the direction of HTML working groups and browser support. It helped me learn about the semantics of new elements, playing video without Flash, local storage, offline apps, manipulating browser history, and more. It helped me appreciate feature-detection with JavaScript instead of browser sniffing. It encouraged me to stop worrying and just go forward with all this exciting new…
  • Steve

    Mislav
    6 Oct 2011 | 2:00 am
    Three years ago I have spent all my savings to buy my first Mac, dropped out of college, moved away from home and since then let nothing blur my vision or turn me away from what I believed in. Before that I was disillusioned with computers and mobile and was ready to quit. I learned that computers can be beautiful and software life-changing. Technology is about humans again. My best work is still ahead of me. I will never stop learning.
  • will_paginate v3.0: Rails 3, Sinatra and more

    Mislav
    9 Aug 2011 | 2:00 am
    After more than a year in making, will_paginate 3.0 is finally out. Notable new features are: Full Rails 3.0 & 3.1 support Active Record pagination powered by Relations DataMapper and Sequel integration Sinatra and Merb support translating with the i18n library dropped support for Rails versions 1.2 – 2.3 (keep using will_paginate 2.3 for that) This release is a complete rewrite of will_paginate. It is backwards compatible for the most part, but you should read the document listing all the changes since v2.3 on the wiki. Install it by adding to your Gemfile: # Gemfile gem…
  • add this feed to my.Alltop

    Jay Fields' Thoughts

  • Lessons Learned while Introducing a New Programming Language

    jaycfields
    24 Jan 2012 | 3:27 pm
    I've used a lot of languages (professionally) over the years: (off the top of my head) Cold Fusion, HTML, Javascript, php, SQL, CSS, ASP(classic & .net), C#, Ruby, Flex, Java, & Clojure. Each language has pros and cons. Being a programmer, it's easiest to discuss the cons - and in general I believe it was best said:I hate all programming languages - Matt FoemmelI think it's important to start with this in mind. At some point you're going to hate what you're advocating, so imagine how other people feel about it. In 2008 I introduced Clojure into a DRW codebase. This blog entry focuses on the…
  • Convert java.util.Properties to a Clojure Map

    jaycfields
    28 Dec 2011 | 8:15 pm
    As I previously mentioned, a lot of the work I do involves Clojure & Java interop. This work includes the occasional case of working with a java.util.Properties object from within Clojure. Working with a Properties object isn't a huge deal, but while in Clojure I prefer to use destructuring and the various functions (e.g. update-in, assoc, dissoc, etc) that are designed to work with Clojure maps. The following example shows how easy it is to convert a Properties object to a Clojure map.user=> (def prop-obj (doto (java.util.Properties.) (.putAll {"a" 1 "b" 2}))) user=> prop-obj #<Properties…
  • Clojure & Java Interop

    jaycfields
    28 Dec 2011 | 5:46 am
    About a year ago I got a phone call asking if I wanted to join another team at DRW. The team supports a (primarily) Java application, but the performance requirements would also allow it to be written in a higher level language. I'd been writing Clojure (basically) full-time at that point - so my response was simple: I'd love to join, but I'm going to want to do future development using Clojure. A year later we still have plenty of Java, but the vast majority of the new code I add is Clojure. One of the big reasons I'm able to use Clojure so freely is the seamless interop with Java. Execute…
  • Clojure: expectations - scenarios

    jaycfields
    19 Nov 2011 | 7:24 am
    When I set out to write expectations I wanted to create a simple unit testing framework. I'm happy with what expectations provides for unit testing; however, I also need to write the occasional test that changes values or causes a side effect. There's no way I could go back to clojure.test after enjoying better failure messages, trimmed stack traces, automatic testing running, etc. Thus, expectations.scenarios was born. Using expectations.scenarios should be fairly natural if you already use expectations. The following example is a simple scenario (which could be a unit test, but we'll start…
  • Clojure: expectations unit testing wrap-up

    jaycfields
    1 Nov 2011 | 5:59 am
    Clojure Unit Testing with Expectations Part OneClojure Unit Testing with Expectations Part TwoClojure Unit Testing with Expectations Part ThreeClojure Unit Testing with Expectations Part FourClojure Unit Testing with Expectations Part FiveClojure Unit Testing with Expectations Part Six (this entry)The previous blog posts on expectations unit testing syntax cover all of the various ways that expectations can be used to write tests and what you can expect when your tests fail. However, there are a few other things worth knowing about expectations.Stacktracesexpectations aggressively removes…
  • add this feed to my.Alltop

    PeepCode Products

  • Advanced Git

    31 Dec 2011 | 5:39 pm
    The Git source code control system is a beautifully engineered piece of software. But using it can often be rough. Trying to use it day to day can be confusing, especially since a few commands conceal dozens of useful features. We learn a lot by watching other developers work, and one of the people who have made the biggest change in the way we use Git is developer Ben Hoskings. In this screencast you’ll learn just what you need to know in order to understand Git’s inner workings. You’ll see how Ben has enhanced Git with his own scripts (you’ll get a copy).
  • Backbone Persistence

    23 Nov 2011 | 4:58 pm
    by Geoffrey Grosenbach. Graphics by Paula Lavalle. Music by Giles Bowkett. Previously: Backbone Part I Backbone Part II Backbone.js is a capable framework for building client-side applications. But even with method-by-method documentation, the details of how to actually build full-featured, useful applications can be elusive. Complete your knowledge of Backbone by learning about data persistence in this screencast! In this video tutorial you’ll learn how to use Backbone.js to create and modify data on a server. You’ll understand Backbone’s default URLs and how to modify them…
  • Gift: Unlimited

    16 Nov 2011 | 3:53 pm
    Give the Unlimited plan. The recipient will receive access to all PeepCode content for a year.
  • Gift: One

    16 Nov 2011 | 3:53 pm
    Give one credit, good for a single video tutorial.
  • Gift: Ten

    16 Nov 2011 | 3:53 pm
    Give ten credits, good for ten video tutorials.
 
  • add this feed to my.Alltop

    has_many :through

  • Modularized Association Methods in Rails 3.2

    Josh Susser
    20 Jan 2012 | 1:03 pm
    Happy Friday! It's Rails 3.2 day! The official release announcement mentions a few of the big changes, but I'd like to take a moment to highlight a relatively small change I was responsible for, one that I hope may make your life a little easier. From the ActiveRecord CHANGELOG: Generated association methods are created within a separate module to allow overriding and composition using `super`. For a class named `MyModel`, the module is named `MyModel::GeneratedFeatureMethods`. It is included into the model class immediately after the `generated_attributes_methods` module defined in…
  • Yak Shaving

    Josh Susser
    4 Jan 2012 | 10:23 am
    As coders, most of us are not only familiar with the term yak shaving, but spend many of our days doing nothing but. I often struggle to explain to non-technical folks what I actually spend my time doing when I'm working and what it feels like. This is the most accessible explanation I can come up with. Say you want to go see a movie with your friend Joe. You can't get away with leaving the house when the kitchen is such a mess, so you have to load and run the dishwasher before you go. Unfortunately you're out of detergent, which means you have to run to the store to pick some up. You want to…
  • I heard you liked files

    Josh Susser
    1 Dec 2011 | 11:35 pm
    I was going to try and be clever and do a funny riff on this whole subject, but I just can't manage it. Here's the thing. Makefile was a dumb name for a file when Stuart Feldman wrote the make utility in 1977, but you have to forgive him because file systems were quite limited back then and filenames could only be a few characters long. The pattern was <filename.ext> - 8 chars for the name, 3 for the extension. I guess config.make wouldn't fit, config.mak looked weird, so Makefile it was. Now we have no excuse. At all. I respect and adore Jim Weirich, but I hope he feels at least a…
  • Refactoring: be eager, not reckless

    Josh Susser
    19 Oct 2011 | 11:54 am
    The illustrious Chris Eppstein recently tweeted: If some code should be refactored, stop what you are doing and refactor it. I was about to respond, but realized I had more to say than would fit in a tweet. (Waiting for someone to fix that problem!) (Then I got distracted and didn't finish this article for a few days, oops.) Now, Chris is really smart and probably doesn't mean exactly what he said, but it's easy to misinterpret his advice. I'll agree with him that you should be eager to refactor code when you discover the need. Don't let that technical debt accrue interest longer than…
  • Fifteen Protips for Conference Speakers

    Josh Susser
    18 Jul 2011 | 3:26 pm
    Do you dream of someday speaking at a technical conference? Have you spoken at a conference but felt like your journey to the podium wasn't as smooth as it might have been? Well here are a couple tips to make things go smoothly and endear you to your conference organizers. I'm writing this from the perspective of a conference organizer where my main focus is the technical program. I've run into a lot of these issues when putting together Golden Gate Ruby Conference, and also seen things from the other side when speaking at other conferences. A lot of this list is about not being a problem for…
  • add this feed to my.Alltop

    Riding Rails - home

  • Rails 3.2.1 has been released

    fxn
    26 Jan 2012 | 5:32 pm
    Rails 3.2.1 is out, with some fixes and doc improvements. Please check the CHANGELOGs gist for details.
  • Rails 3.2.0: Faster dev mode & routing, explain queries, tagged logger, store

    David
    20 Jan 2012 | 11:22 am
    So we didn’t quite make the December release date as we intended, but hey, why break a good tradition and start hitting release targets now! In any case, your patience has been worldly rewarded young grasshopper: Rails 3.2 is done, baked, tested, and ready to roll! I’ve been running on 3-2-stable for a few months working on Basecamp Next and it’s been a real treat. The new faster dev mode in particular is a major step up over 3.1. Do remember that this is the last intended release series that’s going to support Ruby 1.8.7. The master git branch for Rails is now targeting Rails 4.0,…
  • Rails 3.2.0.rc2 has been released!

    spastorino
    4 Jan 2012 | 3:01 pm
    Hi everyone, Rails 3.2.0.rc2 has been released! What to update in your apps Update your Gemfile to depend on rails ~> 3.2.0.rc2 Update your Gemfile to depend on sass-rails ~> 3.2.3 Start moving any remaining Rails 2.3-style vendor/plugins/*. These are finally deprecated! Extract your vendor/plugins to their own gems and bundle them in your Gemfile. If they're tiny, not worthy of the own gem, fold it into your app as lib/myplugin/* and config/initializers/myplugin.rb. Changes since RC1 ActionMailer No changes ActionPack Add font_path helper method Santiago Pastorino Depends on rack ~> 1.4.0…
  • Rails/master is now 4.0.0.beta

    David
    20 Dec 2011 | 9:33 am
    The forthcoming 3.2.x release series will be the last branch of Rails that supports Ruby 1.8.7. There’s a new 3-2-stable branch in git to track the changes we need until 3.2.0 final is release and for managing point releases after that. So for now you should stop floating on rails/master if your application is not compatible with Ruby 1.9.3. We have updated the version numbers to indicate this backwards incompatibility to be 4.0.0.beta. This doesn’t mean that 4.0 is anywhere close to being released, mind you. We’re simply doing this now because we’re dropping support for Ruby 1.8.7 in…
  • Rails 3.2 RC1: Faster dev mode & routing, explain queries, tagged logger, store

    David
    19 Dec 2011 | 6:46 pm
    Once you’ve boarded the Rails train, you just know that every stop along the way is going to be a good time. This release candidate is no different and we’ve packed it with loving goodies without making upgrading a hassle. Faster dev mode & routing The most noticeable new feature is that development mode got a ton and a half faster. Inspired by Active Reload, we now only reload classes from files you’ve actually changed. The difference is dramatic on a larger application. Route recognition also got a bunch faster thanks to the new Journey engine and we made linking much faster as well…
  • add this feed to my.Alltop

    Polishing Ruby

  • RubyInline version 3.11.1 has been released!

    zenspider
    25 Jan 2012 | 2:12 am
    Inline allows you to write foreign code within your ruby code. It automatically determines if the code in question has changed and builds it only when necessary. The extensions are then automatically loaded into the class/module that defines it. You can even write extra builders that will allow you to write inlined code in any language. Use Inline::C as a template and look at Module#inline for the required API. Changes: 3.11.1 / 2012-01-25 1 bug fix: Use Ruby's LDFLAGS config variable. (maharg) http://www.zenspider.com/ZSS/Products/RubyInline/
  • minitest version 2.11.0 has been released!

    zenspider
    25 Jan 2012 | 2:08 am
    minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking. "I had a class with Jim Weirich on testing last week and we were allowed to choose our testing frameworks. Kirk Haines and I were paired up and we cracked open the code for a few test frameworks... I MUST say that mintiest is *very* readable / understandable compared to the 'other two' options we looked at. Nicely done and thank you for helping us keep our mental sanity." -- Wayne E. Seguin minitest/unit is a small and incredibly fast unit testing framework. It provides a rich set of…
  • hoe version 2.13.0 has been released!

    zenspider
    23 Jan 2012 | 7:15 pm
    Hoe is a rake/rubygems helper for project Rakefiles. It helps you manage and maintain, and release your project and includes a dynamic plug-in system allowing for easy extensibility. Hoe ships with plug-ins for all your usual project tasks including rdoc generation, testing, packaging, and deployment. See class rdoc for help. Hint: ri Hoe or any of the plugins listed below. For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf Changes: 2.13.0 / 2012-01-23 3 minor enhancements: Added :dcov task so you can easily check documentation coverage. Added Rake monkeypatch so that…
  • Enumerable#uniq_by

    zenspider
    18 Jan 2012 | 5:10 pm
    Random code sitting around waiting to be blogged... module Enumerable def uniq_by r, s = [], {} each do |e| v = yield(e) next if s[v] r << e s[v] = true end r end end
  • minitest version 2.10.1 has been released!

    zenspider
    17 Jan 2012 | 6:17 pm
    minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking. "I had a class with Jim Weirich on testing last week and we were allowed to choose our testing frameworks. Kirk Haines and I were paired up and we cracked open the code for a few test frameworks... I MUST say that mintiest is *very* readable / understandable compared to the 'other two' options we looked at. Nicely done and thank you for helping us keep our mental sanity." -- Wayne E. Seguin minitest/unit is a small and incredibly fast unit testing framework. It provides a rich set of…
 
  • add this feed to my.Alltop

    Koz Speaks

  • Decommissioning this old blog

    Michael Koziarski
    1 Jan 2012 | 10:22 pm
    After more than a year with no posts it’s time for me to admit that it’s unlikely I’ll find the time to regularly update a blog. I’ve converted the old posts over to Octopress so that I can avoid the deluge of comment spam and save some CPU cycles. This means I haven’t imported the old comments, there were some great comments but unfortunately there was also a tonne of junk. My plan is to occasionally post new articles / essays over at Koziarski.com and I’m hoping that a fresh system, without the baggage, will encourage me to expand some of my Twitter rants…
  • Fun with Threads

    Michael Koziarski
    10 Dec 2008 | 9:21 pm
    During the release of rails 2.2 we made a lot of changes to ensure that we could dispatch requests in parallel by using multiple threads. Some like to describe this as ‘threadsafe’, but as I’ve argued before that’s a little too vague for me. One of the key lessons we had in the very very early days of rails is that it is impossible to require code when you have multiple threads on the go. It takes a while for people to get their heads around this, typically they ask things like “Why not just put a mutex around require?”. I figured I should write this up for…
  • add this feed to my.Alltop

    Engine Yard Blog

  • In Case You Missed It: January’s JRuby Meetup

    Elaine Greenberg
    27 Jan 2012 | 3:36 pm
    If you weren't able to make it to our JRuby Meetup last week at Engine Yard HQ, you missed out on an awesome presentation from Square platform engineer Xavier Shay. However, you're in luck! Our favorite videographers at Marakana (a big shout out and thank you to Max Walker!) taped the whole thing. And of course, a big thanks to Xavier for coming and chatting about Square's awesome technology! Hear about how Square incorporated JRuby, Kirk, Jetty and Jetpack into their platform. Check out the video and slides right here: (JRuby at Square) Also, if you haven't already heard, JRuby Conf 2012 is…
  • And We’re Live!

    Elaine Greenberg
    26 Jan 2012 | 1:31 pm
    The 2012 JRubyConf site is live, and we're really excited about it! We’ll be using the site as a way to keep you up to date with conference developments and details as they unfold. This will be the fourth annual JRubyConf and definitely the biggest and best yet! Join us in talking about and celebrating the union of the Java and Ruby communities. Follow the news section of the site to find out more about sponsorships, speakers, after-events and a soon-to-follow call-for-proposals. Also, stay tuned for more information about Workshop Day (Monday the 21st) and the conference…
  • RVM Stable and More

    Michal Papis
    24 Jan 2012 | 2:13 pm
    Stable RVM has been available for some time now. Many of you may know what goes on in RVM, but there is still a story to tell. RVM is now using git flow, following the model outlined here, which makes a diametrical change in the release model of RVM. We will no longer make small releases using the master branch. We will have rare larger releases (called latest). Even so, we will maintain a stable branch which gets only fixes and important updates like ruby version updates. This new release model will allow for development of new features in head whilst keeping a stable version of RVM…
  • Bridging the Gap Between Development and Design

    Elizabeth Naramore
    19 Jan 2012 | 3:49 pm
    At a recent conference, I had the privilege of attending a talk entitled “Developers Can’t Design (and other completely untrue design myths)” by the incomparable Jen Myers. Jen is one of those rare individuals who effortlessly flows between design and development, having a formal education in computer science, but also a passion for design. I am not one of those people. At least, not yet. For, you see, I have traditionally considered myself in the “graphically challenged developer” camp. There was no hope of bridging that gap. I know my limitations and embrace them. But Jen said…
  • Introducing the New Feature Request Forum

    Jamie Bleichner
    17 Jan 2012 | 12:30 pm
    Here at Engine Yard we are committed to making you, our customer, successful. Today we are happy to share with you a new Feature Request Forum available to you within our support ticketing system. The Forum is a place for you to communicate directly with us and with other users. We hope you’ll use it to exchange ideas with the community, and discuss ways we can continue to improve our platform and services to better meet your needs. This is the first of many community topic forums we will be opening up in the near future. Your opinions and ideas are very important to us, and we want to…
  • add this feed to my.Alltop

    Learnivore!

  • RailsCasts #150 Rails Metal (revised) (Railscasts - paid)

    26 Jan 2012 | 6:00 pm
    Rails metal may have been removed in Rails 3, but it is possible to bypass the entire Rails stack through middleware as shown in this episode. HackerBooks.com - find and explore books from StackOverflow and HackerNews!
  • RailsCasts #319 Rails Middleware Walkthrough (Railscasts - paid)

    22 Jan 2012 | 6:00 pm
    Here I describe each Rack middleware that is included in a Rails app which will give you a better understanding of what a request goes through behind the scenes before it hits your application. HackerBooks.com - find and explore books from StackOverflow and HackerNews!
  • RailsCasts #318 Upgrading to Rails 3.2 (Railscasts - free)

    22 Jan 2012 | 6:00 pm
    Rails 3.2 sports many new features including automatic explain queries, tagged logging, key-value store in Active Record, improve migration generator and more. Learn all about these new features in this episode. HackerBooks.com - find and explore books from StackOverflow and HackerNews!
  • RailsCasts #72 Adding an Environment (revised) (Railscasts - paid)

    18 Jan 2012 | 6:00 pm
    Rails comes with three environments: development, test, and production, but it is easy to add your own. Here I show how to add a separate staging environment and how to start up Rails under this. HackerBooks.com - find and explore books from StackOverflow and HackerNews!
  • Episode 4: Context In JavaScript (Watch Me Code - paid)

    16 Jan 2012 | 6:00 pm
    When was the last time JavaScript's "this" worked the way you thought it did? You have an object with a function, and you call "this" to get some data from the it only to find that the data isn't there because "this" isn't the object you thought it was! In this episode, we'll look at all function invocations and how they manipulate "this". We'll also see some common scenarios that trip people up, like passing an object's method as a callback. HackerBooks.com - find and explore books from StackOverflow and HackerNews!
 
  • add this feed to my.Alltop

    Vinsol - Leading Ruby on Rails Development and Consulting Firm in India

  • SMS Scheduler – Another Amazing Android App Developed by our Android Team

    naveen
    11 Jan 2012 | 12:07 am
    Our Android team is on a spree of developing some amazing Android applications and the latest one that has made way from their stable is ‘SMS Scheduler‘. The Application is the result of the continuous and incessant analysis of the users’ requirements pertaining to sending and receiving SMS’s. Statistics show there is a continuous rise in the number of text SMS across the World, but even then more often than not, we miss to send important messages to our family, friends, officemates, or business partners on right time. This is where SMS Scheduler for Android comes to your…
  • Game On!

    Rajat Bhalla
    10 Jan 2012 | 5:28 am
    “Well served!” “What a spin!” “Just missed the net!” “Deuce!” These aren’t the standard phrases that you would expect to hear at a development company. But at VinSol, you would hear them many times a day! Ever since we got a new Table Tennis table, 60 minutes of game play has become a part of our daily routine. To the average manager / employer, it might seem as a waste of time. For those who are truly looking to get the best out of their team, this is just what the doctor ordered. I have seen productivity rise both before and after the…
  • Expense Tracking Made Easy with Our Android Application – Expense Tracker

    naveen
    6 Jan 2012 | 12:47 am
    Most of us are oblivious of our spending behavior and more often than not end up asking questions like ‘How can I improve my spending habits’? Or ‘how can I hold back unwanted expenses’? Let’s accept it, mainstream population is unmindful of their spending behavior and typically end up overspending (of course some people claim to know where their money is going). It is difficult to fully dispute this claim, but there is a fair degree of skepticism. None of us is a human calculator after all (unless you are not using a traditional pen and paper approach for your book-keeping). The…
  • Apple Deprecated Access to UDID

    Rajat Bhalla
    30 Nov 2011 | 6:58 am
    OK. So some of you might have heard that Apple has deprecated access to UDID. Well, that’s true….sort of…but what on earth does it mean. Let’s find out. Every iPhone, iPad, and iPod touch has an identifier unique to that device. It is called a UDID which stands for Unique Device ID. Some apps use it directly or some create a hash using it to uniquely identify the user/device. They use a property called “uniqueIdentifier”. Apple is now deprecating the method that is used to access the UDID of a device from within the app. In other words, this method is…
  • Does Agile Manifesto Need Changes? The 10 Years Experience!

    Rajat Bhalla
    8 Nov 2011 | 11:36 pm
    I delivered a presentation on the above topic earlier this year at an Agile Conference in NCR, India. I have summed up my thoughts below. On a cold winter morning of 13 Feb 2001, at a ski resort in Utah, the Agile Manifesto was born. The newborn had 17 fathers (ahem ahem), all stalwarts of the software industry, trying to be Agile in their own way, ahead of their times. Though some leading software practitioners were following some form of Agile (without calling it that), the real precipitation of thoughts happened in February 2001. And thus emerged the Agile methodology of software…
  • add this feed to my.Alltop

    DevInterface Blog

  • Inserire box di commento Disqus più volte nella stessa pagina

    Claudio
    26 Jan 2012 | 1:52 pm
    Ciao a tutti! Per chi non lo conoscesse Disqus è una piattaforma che permette di inserire facilmente un box per i commenti su qualsiasi sito web, e consente agli utenti di utilizzare il loro account facebook o twitter (ma non solo) per autenticarsi. Il limite di Disqus è che associa ogni thread di commenti ad un unica url. Di conseguenza, si aspetta che in ogni pagina ci sia solamente un box di commenti. Nella stragrande maggioranza dei casi questo limite è accettabile, tuttavia, per alcune applicazioni è utile poter inserire più box di commento in un unica pagina. Si pensi ad esempio ad…
  • Tips: Paginazione multipla con will_paginate

    Claudio
    11 Aug 2011 | 8:07 am
    Will Paginate è la gemma più utilizzata per la paginazione in Ruby on Rails. Succede a volte di dover paginare più liste diverse su una stessa pagina. Questo tip mostra come è possibile visualizzare una lista paginata di prodotti ed una lista paginata di servizi su una stessa pagina utilizzando will_paginate. Il punto chiave sta nell’utilizzare un parametro param_name personalizzato sia nella view che nel controller. Il codice della view sarà qualcosa di simile a questo: 1234567# ... # la lista di prodotti va qui   <%= will_paginate @products, :param_name =>…
  • Registrazione in due step con Devise

    Claudio
    11 May 2011 | 3:28 pm
    Nei miei progetti in Ruby on Rails generalemente utilizzo Devise come gem per l’autenticazione degli utenti. Nell’ultima applicazione sviluppata avevo necessità di personalizzare Devise in modo che gli utenti potessero registrarsi fornendo solo l’indirizzo email. La password di accesso doveva essere impostata nello step di conferma dell’account. Dopo alcuni test, sono giunto alla seguente soluzione. 1. Per prima cosa ho dovuto sovrascrivere il ConfirmationsController. Quindi nel file routes.rb ho impostato devise perchè utilizzase il mio controller custom (il mio…
  • Lancio del portale Gruppi Emergenti

    DevInterface
    15 Apr 2011 | 7:56 am
    Siamo prossimi alla pubblicazione online di Gruppi Emergenti, il nuovo portale della musica emergente italiana che si propone come vetrina per le band, gli artisti ed i locali di musica dal vivo. Il sito web, completamente gratuito, permette di creare la pagina della propria band o del proprio live club e di pubblicare eventi musicali. Tramite una ricerca localizzata su Gruppi Emergenti è possibile cercare tutti gli eventi (esibizioni, concerti e quant’altro) che si terranno in un determinato periodo ed in una determinata zona. L’integrazione con le mappe di Google permette di…
  • Prevenire la registrazione di login riservate

    Claudio
    5 Apr 2011 | 3:34 am
    Ogni volta che si realizza una web application dove gli utenti possono registrarsi, è buona cosa escludere alcuni username o login in modo che non possano essere utilizzati. Un esempio classico è la login “admin”. Credo che nessuno desideri che sulla sua applicazione ci sia un utente iscritto con lo username “admin” che possa magari contattare gli altri utenti spacciandosi per il vero amministratore del sito. La stessa cosa può valere per lo username “root” e per molti altri. E’ quindi necessario definire una lista di nomi riservati. Fortunatamente…
Log in