Ruby

  • Most Topular Stories

  • Time-Series Database Design with InfluxDB

    Ryan Daigle
    Ryan Daigle
    12 Aug 2014 | 5:00 pm
    Here at Spreedly we’ve recently started using the time series database InfluxDB to store a variety of customer activity metrics. As with any special purpose database, using and designing for a time-series database is quite different than what you may be used to with structured (SQL) databases. I’d like to describe our experience designing our InfluxDB schema, the mistakes we made, and the conclusions we’ve come to based on those experiences. The mark Consider the following scenario, closely resembling Spreedly’s: You run a service that lets your customers transact…
  • Session Management

    Vinsol - Ruby on Rails, iOS, Android Consulting and Development
    achin
    22 Oct 2014 | 3:29 am
    This is the fifth part of a 6 posts series on Fragment oriented application architecture. In the previous post I talked about efficiently handling back button press inside fragment. In this part I am going to talk about session management in Fragment oriented application, by explaining integration of Facebook SDK. (Sample application’s source code and README) In a fragment oriented application, we can conveniently manage all session related code in the activity and all its fragments would utilise it. Facebook SDK is quite in sync with this approach. Implementation of Facebook session…
  • The New Gist: What It Is and What It Could Be

    Ryan Daigle
    Ryan Daigle
    12 Dec 2012 | 4:00 pm
    Gist is an incredible tool by Github for quickly sharing code, text and files. It has syntax highlighting and rendering for a huge number of programming languages including Markdown for text. For many techies, including myself, Gist is an indispensable tool for quickly sharing code and content with coworkers. Gist has been around for several years now and, when compared with the pace of development on the main Github.com property, has been relatively neglected. Thankfully, Github recently updated Gist with a fresh new codebase and UI. As a heavy user of Gist I have some thoughts on this…
  • Healthy Codebase and Preparatory Refactoring

    RubyFlow
    19 Nov 2014 | 10:28 am
    In a recent episode of the RubyRogues podcast, Martin Fowler and Jessica Kerr illustrated Healthy Codebase and Preparatory Refactoring with beautiful words and powerful metaphors. I share those in this article.
  • Generate an Apple Pay CSR with OpenSSL

    Ryan Daigle
    Ryan Daigle
    5 Nov 2014 | 4:00 pm
    When creating an Apple Pay certificate signing request, Apple specifies that you need to use a 256 bit elliptic curve key pair. To generate both the private key and the CSR using the openssl command line utility, do the following: $ openssl ecparam -out private.key -name prime256v1 -genkey $ openssl req -new -sha256 -key private.key -nodes -out request.csr -subj '/O=Your Name or Company/C=US' The result will be a private key file at private.key and the CSR in request.csr. They should look something like this. private.key -----BEGIN EC…
 
  • add this feed to my.Alltop

    Ryan Daigle

  • Generate an Apple Pay CSR with OpenSSL

    Ryan Daigle
    5 Nov 2014 | 4:00 pm
    When creating an Apple Pay certificate signing request, Apple specifies that you need to use a 256 bit elliptic curve key pair. To generate both the private key and the CSR using the openssl command line utility, do the following: $ openssl ecparam -out private.key -name prime256v1 -genkey $ openssl req -new -sha256 -key private.key -nodes -out request.csr -subj '/O=Your Name or Company/C=US' The result will be a private key file at private.key and the CSR in request.csr. They should look something like this. private.key -----BEGIN EC…
  • Exposing a Javascript API in a Web Page with Browserify

    Ryan Daigle
    8 Oct 2014 | 5:00 pm
    When using Browserify to build and resolve your javascript library dependencies, it’s very easy to get a resulting bundle.js file that you can include in a browser with a simple script tag. <script src="/assets/bundle.js"></script> Including the bundle in this way will execute the code in your entrypoint (often main.js) which is where most online tutorials end and which might be all you need. However, how do you create a bundle that will expose an API to the including page? So you can do something like: <script…
  • Time-Series Database Design with InfluxDB

    Ryan Daigle
    12 Aug 2014 | 5:00 pm
    Here at Spreedly we’ve recently started using the time series database InfluxDB to store a variety of customer activity metrics. As with any special purpose database, using and designing for a time-series database is quite different than what you may be used to with structured (SQL) databases. I’d like to describe our experience designing our InfluxDB schema, the mistakes we made, and the conclusions we’ve come to based on those experiences. The mark Consider the following scenario, closely resembling Spreedly’s: You run a service that lets your customers transact…
  • The New Gist: What It Is and What It Could Be

    Ryan Daigle
    12 Dec 2012 | 4:00 pm
    Gist is an incredible tool by Github for quickly sharing code, text and files. It has syntax highlighting and rendering for a huge number of programming languages including Markdown for text. For many techies, including myself, Gist is an indispensable tool for quickly sharing code and content with coworkers. Gist has been around for several years now and, when compared with the pace of development on the main Github.com property, has been relatively neglected. Thankfully, Github recently updated Gist with a fresh new codebase and UI. As a heavy user of Gist I have some thoughts on this…
  • Site Relaunch

    Ryan Daigle
    7 Feb 2012 | 4:00 pm
    I’m currently in the middle of putting a fresh coat of paint on RyanDaigle.com, the previous home of the What’s new in Edge Rails series. All old links to http://ryandaigle.com/articles will be redirected to an archived version of the site at http://archives.ryandaigle.com. I doubt all links will make the change, but I’ve given it my best effort. Don’t have any big plans for the site beyond a renewed effort at writing more. Stay tuned.
  • add this feed to my.Alltop

    slash7 with Amy Hoy

  • The Wasp, the Caterpillar, and Cannibalizing Your Own Product from the Inside

    Amy Hoy
    10 Nov 2014 | 9:31 am
    This December, Freckle Time Tracking turns 6 years old. OMG! And 30×500 turns 5 years old… after a fashion. You see, the original 30×500 is dead. And the one before that. And the one before that. And the one before that, too. We killed them. Slowly. And we’re still killing them, even as I write this. The 30×500 that just wrapped up for 30 students is just about expired. This winter, we’re launching the culmination of 5 years of teaching designers & developers to make their very first product dollar. We’re making the very first go-at-your-own-pace…
  • The Wasp, the Caterpillar, and Cannibalizing Your Own Product from the Inside

    Amy Hoy
    10 Nov 2014 | 9:31 am
    This December, Freckle Time Tracking turns 6 years old. OMG! And 30×500 turns 5 years old… after a fashion. You see, the original 30×500 is dead. And the one before that. And the one before that. And the one before that, too. We killed them. Slowly. And we’re still killing them, even as I write this. The 30×500 that just wrapped up for 30 students is just about expired. This winter, we’re launching the culmination of 5 years of teaching designers & developers to make their very first product dollar. We’re making the very first go-at-your-own-pace…
  • What if your product launch fails? This interview will give you $10k reasons to do it anyway.

    Amy Hoy
    3 Nov 2014 | 6:57 pm
    If there’s one thing Amy and I hear from our students, both directly and indirectly, it’s “I’m worried I’m going to fuck this up.” After teaching hundreds of students the 30×500 processes and techniques, there’s only one difference that stands out between the people who succeed and everyone else: Action vs. inaction. Doing the work vs. making excuses. Trying vs. resisting. Call it what you want, the source of inaction is the same nearly 90% of the time. People are terrified of doing things wrong. And then there are the people who take what…
  • How to design the most efficient software your users have ever seen

    Amy Hoy
    17 Oct 2014 | 8:49 am
    When’s the last time you heard or read somebody discussing efficiency in software experience? Probably just about never, I’d wager. It’s not trendy. It’s not sexy. It’s certainly not easy… you can’t apply it with a Node.js library or an icon font. This is not the sound of a grumpy old lady waving her cane at the kids — it’s the sound of opportunity begging you to take it. If you design[1] software[2], this post will make you money. [1] if you make decisions about your company’s software products in any way, even if you don’t think of…
  • My secret startup past

    Amy Hoy
    13 Oct 2014 | 2:40 pm
    I’ve been designing & developing for hire since I was 14. But I almost never write about my past. It’s old hat to me. I’m an always-moving-forward kind of girl. This has led many to assume my strongly opinions on bootstrapping come ex nihilo — or possibly from bitchy sour grapes at being excluded from Startuplandia, unable to reach that sweet venture dolla dolla. Quite the opposite. I wrote, once before, three second-hand tales from the startup trenches that I had the privilege (or misfortune) of witnessing. Here are my stories. Let’s start with what may seem…
 
  • add this feed to my.Alltop

    Polishing Ruby + Software Releases - zenspider.com

  • rdoc_osx_dictionary version 2.1.0 has been released!

    ryan davis
    11 Nov 2014 | 4:09 pm
    rdoc via Apple’s Dictionary.app. Automatically builds and installs an Apple Dictionary with all rdoc nicely formatted. Inspired by: http://priithaamer.com/blog/ruby-on-rails-dictionary-for-macosx Changes: 2.1.0 / 2014-11-11 1 major enhancement: Enable to work with rdoc 4 and newer dictionary dev kits. (zalt50) 1 bug fix: Removed dead rubyforge setting in Rakefile home: https://github.com/seattlerb/rdoc_osx_dictionary rdoc: http://docs.seattlerb.org/rdoc_osx_dictionary
  • omnifocus-github version 1.8.0 has been released!

    ryan davis
    11 Nov 2014 | 3:56 pm
    Plugin for omnifocus gem to provide github BTS synchronization. Support for Github Enterprise: In your git config, set the key omnifocus-github.accounts to a space separated list of github accounts. git config --global omnifocus-github.accounts "github myghe" For each account API and web end points and authentication information should be stored in the git config under a key matching the account. For example: git config --global github.user me git config --global github.password mypassword git config --global myghe.api https://ghe.mydomain.com/api/v3 git config --global myghe.api…
  • minitest version 5.4.3 has been released!

    ryan davis
    11 Nov 2014 | 3:44 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 minitest 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…
  • imap_processor version 1.6 has been released!

    ryan davis
    17 Oct 2014 | 3:48 pm
    IMAPProcessor is a client for processing messages on an IMAP server. It provides some basic mechanisms for connecting to an IMAP server, determining capabilities and handling messages. IMAPProcessor ships with several executables which can query and manipulate IMAP mailboxes in several different ways: imap_archive :: Archives old messages to a new dated mailbox. imap_cleanse :: Delete messages older than a certain age in specified mailboxes. imap_flag :: Flag messages to/from certain people. imap_idle :: Shows new messages in a mailbox. imap_keywords :: Queries an IMAP server for keywords set…
  • Happy Birfday to me!

    ryan davis
    15 Oct 2014 | 6:13 pm
    Today is my Fourteenth Year Anniversary with Ruby! Yay! 823 gem releases (up by 93), 9805 commits (up by 823), and bazillions of test runs later, and I’m still going strong. Rawr!
  • add this feed to my.Alltop

    Saturn Flyer with Jim Gay

  • Shorter, simpler code with Forwardable

    14 Nov 2014 | 4:00 pm
    I often find that visual distractions slow me down. Reading simple code with familiar concepts feels cumbersome when I have to sort through repetition to find the meaning. Take a glance at this code to see what I mean: class Person def street address.street end def city address.city end def state address.state end end Although the code is short, you have to think a bit before you realize that all of these methods do basically the same thing. Ruby has a built-in way to bring the information out of this code: Forwardable. I touched on using Forwardable in a previous article but we’ll look…
  • The tools that are right under your nose

    19 Nov 2013 | 4:00 pm
    I recently had a fantastic experience giving a presentation at RubyConf called The Secrets of the Standard Library. The slides are available and once the video is up I’ll send along a link to that. There are no secrets in the Standard Library There are no secrets, of course, because the code is right there for you to read but many developers don’t realize that powerful tools like SimpleDelegator and Forwardable are built into Ruby. There’s no gem to find and install, just require the file you need and you’ve got it. It’s as easy as: require 'delegate' class…
  • Delegation is Everything and Inheritance Does Not Exist

    17 Nov 2013 | 4:00 pm
    Sharing behavior among and between objects requires a balanced decision. Will other objects use this behavior? Which ones? Why? Should I make a new class to handle what I need? Determining answers led me to dive into exactly what delegation is and inevitably led to more research to get a better understanding of inheritance. Prefer delegation over inheritance goes the standard advice. It seems that many developers think about inheritance in terms of classes. Classes define everything about your objects so it must be the only way to handle inheritance. We tend to think about delegation in terms…
  • How abstractions encourage good thinking

    12 Nov 2013 | 4:00 pm
    Many times, as developers, we grow our code in ways we don’t intend. We live with quick decisions a little too long and end up with a problem where, well, we don’t see the problem. With too much of this, our code becomes our unkempt bedroom or messy desk. Working against your brain A few years ago I saw an excellent presentation at Rocky Mountain Ruby by Michael Feathers about a phenomenon he called “code blindness.” In that keynote he raised the point that despite the fact developers may know how to, or know why our code should be structured differently, we become…
  • Unleash the Secrets of the Standard Library

    11 Nov 2013 | 4:00 pm
    RubyConf 2013 was a fantastic experience and I was fortunate enough to give a presentation about learning from the tools in the Standard Library. The presentation was recorded and will be online soon. While the slides alone don’t reveal the value from my presentation, I encouraged the audience to read the ruby source and discover what the standard library has to offer. We looked at how delegate.rb and forwardable.rb can help solve problems and how they are implemented. There’s plenty of tricks to pick up in there. I had a great time having a chat on Ruby5 too. Update: My…
 
  • add this feed to my.Alltop

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

  • 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.
  • Fragment view state retention: A dirty solution

    achin
    22 Oct 2014 | 3:40 am
    This is the last part of this 6 part series about Fragment Oriented Architecture in Android applications. In the previous post I talked about managing sessions in fragment oriented application. In this post I am going to talk about retaining view hierarchy of a Fragment after removing it from container and then coming back to it by popping the backstack. (Sample application’s source code and README) When a fragment gets replaced by another fragment and the transaction is added to back stack, the expectation after a popBackStack() is to return to the previous fragment with its UI state…
  • Session Management

    achin
    22 Oct 2014 | 3:29 am
    This is the fifth part of a 6 posts series on Fragment oriented application architecture. In the previous post I talked about efficiently handling back button press inside fragment. In this part I am going to talk about session management in Fragment oriented application, by explaining integration of Facebook SDK. (Sample application’s source code and README) In a fragment oriented application, we can conveniently manage all session related code in the activity and all its fragments would utilise it. Facebook SDK is quite in sync with this approach. Implementation of Facebook session…
  • Handling back button press Inside Fragments

    achin
    1 Oct 2014 | 6:25 am
    This is the fourth part of a 6 posts series on Fragment oriented application architecture. In the previous post I talked about Inter-Fragment Communication. In this part I am going discuss about elegantly handling back button press inside fragments in a fragment oriented application. (Sample application’s source code and README) Android devices have a hardware back button which normally serves the purpose of going back through the screens/actions stack. Callback to a back button press event is received in the foreground Activity (onBackPressed() event callback) which can be overridden…
  • add this feed to my.Alltop

    Ruby-coloured glasses

  • 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…
  • Link: Advisory locks in postgres

    Taryn East
    13 Nov 2014 | 4:44 pm
    Advisory locks in postgres "PostgreSQL provides various lock modes to control concurrent access to data in tables. Advisory locks provide a convenient way to obtain a lock from PostgreSQL that is completely application enforced, and will not block writes to the table." This is not like row-locking your tables, this is to help you ensure concurrency for certain parts of your application. eg that you only enter a complex, resource-intensive part of your codebase once across all your servers. Given that ruby basically isn't very threadsafe - this provides a mechanism for concurrency-locking that…
  • gotcha: redirecting through root-url fails to preserve anchor tag

    Taryn East
    7 Nov 2014 | 4:52 pm
    Interesting (and annoying). If you redirect to your root-path and pass it an anchor tag like "show-help" (in some controller) eg with redirect_to root_path(:anchor => 'show-help') It first redirects correctly to /#show-help but it then further redirects to your actual root url... and removes the anchor tag eg /my_dashboard My expectation would be that it would preserve the anchor tag... eg the final URL would be: /my_dashboard#show-help But of course, the browser doesn't actually send anchor tags to the server at all... which means that after the first request (to '/'), Rails never gets the…
  • gotcha: running `rake db:migrate:redo` and testing

    Taryn East
    1 Nov 2014 | 4:17 pm
    So... rails *tells* me that rake db:test:prepare is deprecated, and that just running the specs will keep the db up-to-date... but it isn't always so. If you jigger with a brand new migration and run a rake db:migate:redo - the test db can't deal with that by itself. You either have to run rake db:migate:redo RAILS_ENV=test or rake db:test:prepare to propagate those changes.
  • Link: Asshole culture at Uber

    Taryn East
    26 Oct 2014 | 3:31 pm
    Uber, darlings of the startup world, have displayed particularly poor taste and utter thoughtlessness towards 50% of the population with a promotion that they have quietly removed (without comment) since it was recently denounced. The article: The horrific trickle down of Asshole culture: Why I’ve just deleted Uber from my phone describes what happened.
Log in