Ruby

  • Most Topular Stories

  • Why not Endless Ruby?

    RubyFlow
    20 Apr 2015 | 10:58 am
    https://rails7.wordpress.com/2015/04/20/ruby-without-ends/
  • Useful Capistrano plugins

    RubyFlow
    20 Apr 2015 | 7:17 am
    Capistrano is a well-known tool for deploying your code. But what fewer people know is that you can also use it for performing additional tasks on your server. - https://intercityup.com/blog/useful-capistrano-plugins.html
  • Tools to Test and Optimize Page Load Speed

    RubyFlow
    20 Apr 2015 | 7:52 am
    A list of tools to measure the page load time and its optimization: https://netguru.co/blog/speed-page-load-owners-developers
  • Build a Ruby Gem is 25% off for RailsConf

    RubyFlow
    21 Apr 2015 | 4:03 am
    In light of RailsConf 2015, Build a Ruby Gem is 25% offRailsConf.
  • Unit Testing Points of View, Probably

    Jay Fields' Thoughts
    Jay Fields
    6 Apr 2015 | 10:20 am
    Michael Feathers, Brian Marick, and I are collaborating to create a new book: Unit Testing Points of View ... probably. OriginIn 2014 Martin Fowler provided Technical Review for Working Effectively with Unit Tests. As part of his feedback he said something along the lines of: I'm glad you wrote this book, and I'll likely write a bliki entry noting what I agree with and detailing what I would do differently. I'm still looking forward to that entry, and I think the idea is worth extending beyond Martin. Unit testing is now mainstream, has tons of entry level books, and has a great reference…
 
  • add this feed to my.Alltop

    Jay Fields' Thoughts

  • Unit Testing Points of View, Probably

    Jay Fields
    6 Apr 2015 | 10:20 am
    Michael Feathers, Brian Marick, and I are collaborating to create a new book: Unit Testing Points of View ... probably. OriginIn 2014 Martin Fowler provided Technical Review for Working Effectively with Unit Tests. As part of his feedback he said something along the lines of: I'm glad you wrote this book, and I'll likely write a bliki entry noting what I agree with and detailing what I would do differently. I'm still looking forward to that entry, and I think the idea is worth extending beyond Martin. Unit testing is now mainstream, has tons of entry level books, and has a great reference…
  • 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…
  • add this feed to my.Alltop

    Polishing Ruby + Software Releases - zenspider.com

  • RubyInline version 3.12.4 has been released!

    ryan davis
    14 Apr 2015 | 5:02 pm
    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.12.4 / 2015-04-14 1 bug fix: Fixed arch header directoy with Ruby >= 2.0. (aurelj) rdoc: http://docs.seattlerb.org/RubyInline/ home:…
  • Great Expectations

    ryan davis
    14 Apr 2015 | 12:00 pm
    minitest/spec has existed since v1.3.0 (6.5 years). It started as a simple proof of concept to show that there was a 1:1 mapping between “spec-style” and “unit-style” tests (not to be confused with BDD vs TDD, which is a development process). It showed (in 67 lines!), that every describe was just a Test subclass, and every it was just a test method (with strange inheritance). minitest/spec has only grown to 152 lines since then but it really hasn’t changed all that much. Until yesterday. The older spec system relied on a thread-local variable in order to…
  • Debride gets better rails support

    ryan davis
    14 Apr 2015 | 12:00 am
    I just released debride 1.3.0. Debride statically analyzes your ruby for potentially uncalled / dead methods. It should help you strip out your dead weight from your large (or small) projects. Thanks to contributions from Pete and Ian, it now has an --exclude flag as well as better rails DSL support. Pete’s also released debride-haml 1.0.0 as debride’s second plugin. If you have any problems with it or have suggestions on how to make it work better for you, please file an issue.
  • png version 1.2.1 has been released!

    ryan davis
    13 Apr 2015 | 3:38 pm
    PNG is an almost-pure-ruby PNG library. It lets you write a PNG without any C libraries. Changes: 1.2.1 / 2015-04-13 WOW! SIX YEARS!! 4 bug fixes: 1.9: quelled warnings 2.0: Added ascii-8bit encoding to test file to bypass new utf-8 default Rakefile cleanup. Use isolate. Nuke pathing. Removed dead rubyforge setting in Rakefile http://seattlerb.rubyforge.org/
  • ruby2ruby version 2.1.4 has been released!

    ryan davis
    13 Apr 2015 | 3:34 pm
    ruby2ruby provides a means of generating pure ruby code easily from RubyParser compatible Sexps. This makes making dynamic language processors in ruby easier than ever! Changes: 2.1.4 / 2015-04-13 1 minor enhancement: Wrap fewer hash values in parentheses. (jaredbeck) 1 bug fix: Fixed handling of kwsplat args. home: https://github.com/seattlerb/ruby2ruby rdoc: http://docs.seattlerb.org/ruby2ruby
 
  • add this feed to my.Alltop

    Saturn Flyer with Jim Gay

  • Locality and Cohesion

    20 Apr 2015 | 5:00 pm
    “The primary feature for easy maintenance is locality: Locality is that characteristic of source code that enables a programmer to understand that source by looking at only a small portion of it.” — Richard Gabriel This advice is from Patterns of Software by Richard Gabriel. Keeping cohesive parts of our system together can help us understand it. By managing locality we can keep cohesive parts together. It’s easy to see coupling in our code. When one object can’t do it’s job without another, we experience frustration in the face of change. We often think about…
  • The 4 Rules of East-oriented Code: Rule 4

    6 Apr 2015 | 5:00 pm
    Often the rules we create are defined by their exceptions. It is difficult to create a program which continually passes objects and never returns data. Often the first rule of “Always return self” is met with immediate rejection because it’s easy to see the difficulty you’d encounter if that rule is continually followed for every object. In my presentation for RubyConf, I showed how we break the rules to allow value objects to handle data for a template. I previously wrote about the approach I used in the presentation to push data into a value object. class Address def…
  • 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.
  • add this feed to my.Alltop

    Ruby on Rails | UI/UX | Android/iOS | Rants and everything else

  • Using HTTPProxy in Net/HTTP globally.

    virendra
    20 Apr 2015 | 12:14 am
    There comes a time when you want to Proxy your Net/HTTP request/response in Ruby.One of the easy ways to do this in NET/HTTP is by passing proxy parameters in ‘new‘  method (during initialization) proxy_addr your.proxy.host proxy_port 8080 Net::HTTP.new(example.com, nil, proxy_addr, proxy_port).start { |http| # always proxy via your.proxy.addr:8080 } Obviously, this works but then querying the website using GET or GET BY URI method there is no provision to pass any proxy parameters altogether(at least that’s what I found out.) Thankfully Ruby-2.0+ (not available in…
  • Dynamic handling of strings/text for Mobile apps – Part 2

    Javal Nanda
    8 Apr 2015 | 11:20 pm
    In my previous post (Dynamic handling of strings/text for Mobile apps – Part 1), I discussed some issues with hard coding labels and text. This post deals with solutions to those problems and involves a method that provides more flexibility by updating text dynamically. Please note: This is not to be confused with the localization of the app. But, this approach can be used for the localization purpose also. This approach involves maintaining a strings file on the server instead of hardcoding it in the app. Following are the steps to follow for the implementation of this approach: On…
  • Dynamic handling of strings/text for Mobile apps – Part 1

    Javal Nanda
    7 Apr 2015 | 3:41 am
    It is a pretty common habit of developers to hard code labels and text directly into xib files or if they plan to localize, it is specified in localizable.strings files for iOS. For android, same goes into strings xml or some even hardcode into layout xml by ignoring warnings. In most scenarios, the above approach is adapted for speedy development and with a misconception that there will be hardly any change for labels and headers or in case of any change, it would be a minor one that can be easily fixed. But in adapting this, developers usually don’t consider the following things: 1)…
  • 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…
  • 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…
 
Log in