Rubyland

news, opinion, tutorials, about ruby, aggregated
Sources About
Remote Ruby 

Joined by Adam Wathan

https://victorafanasev.info/ 

First thing to do after creating a new VPS server: setup deploy user and enable SSH-key authentication only

1) Create on the remote server a deploy user:

# on the server, as a root user

$ adduser deploy
$ adduser deploy sudo

2) Make sure that you can login to the server as a deploy user without password prompt:

It assumes that you have ssh keypair already (~/.ssh/id_rsa and ~/.ssh/id_rsa.pub) on your desktop.

# on the desktop

$ ssh-add
$ ssh-copy-id deploy@deploy_server_ip

# Now try to login to the server as deploy user:
$ ssh deploy@deploy_server_ip

If it didn’t work, and you get message like Permission denied (publickey), it seems like password authentication disabled by default on your server (which is a good thing actually). Login to the server as a root again, then login to …

Riding Rails 

Zeitwerk integration in Rails 6 (Beta 2)

The second beta of Rails 6 is about to ship, and includes Zeitwerk integration.

While Rails 6 final is going to have proper documentation about it, this post will help understanding this feature meanwhile.

Highlights

  • You can now robustly use constant paths in class and module definitions:

    # Autoloading in this class' body matches Ruby semantics now.
    class Admin::UsersController < ApplicationController
      # ...
    end
    
  • All known use cases of require_dependency have been eliminated.

  • Edge cases in which the autoloaded constant depended on execution order are gone.

  • Autoloading is thread-safe in general, not just for the currently supported use cases…

Also, applications get some performance benefits for the same price:

  • Autoloading a constant no longer involves walking autoload paths looking for a relative match in the file system. Zeitwerk does one…

EquiValent 

Visualized desktop workspaces flow

In this article I will show you what is in my opinion the most productive way how to work with your desktop environment.

It is about using existing tool currently available in most of the operating systems called workspaces

Desktop Workspaces are designed to hold multiple applications in different contexts. Point I’ll try to make is about how you organize and access these applications in relation to their responsibilities in the most productive way.

In order to present you this flow I’ll show you how I use workspaces in daily professional life.

Here is a quick video Demonstration (youtube)

Every workspace is dedicated to single purpose

In my daily setup I use 6 workspaces which…

Drivy Engineering 

From translator to developer

After working as a teacher and translator for several years, Emily embarked on a new phase in her career by learning a different kind of language: programming.

Emily has worked at Drivy for the past year and a half as a Full-Stack Engineer, after attending the intensive Le Wagon bootcamp in Paris. Here, she shares how she began coding and what life is like for a developer at Drivy.

If you’re considering a career change to become a software engineer, hopefully Emily’s story will inspire you to go for it.

What were you doing before you became a software engineer?

I studied modern languages and translation, and after university worked as a teacher and translator. My freelance translation…

The Bike Shed 

188: A Function by Any Other Name

On this week's episode, Chris is joined by German Velasco for a conversation that fully lives up to the name of the show with plenty of opinions and impressively deep dives on topics that folks outside the world of programming would never think could warrant this much discussion.

How much duplication should we have? Is there such a thing as too DRY? Is there ever a need for code comments, really? Lest you worry that Chris & German spend the whole episode just volleying opinions, have no fear: the episode is balanced out with plenty of pointed suggestions and useful anecdotes to make sure everyone will enjoy it.

Awesome Ruby Newsletter 

Issue 144 - Moving from Ruby to Rust

Semaphore 

A Reality Check About Cloud Native DevOps

An interview with John Arundel, author of 'Cloud Native DevOps with Kubernetes' on building for the cloud in a culture of collaboration.

John Arundel is a consultant and author of Cloud Native DevOps with Kubernetes. We spoke with John on how adopting DevOps destroys walls, builds bridges, and influences company cultures for the better.

You’ve just co-authored (with Justin Domingus) a book entitled “Cloud Native DevOps with Kubernetes: Building, Deploying, and Scaling Modern Applications in the Cloud.” From the description of the book, it looks like it can take you from zero to hero in building and scaling apps the Kubernetes way. What do you think makes this book stand out from other books on the topic available on the market?

It’s the book that Justin and I wish we’d had when we started trying to deploy real apps on…

Ruby Weekly 

Some 'Unnoticed' Features of Rails 6

#438 — February 21, 2019

Read on the Web

Ruby Weekly

Some 'Unnoticed' Features of Rails 6 — There’s a sizable number of changes coming to Rails 6 (which is already in beta) that aren’t getting the limelight, such as host whitelisting, new migration features, and tons of time and date syntactical sugar.

Alexandre Ferraille

Work on a Register Transfer Language (RTL) for CRuby — A detailed and rather low level article on the performance improvements that researcher Vladimir Makarov has been working on to make Ruby faster. Here we see his work with RTL, an approach for the Ruby VM to interpret instructions…

EquiValent 

Cinnamon workspaces for productivity development

This TIL note is related to article Visualized desktop workspaces flow

How to Setup Cinnamon DE workspaces and keyboard shortcuts (instructions how to install Cinnamon DE on Ubuntu 18.04 are at the bottom)

step 1 - increase the number of workspaces

default numper of workspaces in Cinnamon is 4 (I need 6)

gsettings set org.cinnamon.desktop.wm.preferences num-workspaces 6

step 2 - Shortucuts for switching workspaces

Menu > Keyboard > Shortcuts Tab > Workspaces > Direct Navigation

Set

"Switch to workspace 1"   to be "Super+1"
"Switch to workspace 2"   to be "Super+2"
"Switch to workspace 3"   to be "Super+3"
"Switch to workspace 4"   to be "Super+8"
"Switch to workspace 5"   to be…
EquiValent 

2019 set up Ubuntu 18.04 for Ruby on Rails developer (Cheatsheet)

in Nov 2016 I’ve published article Setup Ubuntu 16.04 for Ruby on Rails app (Cheatsheet) and it was quite a hit. As I’m reinstalling by Lenovo with fresh Ubuntu 18.04 I’ve decided to write up fresh revised article related to latest Feb 2019 technologies

Basic tools:

sudo apt install -y curl git

Generate ssh key

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Install RVM + Ruby

gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3…
Ruby on Rails Podcast 

261: Domain Driven Design & Bots with José Albornoz

Special Guest Host, Nick Schwaderer, stepped into Brittany's hosting shoes this week to interview Shopify's José Albornoz. Tune in for an insightful conversation about Shopify's infrastructure and how personal bot building makes the world a better place.

Links for this episode:

All Ruby Podcasts by Devchat.tv 

MRS 078: Vlad Dem

Sponsors:

  • Sentry use the code “devchat” for $100 credit

Panel: Charles Max Wood

Guest: Vlad Dem

Dustin Zeisler 

The Power of Ruby Structs

I invite you to explore beyond ActiveRecord models and into the world of PORO (Plain Old Ruby Objects). These are the building block of any Object Oriented Language and especially Ruby. I’m going to focus on Value Objects, which holders of some collection of data or attributes. The collection could model a person, an account, an address, or more abstractly an error, and many more. You should keep in mind as a general principle that these objects should have a well-defined purpose or identity and contain no more information than what is needed.

A simple and common way to pass around a collection of attributes is with a Hash. It’s flexible for taking any number of key-value pairs created…

Greater Than Code 

118: A Piece of Luck with Jessica Kerr

Jessica Kerr talks about being the property of a situation, the interpretation of luck and the psychology of scarcity, physics, the ways people tend to undervalue code, and defining "done" in software development. Are you truly involved in the developer communities you work in and sell to? Are you seeing the value in the events you are a part of? DevRelate.io can help! Developer and Community Relations as a Service: we speak developer! Learn more at DevRelate.io or email us at info at DevRelate.io! Panelists: Jacob Stoebel | Sam Livingston-Gray | Jamey Hampton | Jessica Kerr Links: 01:50 - Jess’s Superpower: Being a Property of a Situation Karl Popper 04:25 - The Interpretation of…
OmbuLabs Blog 

Refactoring with Design Patterns - The State Pattern

In this series of code refactoring posts we are discussing how design patterns can be used to make our Ruby code beautiful, maintainable and clean.

Today I want to talk about a pattern that can be very useful when we need to control the flow of a set of events of our objects: The State Pattern a.k.a Finite State Machine.

As a developer it is common to see objects changing their state. At the beginning managing the state of an object can be as simple as having some boolean attributes where you can check if the object is in state A or B. But when the complexity increases you can end up with a number of states that are difficult to manage without breaking the SOLID principles. That is where…

Scott Watermasysk 

Bugs are Inevitable. Your Response is What Matters

Bug, defects, delays, etc will always happen. With good practices, you can minimize them, but they will always exist.

You can however control how you respond to them. This message from WASD is exceptional. 1

  1. Accept fault
  2. Apologize
  3. Provide details and supporting information.
  1. If you are following my keyboard journey, interactions with WASD like this won me over. ↩︎

Vladimir Makarov – Red Hat Developer Blog 

Register Transfer Language for CRuby

For the last two years, I have been trying to improve CRuby performance. I have been working simultaneously on two major fronts: introducing register transfer language (RTL) for the CRuby virtual machine (VM) and just-in-time (JIT) compilation. For background on the goal of having Ruby 3 be 3 times faster than version 2 (3X3), see my previous article, “Towards the Ruby 3×3 Performance Goal“.

The JIT project (MJIT) is advancing successfully. The JIT approach and engine I proposed and implemented has been adopted by the CRuby community. Takashi Kokubun hardened the code and adapted it to the current CRuby stack machine and recently MJIT became an experimental feature of the CRuby 2.6 release.

All Ruby Podcasts by Devchat.tv 

RR 400: Celebrating a Milestone - Ruby Rogues 400th Episode

Sponsors

 

Episode Summary  

In this 400th episode of Ruby Rogues, the panelists - Dave Kimura, Andrew Mason, Eric Berry, Charles Max Wood talk about themselves, their backgrounds, things they are working with, their journey and perspectives on life in general.

Eric has been a developer since 1998 and is working on Ruby on Rails since 2008. He talks about his current company – CodeFund, an ethical advertising platform that helps open-source developers generate a recurring passive income which encourages them to maintain existing software as well as contribute to additional projects. Dave is currently in a…

Everyday Rails 

7 reasons why learning SQL is still important for Rails developers

Active Record abstracts away much of the need to use SQL on a daily basis. But understanding what's going on behind the scenes is still important. Here's how understanding SQL can make you a better Rails developer.
RubyGuides 

What is Rake in Ruby & How to Use it

Rake is a popular task runner in Ruby. What is a task? Making a backup of your database Running your tests Gathering & reporting stats These are small tasks that without Rake would be scattered all over your project on different files. Rake centralizes access to your tasks. Rake also makes a few things easier, […]

The post What is Rake in Ruby & How to Use it appeared first on RubyGuides. Don't miss your free gift here :)

Julia Evans 

Organizing this blog into categories

Today I organized the front page of this blog (jvns.ca) into CATEGORIES! Now it is actually possible to make some sense of what is on here!! There are 28 categories (computer networking! learning! “how things work”! career stuff! many more!) I am so excited about this.

How it works: Every post is in only 1 category. Obviously the categories aren’t “perfect” (there is a “how things work” category and a “kubernetes” category and a “networking” category, and so for a “how container networking works in kubernetes” I need to just pick one) but I think it’s really nice and I’m hoping that it’ll make the blog easier for folks to navigate.

If you’re interested in more of the story of how I’m…

avdi.codes 

SIGAVDI #43: X-Wing Edition

Hello friends,

Jessica was in town this week. We made a spaceship (pictured below). We also did some livestreaming. We Paired with Bunny on some basic client-side JavaScript, and Jessica showed me what she's working on for Atomist.


I've been thinking about a tension in how we think about relationships.

When I was growing up I was heavily influenced by the point of view that compatibility is basically irrelevant, and relationships are all about the work you put into them. This came primarily from a parent who felt that arranged marriages were the ideal kind of marriage, as well as this jackass who taught that dating was a bad idea (he has since repented).

(Aside: never…

Julia Evans 

!!Con 2019: submit a talk!

As some of you might know, for the last 5 years I’ve been one of the organizers for a conferences called !!Con. This year it’s going to be held on May 11-12 in NYC.

The submission deadline is Sunday, March 3 and you can submit a talk here.

(we also expanded to the west coast this year: !!Con West is next week!! I’m not on the !!Con West team since I live on the east coast but they’re doing amazing work, I have a ticket, and I’m so excited for there to be more !!Con in the world)

!!Con is about the joy, excitement, and surprise of computing

Computers are AMAZING. You can make programs that seem like magic, computer science has all kind of fun and surprising tidbits, there are all kinds…

Drivy Engineering 

Rails 6 unnoticed features

Rails 6.0.0.beta1 is out and you may have already tested it. We all have heard about the main features such as multi-database connectivity, Action Mailbox & Action Text merge, parallelized testing, Action Cable testing etc. But there’s also a ton of other cool features that I found interesting.

Requirements change

With each major release comes new requirements, starting with Ruby which is now required with a minimal version of 2.5.0 instead of 2.2.2 for Rails 5.2. Our databases also get an upgrade with 5.5.8 for MySQL, 9.3 for PostgreSQL and 3.8 for SQLite.

Webpacker as default

Webpacker has been merged in Rails 5.1 and provides a modern asset pipeline with the integration of Webpack for…

Appfolio Engineering 

Microbenchmarks vs Macrobenchmarks (i.e. What's a Microbenchmark?)

Sometimes you need to measure a few Rubies…

Sometimes you need to measure a few Rubies…

I’ve mentioned a few times recently that something is a “microbenchmark.” What does that mean? Is it good or bad?

Let’s talk about that. Along the way, we’ll talk about benchmarks that are not microbenchmarks and how to pick a scale/size for a specific benchmark.

I talk about this because I write benchmarks for Ruby. But you may prefer to read it because you use benchmarks for Ruby - if you read the results or run them. Knowing what can go wrong in benchmarks is like learning to spot bad statistics: it’s not easy, but some practice…

Valentino Gagliardi 

React Hooks Tutorial for Beginners: Getting Started With React Hooks (2019)

In this React hooks tutorial you will learn how to use React hooks, what they are, and why we’re doing it.

React Hooks Tutorial for Beginners: Getting Started With React Hooks (2019)

Here I am, writing a React hooks tutorial for you. I decided to wait until hooks got finally released before dropping this post. Together we’ll learn React hooks step by step, with a look at how the same logic would be implemented with ES6 classes.

Enjoy the reading!

React Hooks Tutorial for Beginners: what you will learn

In the following tutorial you’ll learn:

  • how to use React hooks
  • how the same logic would be implemented in React class components

React Hooks Tutorial for Beginners: requirements

To follow along with the tutorial you should have a basic…

RubyGuides 

Understanding Boolean Values in Ruby

What is a boolean? A boolean is a value used in a logic statement to say if something is considered true or false. This can be used to make decisions. In Ruby we don’t have a Boolean class, but we have boolean objects! We have true & false. Which are the singleton objects of TrueClass […]

The post Understanding Boolean Values in Ruby appeared first on RubyGuides. Don't miss your free gift here :)

Depfu 

Grouping all updates together

Of course if we start thinking about reducing the amount of PRs, we also have to consider that doing individual updates might not be the best solution in all situations.

If there is one thing we’ve learned so far at Depfu, it’s that every team works differently. Every project – be it open source or in-house – is in a different situation. And the teams working on these projects all have their unique way of working and constraints.

While we love to be be opinionated and have sensible defaults, we also love listening to customers. And quite a few have told us that grouping updates into a single, recurring PR instead of individual updates is what they prefer.

So today we’re giving everyone…

Hi, we're Arkency 

Patterns for asynchronous read models in infrastructure without order guarantee

When we focus on the model in CQRS architecture, we put most effort into write model. Not only this is the place where the business operations are implemented and breakthroughs in understanding domain are happening – we also consider it the part of the implementation where we should put a lot of our technical attention to.

Different implementations of aggregates? Persistence in the model or not? Messaging? Different kinds of transaction boundaries and transaction guarantees between multiple databases?

All of these are exciting topic, but read model part, often considered as an easy job for “junior” developers also pose challenges in implemention.

In ideal scenario, read models are…

Remote Ruby 

Joined by Ben Orenstein

The Bike Shed 

187: Convincing People Not to Build Software

On this week's episode, Chris is joined by Matt Sumner, development director in our Boston Studio. Chris & Matt start with a quick update on Matt's crypto adventures, and then transition to the core of the conversation as Matt describes the past few weeks of starting a new project and all the decisions that come with that.

The project kicked off with a product design sprint to help determine the initial direction for MVP. From there, Matt describes some of the thinking that went into the technology choices for the app, as well as describing his experience thus far working in a novel ecosystem for him with Scala & GraphQL.

Awesome Ruby Newsletter 

Issue 143 - What’s coming to Rails 6.0

Ruby on Rails Podcast 

260: Rails Performance with Nate Berkopec

Nate Berkopec is the proprietor of Speedshop, a Ruby on Rails performance consultancy. He will be holding a Rails Performance Workshop after Railsconf in Minneapolis. They chatted about performance and their loyalty for the Ruby community.

Links for this episode:

EquiValent 

Duck Typing in Rails

Article is still in progress, I’m planing to release it by end of the weak

In programming there is a powerful concept called “Duck Type”

Duck typing in computer programming is an application of the duck test—”If it walks like a duck and it quacks like a duck, then it must be a duck” Wikipedia

So here is an example Ruby code:

class A
  def aa
    'aa'
  end
end

class B
  def call(a)
    a.aa
  end
end

class C
  def aa
    'cc'
  end
end

class D
end

a = A.new
a.aa
# => 'aa'

c = C.new
c.aa
# => 'cc'

d = D.new
d.aa
# NoMethodError (undefined method `aa' for D:Class)


B.new.call(a) # => 'aa'
B.new.call(c) # => 'cc'
B.new.call(d) # NoMethodError (undefined method `aa' for…
Honeybadger Developer Blog 

Going deep on UUIDs and ULIDs

A chance conversation let me to the realization that the world of unique identifiers is larger and more wondrous than I ever could have imagined. In this post we discuss five types of UUIDs and their upstart cousin, the ULID. We explore what makes each of them special and when they may be particularly useful.
Ruby Weekly 

A thorough tutorial on building a Rails and React app

#437 — February 14, 2019

Read on the Web

Ruby Weekly

Ruby 2.7 to Add Enumerable#tallyEnumerable#tally is a new function letting you count lists using a function - a long-wanted Ruby feature. Related commit.

Brandon Weaver

How to Create a CRUD App with Rails and React — A really thorough tutorial covering fronting a Ruby on Rails API with a React client along with linting, flash messages, and handling 404s in React.

James Hibbard

Production-Quality Redis Hosting — Better tools, analytics and support for your high-performance Redis needs.

RedisGreen sponsor

What’s Coming to Rails…

GoRails Screencasts 

Symbols vs Strings

Ever wondered what the difference between Symbols and Strings were? Why would we use one over the other when most languages only have strings?
Ruby Inside - Medium 

What’s coming to Rails 6.0?

Rails 6.0 will be released soon and it’s packed with many features that both smaller and bigger applications will benefit from, as it feels like many improvements around speed and scalability were introduced in Rails 6.

I’ve read through the CHANGELOGs of all Rails parts (ActiveRecord, ActionPack, ActiveSupport, etc.) and picked some of the features that I found the most interesting.

Two new additions to the Rails family are Action Mailbox and Action Text that come straight out of Basecamp.

Active Record

Add basic API for connection switching to support multiple databases

Connection switching support has been on my list for a long time, I’ve used the Octopus gem a few times before as well, but…

Drivy Engineering 

Handle disabled mobile data setting on iOS

For an unknown reason, a significant number of users disable the mobile data for our iOS app. This is not a problem when they are booking a car from their couch at home with Wi-Fi, but can quickly become a major issue when they try to unlock their Drivy Open car in the street. At this specific moment, there is very little chance that they remember they disabled this setting, so it very often leads to a call to Customer Services that could have been avoided.

Drivy's settings with mobile data switched off Drivy's settings with mobile data switched off

If we do nothing about this, the users’s resquests would always fail when not on Wi-Fi, and they would see a default error. In our case, they would see the message “An error…

Ruby Conferences 'n' Camps in 2019 - What's Upcoming? 

RubyConf Kenya @ Nairobi, Kenya - Ruby Conferences 'n' Camps Update

Conferences 'n' Camps

What's News? What's Upcoming in 2019?

RubyConf Kenya
Jul/25-27 (3d) Thu-Sat @ Nairobi, Kenya • (Updates)

See all Conferences 'n' Camps in 2019».

Ilija Eftimov 

Golang Datastructures: Trees

You can spend quite a bit of your programming career without working with trees, or just by simply avoiding them if you don’t understand them (which is what I had been doing for a while).

Now, don’t get me wrong - arrays, lists, stacks and queues are quite powerful data structures and can take you pretty far, but there is a limit to their capabilities, how you can use them and how efficient that usage can be. When you throw in hash tables to that mix, you can solve quite some problems, but for many of the problems out there trees are a powerful (and maybe the only) tool if you have them under your belt.

So, let’s look at trees and then we can try to use them in a small exercise.

A touch…

Depfu 

Grouping updates by type

Continuing our quest on reducing the amount of PRs: What if grouping or bundling updates together does make sense for certain types of dependencies?

We recently shipped a few options for you to try that on your projects:

We think of these as strategies you can use to reduce the amount of PRs you get from Depfu. By default we will continue to send individual PRs, but depending on how you structure and treat your dependencies, we think it makes sense to give you the option to update certain types of dependencies together.

Grouping development dependencies

While updating dev dependencies might be as much or more work as production dependencies in some cases (test frameworks come to…

OmbuLabs Blog 

Three Useful Data Migration Patterns for Rails

At Ombu Labs, we are big fans of Ruby on Rails and design patterns, especially convention over configuration! The beauty of Rails is that you can inherit a legacy project and easily find the different layers of code in different directories.

When it comes to database migrations the policy of Rails is very clear. It's all about altering the database structure with gradual migration files: "Migrations are a convenient way to alter your database schema over time in a consistent and easy way." (source)

But, what about data migrations? What's the best way to write, maintain, and run migrations that alter the data in your production database?

In this article I will talk about three different…

All Ruby Podcasts by Devchat.tv 

MRS 077: Radoslav Stankov

Sponsors

  • Sentry use the code "devchat" for $100 credit

Panel: Charles Max Wood

Guest:

Greater Than Code 

117: Wholeness and Separation

What does it take to create safe conversations in our organizations, and in our global world? What does “safe” even mean? In this episode, the panelists get into a philosophical discussion about the dynamics of human relationships, differences in paradigm, and how to improve our ability to see one another. Are you truly involved in the developer communities you work in and sell to? Are you seeing the value in the events you are a part of? DevRelate.io can help! Developer and Community Relations as a Service: we speak developer! Learn more at DevRelate.io or email us at info at DevRelate.io! Panelists: Janelle Klein | Rein Henrichs | John K. Sawers Links: Virginia Satir Hierarchical…
Depfu 

Grouping updates from monorepos

We’ve been on a quest lately: How can we reduce the amount of PRs Depfu creates, while still keeping your app up-to-date?

One of the more obvious avenues to explore is grouping updates together. While we are still convinced individual PRs are easier to assess and to merge, there are a few situations where grouping makes sense.

The first one I want to talk about is monorepo libraries.

JavaScript vs Ruby

In the JavaScript ecosystem it’s quite common to have many smaller packages, all coming from a single monorepo. Some prominent examples are React and Babel. These frameworks are split up into several individual packages, but they’re always getting released at the same time and with the…

Scott Watermasysk 

Better Jekyll Excerpts

When you use the built-in excerpt feature, Jekyll returns the first paragraph of text. It does this by looking for something called the excerpt_separator. The excerpt_separator defaults to \n\n, which is ideal for most short posts.

Back in my LiveWriter days, it would use an HTML comment like <!--more--> to designate where to break for an excerpt. Jekyll supports this as well. In your _config.yml file you can add:

excerpt_separator: <!--more-->

Unfortunately, this now means that on every post, you need to enter <!--more-->, even if you are OK with the default of the first paragraph. The alternative is to add excerpt_separator: <!--more--> for each post you want to control the excerpt.

dry-rb news 

dry-view 0.6.0, an introductory talk, and plans for 1.0

Last month we released dry-view 0.6.0, a very special release that made huge strides towards the system’s overall completeness. With 0.6.0, dry-view should now offer everything you need to write better organized views in Ruby.

From here, our goal is to take dry-view to version 1.0. So please give this release a try! Your feedback at this point will help ensure 1.0 is as polished as possible.

If you’re new to dry-view, or would like to see its new features presented in context, then you’re in luck! My talk from RubyConf AU (which took place just last week!) is a nice and tidy, 20-minute package explaining dry-view’s rationale and how everything fits together:

I’d also invite you to take…

JRuby.org News 

JRuby 9.2.6.0 Released

The JRuby community is pleased to announce the release of JRuby 9.2.6.0

JRuby 9.2.x is our new major version of JRuby. It is expected to be compatible with Ruby 2.5.x and stay in sync with C Ruby. JRuby 9.2.0.0 is our first release for 2.5 support.

If you do find issues then report them on using our issue tracker at http://bugs.jruby.org. We also encourage users to join our IRC channel (#jruby on Freenode) and mailing lists. You may also follow @jruby on Twitter for updates.

Highlights:

  • 52 issues fixed for 9.2.6.0

Github Issues resolved for 9.2.6.0

  • #5597 - "Useless" warnings have file as "null"
  • #5596
Honeybadger Developer Blog 

Honeybadger and Slack - Error Monitoring Awesomeness – Part Deux

Honeybadger and Slack have partnered up again and have been hard at work pushing error monitoring to the limit. Why? Because bugs and exceptions don't rest, and neither do Honeybadger and Slack. We’ve rebuilt the Slack integration.
RubyGuides 

Everything You Need to Know About I/O In Ruby

I/O stands for Input/Output. By input we mean all the data & information that comes into something (computer, Ruby method, your brain). Examples of input: Keys your press on the keyboard Mouse click Books you read By output we mean everything that comes out as a result of the input. Examples of output: The result […]

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

avdi.codes 

SIGAVDI #42: Ultimate Answer Edition

Hello friends,

I spent last week on the tropical island of Anguilla with a bunch of software luminaries. My life is sometimes surreal.

At the moment though, I'm looking out on a chilly, thick fog up here at Fair Pavilion. I can't see the sun. This matches my internal climate pretty well. The world has sharp edges, and my journey seems to be one of exposing ever greater surface area to it.

This is fine.

“This is fine”. My friend Jessica says this a lot. It has been seeping into my personal vernacular lately. To me it represents a whole philosophy of life, strongly at odds with how I once lived.

“This is fine” is the choice to accept a situation exactly as it is, without…

Julia Evans 

Networking tool comics!

Hello! I haven’t been blogging too much recently because I’m working on a new zine project: Linux networking tools!

I’m pretty excited about this one – I LOVE computer networking (it’s what I spent a big chunk of the last few years at work doing), but getting started with all the tools was originally a little tricky! For example – what if you have the IP address of a server and you want to make a https connection to it and check that it has a valid certificate? But you haven’t changed DNS to resolve to that server yet (because you don’t know if it works!) so you need to use the IP address? If you do curl https://1.2.3.4/, curl will tell you that the certificate isn’t valid (because it’s…

Andy Croll 

Be Careful Assigning to has_one Relations

Most of the time, when building relationships between models, you typically use has_many and belongs_to. There are some circumstances where a has_one relationship is more appropriate.

However, the behaviour of has_one has some quirks that make it a little trickier to deal with.

When you assign a new instance of an associated model to its has_one model the existing instance is removed from the association and causes a permanent change to be written to the database. This happens whether the new model is valid or not.

Read about this side effect of the generated #association= method in the Rails documentation.

Instead of…

…directly assigning a new object to a has_one object’s #association=

Scott Watermasysk 

Michelle Obama On Startup Pricing

On startup pricing, Michelle Obama famously said,

…our motto is: when they go low, we go high1

A post on Indie Hackers reminded me of this quote:

So, I’m thinking if I should try offering an email service, similar to Google Apps, but more affordable..

Just raise prices has been the rallying cry in the bootstrap community for the last couple of years2, but this is a different topic.

When competing with large entrenched competitors competing on price is almost always the wrong strategy. Founders, especially those who were developers, grossly underestimate what it takes to build and support something.

Google could easily run Google Apps for nothing (they did for a long time). The…

Ruby Together News 

December Monthly and 2018 Yearly Update

Hello, and happy belated new year! Welcome to a year-end special edition of the monthly update: Ruby Together’s Yearly Update for 2018. Throughout the year, our work was supported by Handshake, Stripe, DigitalOcean, Airbnb, Travis CI, Coinbase, GitLab, reinteractive, Stitch Fix, Bleacher Report, Triplebyte, and many others.

ruby together news

There are more details in the following sections, but here’s the tl;dr: during 2018, we took in $300,183.32, we spent $266,900.32, and we paid for 1,394 hours of developer work on Ruby open source.

Some highlights from the year include shipping 21 Bundler releases, shipping 11 RubyGems releases, kicking off Ruby Toolbox 2.0, Bundler almost shipping…

Code with Jason 

Page Objects in Rails

The challenge of keeping test code clean

The hardest part of a programmer’s job isn’t usually figuring out super hard technical problems. The biggest challenge for most developers, in my experience, is to write code that can stand up over time without collapsing under the weight of its own complexity.

Just as it’s challenging to keep a clean and understandable codebase, it’s also challenging to keep a clean and understandable test suite, and for the same exact reasons.

If I look at a test file for the first time and I’m immediately able to grasp what the test is doing and why it’s doing it, then I have a clear test. The test has a high signal-to-noise ratio. That’s good.

The opposite…

avdi.codes 

Why I suck at writing talks with good transitions (and how I’m improving)

Smooth transitions help hold the audience's attention

Saron Yitbarek has a great post about how improving your transitions can really spruce up a tech talk. Specifically, about how the transition to a new slide should begin before you actually switch to that slide.

The goal is to make slides support your points, rather than having them introduce your points. It's an important skill to learn for giving talks. Go read her article.

But it's difficult to remember what the next slide will be

I try to practice this technique in my talks, but I've never found it easy. I often have trouble remembering exactly which slide comes next, and it's hard to transition when you can't remember…

Ruby on Rails Podcast 

259: Continuous Deployment (dpl) with Hiro Asari

Hiro Asari is a software developer at Travis CI and has spoken at many conferences across the globe. Hiro guested on to the show to discuss dpl, a continuous deployment tool he maintains at TravisCI.

Links for this episode:

Ruby – AWS Developer Blog 

Introducing Transaction Support in aws-record

Introducing Transaction Support in aws-record

The aws-record Ruby Gem is a data mapper abstraction layer over Amazon DynamoDB, a key-value and document database that delivers single-digit millisecond performance at any scale.

Recently, support for transactions was added to DynamoDB. DynamoDB transactions simplify the developer experience of making coordinated, all-or-nothing changes to multiple items both within and across tables. Transactions provide atomicity, consistency, isolation, and durability (ACID) in DynamoDB, enabling you to maintain data correctness in your applications easily.

Today, we’re launching support for DynamoDB transactional find and write operations directly from a…

RubyGuides 

Which Ruby IDE Should You Use?

You’re going to spend a lot of your time as a developer inside the editor, so it important to use an editor that you’re comfortable & productive with. In this article: I want to help you choose which Ruby IDE / Editor is right for you! You don’t need to stress over this decision, just […]

The post Which Ruby IDE Should You Use? appeared first on RubyGuides. Don't miss your free gift here :)

Remote Ruby 

Joined by Terence Lee

Awesome Ruby Newsletter 

Issue 142 - From JavaScript to Ruby: A few of my favourite features

Ruby Weekly 

An experimental wrapper around Ruby's TracePoint

#436 — February 7, 2019

Read on the Web

Ruby Weekly

Introducing dry-schema: A Data Coercion and Validation Library — A new library from Dry.rb focused on data validation. It was built to improve some of the issues in dry-validation.

Piotr Solnica

A Complete Program — An interesting exploration of a thought where, in this case, “complete” means “done enough for me to feel good about abandoning” it. In other words, how do you feel good about stopping work on a program?

Richard Mavis

Make a Valuable Open Source Contribution with CircleCI Orbs — CircleCI Orbs (packages of configuration) are a…

Honeybadger Developer Blog 

Avoiding Junk-Drawer Classes in Ruby

Because Ruby is an object-oriented language, we tend to model the world as a set of objects. We say that two integers (x and y) are a Point, and a Line has two of them. While this approach is often useful, it has one big problem...
Ruby Weekly 

Ruby 2.6.1 released

#435 — January 31, 2019

Read on the Web

Ruby Weekly

Ruby 2.6.1 Released — This release is primarily to resolve the critical Net::Protocol issue we mentioned a few weeks ago. If you’re using 2.6 in production at all, this is a must update.

Yui Naruse

Rails 6 to Keep Source Maps in Production, Decrees DHH — For performance reasons, source maps were originally not going to be included in production Rails apps, but this week DHH stepped in and reverted to ‘source-maps-by-default’ behavior in tribute to the Web’s tradition of ‘View Source’ actually being useful.

Ruby on Rails

Timeseries in Redis with…

Scott Watermasysk 

Unlimited Software Does Not Exist

In software, nothing is unlimited. You can market and sell your product without any limits, but when it comes to computing, there are always limits.

One such limit, bit me in the ass yesterday.

KickoffLabs uses recursive queries in a couple of places. These are great because they can often limit hops back and forth to the database. Generally, they recurse two or so levels deep.

Unfortunately, a customer (or customer’s customer) managed to go many levels deep….and you probably guessed it by now, without any limits. Furthermore, one of these queries generates more related recursive queries.

Oh no! When things went wrong

The green in the picture is database work. It was not the number of queries causing the problem,…

The way is long but you can make it easy on me 

Getting the most mileage out of Docker and Rails

Hi Folks,

Recently I was working with a friend on their Rails app, which had been fully wrapped in a docker-compose setup. They were quite rightly asking me questions about the best way to do things like run the server, run tests, migrate the database and other common Rails tasks. While I’ve seen a number of different ways of Dockerizing Rails in development, my preferred way is not to Dockerize my Rails app itself. In development I prefer to use Docker to manage any complex dependencies my application has, leaving my app running bare on my machine. When it comes to production time, that's the ideal place to Dockerize your application. Let's look at why!

It starts with the "Rails Way"

The…

All Ruby Podcasts by Devchat.tv 

MRS 076: Sihui Huang

Sponsors

Greater Than Code 

116: Healing Organizational Trauma with Matt Stratton

In this episode, Matt Stratton discusses incident response communication, leading by example, the way we should be handling postmortems, and telling the hero’s story vs the story of the people. If you like Greater Than Code, you should check out The Transatlantic Cable Podcast from Kaspersky Lab. They look at cybersecurity issues that affect everybody, and also make sure the podcast fits into your busy day, by keeping them to 20 minutes or less. Check it out and subscribe wherever you get your podcasts. Panelists: Janelle Klein | Coraline Ada Ehmke | Jessica Kerr Special Guest: Matt Stratton: @mattstratton Matty Stratton is a HumanOps Advocate at PagerDuty, where he…
BigBinary Blog 

Resolve foreign key constraint conflict while copying data using topological sort

We have a client that uses multi-tenant database where each database holds data for each of their customers. Whenever a new customer is added, a service dynamically creates a new database. In order to seed this new database we were tasked to implement a feature to copy data from existing “demo” database.

The “demo” database is actually a live client where sales team does demo. This ensures that the data that is copied is fresh and not stale.

We implemented a solution where we simply listed all the tables in namespace and used activerecord-import to copy the table data. We used activerecord-import gem to keep code agnostic of underlying database as we used different databases in…

OmbuLabs Blog 

Using Google Calendar for Account Management

At Ombu Labs, we like to split our time between working on our own products, open source and client projects.

Our own products include everything from OmbuShop, an e-commerce platform, to FastRuby.io, a Ruby on Rails upgrade service. In terms of open source, we recently created Audit Tool and are constantly searching for more projects to contribute to. We also work on a variety of interesting client projects, and with our current team size, like to take on two to three of them at a time.

As an Account Manager, it can get hectic trying to manage all of this. Google Calendar can be a serious help.

Using Multiple Calendars

In order to manage the different types of projects we work on at

Ruby Magic by AppSignal 

Unraveling Classes, Instances and Metaclasses in Ruby

Welcome to a new episode of Ruby Magic! This month's edition is all about metaclasses, a subject sparked by a discussion between two developers (Hi Maud!).

Through examining metaclasses, we'll learn how class and instance methods work in Ruby. Along the way, discover the difference between defining a method by passing an explicit "definee" and using class << self or instance_eval. Let's go!

Class Instances and Instance Methods

To understand why metaclasses are used in Ruby, we'll start by examining what the differences are between instance- and class methods.

In Ruby, a class is an object that defines a blueprint to create other objects. Classes define which methods are available on any…

All Ruby Podcasts by Devchat.tv 

RR 398: Productivity with Mani Vaya

Get Mani's 10x Productivity Book Summaries

Sponsors

Panel:

  • Eric Berry
  • Charles Max Wood
  • Nate Hopkins

Special Guest: Mani Vaya

Links:

Scott Watermasysk 

What Are Shorts? And Why You Should Use Them Too.

There are few things lamer than blogging about blogging, but this is a subject I think is very important.

In my virtual circles, Twitter has killed blogging. I do not believe Twitter did it on purpose. Twitter is simple, and you can reach a lot of people quickly. And despite all the negative energy around Twitter, it still the place where I learn the most on a daily basis.

What concerns me about blogging’s demise is how much information vanishes after a couple of minutes. You can like it, but good luck finding in the future.

What I am trying to do instead is something I am calling shorts. A short is a post that is either small enough to live inside a tweet or has enough formatting…

RubyMine Blog 

RubyMine 2019.1 EAP updated: View Call Hierarchy, TruffleRuby Support

RubyMine 2019.1 EAP (build 191.4738.18) has just been updated. The new build features an ability to view a Call Hierarchy of Ruby methods, and adds support for TruffleRuby.

Call Hierarchy [RUBY-16165]

This build features a very handy ability to view a call hierarchy of methods (Navigate | Call Hierarchy), which expands the potential of the Find Usages action.

Not only does the Call Hierachy show you all the methods (“callers”) that use the method you are investigating, but it also shows you callers of the callers. Take a look at the following steps to escape this verbal abracadabra and get a grasp of this feature:

  • Put the caret at the method you want to…
Ruby Pigeon 

Dream Code First

Let’s consider two software development workflows. Their outcomes differ in many ways, but in this article I just want to focus on code quality.

Workflow #1: Straight to the implementation

  1. Look around the codebase for existing places that will need to be changed.
  2. Change and add code until the new functionality works, doing manual testing.
  3. Think about refactoring, but decide against it, because it’s working, and you’ll have to manually test everything again if you make changes.
  4. Write some tests to cover the new code.
  5. Refactor some of the code, without breaking the tests you just wrote.

This workflow does not involve design. Changes are made haphazardly until the implementation…

Drifting Ruby Screencasts 

What the RegEx?

In this episode, we look at different ways to use pattern matching with Regular Expressions in Ruby.
Scott Watermasysk 

Simplifying Shorti's Api

If you are not familiar, Shorti is my API only simple URL shortener. The source is on GitHub.

Initially, all of the API endpoints returned JSON. JSON is convenient, and the tools around it are great these days. However, I did notice that in my primary use cases it was adding some unnecessary steps, especially when using it with shell scripts.

Since it is a relatively new project, I thought it was best to fix this now.

I made a change that now checks the HTTP ACCEPT header. If it is application/json, the API will return JSON. If it is anything else, it will return plain text.

  def is_json_request?
    request.accept == "application/json"
  end

What is nice is that you can now simply…

Bundler Blog 

December 2018 Bundler Update

Welcome to the December 2018 monthly update!

In December, Bundler reached two huge and exciting milestones. First, Ruby included Bundler for the first time ever, including Bundler 1.17.2 in Ruby 2.6. Special thanks are due to @hsbt for years worth of work integrating Bundler into the ruby-core test suite and keeping everything working and up to date.

Second, Bundler shipped version 2.0! It’s a big milestone, and the Bundler team is very excited to adopt a yearly major release cadence, to better match Ruby itself.

Bundler gained 55 new commits, contributed by 7 authors. There were 225 additions and 63 deletions across 21 files.

Interested in contributing to Bundler? We always welcome…

RubyGems Blog 

December 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 October.

rubygems.org news

In RubyGems.org news, lead RubyGems.org maintainer @dwradcliffe completed porting the production RubyGems.org deployment to use Kubernetes! This didn’t cause any user-facing changes, but makes it easier for others to develop locally, and will help us with our efforts to avoid downtime.

Another major development was enabling two factor authentication, a Google Summer of Code project that can greatly improve the security of logging in and…

Scott Watermasysk 

My Mac Mechanical Keyboard Search

Short Version

I enjoyed using both the Das Keyboard and WASD Code V3. The smaller size and backlighting would have been enough to push the WASD ahead, but the rollout and Windows requirement of the V3 was too much to overlook.

In the end, I kept the Das Keyboard and returned the other two.

The models I tested

  • Das Keyboard 4 Professional (MX Blue)
  • Matias Mini Tactile Pro (ALPS)
  • WASD Code V3 87-Key (MX Blue)

Sadly, there are not many “real” Mac choices for mechanical keyboards. Apple.com lists none. Most of what comes up on Amazon are ‘retro’ which is not the same a mechanical. Apple makes lion share of profits in the hardware space, but the number of units is still quite small.

Appfolio Engineering 

Test Ruby's Speed with Rails and Rack "Hello, World" Apps

As I continue on the path to a new benchmark for Ruby speed, one important technique is to build a little at a time, and add in small pieces. I’m much more likely to catch a problem if I keep adding, checking and writing about small things.

As a result, you get a nice set of blog posts talking about small, specific aspects of speed testing. I always think this kind of thing is fascinating, so perhaps you will too!

Two weeks ago, I wrote about a simple speed-test - have a Rails 4.2 route return a static string, as a kind of Rails “Hello, World” app. Rack’s well-known “Hello, World” app is even simpler. On the way to a more interesting Rails-based Ruby benchmark, let’s speed test those two, and…

(Scroll down for…

RubyGuides 

Ruby Comments Explained!

You can use a Ruby comment to add information to your code that may be helpful for you or other developers. The most common type of comment is the single-line comment. Here’s the syntax: # I like apples & oranges Notice three things about this: The comment starts with a pound (#) symbol We put […]

The post Ruby Comments Explained! appeared first on RubyGuides. Don't miss your free gift here :)

Remote Ruby 

Joined by Chris Seaton

Valentino Gagliardi 

How to Test a Django Application: the Thought Process Behind Testing

In the following tutorial you’ll learn how to test a Django application and the thought process behind testing and refactoring

When it comes to backend my tools of choice are Django and Python. Speed of development (particulary useful for rapid prototyping) and the excellent test coverage I can get almost out of the box are the major boons for me.

How to Test a Django Application: the Thought Process Behind Testing

I use Django for training aspiring developers too and when I run a workshop I don’t go straight to the “right implementation”. What I like instead is guiding newcomers through the initial “working implementation” to refactoring into a more complex application.

In this tutorial you’ll build a small application with the exact same…

The Bike Shed 

186: Let's Duplicate Stuff

On this week's episode, Chris is joined by Daniel Colson, developer in our New York studio and current maintainer of all things FactoryBot. Chris & Daniel discuss Daniel's work as maintainer of one of thoughtbot's most popular open source projects and some of the parallels to thoughtbot's consulting work. They then discuss a bit more on the specifics of FactoryBot and what's in store for upcoming versions.

To round out the conversation Daniel and Chris also dig into some of the testing related best practices and patterns common to thoughtbot projects, linting and formatting tools, and even dip into the age old discussion around single quotes vs double quotes (just a tiny bit).

Ruby on Rails Podcast 

258: Run.rb and Mental Health Awareness with Jason Charnes

Jason Charnes is a web developer, podcaster (Remote Ruby), husband, and dad who is part of the team of run.rb, a Ruby emulator in the browser. After discussing their mutual love of Ruby, Brittany and Jason discuss the importance of mental health awareness in the developer community.

Links for this episode:

Awesome Ruby Newsletter 

Issue 141 - How ActionCable broke Puma

Ruby Conferences 'n' Camps in 2019 - What's Upcoming? 

Rubyhack @ Salt Lake City, Utah, United States - Ruby Conferences 'n' Camps Update

Conferences 'n' Camps

What's News? What's Upcoming in 2019?

Rubyhack
Apr/4+5 (2d) Thu+Fri @ Salt Lake City, Utah, United States • (Updates)

See all Conferences 'n' Camps in 2019».

Ruby Conferences 'n' Camps in 2019 - What's Upcoming? 

RubyDay Italy @ Verona, Veneto, Italy - Ruby Conferences 'n' Camps Update

Conferences 'n' Camps

What's News? What's Upcoming in 2019?

RubyDay Italy
Apr/10+11 (2d) Wed+Thu @ Verona, Veneto, Italy • (Updates)

See all Conferences 'n' Camps in 2019».

solnic.codes 

Introducing dry-schema

Two years ago (!!!) I published a post on discourse.dry-rb.org explaining my plans for dry-validation 1.0.0 and in this post I mentioned that there will be a new gem called dry-schema that dry-validation will use for its schemas. It’s crazy how time flies because I swear I thought it was last year. I know that over this time dry-validation has been accumulating a lot of issues (125 in the moment of writing this article), and I know it sucks, big time, that I didn’t have a chance to address any of these.

Good news is I’ve finally shipped the first version of dry-schema, a new project I’ve been working on-and-off over the course of the last 2 years. It didn’t actually take much time to…

Notes to self 

Rails handles large number of nested routes better than Sinatra

Jeremy Evans (of Roda and Sequel fame) created an interesting benchmark comparing memory and runtime performance of large number of routes (up to 10000) in various Ruby web frameworks. I was immediately interested and ran it to get the numbers.

Jeremy’s benchmark is called r10k and supports several web frameworks. Since the results are not included in the original repository I ran this benchmark on my laptop (5th gen i7 ThinkPad Carbon) to find out.

I used latest stable versions of Roda (3.16.0) and Sinatra (2.0.5) together with Rails 6 (6.0.0.beta1) all running Ruby 2.6.0. I did only small tweaks to the original benchmark by upgrading Rails and removing config.secret_token

All Ruby Podcasts by Devchat.tv 

MRS 075: Luca Guidi

Sponsors

OmbuLabs Blog 

Often neglected API best practices

If you've been a web developer for any length of time at all these days, you've no doubt used at least a few web based APIs here and there. It's possible that you've even written one (or more!) yourself. API design is a rich topic with a lot of deep roots, but some cursory research will show a number of best practices that public facing APIs should implement. Understanding these practices will give you a firm basis for judging the quality of APIs as a user and consumer, and allow you to design more useful APIs when it's your turn.

Over the years, I've used a lot of APIs myself, and here are some best practices that I see getting short shrift:

Versioning

Versioning an API is something…

Hanami 

Announcing Hanami v2.0.0.alpha1

Hello wonderful community! ❤️🌸

Today we're thrilled to announce v2.0.0.alpha1 release 🙌.

A fresh start 😎

Today's release is the beginning of Hanami 2 series. The final 2.0 version will be released later this year.

We decided to start fresh with the development of the framework. The internals needed a cleanup because the code was accumulating techical debt from the old days of Lotus. To evolve it would have required too much effort. Given 1.3 is 4k lines of code, it made a lot of sense for us to start from scratch.

That means this release is not meant to be comparable in terms of features with 1.3, but it's more a preview of Hanami 2.

Honeybadger Developer Blog 

Understanding Elixir's Strange Module Names

While brushing up on Elixir for our company hackathon, I discovered that it's way of resolving modules is a little strange. In this post I dive into the strangeness to reveal the underlying mechanisms.
Ruby News 

Ruby 2.6.1 Released

Ruby 2.6.1 has been released.

Changes

This release includes additional bug fixes. See the commit logs for more details.

Download

Greater Than Code 

115: Tension Between Opposites with Sam Joseph

In this episode, Sam Joseph talks about making spaces to have safe and nonviolent conversations, collaborative communication and learning, delivering working solutions that meet end-user needs, and the value of doing things the way you’re used to vs a way that might be better. Hi friends!...that's what Scott Hanselman says whenever he starts a talk or a podcast. He's done over 650 episodes of his Hanselminutes podcast that he calls "Fresh AIr for Developers." It's a tight 30 min technology chat show that shares the same values that we do here at Greater than Code. There's a HUGE library of guests for you to catch up on and a new high quality show every Thursday afternoon with a fresh face…
All Ruby Podcasts by Devchat.tv 

RR 397: Oracle with Karthik Gaekwad

Sponsors

Julia Evans 

A few early marketing thoughts

At some point last month I said I might write more about business, so here are some very early marketing thoughts for my zine business (https://wizardzines.com!). The question I’m trying to make some progress on in this post is: “how to do marketing in a way that feels good?”

what’s the point of marketing?

Okay! What’s marketing? What’s the point? I think the ideal way marketing works is:

  1. you somehow tell a person about a thing
  2. you explain somehow why the thing will be useful to them / why it is good
  3. they buy it and they like the thing because it’s what they expected

(or, when you explain it they see that they don’t want it and don’t buy it which is good too!!)

So basically as far…

BigBinary Blog 

How to cache all files using Cloudflare worker along with HMAC authentication

Cloudflare is a Content Delivery Network (CDN) company that provides various network and security services. In March 2018, they released “Cloudflare Workers” feature for public. Cloudflare Workers allow us to write JavaScript code and run them in Cloudflare edges. This is helpful when we want to pre-process requests before forwarding them to the origin. In this post, we will explain how we implemented HMAC authentication while caching all files in Cloudflare edges.

We have a bunch of files hosted in S3 which are served through CloudFront. To reduce the CloudFront bandwith cost and to make use of a global CDN (we use Price Class 100 in CloudFront), we decided to use Cloudflare for file…

Code with Jason 

RSpec mocks and stubs in plain English

One of the most common questions I see from beginners to Rails testing is what mocks and stubs are and when to use them. If you’re confused about mocks and stubs, you’re not alone. In my experience very few people understand them. In this post I’ll attempt to help clarify the matter, particularly in the context of Rails/RSpec.

I want to preface my explanation with a disclaimer. This post is partly derived from personal experience but it’s mostly derived from me just reading a bunch of posts online and reading a few books to try to understand mocks and stubs better. It’s entirely possible that what follows is not 100% accurate. But I’m risking the inaccuracy because I think the internet…

Semaphore 

Travis CI Alternative for Private Projects

Travis CI is one of the most popular hosted Continuous Integration solutions. Most notably, it has made a huge contribution to the developer community by serving the biggest share of open source projects.

However in 2019 most new software projects are looking for a solution that can drive the entire Continuous Delivery lifecycle. There’s also little evidence in the developer tools space of companies making customer-centric innovations after being acquired by a private equity fund. So after the last week’s announcement of Travis CI’s acquisition by Idera Inc., many developers have started exploring alternatives.

Over the years the most common benefit that we’ve heard from customers who…

The Miners - Medium 

“!” and “?”: Understanding one of Ruby’s coolest naming conventions

“!” and “?”: Understanding One of Ruby’s Coolest Naming Conventions

“Well, that’s quite some symbols you got there ♨_♨” - You, after reading this article’s title.

It was a calm Friday afternoon here at CodeMiner42, when one of my co-workers from another office came up with an interesting question in the company’s chat:

“Guys, are the ! and ? that we find at the end of method names a convention of Ruby, RoR, or whom else?”

Well, that’s a fair question, and I hope I can increase your knowledge by sharing my answer here.

It’s all about conventions, in the end

First of all, from an implementation standpoint, naming a method with ! or? at the end has no effect in the method’s functionality. With that,…

Martian Chronicles, Evil Martians’ team blog 

Anonymous web authentication with Stellar blockchain

Authors: Viktor Sokolov, Lead Developer at Evil Martians and Sergey Nebolsin, Lead Developer at Evil Martians

Learn how to use the combination of signed transactions and JWT tokens to authenticate users from a pair of cryptographic keys that identify the blockchain user. This article is based on Stellar Web Authentication proposal by Sergey Nebolsin and Tom Quisel that now becomes a part of Stellar ecosystem. The same approach might be used in theory with other blockchain solutions.

Strictly speaking, web-based authentication and blockchain do not even have to appear in the same sentence, as technologically these concepts are not more related than apples and oranges. In reality,…

Ruby Pigeon 

ValueSemantics—A Gem for Making Value Classes

Today I am announcing ValueSemantics — a gem for making value classes. This is something that I’ve been using in my personal projects for a while, and I think it’s now ready for public use as of v3.0.

In this article, I will give an overview of the gem, but I mainly want to talk about the thought process behind designing a library. We’ll look at:

  • features
  • design goals
  • comparisons to similar gems
  • the module builder pattern
  • case equality
  • callable objects
  • opinions about freezing
  • Integration Continuity™
  • designing DSLs
  • stability in cross-cutting concerns

What’s the Point?

Before getting into the details of this gem, you might be wondering: what are value objects, and…

Riding Rails 

Active Record bug fixes, faster Date#advance, and more!

Hello everyone! This is Eugene, with a selection of interesting improvements to Rails merged in the past week.

Don’t load app environment when editing credentials

Support for per-environment credentials is coming in Rails 6.0, but adding a new environment wasn’t always easy: if your application accessed credentials during boot, the credentials:edit command would fail to run, which would in turn prevent you from adding the missing credentials. Oops!

All queries should return correct results even if they include large numbers

When prepared statements are enabled, querying an integer column with an out-of-range value causes an error in the underlying database driver. To work around this…

Honeybadger Developer Blog 

Announcing Search Autocomplete

Stop the presses! We've just added a small but really cool new feature to your Honeybadger account: search key autocomplete.