Rubyland

news, opinion, tutorials, about ruby, aggregated
Sources About
RubyGuides 

The Ultimate Guide to Ruby Gems, Gemfiles & Bundler

A Ruby gem packages together Ruby code in a way that is easy to share with others. Gems solve mostly two problems: A common format for sharing libraries & tools in Ruby A way to describe dependencies so they are installed automatically with the gem Thanks to Ruby gems we have a rich ecosystem of […]

The post The Ultimate Guide to Ruby Gems, Gemfiles & Bundler appeared first on RubyGuides. Don't miss your free gift here :)

OmbuLabs Blog 

Step up the security of your Rails app | Part 1

The internet is a wonderful place, but there will always be people that don't have good intentions when they visit our websites. That's why you need to be aware of the vulnerabilities that your application can have and how to avoid them. In this article I'll cover two common security problems in Rails applications (I'll probably make a second part since this is a very extensive topic).

It's also worth to mention that Rails itself has improved a lot over the years to make everything more secure and easy for the people who use it. That's one of the reasons why it's so important to upgrade your Rails project.

Before we start you should know that Rails has an official security guide with a…

Notes to self 

Making a Ruby executable with ruby-packer

You can make a single executable from your gem or even a Rails application. I just tried ruby-packer and it works as promised.

One of the things that I missed when writing a command line tool in Ruby was making a binary that is easy to distribute. Since Ruby is an interpreter we cannot just make a binary.

However, there are ways how to package Ruby interpreter and all the required gems together with your program as one distribution. For one there was Traveling Ruby project. Another good option is to look at how Vagrant is packaged (I did that when we were bringing Vagrant natively for Fedora back in the day). But neither approach felt quite right and the best way to distribute Ruby programs…

RubyMine Blog 

RubyMine 2018.2.3 Is Available

Hi everyone,

RubyMine 2018.2.3 (build 182.4323.73) is now available. This minor release features an ability to explicitly run scripts with bundle exec. Previously RubyMine used RUBYOPT options to achieve the same result, which caused confusion and issues in specific cases (see RUBY-11434 & RUBY-22247).

To explicitly run scripts with bundle exec, go to Help | Find Action | Experimental features, and check ruby.force.explicit.bundle.exec:

explicit_bunde_exect

Note that this option will be enabled by default starting with v2018.3 (to be released in November 2018).

Some other annoying issues were also fixed in this build:

  • GEM_HOME/GEM_PATH not set” warning [RUBY-22254]
  • Inability to read the $GEM_HOME environment…

Download RubyMine 2018.2.3

See…

All Ruby Podcasts by Devchat.tv 

RR 381: “Ruby GUI Development” with Saverio Miroddi

Panel:

  • Charles Max Wood
  • Dave Kimura
  • Eric Berry

Special Guests: Saverio Miroddi

In this episode of Ruby Rogues, the panel talks to Saverio Miroddi who is an engineer among other things. Saverio has written articles, and a link to two of his articles is found below. The panel and Saverio talk about Ruby, Ruby Motion, Shoes, Hackety Hack, and much more! Check out the episode!

Show Topics:

2:05 – Chuck asks a question.

2:42 – Chuck: What do you recommend for the listeners?

2:49 – Saverio: At the time I recommended an underdog. Now, making a recommendation is kind of hard. It depends on what they need. It’s fascinating in a way, because web development is not straightforward.…

Remote Ruby 

Chasing Bugs, Redis, Tailwind-Stimulus Controllers, and Superleggera

Chris and Jason start their morning talking about different projects they've been working on.
Julia Evans 

Why sell zines?

Hello! As you may have noticed, I’ve been writing a few new zines (they’re all at https://jvns.ca/zines ), and while my zines used to be free (or pay-for-early-access-then-free after), the new ones are not free! They cost $10!

In this post, I want to talk a little about why I made the switch and how it’s been going so far.

selling your work is okay

I wanted to start out by saying something sort of obvious – if you decide to sell your work instead of giving it away for free, you don’t need to justify that (why would you?). Since I’ve started selling my zines, exactly 0 people have told me “julia, how dare you sell your work”, and a lot of people have said “your work is amazing and I’m…

Search Results for “ruby” – via @codeship 

Updated Github Integration

Reading Time: 4 minutes

Today we rolled out a new Github integration (based on Github Apps) which changes login option and how projects are created.

Logging in with Github

The first thing you might notice, is that you’ll be asked to authorize CodeShip to access your Github account. We are migrating away from the OAuth App to the new Github App.

One improvement is that we no longer require read/write access to your repositories. Using the Github App APIs enables us to be more granular in what permissions the CodeShip GitHub App requires.

If you only use Github to login to CodeShip, you can stop here and skip the rest of this message. However, if you manage or setup projects, please read the…

Julia Evans 

New zine: Help! I have a manager!

I just released a new zine! It’s called “Help! I have a manager!”

This zine is everything I wish somebody had told me when I started out in my career and had no idea how I was supposed to work with my manager. Basically I’ve learned along the way that even when I have a great manager, there are still a lot of things I can do to make sure that we work well together, mostly around communicating clearly! So this zine is about how to do that.

You can get it for $10 at https://gum.co/manager-zine. Here’s the cover and table of contents:

The cover art is by Deise Lino. Tons of people helped me write this zine – thanks to Allison, Brett, Jay, Kamal, Maggie, Marc, Marco, Maya, Will, and…

Mike Perham 

Moving to Mastodon

Last month I revived my Mastodon account after seeing one more round of Twitter giving Nazi accounts acting in bad faith a pass while suspending upset liberal accounts acting in good faith.

I think this concept of acting in good faith vs bad faith is the crux of the issue in social media today. Is this person trying to make things better or are they delaying action, spreading confusion or uncertainty, harassing others into silence? Often it is easy to tell in the case of red-blooded USA patriot accounts with IP addresses in St. Petersburg or anonymous anime fans who make it clear that they hate women.

But often it's not clear at all. People acting in good faith can still inadvertantly…

RubyMine Blog 

I18n Features in RubyMine

This post will cover a number of handy options that RubyMine provides to help you internationalize your application, including the newest ones added in the recently announced RubyMine 2018.3 EAP.

Creating I18n translations

First of all, you can create an I18n property from a string for all existing dictionaries. To do this, simply put the caret on the desired string, press Alt+Enter to invoke Intention Actions, and Choose I18n string value. This will open a dialog where you can create a property key and provide translations for…


RubyMine will create a key-value pair…

The Bike Shed 

171: What If We Just Used a Form?

Matt Sumner joins Chris for a discussion around Matt's recent adventures with the block chain and Ethereum, as well as tackling the thorny issue of server rendered vs client side apps. They cover a bit of history, a bit of opinion, and some practical considerations to keep in mind when tackling rich client development.

Awesome Ruby Newsletter 

Issue 122 - I wrote this simple serverless platform dedicated to run Ruby functions. Feedback appreciated!

Code with Jason 

Reverse job ad

.footer-opt-in { display: none; }

I’m looking for a new job. Inspired by this reverse job ad, I decided to create one of my own, although a substantially less funny one.

Who I am

I’m Jason Swett, software engineer. I’ve been coding since the ’90s. I’ve taught programming in Nigeria, Bulgaria, the Netherlands and even Missouri. I’m the host of the Ruby Testing Podcast. Most of my work has been in Ruby on Rails.

What I’m looking for in my next role

In my next role I can see myself doing any combination of the following things:

  • Training and mentoring junior developers
  • Developing and documenting the organization’s processes (e.g. incident response process)
  • Helping foster a healthy…
Ruby Weekly 

A Future for Serverless Ruby?

#417 — September 20, 2018

Read on the Web

Ruby Weekly

A Future for Serverless Ruby? — Ruby has been a long overlooked language when it comes to serverless but OpenWhisk, an open source serverless system, has now added native support. FaaStRuby is another interesting experiment in the serverless Ruby world right now, too.

Justin Halsall

RubyMe: A Paid Mentorship Program for Early-Career Ruby Developers — If you’re accepted, you’ll get paid for 8 hours of Ruby related community work (documentation, design, testing, etc.) and be mentored through the process.

Ruby Together

Real-Time Production…

Toxic Elephant 

Betting

I happened upon this comment.

But more important, it just doesn’t work sensibly to explain why many people decline modest bets (e.g. that someone not on the brink of starvation would decline a 50/50 lose $100 vs gain $110) bet.

You can look at this bet in two ways. The first is the single bet. Then, you can think about how bad you feel about losing $100, versus how good you feel about gaining $110.

The second way is as a repeated bet. And I think this is how people do think about it: If I bet yesterday, why not bet today? Or, I lost yesterday, I need to bet again today to ‘make up for it’.

Emotions aside, the reason given that the bet is a good one, is that in the long run the better…

Greater Than Code 

098: Designing For Inclusion with Jenny Shen

In this episode, Jenny Shen talks about not giving a f*ck and why that’s okay, design and UX for international users, paid mentorship, and the intersection between privilege and open source. Panelists: Jamey Hampton | Jessica Kerr | Sam Livingston-Gray Guest Starring: Jenny Shen: @jennyshen | jennyshen.com Show Notes: 01:51 – Jenny’s Superpower: Not Giving a F*ck and Sticking Up For Others The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life 05:00 – Living a Remote Lifestyle and Cross-Cultural Communication 08:34 – Design and UX For International Users / Research for Local Users 18:08 – Designing to Include All People: Is it possible? 27:07 – Paid…
All Ruby Podcasts by Devchat.tv 

MRS 061: Erik Dietrich

Panel: Charles Max Wood

Guest: Erik Dietrich

This week on My Ruby Story, Charles talks to Erik Dietrich who is a consultant and a business owner. After he left the IT life, he is a partner for a content marketing company among others.

In particular, we dive pretty deep on:

0:52 – Greetings! It’s another story on Ruby Stories.

1:04 – We have had you on Episode 296.

1:28 – Guest: I did in my blogger days, but over the course of time but I ran into management roles and then left. That definitely skewed my topics that I talked about.

1:59 – Chuck: Introduce yourself for people. 

2:53 – Chuck: Let’s talk about your career or even further back. How did you get into programming?

3:24 –…

Julia Evans 

Build impossible programs

Hello! My talk from Deconstruct this year (“Build impossible programs”) is up. It’s about my experience building a Ruby profiler. This is the second talk I’ve given about building a profiler – the first one (Building a Ruby profiler) was more of a tech deep dive. This one is a squishier talk about myths I believed about doing ambitious work and how a lot of those myths turn out not to be true.

There’s a transcript on Deconstruct’s site. They’re also gradually putting up the other talks from Deconstruct 2018, which were generally excellent.

video

slides

As usual these days I drew the slides by hand. It’s way easier/faster, and it’s more fun.

zine side note

One extremely awesome…

RubyGuides 

How to Use Ruby Conversion Methods

If you would like to use string methods (like gsub) but you’re working with an integer… What can you do? Use a conversion method! For example: You can convert the Integer 1 to the String “1”. Then you can use methods from the converted class, which helps you do something that wasn’t possible before. In […]

The post How to Use Ruby Conversion Methods appeared first on RubyGuides. Don't miss your free gift here :)

Passenger - Phusion Blog 

Dropping RHEL6, Debian 7 and Ruby 1.8 support?

Dropping RHEL6, Debian 7 and Ruby 1.8 support?

We are considering dropping support in Passenger for RHEL/CentOS 6, Debian 7 and Ruby 1.8. These distributions are very old, so it's getting increasingly hard to maintain support for these. They also slow down our development process and thus slow down future improvements.

By dropping support for old operating systems, we'll be able to use C++11, which should simplify our codebase. By dropping Ruby 1.8, we'll be able to upgrade the gems we use during development and testing, and we'll be able to remove various compatibility code.

Since 2014, Ruby 1.8(.7) no longer receives security patches. We recommend everyone to inspect their systems and to upgrade. Besides 1.8, other older Ruby versions…

Passenger - Phusion Blog 

Migrating Passenger from C++ to Go?

Migrating Passenger from C++ to Go?

Passenger is mostly written in C++. The main reasons were: Apache and Nginx integration (via modules), ease of installation for users (users commonly have a C/C++ compiler installed), and performance. Back when Passenger was first created, C and C++ were the only viable options that satisfy these purposes.

But the programming language ecosystem has changed a lot since then. Comparatively, C++ is limiting our development velocity. That's why we've been pondering slowly migrating Passenger to an alternative language.

This article describes:

  • What the problems are with C++ that makes us consider a migration.
  • What requirements alternatives must satisfy.
  • How a migration path would look like.
  • Wha…

Let us hear from you!

What do you think about the user implications? Read the last section and…

Hi, we're Arkency 

3 ways to make your ruby object thread-safe

Let’s say you have an object and you know or suspect it might be used (called) from many threads. What can you do to make it safe to use in such a way?

1. Make it stateless & frozen

Here is the most basic approach which is sometimes the easiest to go with and also very safe. Make your object state-less. In other words, forbid an object from having any long-term internal state. That means, use only local variables and no instance variables (@ivars).

To be sure that you are not accidentally adding state, you can freeze the object. That way it’s going to raise an exception if you ever try to refactor it.

class MyCommandHandler
  def initialize
    make_threadsafe_by_stateless
  end

  def c…
All Ruby Podcasts by Devchat.tv 

RR 380: "Deploying Ruby on Rails application using HAProxy Ingress with unicorn/puma and websockets‌" with Rahul Mahale

Panel:

  • Charles Max Wood
  • Dave Kimura
  • Eric Berry

Special Guests: Rahul Mahale

In this episode of Ruby Rogues, the panel talks to Rahul Mahale. Rahul is a Senior DevOps Engineer at BigBinary in India. He has also worked with SecureDB Inc., Tiny Owl, Winjit Technologies among others. In addition, he attended the University of Pune. The panel and the guest talk about Kubernetes.

Show Topics:

1:25 – Swag.com for t-shirts and mugs, etc. for Ruby Rogues / DevChat.tv.

1:49 – Chuck: Why are you famous?

1:57 – Guest’s background.

4:35 – Chuck: Kubernetes – Anyone play with this?

4:49 – Panelist: Yes. Funny situation, I was working with Heroku. Heroku is very costly, but great.

The…

Ruby Together News 

Announcing Ruby Me

A paid mentorship program for early-career Ruby developers.

Ruby Together is extremely excited to announce a new program, designed by Coraline Ada Ehmke: Ruby Me.

The mission of the RubyMe program is to help early-career developers improve their skills and confidence by contributing to Ruby open source projects, by paying them to pair on open source software for 8 hours per month. Through this program we hope to give these developers the skills and experience that they need for continued growth and success in their careers.

Early-career developers (with a firm grasp of Ruby fundamentals) can apply for a spot in the three-month long program. If you’re a recent bootcamp grad, career…

OmbuLabs Blog 

Refactoring with Design Patterns - The Template Pattern

In our last article of the refactoring series we saw how design patterns can be used to make our Ruby code beautiful and clean. Design patterns are a powerful tool for any developer and a familiarity with them will lead to better code by forcing a consideration of SOLID principles.

Now let's talk about other pattern that when properly used can be very helpful: The Template Method.

The Template Method

The Template Method is described as "a behavioral design pattern that lets you define the skeleton of an algorithm and allow subclasses to redefine certain steps of the algorithm without changing its structure."

The goal is to separate code that changes from code that doesn't change,…

ruby – Bibliographic Wilderness 

Notes on study of shrine implementation

Developing software that is both simple and very flexible/composable is hard, especially in shared dependencies. Flexiblity and composability often lead to very abstract, hard to understand architecture. An architecture custom-fitted for particular use cases/domains has an easier time of remaining simple with few moving parts. I think this is a fundamental tension in software architecture.

shrine is a “File Attachment toolkit for Ruby applications”, developed with explicit goals of being more flexible than some of what came before. True to form, it’s internal architecture can be a bit confusing.

I want to work with shrine, and develop some new functionality based on it, related to…

Ruby Inside - Medium 

Introducing Priora: An Object Prioritization Utility Gem for Ruby

https://pixabay.com/en/stones-pebbles-stack-pile-zen-801756/

TL;DR: I’ve released Priora, a new gem that helps in prioritizing collections of objects in Ruby in a friendly way! Check it out (GitHub / RubyGems).
In this post, I will discuss the motivation, design and agenda I have picked in creating this utility. Parts of this story have been extracted into the library’s README file on GitHub.

The other day, a fellow developer at work asked for my opinion regarding some pull request. She was working on a task that required prioritizing an array of objects according to some specified business logic. I’ll refer to the class of these objects as Post in this story. It is a data class whose…

Andy Croll 

Using pluck can save a bunch of memory

Active Record models are incredibly flexible and provide a very large amount of functionality. One consequence of providing this large API of methods is that each individual Active Record object takes up a lot of space when loaded into memory.

If you only need to use a single field on an Active Record model, for example, the ids, then Rails has your back.

Instead of…

…iterating over objects fully loaded into memory.

Book.paperbacks.map { |book| book.title }
#=> ["Eloquent Ruby", "Sapiens", "Agile Web Development With Rails"]
Book.paperbacks.map(&:title)
#=> ["Eloquent Ruby", "Sapiens", "Agile Web Development With Rails"]

Use…

…the ActiveRelation#pluck method to pull the required…

Riding Rails 

Performance improvements, configuration options, and more

Greetings! Daniel here, reporting from Brooklyn, NY.

Use faster globs for template resolving

Resolving templates used to get pretty slow as the number of view paths, handlers, and formats increased. Replacing 1682 system calls with 14 sounds pretty great to me!

Do less work and use less memory

2.4% faster, 1.7% faster, 1.58% faster. Many thanks to Richard for working hard so our applications don’t need to!

Improve performance of Integer#multiple_of?

With a few clever tweaks, it has never been easier to find out if 4611686018427387903 is a multiple of 42.

Default to utf8mb4 for MySQL

The previous default character set did not support supplemental characters like emoji. The 4-Byte…

Code with Jason 

Deploy to Production on Day One

Sleeping at the office, nothing to show

You know a project is under serious pressure when people start camping out at the office.

In 2015 I got a job at an agency where they were doing a big project for a large Chinese electronics manufacturing company. The project had been underway for about six months.

Two of the developers, who I’ll call Dave and Eric, had been working on the iOS and Android app portion of the project. I was told that for a time they had been sleeping at the office at night in an effort to hit their timelines.

The application had a Rails backend. I have a vague memory that the person who wrote most of the Rails app wasn’t around anymore.

Six months into the project, with…

Bundler Blog 

August 2018 Bundler Update

Welcome to the August monthly update!

With the help of @eanlain, we shipped a new guide: “How to use Bundler with Docker”. We also dramatically improved error messages when version requirements conflict, shipped a playbook for adding or removing core team members, and fixed some issues handling gemspecs with non-ASCII characters. We also merged a fix that could cause Bundler to fail when trying to install a gem that has had a version yanked recently.

On top of that code work, we also added two new contributors to the Bundler team! Welcome to Stephanie Morillo and Grey Baker.

Stephanie has helped create new Bundler docs (like the troubleshooting RubyGems and Bundler TLS/SSL issues guide),…

The Bike Shed 

170: Less Charted Territory

Chris is joined by Paul Smith to discuss Crystal, a statically-typed and compiled language with a Ruby inspired syntax. Paul has spent much of the past few years exploring Crystal and building a new web framework called Lucky.

Paul's infectious enthusiasm for the Crystal language shines through in this discussion covering some of the unique features of Crystal & Lucky, but there is plenty to enjoy even if you're not specifically interested in Crystal.

With Lucky, Paul has done a great job of taking the best of what has been built in other frameworks and bring it to Crystal, drawing inspiration from Ruby & Rails, Elixir & Phoenix, and even PHP and the Laravel framework. There's…

Awesome Ruby Newsletter 

Issue 121 - Understanding Transducers in Ruby – Brandon Weaver – Medium

Remote Ruby 

Joined by "Schneems" (Richard Schneeman)

Ruby Weekly 

Understanding Transducers in Ruby

#416 — September 13, 2018

Read on the Web

Ruby Weekly

▶  A Branch in Time — An interesting 20 minute talk from Brighton Ruby (which next takes place in July 2019) that takes a high level, git-oriented look at how a codebase’s history can impact on its maintainability and best practices you can use to keep code maintainable, particularly when working on a project with others.

Tekin Süleyman

How I Got My First Pull Request into Rails — Or “How I found ways to participate in the Ruby community more, while working full time at a job with no allotted ‘OSS-time’”

Nick Schwaderer

Continuous Delivery…

OmbuLabs Blog 

How we use Pivotal Tracker at Ombu Labs

We tend to use GitHub for everything at Ombu Labs, but sometimes our clients prefer Pivotal Tracker. We have no problem with Pivotal Tracker, we just like to keep everything in one place, that is why we prefer GitHub for everything.

There are many things that are easier with Pivotal Tracker, as long as you are using it the right way. Some of its features are very useful for agile teams like ours. This is how we like to use it to ship value with every sprint and keep track of our velocity.

Step 1: Filing user stories

Every single thing has to be tracked according to the type of story. Most of the user stories are either features or bugs, although sometimes there will be chores to…

OmbuLabs Blog 

FastRuby.io: Exit Calls

At Ombu Labs we believe that if we are not learning from our mistakes we are doing it wrong. It is simple: The only unforgivable mistake is to not learn from our mistakes.

That is why we try to incorporate feedback into everything we do. We embrace peer reviews and pair programming as a way to get constant feedback on a daily basis. Even this article had reviews from 3 different people! (https://github.com/ombulabs/blog/pull/154)

Another step that we incorporate into every client relationship is an exit call. This call gives us an opportunity to assess how well we performed.

If we performed well: Great! What can we do more of? If we performed poorly: What can we improve? What can we do…

BigBinary Blog 

Configuring memory allocation in ImageMagick

ImageMagick has a security policy file policy.xml using which we can control and limit the execution of the program. For example, the default memory limit of ImageMagick-6 is 256 MiB.

Recently, we saw following error while processing a gif image.

convert-im6.q16: DistributedPixelCache '127.0.0.1' @ error/distribute-cache.c/ConnectPixelCacheServer/244.
convert-im6.q16: cache resources exhausted `file.gif' @ error/cache.c/OpenPixelCache/3945.

This happens when ImageMagick cannot allocate enough memory to process the image. This can be fixed by tweaking memory configuration in policy.xml.

Path of policy.xml can be located as follows.

$ identify -list policy

Path:…
OmbuLabs Blog 

FastRuby.io: Exit Calls

At Ombu Labs we believe that if we are not learning from our mistakes we are doing it wrong. It is simple: The only unforgivable mistake is to not learn from our mistakes.

That is why we try to incorporate feedback into everything we do. We embrace peer reviews and pair programming as a way to get constant feedback on a daily basis. Even this article had reviews from 3 different people! (https://github.com/ombulabs/blog/pull/154)

Another step that we incorporate into every client relationship is an exit call. This call gives us an opportunity to assess how well we performed.

If we performed well: Great! What can we do more of? If we performed poorly: What can we improve? What can we do…

BigBinary Blog 

Fixing memory issue in ImageMagick

ImageMagick has a security policy file policy.xml using which we can control and limit the execution of the program. For example, the default memory limit of ImageMagick-6 is 256 MiB.

Recently, we saw following error while processing a gif image.

convert-im6.q16: DistributedPixelCache '127.0.0.1' @ error/distribute-cache.c/ConnectPixelCacheServer/244.
convert-im6.q16: cache resources exhausted `file.gif' @ error/cache.c/OpenPixelCache/3945.

This happens when ImageMagick cannot allocate enough memory to process the image. This can be fixed by tweaking memory configuration in policy.xml.

Path of policy.xml can be located as follows.

$ identify -list policy

Path:…
Rebased Blog 

101: Advanced OOP Structure in Rails Practice

When thinking about more advanced OOP structure, one can sometimes ask – how to incorporate it into a Rails application? I will try to answer that question in this blog note, introducing some advanced OOP concept into a Rails application (without any architecture gems). The result? Skinny controller, fat business-logic...
All Ruby Podcasts by Devchat.tv 

MRS 060: Jamie Wright

Panel: Charles Max Wood

Guest: Jamie Wright

This week on My Ruby Story, Charles talks to Jamie Wright about his background and current projects that he is working on. Ruby Rogue interviewed Jamie on Episode 326 – check out that episode for more information. Chuck and Jamie discuss many topics, but one in particular is truly inspiring and that is Jamie’s impact within his community: teaching! Jamie is enthused to help students with designing games and helping them with programming. Check-out today’s episode to hear more! 

In particular, we dive pretty deep on:

0:53 – Introduction. Episode 326 of Ruby Rogues is a past episode with Jamie as a guest.

1:50 – Chuck was at Microsoft Build.…

Paweł U. | Ruby on Rails Web Development Consultant Full Stack Blog 

Optimize Dokku Deployment Speed for Ruby on Rails with Dockerfile

Dokku lets you setup Rails hosting infrastructure on a simple VPS without much dev ops experience. Although it is easy to get started, a default config might result in very slow and unreliable deployments. In this blog post, I will describe how I’ve improved my Dokku based Ruby on Rails (NodeJS with Yarn and Webpack) application deployment speed by over 400% using a Docker image Dockerfile.

This tutorial is written in the context of RoR tech stack but solution presented (with small Docker image config tweaks) can be applied to all the server side technologies hosted with Dokku.

Getting started with Dokku

If you are not familiar with Dokku, you should check out one on my previous blog…

Greater Than Code 

097: The Job of a Manager with Brandon Hays

Brandon Hays talks about mentorship, management, and leadership skills, as well as maintaining relationships with people, climbing the tech ladder, strategizing career growth. Panelists: Coraline Ada Ehmke | Astrid Countee | John Sawers Guest Starring: Brandon Hays: @tehviking | blog Show Notes: 00:43 – Brandon’s Superpower: Helping Other People Discover Their Own Superpower 02:04 – Maintaining Relationships When People Change Jobs So Frequently 04:31 – Climbing The Corporate Tech Ladder and Strategizing Career Growth 10:25 – Mentorship and Power Disparity 19:00 – Management and Leadership Skills The Manager's Path: A Guide for Tech Leaders Navigating Growth and Change 10 Traits of a…
RubyMine Blog 

RubyMine Refactorings: Overview & Improvements

RubyMine provides a number of refactorings that can help clean up your code quickly. In mere seconds, you can move files, extract code chunks into methods and variables, and rename values across your project. These options are available through the Refactor this popup, which is accessible by selecting Refactor | Refactor this or pressing Ctrl+T / Ctrl+Alt+Shift+T.

Extract Method refactoring

To recall how refactorings work in RubyMine, let’s extract a piece of code which is repeatedly used by a number of methods, to its own method:

After…

Depfu 

What makes a good changelog?

Writing a good changelog, like writing any text, is about knowing your audience and their needs.

In the last post I’ve talked about the different needs of developers a changelog addresses. In this article, I would like to talk more about the specific elements that make a changelog work.

A changelog should have an entry for each version. That sounds self explanatory, but unfortunately bears repeating. Ideally, it would show the release date for each release. This makes it easier to scan the changelog and get a feel for the development speed of the project and makes it super obvious when a project is not really maintained anymore. While we’re at dates, please use a non ambiguous date…

OmbuLabs Blog 

How we use Pivotal Tracker at Ombu Labs

We tend to use GitHub for everything at Ombu Labs, but sometimes our clients prefer Pivotal Tracker. We have no problem with Pivotal Tracker, we just like to keep everything in one place, that is why we prefer GitHub for everything.

There are many things that are easier with Pivotal Tracker, as long as you are using it the right way. Some of its features are very useful for agile teams like ours. This is how we like to use it to ship value with every sprint and keep track of our velocity.

Step 1: Filing user stories

Every single thing has to be tracked according to the type of story. Most of the user stories are either features or bugs, although sometimes there will be chores to…

RubyGuides 

How to Use The Ruby Super Keyword

What does the super keyword do in Ruby? It calls a method on the parent class with the same name as the method that calls super. For example: If you call a method named i_like_chocolate, and then you call super within that method, Ruby will try to find another method with that same name on […]

The post How to Use The Ruby Super Keyword appeared first on RubyGuides. Don't miss your free gift here :)

Test Double | Our Blog 

Growth

Stepped Growth

Growth

Test Double was recently recognized for the third year in a row as one of the Inc 5000 and for the fourth year in a row as one of Columbus' Fast 50. Both of these honors reflect our persistent growth over the last four years and we want to celebrate them because that growth is the result of a lot of hard work and success that our team has had delighting clients, finding prospects, and expanding the recognition of our brand across the US. We typically don't discuss growth as a goal though, so we wanted to share some thoughts on our goals, metrics, and general views on growth.

Goals and Metrics

We've always felt that working in the open and being transparent with company…

All Ruby Podcasts by Devchat.tv 

RR 379: "Caching in Rails" with Jeff Kreeftmeijer

Panel:

  • Charles Max Wood
  • Dave Kimura
  • Eric Berry

Special Guests: Jeff Kreeftmeijer

In this episode of Ruby Rogues, the panel talks to Jeff Kreeftmeijer who is a Ruby and Elixir developer at AppSignal. Jeff writes for the AppSignal's newsletter and has a blog. Check out today’s episode where the panel talks about AppSignal, Russian doll caching, Drifting Ruby, JavaScript Sprinkles, cache warming, N+1 plus other topics.

Show Topics:

2:47 – Code Fund & New Relic.

3:40 – AppSignal might be the only support for Elixir.

4:12 – The integration, the ease was so simple and your (Jeff) documentation made it very easy.

4:46 – Comparatively to New Relic, AppSignal is cheaper, isn’t it?

4:5…

All Ruby Podcasts by Devchat.tv 

RR 378: Ruby performance: MJIT with John Hawthorn

Panel:

  • Charles Max Wood
  • David Richards
  • Dave Kimura
  • Eric Berry

Special Guests: John Hawthorn

In this episode of Ruby Rogues, the panel talks to John Hawthorn about MJIT. John has been a Ruby programmer for about 9 years and is based in Victoria, B.C. They talk about what MJIT is, the effects you can see from using the MJIT compiler, and why the JIT doesn’t always work with other languages. They also touch on how you can use the JIT in your own code, how he makes his performance better, and more!

Show Topics:

1:36 – John is a Ruby programmer, and has been one for the past 9 years, and he is based out of Victoria, B.C.

5:00 – He had always been curious how a JIT would work and…

RubyMine Blog 

RubyMine 2018.3 EAP is Open

Hi everyone,

RubyMine 2018.3 EAP1 (build 183.2153.13) is now open. Here’s the list of improvements introduced in this first Early Access build:

We will cover all these major changes in the next few blog posts.

Download RubyMine 2018.3 EAP

See…

Ruby Together News 

August 2018 Monthly Update

Hello! Welcome to the monthly update. During August, our work was supported by Handshake, Stripe, Coinbase, reinteractive, Airbnb, and many others.

ruby together news

In August, Ruby Together was supported by 75 different companies, including our newest Ruby-level member, Handshake. Thanks so much for the incredible support! We were also supported by 77 individual members and 64 friends of Ruby Together. Thanks to all 75 companies and 141 individuals for making everything that we do possible.

board nominations

It's almost time for our yearly election to choose directors! Each year, one third of the seats on the board are up for election. This year, the seat currently held by Adarsh…

Hi, we're Arkency 

Big events vs Small events - from the perspective of refactoring

Today I’d like to write a few words about big events versus small events. This topic usually leads to very heated discussions. At the beginning, I was mostly keen on big events, but now, after working for several years in an event sourced system, I notice many problems connected with big events. And that is why now I am all for smaller events.

To give you a sense of what I mean, here’s one example of a problem that I find very painful to deal with, namely the refactoring of our codebase. The thing is that when you publish events and you usually do it from an aggregate, then the aggregate contains some state related to the event or to the information needed to make the decision to publish…

Honeybadger Developer Blog 

Wrapping Up ElixirConf 2018

In September, we attended ElixirConf in Bellevue, WA. We're still fans of Elixir. Check out some of the highlights from the conference.
Julia Evans 

An awesome new Python profiler: py-spy!

The other day I learned that Ben Frederickson has written an awesome new Python profiler called py-spy!

It takes a similar approach to profiling as rbspy, the profiler I worked on earlier this year – it can profile any running Python program, it uses process_vm_readv to read memory, and it by default displays profiling information in a really easy-to-use way.

Obviously, think this is SO COOL. Here’s what it looks like profiling a Python program: (gif taken from the github README)

It has this great top-like output by default. The default UI is somewhat similar to rbspy’s, but feels better executed to me :)

you can install it with pip!

Another thing he’s done that’s really nice is…

Cognito Blog 

Product Updates: Faster Responses, Drivers Licenses, and More

Product updates for September 2018

We've been hard at work improving your Cognito experience, and today we are highlighting 5 upgrades that we have made recently:

Faster responses: The speed of our responses is always a priority for us to ensure that your customers' experience is as seamless as possible. Over the past few months we have improved response times by as much as 30% and doubled the speed of accessing the dashboard for high volume customers.

Drivers license data: Approved customers can now opt to receive drivers license numbers and issuance states where the data is available. Please contact our sales team if you are interested in receiving this data.

API keys on the dashboard: You no longer need to contact…

RubyGems Blog 

August 2018 RubyGems Updates

Welcome to the RubyGems monthly update! As part of our efforts at Ruby Together, we publish a recap of the work that we’ve done the previous month. Read on to find out what updates were made to RubyGems and RubyGems.org in August.

rubygems.org news

In August, we blacklisted several gems with names that were close to other popular gems, in response to CVE-2018-3779. We’re starting to investigate ways to protect RubyGems.org from malicious gems—if you’re interested in helping work on that, let us know! We also reviewed and merged performance improvements to the “rubygems#show” and “version#index” pages, contributed by @nateberkopec.

In total, RubyGems.org gained 11 commits from 5 authors,…

The Bike Shed 

169: Fear Driven Development

Chris is joined by Kane Baccigalupi, development director from thoughtbot's San Francisco office to discuss Kane's history in government working for 18F and California State and how those experiences have informed Kane's work since.

Throughout the conversation Chris and Kane discuss their shared desire to hide all implementation details and their love of Ruby for how it allows us to do that, testing vs test driven development, and approaches for refactoring large untested systems.

Awesome Ruby Newsletter 

Issue 120 - GitHub moves off the Rails as Microsoft closes in

OmbuLabs Blog 

How we use Pivotal Tracker at Ombu Labs

We tend to use GitHub for everything at Ombu Labs, but sometimes our clients prefer Pivotal Tracker. We have no problem with Pivotal Tracker, we just like to keep everything in one place, that is why we prefer GitHub for everything.

There are many things that are easier with Pivotal Tracker, as long as you are using it the right way. Some of its features are very useful for agile teams like ours. This is how we like to use it to ship value with every sprint and keep track of our velocity.

Step 1: Filing user stories

Every single thing has to be tracked according to the type of story. Most of the user stories are either features or bugs, although sometimes there will be chores to…

GoRails Screencasts 

Fast Pagination with Pagy

Pagy is 29x faster at pagination in their benchmarks which makes it an ultra fast and lightweight pagination library
OmbuLabs Blog 

How we use Pivotal Tracker at Ombu Labs

We tend to use GitHub for everything at Ombu Labs, but sometimes our clients prefer Pivotal Tracker. We have no problem with Pivotal Tracker, we just like to keep everything in one place, that is why we prefer GitHub for everything.

There are many things that are easier with Pivotal Tracker, as long as you are using it the right way. Some of its features are very useful for agile teams like ours. This is how we like to use it to ship value with every sprint and keep track of our velocity.

Step 1: Filing user stories

Every single thing has to be tracked according to the type of story. Most of the user stories are either features or bugs, although sometimes there will be chores to…

Ruby Weekly 

Writing a Gem with Native Extensions

#415 — September 6, 2018

Read on the Web

Ruby Weekly

Writing a Gem with Native Extensions — Whether you want to leverage existing C code or squeeze some extra performance, knowing how to include native extensions in your gem is good to know.

Tristan Penman

Uploading Files Directly to S3 with Presigned POST Requests — S3 supports ‘pre-signed’ POST requests so that your app’s users can upload files directly without you needing to share sensitive credentials over the air.

Chirag Shah

Containers for Rails Developers: Use Containers While Staying True to Your RoR Roots — A case study about moving our…

rossta.net 

Local SSL for Rails 5 development and tests

Is your Rails app on SSL in production? It may be a good idea to use SSL locally too. It's just that it's typically been a pain to set up for development. Using SSL with Capybara for acceptance tests has traditionally been even more challenging— until now.

In this post I'll demonstrate how I set up my Rails 5 app for local development and system tests over SSL with wildcard domains.

Local Rails SSL Demo

Why local SSL?

First, a tweet.

To summarize Kyle Simpson's Twitter rant, if your production app is on SSL, you want to develop on local SSL as well to test:

  1. URL logic (routing, history, redirects, enforcing…
All Ruby Podcasts by Devchat.tv 

MRS 059: Rob Miller

Panel: Charles Max Wood

Guest: Rob Miller

This week on My Ruby Story, Charles talks to Rob Miller. Rob is a return guess from Ruby Rogues 235. Rob shares his journey into programming, starting with creating HTML and CSS and website building. Rob talks about his book Text Processing with Ruby and projects and he is currently working on.

In particular, we dive pretty deep on

1:15 - Rob shares about getting into programming starting with Geocities and website building

4:00 -  Rob and Charles talks about the old ways of working with websites building

5:20 -  Rob talks about when he go into Ruby, and along with PHP and Rails.

6:09 -  Rod share on what he like most about Ruby. The…

Hi, we're Arkency 

Command sourcing - why I am considering it

If you’ve been following me over the last years, you know that recently I’ve been very interested in event sourcing. Command sourcing sounds very similar and indeed there are similarities. But on the other hand, it’s something completely different. We have been trying to introduce command sourcing to one of our projects and it requires us to address so many different aspects of it.

Therefore, I will try to gradually get you familiar with what it’s about, why we use it and what kind of problems we’re trying to solve. Today, I’ll try to stay simple and maybe in the next blog posts I will delve deeper into the subject.

The idea of command sourcing is about persisting commands. A command…

Depfu 

We need to talk about changelogs

Here at Depfu, we have a pet peeve we mention every time we talk about our product but haven’t talked about a lot on this blog: Changelogs. Let’s change that - with a changeblog.

Sorry.

Changelogs are, in our eyes, an essential part of the documentation of an open source project, especially for libraries or packages or modules or whatever your language of choice calls these managed dependencies.

For me, a changelog serves at least three different purposes: It shows me breaking changes where I need to act when upgrading, it shows me new features and changes I could use and it gives me a good look into the governance of the project. Let’s look at each of them:

The most important question…

Greater Than Code 

096: Resilience Engineering with John Allspaw

John Allspaw talks about the intersection of people, technology, and work, variety and complexity, and the importance of generating context-specific questions.
BigBinary Blog 

Uploading files directly to S3 using Pre-signed POST request

It’s easy to create a form in Rails which can upload a file to the backend. The backend, can then take the file and upload it to S3. We can do that by using gems like paperclip or carrierwave. Or if we are using Rails 5.2, we can use Active Storage

But for applications, where Rails is used only as an API backend, uploading via a form is not an option. In this case, we can expose an endpoint which accepts files, and then Rails can handle uploading to S3.

In most of the cases, the above solution works. But recently, in one of our applications which is hosted at Heroku we faced time-out related problems while uploading large files. Here is what heroku’s docs says about how long a request can…

RubyGuides 

Rack Explained For Ruby Developers

Would you like to know what goes on behind the scenes of Rails, Sinatra, and other Ruby web frameworks? Then you’re in the right place. Because today we are going to talk about Rack! Rack is the key component that makes Ruby web development possible… …but what is Rack exactly? Rack is a layer between […]

The post Rack Explained For Ruby Developers appeared first on RubyGuides. Don't miss your free gift here :)

Ruby Magic by AppSignal 

Closures in Ruby: Blocks, Procs and Lambdas

In Ruby Magic we love to dive into the magic behind the things we use every day to understand how they work. In this edition, we’ll explore the differences between blocks, procs and lambdas.

In programming languages with first-class functions, functions can be stored in variables and passed as arguments to other functions. Functions can even use other functions as their return values.

A closure is a first-class function with an environment. The environment is a mapping to the variables that existed when the closure was created. The closure will retain its access to these variables, even if they’re defined in another scope.

Ruby doesn’t have first-class functions, but it does have…

Hi, we're Arkency 

Event scout rule

Recently I came up with a new name for an existing technique that I have been suggesting over the last few years. It is connected with applying domain-driven design, event sourcing or event-driven architecture to various existing applications.

The idea is that when you start a new application and you already know how to do events, event-driven architecture or event sourcing, then from a technical perspective, it’s all quite easy. You simply add a new feature and all is event-driven from the beginning.

Legacy apps

In the case of existing applications, however, it’s a bit more complicated, because there are no events. Building a new feature in an existing application is hard, because…

Depfu 

Private registries

Are you sharing code between your different projects? Depfu now supports all package registries you might use for your own private shared libraries.

Let’s have a look at how…

Julia Evans 

Editing my blog's HTTP headers with Cloudflare workers

Hello! For the last 6 months, I’ve had a problem on this blog where every so often a page would show up like this:

Instead of rendering the HTML, it would just display the HTML. Not all the time, just… sometimes.

I’ve gotten a lot of messages from readers with screenshots of this, and it’s no fun! People do not want to read raw HTML. I would like my pages to render! I finally (I think) have a solution to this, so I wanted to write up what I did.

The mystery of the missing Content-Type header

It was clear basically the first time this happened that the reason was that there was a missing HTTP Content-Type header. The Content-Type for HTML pages is supposed to be set to Content-Type:…

Drifting Ruby Screencasts 

Rails Presenters

Separating view logic from bloated models can help maintain the model in the long run.
Riding Rails 

Read replica database configurations, faster parameter filtering, and more!

Hello everyone! This is Eugene, bringing you the highlights from the last week of activity in the Rails codebase.

Add hooks to Active Job on retries and discards

Your application can now subscribe to be notified whenever a job is retried or discarded. Neat!

Support read replica database configurations

Database configurations can now be flagged as “replicas”, indicating that the database they connect to is read-only.

For now this just means they’re ignored by database tasks like db:create, but the comments on the pull request mention some other features that could be built on top of this change.

Reduce allocations during parameter filtering

Initially this patch looked like a…

Andy Croll 

Careful with present? when using ActiveRecord scopes

When using Rails, #present? is available on all Ruby objects. Therefore, we tend to use it in many places. For example, you might use it in a view to check if an array has some elements before trying to loop through it and display some data.

However, using #present? on scopes can create unforeseen performance problems.

Instead of…

…using #present? on an Active Relation (a scope on an Active Record class)

books = Book.recently_released
if books.present?
  books.paperbacks.each { |book| puts book.title }
end

Use…

#any? or #exists?

books = Book.recently_released
if books.any?
  books.paperbacks.each { |book| puts book.title }
end

But why?

When you call #present? on an Active…

Hi, we're Arkency 

Use channels, not direct messages - 9 tips

There’s something about using direct messages (project related) that developers find uncomfortable. At Arkency, we avoid them at all costs, but we also see how hard is to change our client teams habits, sometimes.

I thought it would be nice to describe the problem and find some solutions. I talk about it from the perspective of a remote/async/distributed team, but I suppose some problems are similar to in-office teams.

My criticism towards direct messages doesn’t assume bad intents from the initiatiors of such conversation. I believe it’s mostly about not being aware of the consequences.

In this post, I’m focusing mostly on project-related communication - where I believe all the team…

Julia Evans 

Who pays to educate developers?

I’ve been thinking about developer education (and, specifically, education of professional developers who have been working for a few years already) for the last year or so. In my last post I talked about how to teach yourself hard things, which is how I’ve learned most things.

But! Even when you’re learning on your own, there are all kinds of resources you depend on! Some examples of places I’ve learned things are:

  • a few really great programming books
  • conference talks
  • hundreds of blog posts (I subscribe to dozens of programming blogs)
  • Twitter
  • meetups
  • Slack groups

All of these things (tweets, blog posts, conference talks, etc) take time to make, and a lot of it is given away for…

Michael Cordell's Blog 

2018 Quarter One Reading List

Table of Contents

Non-Fiction

David Graeber - Debt

The first 5,000 years

Debt is not a book whose message can be boiled down to a few bullet points. It is a lengthy study of the power of debt, and how it shapes human society. As the author states in the introductory chapter, “This book is a history of debt, then but it also uses that history as a way to ask fundamental questions about what human beings and human society are or could be…

Julia Evans 

How to teach yourself hard things

This blog is mostly about learning computer programming / systems. Probably 70% of these posts are in one way or another about things I’ve learned and why they’re exciting.

But how do you teach yourself hard things? I’ve talked before about having a growth mindset, which is about replacing the belief “I’m bad at X” with “I haven’t learned about X yet”.

Having a positive attitude is really important, but IMO by itself it’s not enough to learn hard things. Learning is a skill which takes a lot of work to get better at. So this blog post is about specific learning skills that I’ve worked on over time. They are:

  1. Identify what you don’t understand (maybe the most important one)
  2. Have…

what does…

Remote Ruby 

Staying Awake, Performance Improvements, Abandoned Open Source, and Little Computers

Join us as we share weird stories from the week, talk about performance improvements in Rails and our own apps, open source projects, and the Surface Go. Plus a bunch of random stuff in-between.
Honeybadger Developer Blog 

The honeybadger gem 4.0 has been released!

Last week we released version 4.0.0 of the `honeybadger` Ruby gem. This release includes a long-awaited feature which makes it even easier to customize your error reports before they are sent to Honeybadger. We also did some much-needed refactoring, and made a few removals and deprecations for good measure. Don't worry, though—most of the API remains unchanged, so upgrading should be a relatively painless process for most users.
solnic.codes 

A quick​ recap and plans for the future

Hi, I’m back! I haven’t written anything on this blog since November 2016, which is sad but it is what it is. I’ve got so much to tell you. A lot happened during this time, and I’ll try to summarize it here and also talk a bit about my plans for the future.

The Ruby Prize

top_image06

Almost a year ago I was honored to go to Matsue, Japan, to attend the Ruby World 2017 conference, where I received the Ruby Prize from Matz himself. Getting the prize and visiting Japan was a fantastic experience for me, and I’m deeply grateful. I’ve been thinking a lot about the Ruby community since then, mostly reflecting on how we’re evolving as programmers and trying to see how well my 8+ years of OSS contributions…

Rebased Blog 

101: Advanced OOP structure

Welcome to the first blog post in our cycle directed to less-experienced developers. We will be diving into the world of more advanced concepts - however, each one should be easily digestible by junior+ - mid developer. It’s one of the ways we want to give back to the community....
The Bike Shed 

168: An Escape Rope of Learning

Chris is joined by Rachel Mathew to discuss Rachel's recent experiences with Scala on a handful of client and side projects. They discuss the benefits of working within a type system, learning to work with a compiler, and the process of getting to know a new language and paradigm.

Along they way they dip into the complexity of twitter as a platform for discussion and making improvements to development workflows.

Awesome Ruby Newsletter 

Issue 119 - Rails Console Magic Tricks

Ruby Weekly 

Ruby's 'main' object, broken CSV parsing, and building Linux desktop apps with Ruby

#414 — August 30, 2018

Read on the Web

Ruby Weekly

Rails.. Still? Plus Some Ruby Metaprogramming — Thoughts on two talks given at the Amsterdam.rb meetup earlier this week. The first reflecting on Ruby webapp frameworks, and the second covering metaprogramming for generalists which you can watch the Euroko version of here.

Floor Drees (Phusion)

Ruby's 'main' Object Does What? — Noah takes a dive into the main object: “Spoiler: there will be a bunch of spelunking, first in Ruby and then in Ruby’s C source code. We’ll talk about how to find code in both places.” This is a follow up to this post on Rake.

Drivy Engineering 

Exporting significant SQL reports with ActiveRecord

A few months ago we faced a memory issue on some of our background jobs. Heroku was killing our dyno because it was exceeding its allowed memory. Thanks to our instrumentation of Sidekiq, it was easy to spot the culprit. The job was doing a fairly complex SQL request, and outputing the query’s result into a CSV file before archiving this file.

In this article, I’ll explain what happened and detail the method we used to solve the problem. I had never seen or used this technique before thus I thought it would be nice to share.

More context

We run a tiny framework, something more like a convention, to run SQL queries and archive the results. If I remove the noise of the framework, we had a…

RubyMine Blog 

RubyMine 2018.2.2 Is Available

Hi everyone,

RubyMine 2018.2.2 (build 182.4129.29) is now available. The new build fixes the following issues:

Markdown

Other improvements:

  • Fixed running Cucumber features and scenarios [RUBY-22203]
  • Added an ability to disable the preselection of autocompletion elements on Enter [RUBY-22266]

Download RubyMine 2018.2.2

See the release notes for the full list of improvements and please report any issues you encounter.

BigBinary Blog 

How we reduced infrastructure cost by 10% for an e-commerce project

Recently, we got an opportunity to reduce the infrastructure cost of a medium-sized e-commerce project. In this blog we discuss how we reduced the total infrastructure cost by 10%.

Changes to MongoDB instances

Depending on the requirements, modern web applications use different third-party services. For example, it’s easy and cost effective to subscribe to a GeoIP lookup service than building and maintaining one. Some third-party services get very expensive as the usage increases but people don’t look for alternatives due to legacy reasons.

In our case, our client had been paying more than $5,000/month for a third-party MongoDB service. This service charges based on the storage used and…

All Ruby Podcasts by Devchat.tv 

MRS 058: Aaron Sumner

Panel: Charles Max Wood

Guest: Aaron Sumner

This week on My Ruby Story, Charles talks to Aaron Sumner. Aaron is a senior software engineer at O’Reilly Media as well as runs the blog Everyday Rails and wrote a book entitled Everyday Rails Testing with RSpec. He first got into programming when his school got a computer and he took a computer class at a local community college that he took in order to learn how to write games. They talk about how he got into Ruby, what he is proud of contributing to the community, why he decided to write his book, and more!

In particular, we dive pretty deep on:

EquiValent 

Google Maps in Rails with Coffee Script

First generate Google API token

  1. go to https://console.cloud.google.com/google/maps-apis/overview
  2. create a project / open a porject from top menu
  3. generate API key for “Maps JavaScript API”
  4. in the “credentials” section for the key in “Application restrictions” tab set “Application restriction” to “HTTP referrers” and add lits of allowed websites (E.g. https://www.mywebsite.com, localhost:4567)
  5. in the “credentials” section for the key in “API Restriction” tab set restriction to “Maps JavaScript API”
  6. in the “Quotas” section for the key set some reasonable quotas so you wont get charged lot of $$$

note: From Summer 2018 you need to fill in billing details for…

Greater Than Code 

095: Cleaning House with Heidi Waterhouse

Heidi Waterhouse joins the show to talk about developer relations, life hacks for ADD, and the similarities between housekeeping and code review.
The Life of a Radar 

Junior Engineering Program: Onboarding

This post is part of a series of posts about the first iteration of the Culture Amp Junior Engineering Program (JEP). You can read the first post here.

In the last post, I covered how we launched the Junior Engineering Program at Culture Amp, all the way up to formally hiring the juniors.

In this post, I'm going to cover what we did to make sure the juniors were successful when they arrived. First of all, we needed to be prepared!

Preparing for the juniors

First impressions matter.

At Culture Amp, our onboarding process is thoughtfully designed to slowly ease new people into their time with us. You can choose custom equipment if you like, and you'll get a wonderful welcome package on…

The Life of a Radar 

Junior Engineering Program: Resources

This post is part of a series of posts about the first cohort of the Culture Amp Junior Engineering Program (JEP). You can read the first two posts here:

In the last post I covered the process of what we did in the weeks immediately following the juniors starting, but didn't talk too much about what we taught them during those or subsequent weeks. That is what this post is going to talk about: what we taught our juniors over the 26 weeks of the Junior Engineering Program.

In the first post, I briefly rattled off some tech that we used:

The juniors learned how to work effectively in teams and amongst themselves,…

All Ruby Podcasts by Devchat.tv 

RR 377: Upgrading a Rails application incrementally with Luke Francl

Panel:

  • Dave Kimura
  • Eric Berry

Special Guests: Luke Francl

In this episode of Ruby Rogues, the panel talks to Luke Francl about his article “Upgrading Rails applications incrementally”. Luke works at GitHub on search and has been there since October 2017. Before working at GitHub, he worked at a search startup that was working with Rails and Elasticsearch. They talk about things that people take for granted with search, the impending takeover of GitHub from Microsoft, and what open source looks like today. They also touch on the process of getting hired at GitHub, his process for upgrading Rails applications, and more!

In particular, we dive pretty deep on:

  • Luke intro
  • Working…
BigBinary Blog 

Ruby 2.6 adds Enumerable#filter as an alias of Enumerable#select

This blog is part of our Ruby 2.6 series. Ruby 2.6.0-preview2 was recently released.

Ruby 2.6 has added Enumerable#filter as an alias of Enumerable#select. The reason for adding Enumerable#filter as an alias is to make it easier for people coming from other languages to use Ruby. A lot of other languages including Java, R, PHP etc. have filter method to filter/select records based on a condition.

Let’s take an example in which we have to select/filter all numbers which are divisible by 5 from a range.

Ruby 2.5

irb> (1..100).select { |num| num % 5 == 0 }
=> [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]

irb> (1..100).filter { |num| num % 5 == 0 }
=> Tra…
Drivy Engineering 

Security tips for rails apps

As your application gets larger and larger, the surface area for security issues expands accordingly, and security bugs become more and more problematic.

Here are a few tips to avoid some common pitfalls regarding security for Rails apps.

Use I18n with html tags properly

It is quite common to want to mix I18n translation keys with HTML tags. I’d recommend against doing that as much as possible, but sometimes you can’t really avoid it.

Let’s take the following example:

# en.yml
en:
  hello: "Welcome <strong>%{user_name}</strong>!"
<%= t('hello', user_name: current_user.first_name) %>

We have a problem here, because this will produce the following output:

Welcome…

Paweł U. | Ruby on Rails Web Development Consultant Full Stack Blog 

Screencast - Scraper App, Visual Web Scraping Development Progress

In this screencast, I showcase development progress of the Scraper App - Visual Web Scraping tool. I show how you can capture live screenshots using a simple Chrome extension. I also describe new features like mobile responsive design, enabling interaction using click selectors and editing websites layout to avoid popups, ads etc.

[Duration] 9m


Subscribe to the waiting list on the Scraper App landing page and let me know if you would like to take part in the Private Beta.

The Life of a Radar 

Culture Amp Junior Engineering Program: Retrospective

This post is a short summary of the Culture Amp Junior Engineering Program (JEP) that I ran from November last year until June this year.

If you're keen to apply for the 2nd cohort then you can do that here:

Apply here for the Culture Amp Junior Engineering Program's second cohort

This post is the first in a series of four blog posts which will go into detail about how the last JEP operated, with the aim of giving potential future cohort applicants and the general public a taste of what a Culture Amp JEP looks like.

Our first Junior Engineering Program

Culture Amp spun up our first Junior Engineering Program in November of 2017. It ran for 6 months, and we trained 10 junior engineers…

The Life of a Radar 

Junior Engineering Program: Launch

Over the last year, a lot of my time has gone into developing and running a Junior Engineering Program at Culture Amp. This program ran for a total of 6 months, but the preparation took a bit longer.

Within this program, we taught 10 junior developers the fundamentals of programming. The juniors learned how to work effectively in teams and amongst themselves, as well as learning about Ruby, PostgreSQL, Mongo, Rails, JavaScript, Flow, React, JSON APIs and GraphQL, all within 6 months time. Our target was for the juniors to become "confident and capable engineers" and we have succeeded in that target. They're now super-powered juniors!

In this post, I'm going to cover how we launched the…

Riding Rails 

Action Cable testing utilities, bugfixes and more!

Happy Sunday! This is Greg bringing you the latest news about Rails.

The initializers Rake task is moved to Rails::Command

Another Rake task is moved to Rails::Command, so in Rails 6 you will need to call bin/rails initializers instead of bin/rake initializers.

Improve Active Job test helpers

This change adds a queue option to perform_enqueued_jobs, and if it is set, only the specified queue will be performed.

Fix rails routes -c

This PR fixes the issue of rails routes -c UserPermissionsController did not output routes for the corresponding controller, because its name consists of multiple words. 

Action Cable testing

This PR is basically a merge of the actioncable-testing gem into…

Appfolio Engineering 

Ruby's Main Object Does What?

Last week, Mischa talked about debugging a problem with Rake tasks polluting the global namespace. This week, I'll talk about how that happens.

Spoiler: there will be a bunch of spelunking, first in Ruby and then in Ruby's C source code. We'll talk about how to find code in both places.

What Are We Looking For?

When we define methods on Ruby's top-level "main" object, they show up as instance methods on Object so they're callable absolutely everywhere. But "main" is mostly just a random instance of Object, and isn't part of the standard class hierarchies like, say, Kernel or Object. So why and how do those methods show up on Object?

First I checked what was going on in irb. You don't know what…

Scout ~ The Blog 

Monitor a Django app with Scout

In this post, I'll show how to setup Scout to monitor the performance of SQL queries, external HTTP calls, template rendering, and more in Wagtail, a Django CMS app.

Wagtail is a fast, modern opensource content management system built on Django. Used at NASA, Google, MIT, and more, it's a great option for running your own CMS. When we add the scout-apm package to the app, we'll quickly gain insights on the app's performance.

I'll start with the performance monitoring basics, then move onto advanced settings we've found valuable for monitoring our own apps at Scout.

Setup

Scout is distributed via the scout-apm Python package and configuration takes just a couple of lines of code. Once…

dejimata 

Metaprogramming for Generalists


Hi everybody, my name is Chris Salzberg and the title of this talk is “Metaprogramming for Generalists”.

So here are some quick bullet points about me. My handle is “shioyama” and I live in Tokyo, in Japan. But I am not Japanese, in case that wasn’t obvious! I’m actually a Canadian originally from Montreal.

I work at a company called Degica based in Tokyo, we do payments and e-commerce. We have a booth so be sure to check us out.

In the open source world, I’m the author of a few gems, the most well-known one is a gem called Mobility for managing model translations.

And I write about things like the “Module Builder Pattern” at my blog, dejimata.com.

This is going to be a two-part…

dejimata 

Transcript of my EuRuKo 2018 Talk

This is a very rough transcript of my talk, Metaprogramming for Generalists, given at this year’s EuRuKo conference in Vienna, Austria. There is also a video of the talk on YouTube.


Hi everybody, my name is Chris Salzberg and the title of this talk is “Metaprogramming for Generalists”. I know I know, you’re thinking, "He’s starting the morning of the first day with metaprogramming?!”

But don’t worry! This will be interesting.


About Me

About Me

Ok, so first about me. My handle is @shioyama and I live in Tokyo, in Japan. But don’t be fooled! I am not Japanese, in case that wasn’t obvious. I’m actually a Canadian originally from Montreal.

I work at a company called Degica based in…

Remote Ruby 

Secret Project X, Payments in Rails, More Javascript 😅, and Mastodon