DEV Community

Cover image for Hacky Friday Stuff #6.12.2019
Alexey Zhaboyedov
Alexey Zhaboyedov

Posted on

Hacky Friday Stuff #6.12.2019

Links about web development, product engineering, tools and services from all over the internet.

Ruby 2.7 adds Enumerator#produce
Ruby 2.7 has added Enumerator#produce to generate Enumerator from any custom data-transformation.

How We Tracked Down an Exception Without Errors: A Detective Story
This is a short detective story about how we tracked down an exception in AppSignal.com’s flow that didn’t cause an error…

Critical CSS with Rails and Webpacker - SprocketsLess Part 1
This is the first of hopefully a series of articles on new advanced usage available when moving all assets to Webpacker. In the first part, we will look into optimizing your CSS size. Critical CSS and especially above the fold critical CSS is the ability to inline (in the HTML) the minimal CSS required to render the top of your page (above the fold).

Track email statuses in Ruby on Rails with SendGrid
When your application sends emails it is useful to know what happens to those emails, like whether it has been delivered or opened. Or, sometimes more importantly, whether it bounced. The Twilio SendGrid email API doesn't just send emails, it can also send you events via webhook that tell you what happened to your emails.
In this post we'll build a small application using Ruby on Rails to send emails and update their status based on the Twilio SendGrid event webhooks.

The Complete Guide to Create a Copy of an Object in Ruby: Part I
In this article we’re going to explore the following topics:

  • shallow copy and deep copy
  • dup and clone
  • dup vs clone

What Everyone Should Know About Fibers in Ruby
If you want to get the most performance out of your Ruby projects we have to explore fibers & how they work.

The Local Variable Aversion Antipattern
Strong aversion to using local variables is something that noticeable again and again in Rails projects. In most scenarios, this has several underrecognized drawbacks. The solution is easy: use local variables.

Refactoring Ruby with Monads
Monads are in danger of becoming a bit of a joke: for every person who raves about them, there’s another person asking what in the world they are, and a third person writing a confusing tutorial about them. With their technical-sounding name and forbidding reputation, monads can seem like a complex, abstract idea that’s only relevant to mathematicians and Haskell programmers.
Forget all that! In this pragmatic article we’ll roll up our sleeves and get stuck into refactoring some awkward Ruby code, using the good parts of monads to tackle the problems we encounter along the way.

OOP Refactoring: from a god class to smaller objects
How to get rid of a class that knows almost everything using CQRS and DDD principles.

Faking External Services in Tests with Adapters
When faking external services in tests, it worth starting with a simple solution and only progress to a more complex one if needed. A simple class that acts as the public interface to adapters might be good at the beginning and then you can make an in-memory adapter for tests.

Gems & Tools

ezmetrics. Simple, lightweight and fast metrics aggregation for Rails.

Deno. A secure runtime for Javascript and Typescript

Podcasts

Software Engineering Daily. Heroku Infrastructure with Mark Turner
Mark Turner is an engineer at Heroku. He joins the show to discuss the architecture and engineering of a Layer 2 cloud provider. Heroku is built on top of Amazon Web Services, and the core compute infrastructure is built on top of a pool of EC2 virtual machines that are continually scheduled with applications that users create on Heroku.

Ruby Rogues. RR 440: Swagger and OpenAPI with Josh Ponelat
The panel discusses the difference between Swagger and Open API with Josh Ponelat. Josh details the difference between the two. Swagger is a set of protocols around describing restful APIs. Swagger was taken over by a company called SmartBear, who donated the specification to the Open Linux Foundation, and that became the Open API. Swagger is the tooling surrounding these specifications. Open API is a standardized way to describe a restful API in a YAML file. Once you’ve got a YAML file to describe your API, you can use tooling like Swagger to leverage that and take it to the next level.

Bright & Early. The Mom Test with Rob Fitzpatrick
Rob talks about common mistakes people make when conducting customer interviews and how to avoid them.

Books

Sandi Metz. 99 Bottles of OOP
In honor of Sandi and Katrina’s half birthdays, 99 Bottles of OOP is 40% off December 4 - 13.

Videos

RubyConf 2019 - Principles of Awesome APIs and How to Build Them by Keavy McMinn
This is a talk for those curious about designing, building, and maintaining modern APIs. We’ll look at specific tooling and strategies to help improve and maintain the quality, consistency, and stability of your API. You’ll learn how to proactively make improvements to these areas, and how to make it easier to shepherd API development in your company.

RubyConf 2019 - Keynote: Lucky You by Sandi Metz

dry-rb in five: 002 dry validation (intro)
dry-rb in five (minutes) is a series of short tutorials about dry-rb ecosystem.
dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.
In today's episode, we're going to have a brief introduction to the basics of dry-validation and which problems it solves.

Ruby Tapas Freebies
RubyTapas is one of the largest collections of Ruby-related screencasts on the web. If you're hungry for advanced Ruby and software development skills, RubyTapas will satisfy your appetite. RubyTapas is served up by Avdi Grimm.

Top comments (0)