Ruby

  • Most Topular Stories

  • Getting Back in the Pool

    The Buckblog
    Jamis
    19 Jan 2015 | 11:00 pm
    An announcement. Our hero indicates his availability for work, in the hopes that some team, somewhere, will make him an offer he cannot refuse — 2-minute read
  • ActiveRecord SQLServer v4.2.0 Prerelease

    RubyFlow
    25 Jan 2015 | 8:17 pm
    Code named Kantishna for the Denali area of Alaska, the ActiveRecord SQLServer v4.2.0.pre is ready for testing. As the name suggests, this is for SQL Server 2012 and higher.
  • Preview Arbitrary HTML

    Jay Fields' Thoughts
    Jay Fields
    8 Jan 2015 | 7:23 am
    I'm a big fan of https://gist.github.com/ for sharing code. It's fantastic for quickly putting something online to talk over with someone else. I've often found myself wishing for something that allowed me to share rendered HTML in the same way. For example, a gist of the HTML for this blog entry can be seen here: https://gist.github.com/jaycfields/82e2cc0a588bd83a91f4. If I want someone to give me feedback on the rendered output, that gist isn't very helpful. It turns out, it's really easy to see that HTML rendered: switch the file extension to md. Here's the same gist with a md extension:…
  • Chasing cats, dumb risk and smart strategy

    slash7 with Amy Hoy
    Amy Hoy
    8 Jan 2015 | 9:27 am
    This is Franklin. Our friends found him all alone on the street when he was just 3 weeks old. We adopted him at 4 weeks, and hand-raised him with bottles and warming pads and all that. Franklin is all grown up now, and an anxious little kitty… which he expresses by being a giant dick to his more emotionally delicate brother. To soothe his delicate little kitty feelings — and to protect Watson, and our furniture — our vet suggested we isolate him at night. In this old house, that means one room: the bathroom. Which is upstairs, next to our bedroom. Some nights he happily trots into the…
  • ruby_parser version 3.6.4 has been released!

    Polishing Ruby + Software Releases - zenspider.com
    ryan davis
    16 Jan 2015 | 5:10 pm
    ruby_parser (RP) is a ruby parser written in pure ruby (utilizing racc–which does by default use a C extension). RP’s output is the same as ParseTree’s output: s-expressions using ruby’s arrays and base types. As an example: def conditional1 arg1 return 1 if arg1 == 0 return 0 end becomes: s(:defn, :conditional1, s(:args, :arg1), s(:if, s(:call, s(:lvar, :arg1), :==, s(:lit, 0)), s(:return, s(:lit, 1)), nil), s(:return, s(:lit, 0))) Tested against 801,039 files from the latest of all rubygems (as of 2013-05): 1.8 parser is at 99.9739% accuracy, 3.651 sigma 1.9 parser…
  • add this feed to my.Alltop

    RubyFlow

  • ActiveRecord SQLServer v4.2.0 Prerelease

    25 Jan 2015 | 8:17 pm
    Code named Kantishna for the Denali area of Alaska, the ActiveRecord SQLServer v4.2.0.pre is ready for testing. As the name suggests, this is for SQL Server 2012 and higher.
  • Today I Learned

    23 Jan 2015 | 12:43 pm
    thoughtbot created an open source GitHub repo this week called Today I Learned. It's receiving lots of community submissions for tips in all programming languages, including lots of Ruby.
  • How to detect and block bots with NGINX

    23 Jan 2015 | 9:18 am
    Reverb.com infrastructure engineer Adam Enger explains How to block bots with NGINX rate limiting
  • Cleaner, safer Ruby API clients with Kleisli

    22 Jan 2015 | 4:54 am
    I just blogged about how to build better APIs using general, simple but powerful ideas from the world of monads.
  • Encryption on Rails - a Primer

    20 Jan 2015 | 1:33 pm
    Encryption on Rails - a Primer - Learn to do multi-key encryption with rotation by Reverb.com engineer Joe Kurleto.
 
  • add this feed to my.Alltop

    The Buckblog

  • Getting Back in the Pool

    Jamis
    19 Jan 2015 | 11:00 pm
    An announcement. Our hero indicates his availability for work, in the hopes that some team, somewhere, will make him an offer he cannot refuse — 2-minute read
  • A Better Recursive Division Algorithm

    Jamis
    14 Jan 2015 | 11:00 pm
    A novel variation on a the Recursive Division maze generation algorithm, in which regions are defined by arbitrary clusters of cells instead of rectangular divisions of the grid. The algorithm is presented and illustrated, and its benefits over the original algorithm are put forth. A demonstration in JavaScript is provided — 5-minute read
  • Winding Back Up

    Jamis
    12 Jan 2015 | 11:00 pm
    In which our hero cautiously tests the waters of the blogosphere once again, relates three years' worth of news and lessons learned, and announces his latest project — 3-minute read
  • Winding down...

    Jamis
    1 Sep 2011 | 9:43 am
    In which our hero tearfully exits the blogosphere, though perhaps without quite so much drama — 1-minute read
  • Sharing the Inheritance Hierarchy

    Jamis
    7 Jun 2011 | 2:32 pm
    Part rant, part exhortation—the dangers of naively implementing Ruby's inheritance hierarchy callbacks — 3-minute read
  • add this feed to my.Alltop

    Jay Fields' Thoughts

  • Preview Arbitrary HTML

    Jay Fields
    8 Jan 2015 | 7:23 am
    I'm a big fan of https://gist.github.com/ for sharing code. It's fantastic for quickly putting something online to talk over with someone else. I've often found myself wishing for something that allowed me to share rendered HTML in the same way. For example, a gist of the HTML for this blog entry can be seen here: https://gist.github.com/jaycfields/82e2cc0a588bd83a91f4. If I want someone to give me feedback on the rendered output, that gist isn't very helpful. It turns out, it's really easy to see that HTML rendered: switch the file extension to md. Here's the same gist with a md extension:…
  • LTR Org Chart

    Jay Fields
    7 Jan 2015 | 5:45 am
    Most traditional organizations have an Org Chart that looks similar to the following:Org Charts displayed in this way emphasize the chain of command. A quick look at a node in this Org Chart will let you know who someone reports to and who reports to them. The chart gives a clear indication of responsibility; it also gives an impression of "who's in charge" and how far away you are from the top.Several years ago I joined ThoughtWorks (TW). TW (at least, when I was there) boasted of their Flat Org Chart and it's advantages.A flat organization (also known as horizontal…
  • Making Remote Work: Tools

    Jay Fields
    6 Jan 2015 | 5:27 am
    I recently wrote about my experiences working on a remote team. Within that blog entry you can find a more verbose version of the following text:Communication is what I consider to be the hardest part of remote work. I haven't found an easy, general solution. A few teammates prefer video chat, others despise it. A few teammates like the wiki as a backlog, a few haven't ever edited the wiki. Some prefer strict usage of email/chat/phone for async-unimportant/async-important/sync-urgent, others tend to use one of those 3 for all communication.As you can tell, we have several different…
  • Making Remote Work

    Jay Fields
    28 Dec 2014 | 11:32 am
    Over 18 months ago I wrote Year Five, an experience report I never imagined I would write. I closed the blog entry by saying I look forward to writing about Year Six. A year and a half later, I'm still having a hard time deciding what (if anything) I should write. My writers block isn't the result the Remote Work experiment failing. Quite the opposite, the success of the Remote Work experiment has helped shape a team I'm very proud to be a part of, and yet I find myself unable to declare victory."How can you work effectively with remote teammates" has become the most common question I hear…
  • Working Effectively with Unit Tests Official Launch

    Jay Fields
    16 Dec 2014 | 10:00 pm
    Today marks the official release release of Working Effectively with Unit Tests. The book is available in various formats:DRM free pdf, epub, & mobi (Kindle) at http://leanpub.com/wewutSoftcover at http://amzn.com/1503242706Kindle edition at http://amzn.com/B00QS2HXUOI’m very happy with the final version. Michael Feathers wrote a great foreword. I incorporated feedback from dozens of people - some that have been friends for years, and some that I’d never previously met. I can’t say enough great things about http://leanpub.com, and I highly…
 
  • add this feed to my.Alltop

    slash7 with Amy Hoy

  • Chasing cats, dumb risk and smart strategy

    Amy Hoy
    8 Jan 2015 | 9:27 am
    This is Franklin. Our friends found him all alone on the street when he was just 3 weeks old. We adopted him at 4 weeks, and hand-raised him with bottles and warming pads and all that. Franklin is all grown up now, and an anxious little kitty… which he expresses by being a giant dick to his more emotionally delicate brother. To soothe his delicate little kitty feelings — and to protect Watson, and our furniture — our vet suggested we isolate him at night. In this old house, that means one room: the bathroom. Which is upstairs, next to our bedroom. Some nights he happily trots into the…
  • A meditation on goals

    Amy Hoy
    6 Jan 2015 | 1:32 pm
    This is not an official Year In Review post, but rather a lengthy meditation on goals: Good goals, bad goals, misinformed goals, hitting goals, missing goals. A year and 2 days ago, I hit publish on my goals for 2014. Here are the goals: Grow Freckle Time Tracking to $700k/yr run rate… which would have been +51% YoY growth over Dec 2013, less prepayments. FAIL, grew only 34%. Run BaconBizConf again. SUCCESS, even better than last year Run 30×500 5-6 times. FAIL, ran 4x. Release 2 self-guided products into the “30×500 Universe” FAIL, released 1 (Just Fucking Ship) (OR:…
  • 12 of our bootstrapping students to watch in 2015

    Amy Hoy
    1 Jan 2015 | 9:22 am
    Happy New Year! Amy and I are going to be publishing our OWN reflections on 2014, but in the mean time, I went ahead and rounded up a collection of 30×500 alumni who we were really impressed by in 2014…many of whom have posted their OWN annual reviews. In no particular order, here are 5 annual reviews from some of our successful alumni that you can enjoy: Joel Hooks – Bootstrapping egghead.io to feed my family: 2014 in Review Noah Gibbs – 2014 year in review Brennan Dunn – My year in review for 2014 Josh Brown – Year in Review 2014: What I learned…
  • The responsibility to give back: Our charitable giving in 2014

    Amy Hoy
    29 Dec 2014 | 11:55 am
    The way I see it, some people are meant to do charitable work. And it’s up to the rest of us to ensure they have what they need. That’s what I wrote last year, and I believe it more than ever. To that end — cuz anonymous donations are bullshit — here’s a breakdown of our charitable giving in 2014: Our traditional giving… DonorsChoose: $11,889.98 Philabundance: $1,500… or 3,000 meals Project Night Night: $250, or 10 care packages for homeless children Heifer International: $240 for 12 flocks of chicks EFF: $100 Wikipedia: $10 (but continuing at $10/mo) We also offered each of…
  • How to create a USEFUL feedback loop after launch

    Amy Hoy
    17 Dec 2014 | 2:06 pm
    With Just Fucking Ship, well, just fucking shipped, Amy and I have been focused on two main things: 1) Amy is finishing up the first pass of editing so we can send our customers a FINISHED copy of the book. As I write this email, she’s putting the last chapter through it’s paces! 2) I’m diligently reading through all of the feedback from those of you who bought a copy for yourself. And it’s been quite a pile to sift through: over 115 people replied to a couple of pointed questions that we asked…that means nearly 15% of the 850+ people who purchased a copy of JFS…
  • add this feed to my.Alltop

    Polishing Ruby + Software Releases - zenspider.com

  • ruby_parser version 3.6.4 has been released!

    ryan davis
    16 Jan 2015 | 5:10 pm
    ruby_parser (RP) is a ruby parser written in pure ruby (utilizing racc–which does by default use a C extension). RP’s output is the same as ParseTree’s output: s-expressions using ruby’s arrays and base types. As an example: def conditional1 arg1 return 1 if arg1 == 0 return 0 end becomes: s(:defn, :conditional1, s(:args, :arg1), s(:if, s(:call, s(:lvar, :arg1), :==, s(:lit, 0)), s(:return, s(:lit, 1)), nil), s(:return, s(:lit, 0))) Tested against 801,039 files from the latest of all rubygems (as of 2013-05): 1.8 parser is at 99.9739% accuracy, 3.651 sigma 1.9 parser…
  • sexp_processor version 4.4.5 has been released!

    ryan davis
    16 Jan 2015 | 5:08 pm
    sexp_processor branches from ParseTree bringing all the generic sexp processing tools with it. Sexp, SexpProcessor, Environment, etc… all for your language processing pleasure. Changes: 4.4.5 / 2015-01-16 1 bug fix: Removed shebangs in tests because of bugs (aka ‘features’) in RPM packaging tools. home: https://github.com/seattlerb/sexp_processor rdoc: http://docs.seattlerb.org/sexp_processor
  • You can go home now, I solved testing

    ryan davis
    15 Jan 2015 | 12:00 pm
    I need to work on a real blog post about this topic, but all I could come up with yesterday was this snarky snippet of code: 1 2 3 4 5 6 7 8 9 10 11 def test_some_method assert_something_output do assert_nothing_raised do assert_some_side_effect do assert_some_response do object.some_method # testing SOLVED end end end end end This is, of course, me responding to more resistance to minitest not having useless assertions like assert_nothing_raised. I’ve talked about it before. I’ve blogged about it before. Pretty sure it’ll never die.
  • omnifocus version 2.1.6 has been released!

    ryan davis
    9 Jan 2015 | 4:42 pm
    Synchronizes bug tracking systems to omnifocus. Changes: 2.1.6 / 2015-01-09 1 minor enhancement: Review command filters out dropped projects. home: https://github.com/seattlerb/omnifocus rdoc: http://docs.seattlerb.org/omnifocus
  • minitest-debugger version 1.0.3 has been released!

    ryan davis
    9 Jan 2015 | 4:39 pm
    This is a stupid simple example of how easy it is to make a minitest plugin that does something useful. In this case it wraps assert so that failed assertions will drop into the ruby debugger. Changes: 1.0.3 / 2015-01-09 1 bug fix: Removed dead rubyforge setting in Rakefile home: https://github.com/seattlerb/minitest-debugger rdoc: http://docs.seattlerb.org/minitest-debugger
 
  • add this feed to my.Alltop

    Saturn Flyer with Jim Gay

  • Ruby Forwardable deep dive

    19 Jan 2015 | 4:00 pm
    The Forwardable library is one of my favorite tools from Ruby’s standard library both for simplifying my own code and learning how to make simple libraries. I find that the best way to understand how code works is to first understand why it exists and how you use it. In a previous article I wrote about the value of using Forwardable. It takes code like this: def street address.street end def city address.city end def state address.state end And makes it as short as this: delegate [:street, :city, :state] => :address Shrinking our code without losing behavior is a great feature which…
  • Avoiding clever mistakes when displaying data with missing values

    29 Dec 2014 | 4:00 pm
    In a previous article I showed a snippet of code I’ve used for displaying address information. There were some tricks to getting it right that are valuable to know when you have to handle missing data. Here’s the problem, and how to solve it. Let’s setup some simple data to use: street = "123 Main St." city = "Arlington" province = "VA" postal_code = "222222" The original implementation of displaying an address looked like this: "".tap do |string| string << street unless street.nil? string << city unless city.nil? string << province unless province.nil? string <<…
  • Enforcing encapsulation with East-oriented Code

    22 Dec 2014 | 4:00 pm
    Often our programs become complicated inadventently. We don’t intend to put things it the wrong place, it just seems to happen. Most of the time it happens to me when I allow my objects to leak information and eventually their responsibilities. In recent articles I showed code that handled displaying address details and how to separate the responsibility for formatting from the responsibility for data. But there’s still a problem which would allow me or someone else to unintentionally leak responsibility from these objects. It’s a good idea to be guarded against how much you…
  • Preferring value objects or setters and arguments

    15 Dec 2014 | 4:00 pm
    The problem with programming can be that there are so many ways to solve a problem. For each solution there are arguments for it and arguments against it. In recent articles I’ve written about moving responsibilities into a template object and out of the objects which use them for display. When the template code first began, its use was extremely simple: class Address def display(template) template.display_address(self) end end By making changes to the template to allow for shared behavior among different types of templates, the way in which our Address class used it became a bit more…
  • Managing change using a common interface

    8 Dec 2014 | 4:00 pm
    In a previous article I showed a way to move display code into a template object to manage missing data. Here’s what the basic template code looked like: class Template def display_address(address) province_and_postal_code = [address.province, address.postal_code].compact.join(' ') province_and_postal_code = nil if province_and_postal_code.empty? city_province_postal_code = [address.city, province_and_postal_code].compact.join(', ') city_province_postal_code = nil if city_province_postal_code.empty? [address.street, city_province_postal_code].compact.join("\n") end end That’s…
  • add this feed to my.Alltop

    Vinsol - Ruby on Rails, iOS, Android Consulting and Development

  • EmberJS: Snagged by belongsTo association

    Chirag Mongia
    12 Jan 2015 | 3:00 am
    Writing Javascript code using MVC framework and rendering templates at client side is the new fancy way of writing web applications. As they say, when Rails is the backend, Emberjs at frontend is a good fit. The beauty of the architecture along with our excitement has impelled us to dive into this framework. It started with revamping of an eCommerce site by building its version-2 using Emberjs as frontend framework and Rails as an api server. Initially, everything was working fine and we were enjoying our Emberjs learning and implementation, but in the following scenario belongsTo association…
  • Custom Edit Control for UITableViewCell

    Satish
    6 Jan 2015 | 7:02 am
    In one of my recent iOS project I was supposed to replace table view cell default edit control with a custom button to match the designs. I guess everyone knows that its pretty simple to change edit control’s color for selected state, we simply need to set cell’s tint color. But there is no way to customise selected or default state of cell edit control with our own custom image because there is no public API to access this control. So, to customise this we have to write our own code. Steps below will guide you to achieve this. Step 1: Hide Default Edit Control First of all add…
  • Droidcon India 2014 Experience

    alok
    11 Dec 2014 | 7:51 am
    Last week we attended Droidcon 2014, held in Bengaluru. First thing we noticed was that we had underestimated it a lot. The event was humongous. With around 250-300 attendees, most of which were either cream Android devs or entrepreneurs. The content selection panel as well seemed to have done a great job. Topics ranged from core technical (hacking through Android source code) to all the way upto UI centric stuffs (delightful user experience). The speakers were highly experienced and most of them were either business owners or with hands-on experience in product development. Even the…
  • Tips for Designers: from a Developer

    alok
    20 Nov 2014 | 2:44 am
    Android is a versatile OS with more than 1000 device manufacturers and more than 18000 distinct devices. Screen size of android phones vary from 2.6” – 6” and the resolution of screen ranges from 240 X 320 to 1440 X 2560 px with screen density from 120 to 640 dpi (ldpi to xxxhdpi). It is difficult for designers to create such designs which work well on all these devices irrespective of the size, density and aspect ratio of device and still stay developer friendly. In this blogpost I will discuss some useful techniques that ease out the painful design implementation in Android…
  • Communication patterns for application components

    achin
    4 Nov 2014 | 5:34 am
    Activities, services, fragments, helper classes etc. are main components of Android applications but its tricky to establish communication between these components. It’s tricky when one cares about writing reusable code – loosely coupled, plug-n-play-able. The goal here is to avoid tight coupling. Tight coupling – Components keep references of each other and call methods on them directly. In the code below, we are keeping a reference of MagazineActivity inside MenuFragment. So, MenuFragment is tightly coupled with MagazineActivity i.e., it cannot function without MagazineActivity.
  • add this feed to my.Alltop

    Ruby on Rails Blog

  • Building an OCR using PDF.js and PDFText

    virendra
    22 Jan 2015 | 1:24 am
    A couple of years back I was handpicked (not really ) for a project that required me to work and build an application that would extract text from the PDFs uploaded into the system, using a bunch of baseline co-ordinates mapped against a sample pdf at start. The Project was named Invoice Analyser (IA) – since all the PDFs were actually invoices of our client. I still vividly remember the day when I was made aware of the requirement on call and soon after the call ended, I knew it was going to tough but I kept faith in myself. If I had to sum up the requirements, it would fit in 3…
  • Dealing with disillusionment in tech.

    siddharth
    12 Jan 2015 | 3:05 am
    As someone who has been in the tech industry for a while now, I’ve seen engineers getting disillusioned, overwhelmed and burnt out to a point where they couldn’t return to their original selves. Battling burnouts is still a subject that isn’t widely discussed in our field and a lot of those who’ve successfully survived it barely understand what they’ve been through. In an industry where we evangelize hackathons and sleeping under the desk, it’s hard to sustain as an individual that doesn’t associate failures in business or code as personal failures. This leads us to the general…
  • Face recognition in Ruby Using Kairos also Finding your celebrity-look-alike

    Shashank Singh
    19 Dec 2014 | 4:04 am
    Humans have an innate need to be identified with a group, that drives us to be an important part of something bigger than us. This implies a relationship that is greater than familiarity or acquaintances. “Facial structure” plays a big part in that identity, making online services like find-your-celebrity-look-alike a guaranteed success. Today, we are going to look under the figurative hood: How this technology works. We will be building a sample find-your-celebrity-look-alike application on Ruby using “Kairos”, a Third party face recognition api. With a simple example, we will…
  • Native Data-binding using JavaScript with observe

    Vinod Sobale
    17 Dec 2014 | 12:45 am
    We have always loved using MV* frameworks for data-binding. Well, we have our reasons. There was never an easy way to set event listeners on RAW objects and perform certain tasks. Thanks to the recent ECMASCRIPT’s (7.0) proposal, data-binding has never been so easy and best of all, without any help from any framework. Announcing Object/Array.observe Allow me to introduce you to a method that asynchronously keeps track of the changes to the data model or simply an array which allows you to perform certain tasks by providing a callback function every time it detects a change in your data…
  • 4 important concepts any front end developer should know

    Vinod Sobale
    20 Jul 2014 | 4:07 am
    Note: I picked these 4 concepts because I feel they would build a strong foundation of understanding for you and it is entirely my opinion and I also understand that every front end developer may not feel the same way. Also, the purpose of this article is to only briefly explain about these concepts so you can dig deeper when you know enough. Event Propagation Event Delegation Document Fragment CSS Specificity Let’s begin… Event Propagation Event dispatching in DOM tree – (image source – W3C) Event (event object) must determine the propagation path (refer to the…
 
Log in