Rubyland

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

Everything You Need to Know About Ruby Operators

Ruby has a lot of interesting operators, like the spaceship operator (<=>), the modulo assignment operator (%=), and of course the regular operators like greater than (>) & not equals (!=). What you may not realize is that many of these operators are actually Ruby methods. This means you can overwrite what they do & […]

The post Everything You Need to Know About Ruby Operators appeared first on RubyGuides. Don't miss your free gift here :)

The Bike Shed 

162: You Have Ruined Your Rails App (Sam Phippen)

Sam Phippen joins us to discuss the maintenance burden of supporting old Rubies, service oriented architecture, and explorations of GraphQL and graph databases.

avdi.codes 

New pairing video and more updates

Hi all! I'm still plugging away at updates to the MOOM course to get it ready for the final release July 23rd.

Note that while all of the Capacitor Sessions raw video is “in the can”, the finished videos have a long turnaround time to publish. That's because we're editing them to remove pauses, shorten long typing sections, highlight conversations, improve audio quality, and write up notes. Consequently, I'll be continuing to add new episodes to the course after the final release date. I'll send out an update to…

Riding Rails 

Attaching files on save, Rails notes and more

Hello Ruby fans. This is Wojtek bringing you latest news from World Cup fields.
I mean Ruby on Rails codebase…

Support readonly option in SQLite3

To ensure no modifications are allowed on SQLite3 database you can now pass “readonly” option.

Support “_html” suffix for array in translations

Now in HTML safe translation key, you can use array of values that will not be escaped in the view.

Change “rails notes” to use Rails command

Previously it was using Rake task under the hood. Now it’s a pure command. Old “rails notes ANNOTATION=custom” becomes “rails notes –annotations custom”. Old syntax will continue to work outputting a deprecation message.

Store newly-uploaded files on save…

Code with Jason 

Things You Can (and Should) Ignore When Getting Started with Rails Testing

Here’s an incomplete list of tools and concepts you might encounter when first trying to learn Rails testing: Capybara, Cucumber, Database Cleaner, factory_bot, Faker, MiniTest, RSpec, system tests, Test::Unit, acceptance tests, end-to-end-tests, mocks, stubs, unit tests and TDD.

That’s a lot of stuff. If you’re like most humans you might look at this long list of things, feel confused about where to start, and say, “I don’t know what to do. I’ll just deal with this later.”

The challenge of getting started with testing would be much easier if you knew exactly what you needed to know and what you could safely ignore. What follows is a list of what you can safely ignore.

Framework Decisions

Y…

RubyMine Blog 

RubyMine 2018.2 RC: JavaScript and Git Improvements

Hey all,

RubyMine 2018.2 RC (build 182.3684.16) is out now. This is the first release candidate for the upcoming v2018.2. This blog post briefly covers improvements coming into RubyMine from the IntelliJ platform.

Download RubyMine 2018.2 RC

JavaScript

JavaScript and Typescript

New intentions (Alt+Enter) for JavaScript and TypeScript, such as Implement interface, Create derived class, Iterate with ‘for..of’, are now available:

The IDE now supports all new features from TypeScript 2.9 and the upcoming TypeScript 3.0…

Bundler Blog 

June 2018 Bundler Update

Welcome to the June Bundler update!

Last month, we fixed some bugs and our Google Summer of Code (GSoC) students finished work on the bundle remove feature. We also created a checklist for the Bundler 2 release, and finished documentation for the Bundler release process.

After that, we published a public request for comments on the idea of Bundler release channels. Just this week, we learned a lot about how Docker and Bundler can work better together.

We published a new zine called “The Evolution of Bundler” in partnership with @sailorhg of Bubblesort Zines. It’s now available for sale in the Ruby Together store.

This month, Bundler gained 63 new commits, contributed by 12 authors.…

RubyGems Blog 

June 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 June.

RubyGems.org News

In June, we updated over 25 dependencies, including nokogiri and the sprockets security release, and updated to Rails 5.1. We also fixed a longstanding and frustrating issue where multiple CI builds pushing a new gem version at the same time could result in a checksum error when trying to install the new version. On June 27, we deprecated the “gem edit” page and it will be removed altogether on July 10.

Instead of editing gem metadata at…

Julia Evans 

netdev day 2: moving away from &#34;as fast as possible&#34; in networking code

Hello! Today was day 2 of netdev. I only made it to the morning of the conference, but the morning was VERY EXCITING. The highlight of this morning was a keynote by Van Jacobson about the future of congestion control on the internet (!!!) called “Evolving from As Fast As Possible: Teaching NICs about time”

I’m going to try to summarize what I learned from this talk. I almost certainly have some things wrong, but let’s go!

This talk was about how the internet has changed since 1988, why we need new algorithms today, and how we can change Linux’s networking stack to implement those algorithms more easily.

what’s congestion control?

Everyone on the internet is sending packets all at…

Soulcutter 

Hiding .gemrc credentials in dotfiles

I recently came across this problem with the ~/.gemrc file used by the gem command since I needed to store a a private token for accessing a GemFury gem source. I struggled to figure out a way to keep the file in my dotfiles without exposing myself to the possibility that I would publish them. Finally, at the end of my rope I reached out to my colleagues with this problem and within minutes Adam Strickland responded with a great approach that was not-obvious but ends up being a great way to provide configuration outside of the committed ~/.gemrc file. A true hidden gem. –do you see what I did there?

GEMRC: the environment variable

It turns out that you can specify another place for the ge…

Awesome Ruby Newsletter 

Issue 112 - If you want to start learning Ruby on Rails, here is the list of 6 websites with free content that will put you on track.

All Ruby Podcasts by Devchat.tv 

RR 370: How I Built Timeasure with Eliav Lavi

Panel:

  • David Richards
  • Dave Kimura
  • Eric Berry
  • Catherine Meyers

Special Guests: Eliav Lavi

In this episode of Ruby Rogues, the panel talks to Eliav Lavi about his article How I Built Timeasure. Eliav works for Riskified where he is a back-end developer working with Ruby mostly and recently some Scala. In the past, he studied music but  had always been into technology from a young age. They talk about how got to where he is today, what the developer scene is like in Israel, and Timeasure. They talk about what this gem is, why they decided to create it, and more!

In particular, we dive pretty deep on:

  • Eliav intro
  • Studied music originally
  • Risk analyst at Riskified
  • Company…
Scout ~ The Blog 

Part I: How not to structure your database-backed web apps

Most scientific papers are unlikely to change your day-to-day approach as a Rails web developer. How not to structure your database-backed web applications: a study of performance bugs in the wild Yang et al., ICSE’18 is the exception to that rule.

This study examined 12 popular, mature, opensource Rails apps for ActiveRecord performance anti-patterns. And boy, did they find some issues:

11 out of 12 studied applications contain pages in their latest versions that take more than two seconds to load and also pages that scale super-linearly

I'm not shocked that almost every application had problematic controller-actions. I was suprised at the percentage of controller-actions that are…

Rebased Blog 

Wkhtmltopdf Considered Harmful

TL;DR: replace it with weasyprint. Read on for why. There are eight reasons why wkhtmltopdf shouldn’t be used for anything serious: 8. Difficult to build Compilation requires Qt (currently an obsolete version) and WebKit, both hefty codebases. One Docker Hub repo author stated problems with compiling it under two hours...
Ruby Weekly 

A Framework for Building 'Hemiparasitic' DSLs

#407 — July 12, 2018

Read on the Web

Ruby Weekly

Generating Music with Sonic Pi and RubySonic Pi is an amazing Ruby-based musical live coding environment (which could do with your support) and if you haven’t yet given it a go, hopefully this will inspire you.

Jessica Garson

Yadriggy: A Framework for Building 'Hemiparasitic' DSLs — A ‘hemiparastic’ DSL is a type of embedded DSL that uses the host’s language syntax (Ruby’s, in this case) but is ultimately run externally. There’s an example of Yadriggy C, a DSL that can offload computation from Ruby to C.

Shigeru Chiba

Long Term Support for…

Julia Evans 

netdev day 1: IPsec!

Hello! This year, like last year, I’m at the netdev conference. (here are my notes from last year).

Today at the conference I learned a lot about IPsec, so we’re going to talk about IPsec! There was an IPsec workshop given by Sowmini Varadhan and Paul Wouters. All of the mistakes in this post are 100% my fault though :).

what’s IPsec?

IPsec is a protocol used to encrypt IP packets. Some VPNs are implemented with IPsec. One big thing I hadn’t really realized until today is that there isn’t just one protocol used for VPNs – I think VPN is just a general term meaning “your IP packets get encrypted and sent through another server” and VPNs can be implemented using a bunch of different…

All Ruby Podcasts by Devchat.tv 

MRS 052: Takashi Kokubun

Panel: Charles Max Wood

Guest: Takashi Kokubun

This week on My Ruby Story, Charles talks to Takashi Kokubun. Takashi is a template engine hobbyist, is currently working on the JIT Compiler for Ruby 2.6, and is a Ruby on Rails application engineer at Treasure Data. He first got into programming in his first year at university where he learned C in his first part-time job. They talk about why he decided to work with Ruby, the first thing he built with it, and how you would write a templating system. They also touch on what he is working on now, what his plans are for the future, and more!

In particular, we dive pretty deep on:

JetRockets 

Rails: increment counter cache and return value

Small ActiveRecord hack that you can use everyday.
JetRockets 

Rails: increment counter cache and return value

Small ActiveRecord hack that you can use everyday.
Passenger - Phusion Blog 

You can’t learn in a vacuum: lessons from 6 open source software maintainers

You can’t learn in a vacuum: lessons from 6 open source software maintainers

May 11-12 ROSS conf (Ruby Open Source Software) took place in Amsterdam. 6 open source project maintainers shared their thoughts and work with the conference participants and ‘camera guy’ Joe Lee. Below we transcribed the best bits from the video interviews we published.

Introducing the maintainers

Katrina Owen maintains Exercism.io, a project that allows people to practice programming (in a new language). Michal Papis maintains RVM (Ruby Version Manager) and likes open source because it gives him the freedom to push a project in the direction he chooses.

Noah Berman switched from being a film maker to programming. Attended the Turing School of Software & Design where the curriculum is open…

Greater Than Code 

088: The Safety 2 Dance with Steven Shorrock

In this episode, Chartered Psychologist, Ergonomist and Human Factors Specialist, Steven Shorrock talks about system performance and human wellbeing, asset-based community development, and Safety-I & Safety-II, which defines safety as the ability to succeed under varying conditions.

We have interactive show transcripts! Powered by Gretta.


Panelists:

Jamey Hampton | Jessica Kerr | John K. Sawers

Guest Starring:

Steven Shorrock: HindSight Magazine | humanisticsystems.com

Human Factors and Ergonomics in Practice: Improving System Performance and Human Well-Being in the Real World

Show Notes:

01:46 – Steven’s Superpower: Being a Super-Recognizer and Empathy

Steven Shorrock on the myth of…

Ruby Magic by AppSignal 

Under the Hood: “Slurping” and Streaming Files in Ruby

In this edition of Ruby Magic, we’ll learn about streaming files in Ruby, how the IO class handles reading files without completely loading them into memory, and how it reads files per line by buffering read bytes. Let’s dive right in!

“Slurping” and Streaming Files

Ruby’s File.read method reads a file and returns its full content.

1
2
irb> content = File.read("log/production.log")
=> "I, [2018-06-27T16:45:02.843719 #9098]  INFO -- : [86a5d18c-19dd-4cbf-9d7a-461c79e98c22] Started GET \"/articles\" for 127.0.0.1 at 2018-06-27 16:45:02 +0200\nI, [2018-06-27T16:45:02.846719 #9098]  INFO -- : [86a5d18c-19dd-4cbf-9d7a-461c79e98c22] Processing by ArticlesController#index as HTML\nI,…
BigBinary Blog 

Ruby 2.6 raises exception when 'else' is used inside 'begin..end' block without 'rescue'

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

Ruby 2.5

If we use else without rescue inside begin..end block in Ruby 2.5, it gives a warning.

  irb(main):001:0> begin
  irb(main):002:1>    puts "Inside begin block"
  irb(main):003:1>  else
  irb(main):004:1>    puts "Inside else block"
  irb(main):005:1> end
  (irb):5: warning: else without rescue is useless

This warning is present as code inside else block will never get executed

Ruby 2.6

In Ruby 2.6 it will raise an exception if we use else without rescue in begin..end block. This commit changed warning into exception in Ruby 2.6. Changes made in the commit are experimental.

  irb(main):001:0>
Appfolio Engineering 

Finding the right engineers for the job

IMG_9036 (1).jpg

The best engineers

"This project will be critical to our success. Let’s get our best software engineers on it…" Maybe you’ve heard something like this where you work. The question naturally arises, who are your “best” engineers?

When I first started my career, I believed that the best software engineer was one who rigorously applied the principles of good software engineering (SOLID) in a steady fashion to create something new. My thinking on this has shifted a bit. While I still very much believe in these principles, I now see them as a part of a larger picture.

The right engineers

A few years ago I attended a conference…

Ruby Together News 

June 2018 Monthly Update

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

ruby together news

In June, Ruby Together was supported by 74 different companies. Two new developers signed up as members or friends of Ruby Together. In total, we were supported by 82 individual members and 66 friends of Ruby Together.

Developer evangelist PJ Hagerty visited a number of conferences and meetups in June, including BostonRB, Texas Linux Fest, and RubyConf Kenya.

As promised, we also published the results from our June 23 board meeting. We made some great progress, and expect to be able to announce the new projects that we’re working on within the next…

bundler…

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

Screencast - Showcase of Scraper App, Visual Web Scraping Prototype

In this screencast, I present a prototype of my new side project. It is a simple tool that allows you to visually scrape interesting parts of different websites to create your personal internet dashboard. I want to probe the interest before releasing a public MVP version.

[Duration] 4m


Subscribe to the waiting list on the Scraper App landing page if you would like to see the project developed.

BigBinary Blog 

Automatically Format your Elm code with elm-format before committing

In one of our earlier posts we talked about how we set up prettier and rubocop to automatically format our Javascript and Ruby code on git commit.

Recently we started working with Elm in a couple of our projects - APISnapshot and AceHelp.

Tools like prettier and rubocop have really helped us take a load off our mind with regards to formatting code. And one of the very first things we wanted to sort out when we started doing Elm was pretty printing our Elm code.

elm-format created by Aaron VonderHaar formats Elm source code according to a standard set of rules based on the official Elm Style Guide.

Automatic code formatting

Let’s setup git hook to automatically take care of code…

rossta.net 

Displaying PDFs lazily with Vue

As we demonstrated in the previous post, we can render pages of a PDF to <canvas> elements using PDF.js and Vue. We were able to use a simple Vue component hierarchy to separate the responsibilities of data fetching and page rendering. We used the PDF.js library to fetch the page data and hand off the work of drawing the data onto <canvas> elements.

In this post, we'll add a new requirement: we should only render pages when they are visible, i.e., as they are scrolled into the viewport. Previously, we were rendering all pages eagerly, regardless of whether they were appearing in the client browser. For a large PDF, this could mean valuable resources are used to render many pages offscreen…

RubyMine Blog 

RubyMine 2018.2 Goes Beta

Hi there,

RubyMine 2018.2 Beta (182.3569.32) is now available for your review. The Beta build polishes all the features introduced in 2018.2 EAP builds, and fixes a number of older issues.

Check out our previous 2018.2 EAP blog posts to discover all the new features:

Download RubyMine 2018.2 BETA

As usual, see the r…

The Bike Shed 

161: Re-Incoherence

Rails performance, rebalancing coherence, and themes from career advice requests.

Awesome Ruby Newsletter 

Issue 111 - Writing Ruby Like it's 2018 | Ruby Programming Language

Drivy Engineering 

Quick wins to deal with users' broken email addresses

If a user signs up to Drivy, we want to welcome them. If a driver has an upcoming booked trip, we would like to send them the needed information. If they want to reset their password, they need to receive a confirmation email and so on.

In another words, transactional emails are very important for a successful experience. So, how do we deal with broken email addresses?

Regex-ing the format

First of all we decided to check the email-address format of a new user during her sign-up flow. To do so, we compare it with a very simple regex.

\A\S+@\S+\.\S+\z

Here is our assumption. An email address can:

  • have at least one or more instance of any non-whitespace character,
  • be imperatively…
Ruby Weekly 

Running JRuby on the Graal JIT

#406 — July 5, 2018

Read on the Web

Ruby Weekly

Running JRuby on the Graal JIT — Graal is the highly-optimized JVM extension that TruffleRuby runs upon, but it brings some impressive performance gains to JRuby too.

Charles Nutter

Ruby Memory Environment Variables: Simpler Than They Look? — So you want to tweak your Ruby memory settings? Here’s a post that tries to talk you out of it but relents by simplifying where to start.

Noah Gibbs

🔧 Fix Ruby Bugs Like a Boss — Reduce time wasted debugging. Automatically capture errors in Ruby apps. Rollbar detects when code breaks in real-time and…

Search Results for “ruby” – via @codeship 

Measuring Performance Metrics in Rails

Reading Time: 7 minutes

Performance is a topic many developers value highly, with web frameworks, programming languages, databases, and various technologies all boasting about performance. However, this isn’t usually the first consideration for a web application, as getting a product or service made more quickly is a higher priority.

We tend to think about performance once a product/service is in working order and we need to consider scaling for more users and more efficiently handling those we have.

In this article, we’ll focus on performance metrics that matter more for our end goal, “the user experience,” from the Rails side of things.


“We start thinking about performance once a product…

avdi.codes 

Get $100 off of Master the Object-Oriented Mindset, today only

As you may or may not know, every year I throw a big one-day sale for my birthday. This year, I've chosen to highlight my new course, Master the Object-Oriented Mindset in Ruby and Rails (MOOM).

The official release date for MOOM is July 23. It will become generally available at that time for $299/seat. But today only I'm making a limited number of seats available for $100 off the already-discounted beta price, or just $149/seat. This price for MOOM will never again be repeated. To claim your seat while you can, visit the MOOM product page and use coupon code HAPPY0X26 when you check out

Over the winter a group of 300 students joined me for a live, beta run of the course. Here are some…

BigBinary Blog 

Ruby 2.6 adds endless range

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

Before Ruby 2.6, if we want endless loop with index, we would need to use Float::INFINITY with upto or Range, or use Numeric#step.

Ruby 2.5.0

irb> (1..Float::INFINITY).each do |n|
irb*   # logic goes here
irb> end

OR

irb> 1.step.each do |n|
irb*   # logic goes here
irb> end

Ruby 2.6.0

Ruby 2.6 makes infinite loop more readable by changing mandatory second argument in range to optional. Internally, Ruby changes second argument to nil if second argument is not provided. So, both (0..) and (0..nil) are same in Ruby 2.6.

Using endless loop in Ruby 2.6
irb> (0..).each do |n|
irb*   # logic goes here
irb>
irb> (0..nil).size
=> Infinity
irb> (0

In Ruby…

All Ruby Podcasts by Devchat.tv 

RR 369: How Ruby 2.5 Prints Backtraces and Error Messages with Vishal Telangre

Panel:

  • Dave Kimura
  • Eric Berry
  • Catherine Meyers

Special Guests: Vishal Telangre

In this episode of Ruby Rogues, the panelists talk to Vishal Telangre about his blog post entitled Ruby 2.5 prints backtrace and error message in reverse order. Vishal is working remotely for BigBinary where he works with Ruby on Rails, Kuberernetes, and Elm. They talk about the power of blog posts at BigBinary, give suggestions for people wanting to get into blogging, and inspiration for blog posts. They also touch on his blog post, the changes to backtrace in Ruby 2.5, and more!

In particular, we dive pretty deep on:

  • Vishal intro
  • BigBinary posts a lot of blogs
  • Write about the experiences that…
All Ruby Podcasts by Devchat.tv 

MRS 051: Andy Hunt

Panel: Charles Max Wood

Guest: Andy Hunt

This week on My Ruby Story, Charles talks to Andy Hunt. Andy has previously been on Ruby Rogues for Episode 277, and is known for his book The Pragmatic Programmer, his company The Pragmatic Bookshelf, and much more. He first got into programming because of his interest in electronic music and his first RadioShack project he created, which led him to finding a book on the future of integrated circuits. They talk about how he found Ruby, why he wrote Programming Ruby, what he is working on now, and more!

In particular, we dive pretty deep on:

katafrakt's site 

Notes on writing Service Objects

Service Objects are probably a single most popular technique for refactoring Ruby applications. However, there is one little with them: there are (too) many ways to write them. And because different people use service objects different way, they tend to get messy too.

I wrote dozens of SOs since I joined Boostcom 1.5 year ago. This is mostly because we don’t really use Rails, so they are even more natural. We never established strict rules to follow while writing services, however, they all tend to look similar. It would seem that the way we write them works for us, so I’d like to share a few tips about what I think service objects should look like.

Here is a list as bullet points, with…

OmbuLabs Blog 

Refactoring: Clean your ruby code with design patterns

Code refactoring can be defined as “the process of introducing small and incremental changes to leave the code in a better state than it was.”. When refactoring your code you have to consider two things: no new functionality should be added and the external behavior should not be affected.

One of the biggest challenges as a Ruby on Rails Developer is to keep your code clean, simple and easy to maintain and that is why we are always refactoring our code.

There are several techniques that a developer can follow to improve their code by code refactoring, such as extract method, move method, move field, switch statements, etc. If you are not familiarized with them, please visit the Refactorin…

BigBinary Blog 

Rails 5.2 added method write_multi to cache store

This blog is part of our Rails 5.2 series.

Before 5.2 it was not possible to write multiple entries to cache store in one shot even though cache stores like Redis has MSET command to set multiple keys in a single atomic operation. However we were not able to use this feature of Redis because of the way Rails had implemented caching.

Rails has implemented caching using an abstract class ActiveSupport::Cache::Store which defines the interface that all cache store classes should implement. Rails also provides few common functionality that all cache store classes will need.

Prior to Rails 5.2 ActiveSupport::Cache::Store didn’t have any method to set multiple entities at once.

In Rails 5.2,

Greater Than Code 

087: The Jazz of Empathy with Chad Fowler

In this episode, we are joined by Chad Fowler, who talks a lot about mental health, and specifically bipolar disorder. Practicing empathy and compassion is also discussed, as well as merit-based rewards systems, management, and leadership.

We have interactive show transcripts! Powered by Gretta.


Panelists:

Coraline Ada Emhke | Jessica Kerr | John K. Sawers | Rein Henrichs

Guest Starring:

Chad Fowler: Lead Developer Advocacy at Microsoft, Venture Partner at BlueYard. chadfowler.com. Jazz Stuff: Chad Fowler Music

The Passionate Programmer: Creating a Remarkable Career in Software Development by Chad Fowler

Show Notes:

02:17 – Chad’s Superpower: Empathy!

07:47 – Using Introspection For a…

Code with Jason 

Why I Recommend Against Using Cucumber

Around the time I first started using Rails in 2011, I noticed that a lot of developers, seemingly all Rails developers, were using Cucumber to assist with testing.

I bought into the idea—describing test cases in plain English—but in practice Cucumber not to be very valuable. In fact, my experience has been that Cucumber adds a negative amount of value.

In recent years I’ve noticed (although this is anecdotal and might just be my perception) that fewer codebases seem to use Cucumber and that fewer Rails developers seem to be on board with Cucumber. I had thought Cucumber was pretty much dead. But lately, to my surpise, I’ve seen Cucumber recommended to testing noobs more than a few times.…

Appfolio Engineering 

Ruby Memory Environment Variables - Simpler Than They Look.

You've probably seen some of the great posts on how you can use environment variables to tune Ruby's memory use. They look complicated, don't they? If you need to squeeze out every last ounce of performance, they can be useful. But mostly, they give a single, simple advantage:

Quicker startup time. More specifically, quicker time-to-full-speed.

You can configure your Ruby process with more memory slots or looser malloc/oldmalloc limits. If you don't, your process will still grow to the right size if it needs it. The only reason to set the limits manually is if you want your process to grow to full size and speed a little more quickly. If you're running a big batch job or a long-running…

Code with Jason 

Rails Testing Resource Roundup

.resource-item { border-bottom: 1px solid #DDD; padding-bottom: 50px; margin-top: 30px; margin-bottom: 50px; }

Below is a list of testing resources I’ve either used myself or heard recommended. I tried to make the list as Ruby-centric as possible, although some resources from other ecosystems are so good that I didn’t want to exclude them.

I intend this to be a living list that grows over time. If you know of something that should be on this list but isn’t, please let me know, either in a comment on this page or via email.

Disclosure statement: None of the links below are affiliate links, although I do have a relationship with some of the authors/creators of these resources.

Secti…

Drifting Ruby Screencasts 

Editors

One question that I get asked most often is what editor, theme and extensions am I using for my editor. In this episode, we take a look at the different extensions and settings that I use.
Riding Rails 

Redis cache store expiry, faster record instantation and more!

Hey there, detective! Here’s Kasper fumbling through his own trenchcoat for his notebook to give you what went down on the Rails codebase this week.

Redis cache store: increment/decrement expiry

If you’ve been looking to expire a key, either when incrementing or decrementing it, with Rails 5.2s Redis cache store. Just pass _expires_in _to make the key sleep with the fishes.

Guides digging almost too deep

The Rails guides are vast and deep. There’s so many that the digging deeper section almost dug its own grave. But splitting out into another section is a saving grace. Why not look through the current guides?

has_secure_password takes an attribute

For many years has_secure_password

Kir Shatrov 

The Lead Developer conference

This week I attended Lead Developer, a conference for technical leaders. Lead Developer is organized as a series a conferences around the world. I’ve attended it in London, but there was one in NYC in April and there’s one in Austin TX planned for December 2018.

For me, a conference us usually something purely technical, with a bunch of people sharing code and telling stories about solving problems. Lead Developer was rather different. Its main topics are leadership, soft skills, communication and efficient management - exactly what I was looking for lately.

The quality of the event was very high: all speakers were well prepared, M.C. was professional and funny, all talks were…

RubyMine Blog 

RubyMine 2018.1.4: Bug-fix Update

Hi everyone,

RubyMine 2018.1.4 (build 181.5281.41) is now released. This bug-fix update features the following improvements:

Download RubyMine 2018.1.4

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

Passenger - Phusion Blog 

My experience with testing a React app on different devices

My experience with testing a React app on different devices

It’s the year 2018 and React is booming in the world of front-end development. React took the top spot as the most essential Javascript library in the front-end tooling survey and claimed 2nd place in the most loved frameworks, libraries and tools list in the Stack Overflow survey.

I've been working on the Passenger documentation during my time as an intern at Phusion. My new and improved Passenger docs contain a lot of components and app-like-features, which is why I decided that it might be a good idea to use React for this project.

I was as excited about learning React as I was sceptical.

Manual testing vs technology

Sceptical in particular about how well React would perform on multiple…

Rebased Blog 

Writing Testable API Documentation Using APIB and Dredd

Introduction One of the things no one really likes to be doing is writing API documentation. But you know what is even worse than no documentation? Totally outdated documentation, where all the requests have changed and you spend a lot of time being misled by docs. In this tutorial, we...
The Bike Shed 

160: Praise Hands Emoji 🙌 (Vaidehi Joshi)

We're joined by Vaidehi Joshi to discuss her multimedia empire, conference talk prep, getting started with computer science, and the applicability of a computer science education in every day development work. We wrap the episode with live Q&A from our RailsConf audience.

Olivier Lacan 

Immunity

The following post is reproduced from Orientation — Code School’s internal documentation system. I wrote it many years ago when we first decided to build out the team that took care of codeschool.com. I was an early member of that team and many things we had built were created under very different circumstances by a rotating cast of developers who rarely stuck around for more than a few weeks or months. This could be very disorienting for someone joining to work on the largest codebase in the company by far, which is why our approach to onboarding was so important.

Whenever someone joins our team and I have the chance to talk to them at the very beginning, the first thing I make sure to…

Code with Jason 

All Code Eventually Gets Tested, It’s Just a Question of When and by Whom

All code eventually gets tested. If a bug is found, it can be found in one of the following ways, in descending order of cost and embarrassment.

A Customer Trying to Use the Feature in Production

Obviously the worst place to find a bug is in production, and the worst person to find it is an end user trying to do his or her job.

This is a bad way to find a bug not just because it blocks your user from using your feature successfully and thus hurts your reputation, but because you might not even immediately find out that the bug exists. Not every user who finds a bug immediately reports that bug to the vendor’s development team. When I find a bug in Gmail, for example, I don’t make an attempt…

Ruby Weekly 

Ruby 2.2 Support Ends

#405 — June 28, 2018

Read on the Web

Ruby Weekly

Support of Ruby 2.2 Has Ended — If you’re still on Ruby 2.2, it’s time to upgrade, preferably to 2.5 but at least to 2.4 as Ruby 2.3’s support will end too in March 2019.

Anton Paisov

Fie: A Rails-Centric Frontend Framework Running over WebSockets — Fie is an interesting idea in reducing the amount of JavaScript you write by keeping client state on the server & managing it via WebSockets. Here’s a tutorial using Fie.

Eran Peer

eBook: Using AWS Lambda with Ruby and Python — Serverless functions are incredibly useful for configuring the execution of…

RubyMine Blog 

Rerun Failed Tests and Better Code Insight for Block Elements in the Updated RubyMine 2018.2 EAP

Hi there,
RubyMine 2018.2 EAP (build 182.3458.16) is now updated. The new build provides an ability to rerun failed tests, and upgrades autocompletion and code navigation for block elements.

Download RubyMine 2018.2 EAP

Rerun failed tests

Now, once you’ve run all tests in a file or directory, RubyMine provides an option to rerun the failed tests only, instead of rerunning all the tests. This frees you from manually picking up and investigating every failed test:

The new feature also works with presets like rake test or rake spec:

Supported frameworks include RSpec, Test::Unit, Minitest, Shoulda, and Cucumber.

Issue: […

Martian Chronicles, Evil Martians’ team blog 

Level up for UX: Design lessons from video games

Author: Alena Kirdina, Designer at Evil Martians

Looking for inspiration to improve the look and feel of your product? Take clues from popular video games to create engaging user experiences for web and mobile. Learn how game designers grab players’ attention with tricks from psychology books and apply those practices to your applications.

Press “start” to play

No one likes being lectured. Most people, if asked to study a 20-page manual before playing a game, will probably choose another pastime (dear board game fans, please don’t take this personally).

Game designers are well aware of that, and they try to make the first step in a game as effortless as possible. Press a button to…

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

Remove AMP and don’t Affect SEO Rating, Organic Traffic, Performance

I’ve used to recommend Google AMP pages as a reliable way to increase site SEO rating and organic traffic visitors. Recently I’ve removed AMP from my website. In this blog post, I will describe how it affected my blog and a couple of more advanced web performance optimization techniques I am using instead of a proprietary standard like Accelerated Mobile Pages.

Web performance score of this blog

Website Performance and Optimization test score for this blog

Removing AMP

How to do it

I will not elaborate on why I decided to remove AMP from this blog. Long story short they offered a degraded experience to mobile visitors and enforced too many restrictions. You can check out Hacker News to find all the AMP hate you could…

Re…

All Ruby Podcasts by Devchat.tv 

MRS 050: Jacob Stoebel

MRS 050: Jacob Stoebel

 

Panel: Charles Max Wood

 

Guest: Jacob Stoebel

 

This week on My Ruby Story, Charles talks to Jacob Stoebel. Jacob is a Ruby and JavaScript developer and he works for a small company that works with publishers. Jacob first got into programming in high school when he took a computer science class where he messed around with Pascal and C++. He got back into programming after college when he went back to school for programming to try to make his data entry job easier. They talk about his journey pushing the boundaries with technology, how he went about starting his programming career, and more!

 

In particular, we dive pretty deep on:

RubyGuides 

Ruby’s Powerful Method Arguments & How To Use Them Correctly

I got an email asking for my opinion about when to use keyword arguments. I thought I’d expand my answer into a full article about method arguments so everyone can benefit! Ruby is very flexible when it comes to method arguments… …we have everything, from the standard required arguments to optional arguments & even keyword […]

The post Ruby’s Powerful Method Arguments & How To Use Them Correctly appeared first on RubyGuides. Don't miss your free gift here :)

BigBinary Blog 

Continuously release chrome extension using CircleCI

In recent times we worked on many chrome extensions. Releasing new chrome extensions manually gets tiring afer a while.

So, we thought of automating it with CircleCI similar to continuous deployment.

We are using the following configuration in circle.yml to continuously release chrome extension from the master branch.

workflows:
  version: 2
  main:
    jobs:
      - test:
          filters:
            branches:
              ignore: []
      - build:
          requires:
            - test
          filters:
            branches:
              only: master
      - publish:
          requires:
            - build
          filters:
            branches:
              only: master

version
Greater Than Code 

086: Culture Is A Community Growing Together with Jesse Oliver Sanford

In this episode, we are joined by Jesse Oliver Sanford, who talks about cognitive science, the importance of cultural capital, flow, and the way people think when they write code.

We have interactive show transcripts! Powered by Gretta.


Panelists:

Rein Henrichs | John K. Sawers  | Jamey Hampton | Sam Livingston-Gray

Guest Starring:

Jesse Oliver Sanford: Cloud City Development

Show Notes:

01:18 – Oliver’s Superpower: The Ability to Read

01:54 Cognitive Science and Emotional Cognition

George Lakehoff

Restylane Injections

The effects of BOTOX injections on emotional experience.

11:24 – How People Think When They Code and the Intersection Between Mind and Body

fMRI (Functional Magnetic…

zverok with ruby 

Quest for Ruby Pattern Matching

It happened so that this blog was started almost 3 years ago with post about exercise in imitating pattern matching as a Ruby library. That was fun, but ended in a sad realization:

All in all, powerful pattern matching need to be core language feature.

Three years forward, the discussion about how pattern matching in Ruby language core may look was raised, ending with Matz’s statement:

If we were going to add pattern matching in Ruby, we should add it with better syntax.

Now, this post is an invitation to discuss possible pattern matching (or its elements) in future Ruby versions, and what could be introduced with minimal and reasonable changes to the language.

Note: It is…

Passenger - Phusion Blog 

Passenger 5.3.3: installer fixes

Passenger 5.3.3: installer fixes

Version 5.3.3 of the Passenger application server for Ruby, Node.js, Meteor and Python has been released. This release contains fixes for a bug in the installer scripts for the Nginx and Apache modules.

Fixes the passenger-install-*-module scripts

We fixed a regression from 5.3.2 which prevented the passenger-install-apache2-module and passenger-install-nginx-module scripts from running. This issue was introduced via a typo as a result of the code audit from Passenger 5.3.2, but it did not result in any additional vulnerabilities.

Various improvements & fixes

  • [Nginx] Fixed Nginx module building on CentOS 6. Closes GH-2081. Thanks to defanator for contributing this.
  • [Apache, Nginx] Fixes…

Installing 5.3.3

Besides support for the latest…

All Ruby Podcasts by Devchat.tv 

RR 368: Improving Ruby Performance with Rust with Daniel P. Clark

Panel:

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

Special Guests: Daniel P. Clark

In this episode of Ruby Rogues, the panelists talk to Daniel P. Clark about improving Ruby performance with Rust. Daniel has been a hobbyist programmer for over 20 years and started blogging about Ruby and other technical matters about 5 years ago. One of the things he is well known for is his Faster Path gem on GitHub, which has over 700 stars. They talk about his blog article Improving Ruby Performance with Rust, why he chose to use Rust, and the benefits of using a Rust extension in Ruby. They also touch on his faster path gem, the Helix project, and more!

In…

dry-rb news 

dry-monads 1.0 released

Today dry-monads reaches 1.0! It started as a dependency replacement for the Kleisli gem in dry-transaction and dry-types. Later, more common monads were added, as well as support for do notation, which evaporates most of the boilerplate introduced by monads. Since the dry-* gems follow semantic versioning, this means you can consider the dry-monads API to be stable, making the gem more “production-ready”. Let us show how monads can be useful in day-to-day ruby code.

Result

Result is the most widely used monad from dry-monads so far. It represents a possibly unsuccessful computation. A trivial example:

require 'dry/monads/result'

class Divide
  include Dry::Monads::Result::Mixin

  def c…
BigBinary Blog 

Rails 5.2 uses AES-256-GCM authenticated encryption as default cipher for encrypting messages

This blog is part of our Rails 5.2 series.

Before Rails 5.2, AES-256-CBC authenticated encryption was the default cipher for encrypting messages.

It was proposed to use AES-256-GCM authenticated encryption as the default cipher for encrypting messages because of following reasons:

  • It produces shorter ciphertexts and performs quick encryption and decryption.
  • It is less error prone and more secure.

So, AES-256-GCM became default cipher for encrypting messages in Rails 5.2 .

If we do not want AES-256-GCM as default cipher for encrypting messages in our rails application, then we can disable it.

Rails.application.config.active_support.use_authenticated_message_encryption = false

De…

Andy Croll 

Ignore PHP bots with Rack::Attack

If your site has been around for a long time or starts getting popular, you might see a bunch of 404 errors in your logs.

Sometimes these errors are for pages like /wp_login.php or other PHP files. If you see these, it’s likely to be automated bots scanning the Internet for security vulnerabilities in WordPress-based sites.

These bots are indiscriminate in their targeting, hence looking for PHP files in our Rails applications!

Instead of…

…your logs becoming cluttered and these automated bots potentially slowing your application.

Use…

Rack::Attack to block their requests and ban the offending IP addresses.

Gemfile

gem 'rack-attack'

config/application.rb

module YourAppName
  class
Karol Galanciak - Ruby on Rails and Ember.js consultant 

Rails And Conditional Validations In Models

Adding consents for accepting Terms of Service/Privacy Policies must have been a top popular feature in the majority of the applications due to enforcement of GDPR in May ;). From the technical aspects that GDPR requires, there is a proof of consent for processing the personal information. In that case, you need to have some actual attributes in the database that would confirm the fact that some user has indeed accepted Terms of Service/Privacy Policy.

That makes a significant impact on how we approach this kind of features. However, in the past, such things were quite often not stored in a database at all – it just took some UI acceptance validation or maybe a validation of the virtual…

MIKAMAYHEM 

Refactor for the past you know, not the future you don’t

Technical Debt is inevitable, only you can reduce the interest to be paid

https://levelup.gitconnected.com/how-to-use-technical-debt-in-your-favor-98bae475ba68

Ruby News 

Support of Ruby 2.2 has ended

We announce that all support of the Ruby 2.2 series has ended.

After the release of Ruby 2.2.7 on March 28, 2017, the support of the Ruby 2.2 series was in the security maintenance phase. Now, after one year has passed, this phase has ended. Therefore, on March 31, 2018, all support of the Ruby 2.2 series has ended. Bug and security fixes from more recent Ruby versions will no longer be backported to 2.2, and no further patch release of 2.2 will be released. We highly recommend that you upgrade to Ruby 2.5 or 2.4 as soon as possible.

About currently supported Ruby versions

Ruby 2.5 series

Currently in normal maintenance phase. We will backport bug fixes and release with the fixes…

Riding Rails 

Custom year names, plus improvements and bug fixes

Hello, this is Claudio with a quick recap of what changed this week in the source code of Ruby on Rails.

Add year_format option to date_select tag

In Japan, 2000 A.D. is Heisei 12 in Wareki. Other countries like Israel and Thailand also have their own calendars.

date_select now takes a lambda option year_format that can be used to customize year names, e.g.: year_format: ->year { “Heisei #{year - 1988}”.

Support more HTTP cache controls

Add support for the stale-while-revalidate and stale-if-error extensions to the Cache-Control response header. Supporting them will make it easier to utilize reverse proxies and CDNs from Rails without resorting to hacks.

Reduce Memory Allocation when…

The Bike Shed 

159: Confusing and Hard to Use

An ORM that's a pleasure to use with raw SQL when needed? Sean discusses how that can be. Plus, Derek shares a new and exciting way for migrations to break!

Rebased Blog 

Rebased featured as one of the leading Eastern Europe B2B companies on Clutch

We’re proud to announce that Rebased is featured in a press release highlighting leading Eastern Europe B2B companies on Clutch! While the competition is fierce and Poland’s well known for many excellent developers and software houses, Rebased boasts both high Clutch rank and review score. Top B2B Service Providers in...
RubyMine Blog 

More YAML improvements in the Updated RubyMine 2018.2 EAP

Hi there,

RubyMine 2018.2 EAP (build 182.3341.19) has just been updated. The new build provides more YAML improvements.

Download RubyMine 2018.2 EAP

Smarter YAML with JSON Schemas

Starting with this EAP RubyMine provides code autocompletion and inspections for YAML data structures that have a JSON Schema file.

The IDE automatically traces schemas from schemastore.org (Preferences | Languages & Frameworks | Schemas and DTDs | Remote JSON Schemas). For instance, Travis CI has a JSON schema file posted there. So if you use Travis to test and deploy your apps, you can now edit configurations in your .travis.yml file faster:

You…

OmbuLabs Blog 

Announcing Gemfile.lock Audit Tool

Today we are happy to announce the launch of our new microsite: Gemfile.lock Audit Tool - a tool created to allow users to check their Gemfile.lock for vulnerabilities in a quick and secure manner.

The tool uses the bundler-audit gem to check for vulnerable versions of gems and insecure gem sources. The tool updates automatically with new warnings as the bundler-audit gem database of vulnerabilities is updated.

Thanks to this tool, users can now easily audit their Gemfile.lock without installing any gems or editing their code. Check it out at https://audit.fastruby.io, and let us know what you think!

Awesome Ruby Newsletter 

Issue 110 - Demand for Rails is still huge

Ruby Weekly 

Pair programming with Ruby creator Matz

#404 — June 21, 2018

Read on the Web

Ruby Weekly

▶  Pair Programming with Matz at RubyKaigi — Watch along as Matz (creator of Ruby) and Jonan Scheffler (Heroku) code Conway’s Game of Life in real time.

Jonan Scheffler

You Can Now Install TruffleRuby via RVM (and ruby-build) — They also added it to ruby-build so rbenv users can get in on the fun with this high performance GraalVM-based Ruby implementation.

RVM

Plan Visually with a Single Glance and Make Sure Your Projects Get Done — monday.com is a project management tool your team will enjoy using. It makes it fun and easy for everyone to…

Hi, we're Arkency 

Removing magic with magic

Some gems, like InheritedResources, help us by reducing the lines of code we have to write by providing definitions automatically. However, depending on how the gem is written, it can be done “magically”. In some cases, we want to remove such gems.

By “magic” I obviously mean defining methods, or in this case, controller actions, without any explicit call to the functions provided by this gem. Such implicit behaviour makes life on legacy codebases harder. It’s harder to remove the feature (or model), because how do we know whether it is used or not? Similarly, it is harder to add feature correctly, because it’s easy to overlook some dependency or usecase which is available in our…

Code with Jason 

How to Get RSpec to Skip View Specs When You Generate Scaffolds

I personally don’t find much value in tests for views, helpers, routes or requests in most cases.

It’s annoying to have to delete these files each time you generate a new scaffold. Fortunately, it’s possible to configure RSpec not to generate these files.

Below is an example of how you can exclude these types of spec (and more) from being generated when you generate a new scaffold.

require_relative 'boot'

require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require…
All Ruby Podcasts by Devchat.tv 

MRS 049: Amit Choudhary

Panel: Charles Max Wood

Guest: Amit Choudhary

This week on My Ruby Story, Charles talks to Amit Choudhary. Amit was previously on Ruby Rogues in January 2018 on episode 345 discussing app failures. Amit is a software developer at Big Binary, where he is a full-stack Ruby developer. He first got into programming when he learned C for a computer engineering course. They talk about how he got into Ruby, what he has done with Ruby, what the Ruby community is like in India, and what he is working on now.

In particular, we dive pretty deep on:

Ruby – Sihui Huang 

First Impression of Elixir, from a Rubyist’s Perspective

If you’re a Rubyist, you might have heard of Elixir: the new functional language with Ruby-like syntax created by José Valim, who used to be on the Rails core team. If you’re curious about it and wondering if you should give it a try, this post is for you!

After playing with Elixir for about a month, I decided to write a post summarizing my thoughts. This post covers the following:

  1. Why I didn’t try Elixir earlier;
  2. Nitpicking at object-oriented programming and Rails;
  3. What changed my mind and made me give Elixir a try;
  4. Materials I used to learn Elixir;
  5. My thoughts after a month.

Why I didn’t try Elixir earlier

Elixir has made a lot of noise in the Ruby community. I heard it being praised…

Running with Ruby 

RubyKaigi 2018 Review – conference in a nutshell

RubyKaigi 2018 has ended, but the excitement is still fresh. After 25 hours in planes, trains, buses, and cabs we’re finally home. I guess it’s a good time to summarize and review 4 days on the best Ruby conference in the world.

Castle.io support

First of all, I would like to express special thanks to Castle.io for backing me up, providing me possibility to go to RubyKaigi and for their ongoing Karafka support. Wouldn’t happen without them.

What is RubyKaigi?

I’ll let RubyKaigi speak for itself:

RubyKaigi is the authoritative international conference on the Ruby programming language, attracting Ruby committers and Ruby programmers from around the world to Japan, the birthplace of Ruby.…

Semaphore Engineering Blog 

Rails Testing Handbook Available for Kindle

Rails Testing Handbook

In April, we officially released Rails Testing Handbook, a free ebook in which our engineers shared how to write tests and practice BDD to develop sustainable Rails applications. The handbook teaches you all you need to know about the BDD approach of analyzing, testing, coding, and designing a system in one short feedback loop. BDD helps us produce better software, while also avoiding mistakes and wasteful work.

You can now also download Rails Testing Handbook for Kindle.

Why we wrote the Rails Testing Handbook

Writing code driven by tests is pretty much how we built and grew Semaphore, our CI/CD product. All that time, we’ve been doing BDD, and it has helped us write…

Greater Than Code 

085: BOOK CLUB! Technically Wrong

For our second Book Club episode, Sara Wachter-Boettcher joins us to talk about her book, Technically Wrong: Sexist Apps, Biased Algorithms, and Other Threats of Toxic Tech.

We have interactive show transcripts! Powered by Gretta.


Panelists:

Jamey Hampton | Astrid Countee | John K. Sawers

Guest Starring:

Sara Wachter-Boettcher: sarawb.com, Co-host of the No, You Go show

Buy the book! Technically Wrong: Sexist Apps, Biased Algorithms, and Other Threats of Toxic Tech

Show Notes:

01:02 – Sara’s Superpower: Communication and Connecting the Dots

03:43 – The Process of Writing, Editing, and Communicating the Book

06:17 – A Summary of Technically Wrong

11:13 – The Harms and Risk of Data Sharing…

RubySec 

Path Traversal in Sprockets

OmbuLabs Blog 

Another successful Rails Girls event

Last month was the fifth edition of the Rails Girls Buenos Aires event, and the third time Ombu Labs participated as a sponsor and part of the coaching team. This time it took place in the impressive offices of Google Argentina where 25 participants attended. All of them were very excited and motivated to start learning new skills.

For those who have never heard of Rails Girls, it’s a 2-day workshop to introduce women to programming, with a focus on the Ruby on Rails framework. We also talk about the current situation of women in technology and the things that we can do to increase the number of women working in this industry.

During the workshop, each participant developed a basic…

All Ruby Podcasts by Devchat.tv 

RR 367: Ruby Core Language Evolution: Moving towards functional with Victor Shepelev

Panel:

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

Special Guests: Victor Shepelev

In this episode of Ruby Rogues, the panelists talk to Victor Shepelev about functional programming in Ruby. Victor is a Ukrainian programmer and poet who has been programming since he was a child. He has been programming with Ruby for the past 12 years and has contributed a lot to the open source community, as well as mentors and participates in discussions about Ruby’s progress. They talk about how to approach functional programming in Ruby, changes Victor hopes to see in Ruby, and more!

In particular, we dive pretty deep on:

  • Victor intro
  • What is functional…
Julia Evans 

How I use Wireshark

Hello! I was using Wireshark to debug a networking problem today, and I realized I’ve never written a blog post about Wireshark! Wireshark is one of my very favourite networking tools, so let’s fix that :)

Wireshark is a really powerful and complicated tool, but in practice I only know how to do a very small number of things with it, and those things are really useful! So in this blog post, I’ll explain the 5 main things I use Wireshark for, and hopefully you’ll have a slightly clearer idea of why it’s useful.

what’s Wireshark?

Wireshark is a graphical network packet analysis tool.

On Mac, you can download & install it from their homepage, and on Debian-based distros you can install…

Dustin Zeisler 

Visualize Ruby with Flowcharts

See Ruby control flow and methods calls as flow charts. Helps developers better understand code and explain it to the non-technical. By using the DSL you already know, Ruby.

Play around with a live Ruby editor demo and see the flow chart being formed on the right.

Visualize Ruby Demo

Write a Ruby class and see method interactions. Visualize Ruby Demo Works with procedural code and bare methods. This is experimental project and does not support all types of code.

Under the hood this is using GraphViz and parser gem. Parser is used to transform the code to an AST and based on each type converts those to GraphViz nodes and edges to create the flow chart.

It’s open source, visualize_ruby. Feedback and pull-request are…

RubyMine Blog 

YAML Code Formatter, chruby, asdf, and More in the Updated RubyMine 2018.2 EAP

Hi everyone,

RubyMine 2018.2 EAP (build 182.3208.25) is now updated and adds some major improvements. Let’s review those.

Download RubyMine 2018.2 EAP

Asdf, chruby, and remote version managers

Support for Ruby version managers has been significantly reworked, which may result in some new issues (please report them if you face any). Nevertheless, the following major features have been added:

  • chruby support [RUBY-14086]
  • asdf support [RUBY-20370]
  • All version managers (RVM, rbenv, asdf, and chruby) are now available in WSL, and also through SSH and other remote connections (Preferences / Settings | Languages &…
Riding Rails 

Faster record deletion, customized error messages, bug fixes, and more!

Greetings, all! This is Daniel, with the latest news about Ruby on Rails.

This Week’s Contributors

14 people contributed to Rails this past week, including 4 first-time contributors. Many thanks to all!

Are you looking to get involved? Check out the list of open issues!

Faster dependent destroying

Has GDPR got you deleting users and all their “likes”? The dependent: destroy option has been updated to use a linear algorithm, rather than a quadratic one. I like that!

Allow suffixing store attributes

Back in March we added the option to use prefixes for your store attributes. Well now you can use suffixes as well. Say goodbye to clashing method names!

Flexible error message…

The Bike Shed 

158: This is How I Ruin Meetings (Aaron Patterson)

We're joined by Aaron Patterson for puns. Aaron also updates us on compacting GC for Ruby and Ruby 2.6's JIT compiler before telling us how he really feels about functional programming.

Awesome Ruby Newsletter 

Issue 109 - Asynchronous Ruby

The Life of a Radar 

Making Tests Go Faster

At Culture Amp, we have a large Rails app that we’ve been building since 2011. This app has about 150k LOC and an extensive test suite that uses Rubocop, RSpec, Capybara, Cucumber and FactoryBot.

We run these tests for the application on Buildkite and currently they take about 16 minutes to run end-to-end. This is 16 minutes that developers are waiting to get feedback on whether their build passed or failed. While this is not unacceptably high, we could do better. Developers could ship things faster, or respond quicker to build failures, with faster builds.

A large chunk of that build time is spent running these tests. In fact, we currently have 8 machines running tests concurrently for…

EquiValent 

Rails CSRF protection for SPA

update 2018-06-27 Added section and updates around CSRF Breach Attack

Topic of SPA (Single Page Applications like React) and Ruby on Rails as an API only is around for a while. This Frontend & Backend split inspired lot of other technology approaches like JWT (JSON Web Tokens)

But there is quite lot of confusion around security. One of the biggest topics is CSRF (Cross Site Request Forgery).

I’ve already wrote an article on the topic before why it is needed in SPA that uses sessions ( CSRF protection on single page app API ) but really didn’t provide any “how to” guide.

Let’s fix this in this article. All the methods mentioned here are equally valid it just really depends on the usecase…

Ruby Weekly 

Improving Ruby Concurrency

#403 — June 14, 2018

Read on the Web

Ruby Weekly

Ruby's External Malloc Problem — Discourse’s Sam Saffron explores a “severe, extremely hard to debug vector for memory bloat in Ruby which can be triggered by the PG (Postgres) gem”.

Sam Saffron

Improving Ruby Concurrency — Using Fibers and non-blocking operations, it’s possible to dramatically increase concurrency in Ruby without the overhead of multi-threaded programming.

Samuel Williams

Productivity Meets Beauty—Learn Ruby Free for 10 Days — You can learn a lot in 10 days. Start a trial and get unlimited access to expert-led dev courses and more.

RubyGuides 

Why Do We Create Classes?

Following my last article, why do we use nil, I thought it’d be a good idea to ask this question for other things that we take for granted. Like… Why do we use classes instead of having just one GIGANT blob of ugly code? At a fundamental level, we use classes to organize code & […]

The post Why Do We Create Classes? appeared first on RubyGuides. Don't miss your free gift here :)

All Ruby Podcasts by Devchat.tv 

MRS 048: James Shore

Panel: Charles Max Wood

Guest: James Shore

This week on My Ruby Story, Charles talks to James Shore about his background, how he got into programming, pitfalls that happened along the way, and his Agile story. James Shore is a thought leader in the Agile software development community. He was an early adopter of Agile development and he continues to lead, teach, write, and consult on Agile development processes.

In particular, we dive pretty deep on:

  • James Shore’s background:
  • How did you get into programming?
    • Began an interest at 15 years old.
  • How did you go from hobbyist to a professional?
    • Modem…
Greater Than Code 

084: Federation Is Bad with Aurynn Shaw

After a particularly compelling conversation after Auyrnn Shaw’s last episode, we invited her back on the show to talk about why federation is problematic in Internet society.

We have interactive show transcripts! Powered by Gretta.


Panelists:

Coraline Ada Ehmke | John K. Sawers

Guest Starring:

Aurynn Shaw: @aurynn | blog.aurynn.com | Eiara

Join Our Slack Channel!
Support us via Patreon!

Show Notes:

01:30 – Federation and Your Internet Identity

Mastodon

Stayin’ Alive in Technology: Who Are You?
Coraline Ada Ehmke and Identity on the Internet

05:59 – Flaws of Federated Identity

Usenet

10:18 – Onboarding

Eternal September

28:51 – All Technology is Political & Speech At All Costs

The…

Sam Saffron 

Ruby's external malloc problem

In this post I would like to cover a severe, extremely hard to debug vector for memory bloat in Ruby which can be triggered by the PG gem.


I have blogged a bit about the Ruby GC previously and covered some basics about malloc triggering GC runs. Over the years much in that blog post has been addressed in Ruby including dynamically growing malloc limits that mean we very rarely would need to amend malloc related GC vars.

As an aside, the only GC var Discourse still overrides is RUBY_GLOBAL_METHOD_CACHE_SIZE for reasons that are specified in the Shopify blog post by Scott Francis.

The GC in Ruby can be triggered by 2 different types of conditions.

  1. We are out of space in our managed heaps.

JetRockets 

Applications of Lambda in Ruby

Thoughts about lambda in Ruby.
All Ruby Podcasts by Devchat.tv 

RR 366: Build Your Own RSpec: A Gentle Metaprogramming Intro with Paweł Dąbrowski

Panel:

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

Special Guests: Paweł Dąbrowski

In this episode of Ruby Rogues, the panelists talk to Paweł Dąbrowski about metaprogramming and DSLs. Paweł is a Ruby developer, is on the iRonin team, and runs a Ruby blog, which he started in January 2018. They talk about his blog, the importance of contributing to the community, and why he chose to create his own version of RSpec. They also touch on how hard it was to get into blog writing as a developer, the use of blog writing as a way to confirm your skills, and much more!

In particular, we dive pretty deep on:

Passenger - Phusion Blog 

Passenger 5.3.2: various security fixes

Passenger 5.3.2: various security fixes

Version 5.3.2 of the Passenger application server for Ruby, Node.js, Meteor and Python has been released. This release contains fixes for 4 CVEs and we urge you to upgrade.

[CVE-2018-12029] CHMOD race vulnerability

The Pulse Security team discovered a vulnerability in Passenger.

The file system access race condition allows for local privilege escalation and affects the Nginx module for Passenger versions 5.3.1, all the way back to 3.0.0 (the chown command entered the code in 2010).

The vulnerability was exploitable only when running a non-standard
passenger_instance_registry_dir, via a race condition where after a file was created, there was a window in which it could be replaced with a…

Martian Chronicles, Evil Martians’ team blog 

Stick with security: YubiKey, SSH, GnuPG, macOS

Author: Kirill Kuznetsov, Lead Operations Engineer

Learn how we use USB sticks from Yubico to handle authentication in all our projects and project-related tools. See how to go beyond their built-in U2F functionality and use them for SSH authentication from a Mac with YubiKey holding all PGP keys and emulating an OpenPGP (GnuPG) smart card. If some of those acronyms seem unfamiliar—read on for more background.

Evil Martians are growing. With more employees and more clients, there is a demand for stronger security. Our clients trust us with their source code and, even more importantly, with access to their production servers, and this trust cannot be broken. In a hostile environment of…

BigBinary Blog 

Our Thoughts on iOS 12

iOS 12 on iPhone 8 Red

Apple announced iOS 12 at WWDC 2018 a few days back. Being honest, it was a bit disappointing to see some of the most requested features not being there in iOS 12. Like users have been asking for Dark mode since before iOS 11, and the ability to set default apps. It’s more of an update focussed on performance improvements, usability, and compatibility. The fact that iOS 12 is also available for the iPhones Apple released 5 years back is a great effort from Apple to keep users happy. And unlike last couple of years, this time we decided to calm our curiosities and installed iOS 12 beta 1 on our devices right away after Apple released it for developers. This blog is based…

Everyday Rails 

Simple shortcuts to get more out of Bundler

Ruby's dependency manager, Bundler, includes lots of features to help make life as a developer a little easier. Here are a few of my favorites, and the shortcuts I've written to make them even simpler to use.
Andy Croll 

Use beginning and end of string in regular expressions

We often validate user input using regular expressions.

There are lots of regular expressions on the Internet. Every now and then we might ‘borrow’ one to save ourselves the life-sapping pain of creating one anew.

However, we should beware.

Instead of…

…using ^ and $ to enclose the regular expression.

# A regular expression matching a
# string of lowercase letters
/^[a-z]+$/

Use…

\A and \z.

# A regular expression matching a
# string of lowercase letters
/\A[a-z]+\z/

But why?

Being specific in this case will reduce potential security holes in your code.

The characters ^ and $ match the beginning and end of a line, not the beginning and end of an entire string.

If your…

Riding Rails 

Improvements, bug fixes and more!

Hello everyone! This is Greg, with the latest news about Ruby on Rails!

This Week’s Contributors

13 awesome people contributed to Rails this past week!
If you’d like to be included here, why not check out the list of open issues?

Raise exception when column is already defined

With this change, migrations will raise an exception when defining an already defined column.

Align Time.zone.at method signature with that of Time::at

ActiveSupport::TimeZone#at now accepts an optional second argument, containing (fractional) microseconds, just like Ruby’s Time::at does.

Avoid allocating column names where possible

When requesting columns names from database adapters, ActiveRecord:Result used…

rossta.net 

Deploying Vue with CircleCI 2.0

I recently upgraded my Connect Four Vue.js application to build on CircleCI 2.0 . In my previous post, I showed how I used continuous integration on CircleCI 1.0 to bundle Vue.js assets and upload them to an S3 bucket configured to serve the application as a static website. But now that config is only good for another few months: CircleCI is sunsetting 1.0. Here's how I upgraded.

The basic steps of the build are the same: once I push changes to GitHub, CircleCI will detect those changes and trigger a build. It will bundle the app using the vue-cli. The assets output from that step will then be uploaded to S3 using the s3deploy golang package only if the build is running against master.