Ruby

  • Most Topular Stories

  • How not to fail at Timezones in Rails

    RubyFlow
    27 Mar 2015 | 10:25 am
    http://product.reverb.com/2015/03/27/how-not-to-fail-at-timezones-in-rails/
  • Hack with Rack

    Ruby on Rails Blog
    virendra
    1 Mar 2015 | 11:32 pm
    Hello everyone, Hope you are having a good day. Ok, some years ago, one of our clients wanted us to implement Social Network (FB,Twitter,Linkedin) sharing functionality. Knowing all the OAuth implementation that one has to deal with, we decided to use this awesome gem called OmniAuth that does all the heavy lifting tasks of OAuth Authorisation with very basic minimum implementation. So with OmniAuth we manage to get the work done in time but then we wanted OAuth Authorisation to work with Ajax call as well. I remember going all out crazy (Googling + debugging OmniAuth code) to find a way to…
  • SOLID Review: Interface Segregation Principle

    RubyFlow
    27 Mar 2015 | 8:52 am
    My take on the Interface Segregation Principle in Ruby. Using Ruby modules, we can see the important role cohesive “interfaces” play, even in duck-typed languages. This leads to less coupling and more readable code.
  • gem install abstract_class

    RubyFlow
    27 Mar 2015 | 10:15 am
    The abstract class pattern implemented in Ruby: https://github.com/shuber/abstract_class
  • Gem of Week #13 - props gem - yet another config (INI) reader in Ruby

    RubyFlow
    27 Mar 2015 | 11:30 am
    Hello, over at the Planet Ruby the Gem of the Week series continues with #13 - props - yet another config (INI) reader - that lets you read in configuration settings in the Windows-inspired INI format and lets you link up settings in hashes in a lookup hierarchy and so on. Full article. Cheers.
  • add this feed to my.Alltop

    RubyFlow

  • Making Big Changes Safely

    27 Mar 2015 | 8:24 pm
    I’d like to take you back 12 months ago. My story starts with my team beginning a 3-month project to add a new feature. My team is Task Force 1. We have 4 developers. The feature is called “Custom Inventory Statuses.” Read more
  • Gem of Week #13 - props gem - yet another config (INI) reader in Ruby

    27 Mar 2015 | 11:30 am
    Hello, over at the Planet Ruby the Gem of the Week series continues with #13 - props - yet another config (INI) reader - that lets you read in configuration settings in the Windows-inspired INI format and lets you link up settings in hashes in a lookup hierarchy and so on. Full article. Cheers.
  • How not to fail at Timezones in Rails

    27 Mar 2015 | 10:25 am
    http://product.reverb.com/2015/03/27/how-not-to-fail-at-timezones-in-rails/
  • gem install abstract_class

    27 Mar 2015 | 10:15 am
    The abstract class pattern implemented in Ruby: https://github.com/shuber/abstract_class
  • SOLID Review: Interface Segregation Principle

    27 Mar 2015 | 8:52 am
    My take on the Interface Segregation Principle in Ruby. Using Ruby modules, we can see the important role cohesive “interfaces” play, even in duck-typed languages. This leads to less coupling and more readable code.
 
  • add this feed to my.Alltop

    The Buckblog

  • Playing with Constants, Methods, and Superclasses

    Jamis
    23 Mar 2015 | 11:00 pm
    A few curious Rubyisms of dubious use, which may yet be worth knowing about — 3-minute read
  • Task Tracking for Neurochemical Brains

    Jamis
    16 Mar 2015 | 11:00 pm
    Presenting a simple (and perhaps very unoriginal) technique for keeping track of a list of tasks in the face of interruption and exploration — 4-minute read
  • Mazes for Programmers: Beta!

    Jamis
    3 Feb 2015 | 11:00 pm
    The author announces the beta availability of his new book, "Mazes for Programmers", and invites the reader to participate in its completion by offering feedback, corrections, and suggestions — 2-minute read
  • Lessons from the Kitchen

    Jamis
    29 Jan 2015 | 11:00 pm
    A retrospective on a personal journey, wherein the author's experiences of growing as a cook are compared with learning how to write software — 5-minute read
  • Hanging Out a Shingle

    Jamis
    25 Jan 2015 | 11:00 pm
    Our hero's plans change, and his journey takes an unexpected turn. — 1-minute read
  • add this feed to my.Alltop

    Jay Fields' Thoughts

  • My Answers for Microservices Awkward Questions

    Jay Fields
    15 Mar 2015 | 2:48 pm
    Earlier this year, Ade published Awkward questions for those boarding the microservices bandwagon. I think the list is pretty solid, and (with a small push from Ade) I decided to write concise details on my experience. I think it's reasonable to start with a little context building. When I started working on the application I'm primarily responsible for microservices were very much fringe. Fred George was already giving (great) presentations on the topic, but the idea had gained neither momentum nor hype. I never set out to write "microsevices"; I set out to write a few small projects…
  • Experience Report: Weak Code Ownership

    Jay Fields
    23 Feb 2015 | 7:00 am
    In 2006 Martin Fowler wrote about Code Ownership. It's a quick read, I'd recommend checking it out if you've never seen it. At the time I was working at ThoughtWorks; I remember thinking "Clearly Strong makes no sense and I have no idea what scenario would make Weak reasonable". 8 years later, I find myself advocating for Weak Code Ownership within my team. Collective Code Ownership (CCO) served me well between 2005 and 2009. Given the make-up of the teams that I was a part of I found it to be the most effective way to deliver software. Around 2009 I joined a team that eventually grew to…
  • 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…
 
  • add this feed to my.Alltop

    slash7 with Amy Hoy

  • What does ’30×500′ even mean?

    Amy Hoy
    20 Mar 2015 | 5:30 am
    April, 2010. The party bus was rolling down the highway from Dublin to Kilkenny; it was upholstered in sparkly red and orange vinyl and full of my favorite kind of nerd, and I was perched on the stool in front with a mic clutched in my hand. I had just finished an impromptu little story about how I bankrolled Freckle’s slow SaaS growth by selling infoproducts (including the very first proto-30×500!). This was the first time I’d ever explained my Be Your Own Angel Investor approach in public. Paul Campbell (organizer) and Randall Thomas on a Funconf party bus, by adelcambre…
  • What I learned making a living on eBay

    Amy Hoy
    18 Mar 2015 | 4:22 pm
    Scene: A fancy tapas restaurant. Dark wood tables and candle lighting. Me and my business partner, Alex. As the ham croquettes arrive, I whip out my iPhone and tell Alex, “Just a sec, I need to bid on an auction.” He laughs at me. He calls me a crazy chair lady. I laugh too, because I win the auction. I now am the proud owner of 2 sleek turquoise egg chair reproductions. Later, when I sell off some other furniture, two separate dealers drool over them. “Where do you find all these things?” they ask. eBay, I say. I’ve furnished our house with truly awesome vintage…
  • “Nobody will pay $10,000 for an Apple Watch!” & other reasons you can’t sell shit

    Amy Hoy
    10 Mar 2015 | 9:40 am
    Are you going to spend $10,000 on the new Apple Watch Edition? No, right? Me either. Maybe you can’t afford it. Maybe you could drop $10k on a device but it seems repugnant or simply ridiculous. Maybe you don’t wear a watch at all; I sure don’t, and at this stage I don’t intend to start. Maybe everyone you know agrees: Overpriced. Who the hell would buy that? Nobody. Apple jumped the shark. You can’t upgrade the innards and jesus h, it’s gold, what a frigging waste, it’ll be obsolete in a year. Who the hell would buy a $10k watch with planned…
  • From “Oh, I shouldn’t charge money for this…” to a $20k launch

    Amy Hoy
    9 Mar 2015 | 9:25 am
    “The idea that, oh well, I shouldn’t charge money for this because… some reason. Justin Weiss spent years noodling on side projects. He made every excuse in the book for not charging for them, including some we haven’t often heard: At the time, it seemed like, ‘Why should I charge money for this? This is a passion project of mine.’ So I should just release it for free.” But last year, he decided to make a change. Justin took 30×500. In the first 3 weeks of droppin’ ebombs on his blog, he added his first 50 mailing list subscribers. (ebomb, n:…
  • So, you’ve got some Safari and ebombs. Now what?

    Amy Hoy
    5 Mar 2015 | 8:17 am
    ebomb, n – our special 30×500 term for actionable educational content marketing. Yeah, cuz that’s a mouthful. So drop a knowledge bomb on ‘em. Ebomb ‘em. “So, I took the 30×500 Bootcamp in November of 2013 and learned a lot. The main thing that stuck out in my mind as this Giant To-Do was the ebombs, because I make content, that’s what I do, that’s what I’ve always done. Did a lot of research, hit the ground running, and just started making a whole bunch of stuff. And that’s kind of where I am today… making a lot of ebombs,…
  • add this feed to my.Alltop

    Polishing Ruby + Software Releases - zenspider.com

  • debride-erb version 1.0.0 has been released!

    ryan davis
    26 Mar 2015 | 5:38 pm
    Extends debride to analyze erb files (erubis ala rails, actually). Changes: 1.0.0 / 2015-03-26 1 major enhancement Birthday! home: https://github.com/seattlerb/debride-erb rdoc: http://docs.seattlerb.org/debride-erb
  • debride version 1.2.0 has been released!

    ryan davis
    26 Mar 2015 | 5:32 pm
    Analyze code for potentially uncalled / dead methods. Changes: 1.2.0 / 2015-03-26 1 major enhancement: Added plugin system to allow processing of other file types. 1 minor enhancement: Refactored code to allow for plugin system to do multi-phase processing. home: https://github.com/seattlerb/debride rdoc: http://docs.seattlerb.org/debride
  • Debride gets Plugins!

    ryan davis
    26 Mar 2015 | 12:00 pm
    I just released debride 1.2.0 and extended it with a flexible plugin system that’ll allow it to process multiple types of files. I also released debride-erb 1.0.0 as debride’s first plugin. Between the whitelisting and ERB support, I’ve been able to run this across seattlerb.org’s website and actually found some stuff we could remove! If you have any problems with it or have suggestions on how to make it work better for you, please file an issue.
  • debride version 1.1.0 has been released!

    ryan davis
    18 Mar 2015 | 2:36 am
    Analyze code for potentially uncalled / dead methods. Changes: 1.1.0 / 2015-03-18 1 minor enhancement: Added –whitelist option to exclude known false positives. 1 bug fix: Fixed sexp_processor dependency home: https://github.com/seattlerb/debride rdoc: http://docs.seattlerb.org/debride
  • Debride gets Whitelisting

    ryan davis
    18 Mar 2015 | 2:00 am
    I just released debride 1.1.0 and extended it with whitelisting. So previously when you ran debride on your code you might see something like this: % debride lib These methods MIGHT not be called: MyClass good_method lib/some/file.rb:16 bad_method lib/some/file.rb:20 ... But if you know that good_method is exempt (perhaps because it is public API), then you can whitelist it: % echo good_method > whitelist.txt % debride --whitelist whitelist.txt lib These methods MIGHT not be called: MyClass bad_method lib/some/file.rb:20 ... You can also use regexps in your whitelist by delimiting them…
 
  • add this feed to my.Alltop

    Saturn Flyer with Jim Gay

  • The 4 Rules of East-oriented Code: Rule 3

    16 Mar 2015 | 5:00 pm
    When I set out to create my presentation for RubyConf, I wanted to provide the audience with something they could easily try. By doing that, one could walk away and put themselves in a position to think about their code differently. While, James Ladd, the creator of East-oriented Code made some basic rules, I decide to take them and frame it in the specific context of Ruby: Always return self Objects may query themselves Factories are exempt Break the rules sparingly After writing about Rule 1 and Rule 2 I’m very eager to get to Rule 3. It’s an easy way to break the intent of this…
  • The 4 Rules of East-oriented Code: Rule 2

    9 Mar 2015 | 5:00 pm
    In a previous article I wrote about the first rule of East-oriented Code. Here again are the rules I set forth in my presentation at RubyConf: Always return self Objects may query themselves Factories are exempt Break the rules sparingly The second rule, that “Objects may query themselves”, allows the design of objects to work with their own attributes. When we design our systems of interacting objects we can use the Tell, Don’t Ask approach to limit the decisions in the code to objects which are responsible for the data used to make them. The Tell, Don’t Ask article…
  • The 4 Rules of East-oriented Code: Rule 1

    9 Feb 2015 | 4:00 pm
    4 simple rules are pretty easy to remember, but a bit harder to understand and apply. A key concept of East-oriented Code is to enforce the use of commands by returning the object receiving a message. Here’s a simple example of what that looks like: def do_something # logic for doing something omitted... self end It’s incredibly simple to follow. Here are the rules I set forth in my presentation at RubyConf: Always return self Objects may query themselves Factories are exempt Break the rules sparingly The first three are hard rules. The fourth, obviously, is more lenient.
  • 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 <<…
  • add this feed to my.Alltop

    Ruby-coloured glasses

  • Link: Flaws In Scrum And Agile

    Taryn East
    8 Mar 2015 | 5:57 pm
    In The flaws in Scrum and Agile Giles Bowkett explains why Panda Strike feels that Agile is basically a past-technology. Good in it's day, with some useful lessons we can keep, but largely not relevant to the way that distributed teams work these days. It's a very interesting read, and I find myself agreeing with it.
  • ActiveAdmin simple_table

    Taryn East
    22 Feb 2015 | 4:04 pm
    ActiveAdmin by default will build you a table (using table_for) for a collection of objects. But sometimes you just want to throw up a quick table of random values - eg on a dashboard you want a table where the left=column is a description and the right column is, say sets of counts of various things. ActiveAdmin uses Arbre under the covers to build html for you This means you can use it to laboriously build an html table using all the tags. But if you just want to throw together a super-simple table, this means too much typing. So I've written a convenience method that will take an array of…
  • Link: run in with turbolinks

    Taryn East
    30 Nov 2014 | 12:24 am
    A quick link today to an article on turbolinks. It includes a couple of different levels of work-around snippets when adding javascripty functionality to your own links so it's pretty useful. Rails 4: My First Run-in with Turbolinks
  • Generate a subset of pseudo-random permutations in non mega-huge time

    Taryn East
    23 Nov 2014 | 6:38 pm
    One of the neat things about sending packages via sendle is that you don't have to print out a label or even know the address of your recipient (this is done so the recipient can keep their address private if they want). Instead, we give the sender a pair of unique code-names to put onto the package. So instead of J Random Shop-assistant at EvilCorp getting your full address, instead you write something like "From: Golden Lion To: Red Tiger". It's fun, as well as effective - like secret-agent names. but it does present us with an interesting problem - how do we generate unique codenames for…
  • Link: Fundamental Guidelines Of E-Commerce Checkout Design

    Taryn East
    19 Nov 2014 | 11:03 pm
    "Here is the harsh reality of e-commerce websites: according to recent e-commerce studies, at least 59.8% of potential customers abandon their shopping cart (MarketingSherpa puts it at 59.8%, SeeWhy at 83% and MarketLive at 62.14%). The main question is why do customers abandon their shopping cart so often?" Fundamental Guidelines Of E-Commerce Checkout Design condenses a large study into usability into 11 really useful guidelines to make your checkout experience much more likely to convert. Here's a condensed, tl;dr version: But I totally recommend reading the whole thing - it's not that…
  • add this feed to my.Alltop

    Ruby on Rails Blog

  • Hack with Rack

    virendra
    1 Mar 2015 | 11:32 pm
    Hello everyone, Hope you are having a good day. Ok, some years ago, one of our clients wanted us to implement Social Network (FB,Twitter,Linkedin) sharing functionality. Knowing all the OAuth implementation that one has to deal with, we decided to use this awesome gem called OmniAuth that does all the heavy lifting tasks of OAuth Authorisation with very basic minimum implementation. So with OmniAuth we manage to get the work done in time but then we wanted OAuth Authorisation to work with Ajax call as well. I remember going all out crazy (Googling + debugging OmniAuth code) to find a way to…
  • 5 Ways we keep our Communication Untangled

    Surekha James
    10 Feb 2015 | 7:00 am
    Ours is a time of technology, an era of non-verbal communication and the age of texting, tweeting, status updates and even, the now rudimentary email. Alright enough with the dramatics. But really, considering communication is almost completely not face-to-face nowadays, why does it bewilder us when we find that we have issues in communication? In software development and even more so, in agile development, communication is key. Whether it’s communication within the team or communication with the client, it is necessary to make sure that non-communication, or worse, miscommunication is…
  • Race Against Time

    Surekha James
    8 Feb 2015 | 9:02 pm
      Agile on a Deadline
  • 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…
 
  • add this feed to my.Alltop

    CRAZ8

  • Make Sure Your Sitemap is using Production Data

    21 Mar 2015 | 4:31 pm
    I’m building a site, and have added the sitemap to help the Googles find the pages and give them an idea when the pages need to be rescanned. I use the excellent sitemap_generator gem, and it works really well. My typical workflow during development is to run the sitemap generator on my development machine, with the Sitemap host set to the production server, and then to check the generated file in and push to the production server. This works great to get something up and running, but very quickly your production server data will not match your development server data, particularly where…
  • Make Your Rails Application Multi-Threaded on Heroku

    19 Jun 2013 | 11:07 am
    I recently read a pretty good e-book on parallel and concurrent programming in Ruby Working with Ruby Threads by Jesse Storimer. I decided to try out running something with Rails and threading enabled, so I converted this blog to run with Puma and Rubinius on Heroku. Here’s how I did that Configuring Puma Add Puma to the Gemfile and disable Unicorn gem 'puma' # gem 'unicorn' Also change the Heroku Procfile to use Puma with a minimum of 5 threads and a maximum of 16 - the defaults are 0 and 16 web: bundle exec puma -t 5:16 -p $PORT Change to Rubinius in Gemfile Update the Gemfile to tell…
  • PostgreSQL 9.2 Range Columns and Rails 4

    17 Jun 2013 | 6:10 pm
    I recently had an application where I needed to find the location for an incoming IP address. I used the MaxMind GeoLite City database to provide the raw data, and I wanted this data inside my own database so I could link to the data records as needed. The GeoLite data has two tables, the Location data that has the City, Latitude and Longitude, and a Blocks table that has a start/end IP address and a location_id from the Location table. My initial migration looked like this, with a start_ip and end_ip as a bigint (to avoid problems with signed/unsigned conversions): create_table :blocks do…
  • Introducing RubyAudit for Gem Vulnerability Detection

    27 May 2013 | 5:12 pm
    Five months after a Ruby on Rails vulnerability is identified, announced and fixed in double-quick time, there are still applications running on public servers that haven’t got that memo. This was a very well publicized and well known exploit, yet not everyone knew about it. What happens if you’re running a Ruby Gem that isn’t so well known, how would you find out that there’s a problem that you need to take care of in your application? You could follow the twitter stream of the writer of all your Gems. Good luck with that! The very best way is to follow all the relevant security…
  • Building A Startup The Easy Way

    5 May 2013 | 9:33 pm
    Last week, I spent a few days at MicroConf in Las Vegas. There have been a small number of blog posts about how useful this conference is, and Christoph has a very good set of posts summarizing each of the MicroConf speakers This was my second year, and I would recommend you all skip it next year to give me a better chance of getting a ticket! A lot of directly actionable items came out of the conference, and Rob Walling asked at the start to make sure we all came away with at least 3 - this is a great way to ensure your customers get value: ask them to look for it as they go, so they don’t…
Log in