Rubyland

news, opinion, tutorials, about ruby, aggregated
Sources About
Jekyll • Simple, blog-aware, static sites 

Jekyll 4.0.0 Released

Hi! 👋 I bring some good news! Jekyll 4.0.0 is finally here! 🎉

There’s quite a bit in this release to unpack, so let me hit the high points quickly:

  • Ruby 2.4.0 or greater is now required.
  • Rouge 3.0 or greater is now required for syntax highlighting.
  • Jekyll builds should be much faster.
  • Kramdown 2.1 is now the default markdown engine.
  • Sass processing should be faster.
  • We dropped support for a lot of stuff, specifically:
    • Pygments
    • RedCarpet
    • RDiscount

Alright, so with the high points out of the way, let’s get into the details a little bit.

Cache all the things! 💰

While some optimizations first made an appearance with Jekyll 3.8.0, Jekyll 4.0…

Ruby Inside - Medium 

Active Storage File Upload Behind The Scenes

Active Storage is a framework in Ruby that makes it a breeze to upload files and reference them in the cloud (or a local disk). It’s built into Ruby On Rails 6, but it’s also got a JavaScript library. In fact, that’s what I like most about Rails. It’s got your back. It delivers complete packages out of the box. Packages that work well together. Client to server — it’s got everything you need! And it’s got beautiful code. Making it a pleasure to work with.

In this post, you will see how Active Storage really works from the inside. We will track the main flow of the program, and see how it processes a file uploaded by the user through the browser with JavaScript. And then, how the file is…

A…

Rebased Blog 

Fighting monsters, or how I stopped worrying and improved my learning process

Learning is a strange experience to me. I love it when I can finally use my knowledge in work, for fun or just to impress somebody, but the process of getting there is usually painful. There is a whole lot of obstacles and issues along the way that feel like...
RubySec 

Code execution backdoor in rest-client

All Ruby Podcasts by Devchat.tv 

RR 426: Dockerized Development Environments with Julian Fahrer

Sponsors

Panel

  • David Kimura

  • Andrew Mason

  • Charles Max Wood

With Special Guests: Julian Fahrer

Episode Summary

Julian Fahrer has been a guest on Devchat shows before and recently did a workshop at RailsConf about Docker. He specializes in teaching people about Docker and has his own course, LearnDocker.online. Julian begins by giving suggestions for those considering Dockerizing their Rails applications. He talks about why Docker is a good choice to be used in a local development environment and gives some advice for those who might have trouble running Docker in development. He talks about where Docker fits…

BigBinary Blog 

Rails 6 adds support of symbol keys with ActiveSupport::HashWithIndifferentAccess#assoc

This blog is part of our Rails 6 series. Rails 6.0 was recently released.

Rails 6 added support of symbol keys with ActiveSupport::HashWithIndifferentAccess#assoc.

Please note that documentation of ActiveSupport::HashWithIndifferentAccess#assoc in Rails 5.2 shows that ActiveSupport::HashWithIndifferentAccess#assoc works with symbol keys but it doesn’t.

In Rails 6, ActiveSupport::HashWithIndifferentAccess implements a hash where string and symbol keys are considered to be the same.

Before Rails 6, HashWithIndifferentAccess#assoc used to work with just string keys.

Let’s checkout how it works.

Rails 5.2

Let’s create an object of ActiveSupport::HashWithIndifferentAccess and call assoc

>> info = { name: 'Mark', ema…
The Bike Shed 

210: Stop Trying to Make Fetch Happen

On this week's episode, Steph and Chris discuss mechanical keyboards, combating error fatigue, the joy of admin features and respond to two listener questions about typed vs dynamic languages and various ways to "speed up" third-party API calls.

Become a Sponsor of The Bike Shed!

Test Double | Our Blog 

Tips for hand-rolling your own deployment pipeline

When it comes to deploying your application, we've been advocating for a NoOps philosophy for some time now. What we mean by this is to encourage your team to focus their efforts on developing features for your application, rather than configuring containers or fiddling with resource management for the hosted product. But perhaps, for one reason or another, the option to deploy onto a PaaS (platform as a service) is unavailable to you. Maybe your burn rate is tight, and you believe you'll save some money setting up your own box rather than paying for a platform; maybe your team has members already well-versed in operations engineering; or maybe you don't see what the big deal of being able…

Code with Jason 

How I make testing a habit

A reader of mine recently asked how I make testing a habit.

The question is an understandable one. There’s a lot of friction in the process of writing tests. Even for someone like me who has been in the habit of writing tests most of my code for many years, the friction is still there. On many occasions I still have to “make myself” write tests, the same way I “make myself” brush my teeth every few days or so.

I actually had to think long and hard about the question. I definitely DO write tests, but I’m not sure that the force that drives me to write tests is exactly a habit.

Yesterday I realized what drives to me to write tests. What drives me to write tests is that I realized, at some…

Super Good Software 

A Ruby Gem Debugging Strategy

Is a gem you’re using not behaving the way you expect or giving a cryptic error you don’t understand? If you’re comfortable diving into the gems your app depends on, you’ll be able to track down and fix a whole new class of bugs that you might otherwise have to work around.

There’s no wrong way to debug an issue so long as you eventually figure out the problem. I’m going to outline how I go about tackling these kinds of issues, but if you have or find a way that works better for you, go for it. My goal is to show you how to get started debugging issues that fall outside of your application’s codebase so that you can expand the kinds of issues you can solve, as well as give you a path to…

Ruby Inside - Medium 

A Q&A with Noah Gibbs

Author of ‘Rebuilding Rails’ and Ruby performance benchmarker extraordinaire

Noah is a Ruby Fellow at AppFolio and has authored countless articles and given many presentations on benchmarking Ruby and Rails. He has also built benchmarking tools, including an official benchmark for Ruby 3x3.

💬 We’re grateful that he’s taken the time to answer a few of our questions:

What first inspired you to start benchmarking Ruby so fervently?

When I was chosen for the Ruby Fellow role, I knew I needed to work on performance. That’s what they were specifically looking for! I tried a few things including different Ruby compile options, different kinds of profiling… You can see some of that in my early…

RubyGuides 

Why Do We Need Application Servers in Ruby?

You start building your new shiny web application in Ruby.

And before you write any code…

You want to see it load in your browser, even if just to see the default “welcome” page.

So you open your browser, you point it at localhost:3000, or maybe localhost:4567 if you’re using Sinatra.

What happens then?

Your browser connects to localhost, on port 3000, where a Ruby application like Puma is waiting.

localhost points to a special IP address, 127.0.0.1, which always refers to your computer

Now:

The job of Puma, or any other rack-based server (like Thin / Unicorn), is to handle the browser’s request & pass it along to your application through a common interface.

Which interface are we…

Karol Galanciak - Ruby on Rails and Ember.js consultant 

Durable Sidekiq jobs: how to maximize reliability of Sidekiq and Redis

Sidekiq is one of the most popular (if not the most popular one) background job framework in Ruby world, which is not a big surprise: it allows to achieve a decent throughput, is stable and well-maintained, has some great features (including also all the gems extending its built-in functionality) and is easy to get started with. It seems like you could simply install Redis, add Sidekiq to your application and you are good to go!

That would work if you didn’t have any business-critical background jobs where reliability doesn’t matter that much. However, if you cannot afford to lose jobs every now and then, there are some things that are absolutely critical to review in your configuration…

How can you lose a Sidekiq job?

T…

Riding Rails 

Rails 6 is released, sass-rails 6, improved mysql2 error and more

Hello! This is Prathamesh bringing the latest news from the Rails community. This week we have some big news. Get ready.

Rails 6 is out!

After two and half years of development from more than 800 people having staggering 7275 commits, Rails 6 is released. Time to upgrade 😁
Check out the release notes and upgrading guide to know more.

Support for sass-rails 6

Rails now works with sass-rails 6.0. sass-rails 6 wraps sassc-rails gem under the hood. This new version stops usage of outdated and unsupported ruby-sass gem.

Make prepared statement status thread and instance-specific

This fixes a race condition in system tests where prepared
statements can be incorrectly parameterized when…

JetRockets 

JetRockets Receives Clutch Leader Award as a Top Developer in New York!

We know that choosing the right web development agency can seem like a truly daunting task. With thousands of agencies around the world, we are here to help you make your decision faster.
Ruby Conferences 'n' Camps in 2019 - What's Upcoming? 

RubyRussia @ Moscow, Russia - Ruby Conferences 'n' Camps Update

Conferences 'n' Camps

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

RubyRussia
Sep/28 (1d) Sat @ Moscow, Russia • (Updates)

See all Conferences 'n' Camps in 2019».

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

Ruby Open Source Software (ROSS) Conf Amsterdam @ Amsterdam, Netherlands - Ruby Conferences 'n' Camps Update

Conferences 'n' Camps

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

Ruby Open Source Software (ROSS) Conf Amsterdam
Dec/13+14 (2d) Fri+Sat @ Amsterdam, Netherlands • (Updates)

See all Conferences 'n' Camps in 2019».

Riding Rails 

Rails 6.0: Action Mailbox, Action Text, Multiple DBs, Parallel Testing, Webpacker by default, and Zeitwerk

Dealing with incoming email, composing rich-text content, connecting to multiple databases, parallelizing test runs, integrating JavaScript with love, and rewriting the code loader. These are fundamental improvements to the fundamentals of working with the web and building fast and fresh applications. This is the kind of work we’ve been doing for the past fifteen years, and we’re still at it. THIS IS RAILS SIX!

And that’s just the headline improvements! Since Rails 5.2 was released a little over a year ago, we’ve continued our high pace of improvement all over the framework. In 2019 alone, we’ve had 341 code contributors submit improvements and fixes. We’ve tried to summarize just some of…

Appfolio Engineering 

Wrk: Does It Matter If It Has Native No-Keepalive?

I wrote about a load-tester called Wrk a little while ago. Wrk is unusual among load testers in that it doesn’t have an option for turning off HTTP keepalive. HTTP 1.1 defaults to having KeepAlive, and it helps performance significantly… But shouldn’t you allow testing with both? Some intermediate software might not support KeepAlive, and HTTP 1.0 only supports it in an optional mode. Other load-testers normally allow turning it off. Shouldn’t Wrk allow it too?

Let’s explore that, and run some tests to check how “real” No-KeepAlive performs.

In this post I’m measuring with Rails Simpler Bench, using 110 60-seconds batches of HTTP requests with a 5-second warmup for each. It’s this experiment…

RubyGems Blog 

3.0.6 Released

RubyGems 3.0.6 includes bug fixes.

To update to the latest RubyGems you can run:

gem update --system

If you need to upgrade or downgrade please follow the how to upgrade/downgrade RubyGems instructions. To install RubyGems by hand see the Download RubyGems page.

Bug fixes:

  • Revert #2813. It broke the compatibility with 3.0.x versions.

SHA256 Checksums:

  • rubygems-3.0.6.tgz
    fd6785ac24728bd5bf8f0883d197fe0cea4df37d485c5353c93fbe573b8941b1
  • rubygems-3.0.6.zip
    d222edc519421f221bfa835a71e5ccea742c5295d8035451ec3baeee8c6b9b3c
  • rubygems-update-3.0.6.gem
    0e4fcbd4f1f0b6d58fc656051f3f3a0229713552d5b1eeab588f853d8ec96d7a
RubyGems Blog 

3.0.5 Released

RubyGems 3.0.5 includes minor enhancements and bug fixes.

To update to the latest RubyGems you can run:

gem update --system

If you need to upgrade or downgrade please follow the how to upgrade/downgrade RubyGems instructions. To install RubyGems by hand see the Download RubyGems page.

Minor enhancements:

  • Use env var to configure api key on push. Pull request #2559 by Luis Sagastume.
  • Unswallow uninstall error. Pull request #2707 by David Rodríguez.
  • Expose windows path normalization utility. Pull request #2767 by David Rodríguez.
  • Clean which command. Pull request #2801 by Luis Sagastume.
  • Upgrading S3 source signature to AWS SigV4. Pull request #2807 by Alexander Pakulov.
  • R…
Awesome Ruby Newsletter 

💎 Issue 169 - "A Complete Guide to the Ruby Programming World"

Posts 

On maintaining webgen

My static website generator webgen has been around for a long time. Though there are now many other static website generators written in Ruby, I still maintain webgen because some of its functionality is unique.

Development of webgen started 16 years ago, back in 2003 because I needed a tool for creating my personal website. From there it grew into a full-blown static website generator over the years (you can read more about its history at the webgen homepage). It had its heyday around 2007/2008 when not many static website generators existed (Hobix anyone?). A few years later the “boom years” for static website generators started and many, many were created. Ruby lends itself especially…

Test Double | Our Blog 

Retrospect and adapt.

I struggle with the concept of chores. Every time I sweep my floor, I can't help but think that I'll just need to sweep it again next week, and the week after that. I see a long, unending chain of sweepings in my future, each one no different from the last, and each one aimed towards the exact same objective: a clean floor.

Maybe I should get a Roomba.

Even if I did, though, no amount of automation currently available to me is going to result in a clean apartment without any effort on my part. Despite my best efforts to be tidy, the mere act of existing in this space messes it up over time.

Our work is like that, too. A high-performing programming team isn't something that appears out of…

Ruby Weekly 

A tour of Ruby's 'magic' comments

#463 — August 15, 2019

Read on the Web

Ruby Weekly

How to Correct 32,000 Incorrect CSV Files in Fewer Than 32,000 Steps — We’ve all faced a data processing task from hell and CSV loves to throw up complexities around escaping and stray commas. Here’s how one Rubyist dealt with it, and came up with the comma_splice gem to help.

Jeff Keen

Magic Comments in Ruby — You’ve likely seen (and even used) ‘magic’ comments, but you probably don’t know all of them or understand things like precedence.

Mehdi Farsi

Automated Code Reviews for Ruby — Take the hassle out of code reviews - Codacy flags errors…

Semaphore 

Speeding Up Your DevOps Workflows with Docker

In this episode, the internet winds bring us Bret Fisher: author, DevOps consultant, and renowned Docker instructor. Bret has been awarded a Docker Captainship for exceptional teaching and community leadership.

Roles in IT are changing, fast, and getting down the basics of containers is more important than ever. Containers are powering the microservice transformation and are an essential component for orchestration platforms such as Kubernetes and Docker Swarm.

For Docker users, the tide is high, and the waters have never been so inviting. Docker has streamlined the way we package and run applications.

What are the biggest problems that Docker solves? What is the role of CI/CD…

Ruby on Rails Podcast 

282: Rails on Windows is Fabulous with Scott Hanselman

Scott Hanselman is a programmer, teacher, speaker, technologist, podcaster, writer and a diversity advocate. He joined Britt to explain how Ruby on Rails on Windows can now be an excellent experience. Windows runs Linux at near-native speeds with an actual shipping Linux Kernel using WSL2, Ruby on Rails folks using Windows should do their work in WSL2.

Links for this episode:

Brought to you by:

Hoefler&Co

A good font is one of the best ways to make your project stand apart. At typography.com, you'll find the work of Hoefler&Co, creators of stylish and high-performance typefaces. And now for a limited time, as a Ruby on Rails listener you'll…

Code with Jason 

How to write a test when the test implementation isn’t obvious

Why testers often suffer from “writer’s block”

When you write a test, you’re carrying out two jobs:

  1. Deciding what steps the test should carry out
  2. Translating those steps into code

For trivial tests, these two steps are easy enough that both can be done together, and without conscious thought. For non-trivial tests (especially tests that include complex setup steps), doing both these steps at once is too much mental juggling for a feeble human brain, or at least my feeble human brain.

This is when testers experience “writer’s block”.

Luckily, there’s a way out. When the implementation of a test eludes me, I consciously separate the job into the two steps listed above and I tackle each one…

All Ruby Podcasts by Devchat.tv 

RR 425: Rails + Webpacker with Taylor Jones

Sponsors

Panel

  • David Kimura

  • Andrew Mason

  • Nate Hopkins

With Special Guests: Taylor Jones

Episode Summary

Taylor Jones works remotely for Heroku in technical support. He talks about some of the most common issues he helps customers with and what issues he saw when Webpacker was introduced. The panel talks about their experience using Webpacker and how it has influenced their usage of React and Ruby. They talk about the importance of creating maintainable applications and the possible effects of using primarily new technology versus tried and true methods. It is important to keep architecture consistent, so…

RubySec 

Rexical Command Injection Vulnerability

RubySec 

Nokogiri Command Injection Vulnerability via Nokogiri::CSS::Tokenizer#load_file

BigBinary Blog 

Rails 6 preserves status of #html_safe? on sliced and multiplied HTML safe strings

This blog is part of our Rails 6 series. Rails 6.0 was recently released.

Before Rails 6

Before Rails 6, calling #html_safe? on a slice of an HTML safe string returns nil.

>> html_content = "<div>Hello, world!</div>".html_safe
# => "<div>Hello, world!</div>"
>> html_content.html_safe?
# => true
>> html_content[0..-1].html_safe?
# => nil

Also, before Rails 6, the ActiveSupport::SafeBuffer#* method does not preserve the HTML safe status as well.

>> line_break = "<br />".html_safe
# => "<br />"
>> line_break.html_safe?
# => true
>> two_line_breaks = (line_break * 2)
# => "<br /><br />"
>> two_line_breaks.html_safe?
# => nil

Rails 6 returns expected status of #html_safe?

In Rails 6, both…

The Bike Shed 

209: We Will Never Know Enough (Michael Chan)

On this week's episode Chris is joined by Michael Chan aka @chantastic, host of the React Podcast and prolific maker and sharer throughout the internets. They discuss Micheal's work on the React Podcast and themes in open source in general, Michael's focus on communication and delivering value, and the honest take that no one has all the answers or a silver bullet.

AkitaOnRails.com 

[Akitando] #18 - Motivação: O Diário de Henry Jones

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

O que o diário de Henry Jones (Indiana Jones e a Última Cruzada) tem a ver com minhas atividades de blogueiro, palestrante e agora YouTuber? Quero contar uma história pessoal que se inicia em 1984 e dura até hoje.

Não subestime uma criança, você nunca sabe o que pode se tornar uma inspiração que pode durar uma vida inteira.

Links:

  • AkitaOnRails - [Off-Topic] Disney, História do Computador e o Encarte Perdido…
JRuby.org News 

JRuby 9.2.8.0 Released

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

JRuby 9.2.x is compatible with Ruby 2.5.x and stays in sync with C Ruby. As always there is a mix of miscellaneous fixes so be sure to read the issue list below. All users are encouraged to upgrade.

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.

  • Substantial memory reduction (~24% less heap with a simple Rails app)
  • Reduced runtime generation of…
AkitaOnRails.com 

[Akitando] #15 - Sua Linguagem NÃO É Especial! (Parte 1)

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Depois da semana geek, vamos "geekar" um pouco na programação também.

Honestamente essa polarização em torno de linguagens de programação é super cansativa. A turma do funcional vs a turma dos objetos. A turma do javascript, a turma do Go.

Enquanto isso, a grande maioria da população de programadores está aflita, sem saber pra onde correr. Quantas linguagens preciso aprender? 2? 6? 50???

Calma! Vamos começar a colocar ordem…

AkitaOnRails.com 

[Akitando] #16 - Sua Linguagem NÃO É Especial! (Parte 2)

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Depois da semana geek, vamos "geekar" um pouco na programação também.

Honestamente essa polarização em torno de linguagens de programação é super cansativa. A turma do funcional vs a turma dos objetos. A turma do javascript, a turma do Go.

Enquanto isso, a grande maioria da população de programadores está aflita, sem saber pra onde correr. Quantas linguagens preciso aprender? 2? 6? 50???

Calma! Vamos começar a colocar ordem…

AkitaOnRails.com 

[Akitando] #17 - O Mundo Hoje É PIOR?

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Se você acompanha as redes sociais, sua percepção é de que o mundo está cada vez pior, cada vez mais perto do apocalipse. Neste episódio vamos ver quão perto estamos chegando do fim!

Será que Thanos estava certo e precisamos exterminar metade da população do universo?

Links:

  • Factfulness (https://www.amazon.com/dp/B0756J1LLV/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1)
  • Hans Rosling's 200 Countries, 200 Years, 4 Minutes -…
AkitaOnRails.com 

[Akitando] #14 - Consertando The Last Jedi

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

The Last Jedi é um assunto que vai ser eternamente controverso, mas hoje não vou entrar na discussão mas sim elencar o que nós fãs não gostamos e ir um passo além, mostrar como os fãs estão consertando esse e outros erros da história de Star Wars.

Links:

  • Harmy's Star Wars: Despecialized Edition - History & Sources Documentary (extended version) (https://www.youtube.com/watch?v=mGrXO2RDzLg)
  • Star Wars Despecialized Edition is…
AkitaOnRails.com 

[Akitando] #13 - Consertando Justice League

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Esta semana vamos pra temas geek. Hoje vamos olhar um pouco a trajetória de Justice League até ele implodir e em vez de só criticar mostrar soluções que outros geeks youtubers chegaram pra resolver esse problema.

Links:

  • Batman v Superman: What Went Wrong? – Wisecrack Edition (https://www.youtube.com/watch?v=467ehoaGDaE)
  • Civil War v Justice League: Dawn of Character Development (Video Essay)…
RubyGuides 

How to Use Logs in Ruby to Track Events & Error Messages

Logging is the process of saving information about what your Ruby application is doing.

It’s very helpful, both in development & production environments.

Why?

Because the whole point of logging is to collect information about what happened, what went wrong & what went right.

All kinds of information can be logged:

  • Slow SQL queries (so you can find & fix them)
  • Error messages
  • Detailed request information (URL, Controller, Params, Views…)

With this information, you can diagnose & find the source of problems in your application faster.

In a Rails app, logs are stored under the /log folder.

In development mode, the development.log file is used & you see log output on the terminal you’re…

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

The Road to $10,000 Profit from my Side Project Slack Bot

My side project Slack app Abot has recently reached a milestone of $10,000 total profit. In this blog post, I describe how the project has changed during the last year and what I am doing to grow and promote it. I also share some details about the usage stats and revenue.

You can check out my previous post for more details about the origin and features of Abot. Long story short it is a highly-configurable Slack addon that that lets you communicate anonymously with your team members.

Backstory and current profit

Total Abot Slack poll app profit so far

Total Abot profit so far


Abot started as a free-to-use weekend project at the beginning of 2017. I’ve introduced a one-time lifetime purchase option around six months…

Andy Croll 

Clamp for min/max values

In my article on value objects, the example involved constraining an integer to a minimum and maximum value in the #initialize method. As of Ruby 2.4, there’s a handy method for that: #clamp. The documentation for the method is in the Comparable module.

Instead of…

…using Array#min and Array#max to constrain a value within a range:

value = 1000
[[0, value].max], 255].min
#=> 255

value = -100
[[0, value].max], 255].min
#=> 0

Use…

…Ruby’s #clamp method.

value = 1000
value.clamp(0, 255)
#=> 255

value = -100
value.clamp(0, 255)
#=> 0

Why?

The standard library is deliberately expansive and elegant.

This is the exact use case for the problem I was trying to solve, so why use more…

Martian Chronicles, Evil Martians’ team blog 

Fullstaq Ruby: First impressions, and how to migrate your Docker/Kubernetes Ruby apps today

Author: Andrey Novikov, Back-end Developer at Evil Martians

What is Fullstaq Ruby?

Fullstaq Ruby is a custom build of standard MRI Ruby interpreter with memory allocator replaced, security patches applied, and more goodies on the way.

If some old-timers are here, they can remember REE—Ruby Enterprise Edition—from ancient times of Ruby 1.8.7 and Ruby on Rails 2.2 (almost ten years ago!) Ah, good ol’ times! You could install it via RVM or Rbenv, and some legacy applications are still running on it or have been just recently migrated. REE has a dozen of different patches on top of Ruby 1.8.7 to improve performance, reduce memory consumption, adjust obsolete security settings, and so on.

In…

Remote Ruby 

Joined by DHH (David Heinemeier Hansson)

Scott Watermasysk 

Five new Desktop Apps I use Every Day

Most of these are merely new to me, not necessarily new apps.

CleanShot - I have been using Droplr for the last couple of years, but recently switched to CleanShot. It has a very clean UI and is simple to use. There is no built-in sharing (still using Droplr there), but overall it is excellent.

CommandTab Plus - OS X spaces are a great way to organize working on different tasks. However, if you frequently use ⌘+Tab, you can accidentally select an app in a different space and end up leaving your current space. CommandTab Plus solves this by changing ⌘+Tab to only show you the apps in your current space. This app has made a considerable improvement in my productivity since I can more easily…

JetRockets 

How to blur a screen in React Navigation

Awesome Ruby Newsletter 

💎 Issue 168 - We're getting closer to releasing Jekyll 4! A new beta dropped just now. The world's #1 (static) web compiler in, yes, ruby

Ruby Weekly 

First impressions of Fullstaq Ruby, a new custom build of MRI

#462 — August 8, 2019

Read on the Web

Ruby Weekly

Runbook: A Ruby DSL for Gradual System Automation — PayPal-owned Braintree uses this to automate their deployment preflight checklists, on-call playbooks, system maintenance operations, and more. And now, you can too. A neat idea.

Patrick Blesi

First Impressions of Fullstaq Ruby — Find out how to reduce your application memory consumption with a new MRI Ruby distribution from Hongli Lai, one of the original creators of Passenger (and Ruby Enterprise Edition, which was a similar idea in the 1.8 era).

Andrey Novikov

Instantly Know When Ruby…

OmbuLabs Blog 

Vim Guide for Beginners

I will not bore you by telling you the history of Vim, and the differences between vi and Vim and all of its philosophy...

If you are interested in that, you can give it a look here.

So all you need to know is that vim is a text editor. In my opinion one of vim's strengths comes with how flexible it can be. It can be as simple or complex as you wish. It can be used to edit a simple config file on a server or you can make it a complete code editing environment.

Vim is different than any text editor you've probably used. The main idea of vim is that using the mouse in an editor is slow. You'll move around a text file using one-key shortcuts so you technically wouldn't move your hands out…

code.dblock.org | tech blog 

Take an Incremental, Agile Approach to Scheduling Your 1:1s

In my past CTO life I directly managed a VP of Engineering, who managed 2 directors, who managed 6 managers, who managed 30 or so engineers, had peer VP of Product, Head of Design, Head of Marketing, COO, CFO, 2 Heads of Business, a Head of People and a CEO. Each had at least 2-3 very important direct reports. This quickly added up to 60 people that I would have wanted to have a 1:1 with, at least once a year, 20-30 people that I needed to be talking to at least quarterly, and a dozen people that I had to talk to at least monthly. I would also get weekly pings from new hires for a 1:1 and maybe a weekly urgent, everything’s on fire, 1:1 from someone wanting to vent or to quit.

In my…

Semaphore 

Solving Real Problems with Voice Recognition, Machine Learning, and CI/CD

In this Semaphore Uncut episode, I interviewed Krzysztof Zalasa from Warsaw. Krzysztof is a developer and a customer engineer at Google Cloud, where he helps customers solve technical challenges. Today, Krzysztof brings us insider news on what’s hot in the cloud. So, if you are a cloud user (who isn’t these days?), this interview should be right up your alley.

The word on the street is that the oldest interface in the world—the human voice—is back and could prove to be the next big thing. With interest in speech recognition at an all-time high, will talking replace typing soon?

Kubernetes and the microservice pattern teamed up to help developers deploy applications faster than ever…

AkitaOnRails.com 

[Akitando] #12 - Dúvida! Devo Fazer Faculdade?

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

A eterna dúvida de "devo ou não fazer faculdade" ou "não sei se continuou ou se desisto". Existem vários ângulos diferentes pra isso, hoje vou pegar a posição dos que já escolheram a programação como carreira e explorar se deve ou não fazer faculdade e pra que ela serve.

Em outros episódios vou explorar posições diferentes como quem ainda não sabe se gosta de programação, ou aqueles que acham que devem sair pra empreender…

AkitaOnRails.com 

[Akitando] #11 - Projetos: Aprendendo a Priorizar

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Esse é um assunto que todo mundo bate cabeça, mas o básico não é tão complicado quanto parece. Em vez de complicar as coisas sem necessidade, entenda a linha geral primeiro. Esqueça processos e metodologias se ainda não entendeu a primeira coisa mais importante em qualquer projeto: priorizar as coisas!

Links:

  • AkitaOnRails: [Off-Topic] Lendo os Princípios Ágeis…
AkitaOnRails.com 

[Akitando] #10 - 9 Dicas para Palestrantes: Venda sua Caneta!

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Estamos próximos da THE CONF 2018 (21-22 Setembro) e me achei que seria um bom assunto explicar como eu encaro a produção e apresentação de palestras.

Assista para saber quais são 9 principais dicas que eu posso dar para melhorar sua apresentação.

E o que isso tem a ver com "vender uma caneta"??

Links:

  • AkitaOnRails: [Off-Topic] Dicas de Mac para Palestrantes…
AkitaOnRails.com 

[Akitando] #9 - 7 Recomendações de Shows para pessoas de Tech

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Esta semana vou testar um formato um pouco diferente, hoje quero compartilhar com vocês 7 shows que vão ao mesmo tempo entretê-los e educá-los um pouco sobre a história da computação moderna.

Alguns links pra complementar:

  • Ada Lovelace: Original and Visionary, but No Programmer (https://www.bbvaopenmind.com/en/ada-lovelace-original-and-visionary-but-no-programmer/)
  • BBC DOCUMENTARY : Calculating Ada - The Countess of…
Remote Ruby 

In Person at Southeast Ruby

Ruby on Rails Podcast 

281: Automating & Shipping Value with Sean Devine

Sean Devine returns to the podcast to discuss a new feature he just shipped (Automatic Production Incident Detection) for XBE. Brittany and Sean discuss the technical implementation, why features should be built and automating your software to use the software you've already written.

Links for this episode:

Brought to you by:

Hoefler&Co

A good font is one of the best ways to make your project stand apart. At typography.com, you'll find the work of Hoefler&Co, creators of stylish and high-performance typefaces. And…

Test Double | Our Blog 

Are you really ready for serverless?

Recently, I've noticed there's an alarming, yet subtle, trend in the industry that characterizes serverless as something you absolutely must adopt in your engineering practices.

If you're unfamiliar with serverless, I refer you to the excellent Serverless Architectures article by Mike Roberts. All of the big cloud providers (AWS, Azure, Google Cloud Platform) offer some variety of serverless products. For this post, we're specifically examining AWS Lambda to orient our discussion.

While I think some advocates for serverless mean well enough, I believe this exuberance needs to be tempered with cautious optimism. Furthermore, I think we need to start analyzing the purported benefits…

Test Double | Our Blog 

Debrief self.conference 2019.

The organizers of self.conference, held in Michigan, believe that a technical conference should present a mix of human and tech topics. Since one of the organizers is Test Double's own Amber Conville, there are usually a handful of agents in attendance.

This year's conference concluded with the announcement of selfdotorg, a nonprofit that will contain self.conference and other initiatives for tech and humans.

Here's what we had to say about self.conference 2019:

Brittany Moore (twitter)

In the keynote titled Mid-Career Survival Tips for POC, Byron Woodfork offers advice for mid-career developers of color to find mentorship, keep progressing in their careers, and get paid what they deserve.…

All Ruby Podcasts by Devchat.tv 

RR 424: Documenting Your Code

Sponsors

Panel

  • David Kumira

  • Nate Hopkins

  • Andrew Mason

Episode Summary

Today the panel is talking about documentation. They begin by discussing what documentation is, where it fits within an application, and if the code documents itself. They agree that documentation starts in the comments to explain what you’re doing, but if that’s your exclusive method, then a refactor is in order. They talk about where to start with documentation and different ways they’ve done it. 

The panel talks about the importance of documentation, especially for people just joining a team. In addition to documenting the project…

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

RubyWorld Conference @ Matsue, Japan - Ruby Conferences 'n' Camps Update

Conferences 'n' Camps

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

RubyWorld Conference
Nov/7+8 (2d) Thu+Fri @ Matsue, Japan • (Updates)

See all Conferences 'n' Camps in 2019».

BigBinary Blog 

Recyclable cache keys in Rails

Recyclable cache keys or cache versioning was introduced in Rails 5.2. Large applications frequently need to invalidate their cache because cache store has limited memory. We can optimize cache storage and minimize cache miss using recyclable cache keys.

Recyclable cache keys is supported by all cache stores that ship with Rails.

Before Rails 5.2, cache_key’s format was {model_name}/{id}-{update_at}. Here model_name and id are always constant for an object and updated_at changes on every update.

Rails 5.1

>> post = Post.last

>> post.cache_key
=> "posts/1-20190522104553296111"

# Update post
>> post.touch

>> post.cache_key
=> "posts/1-20190525102103422069" # cache_key changed

In Rails…

The Bike Shed 

208: Goldilocks and the Three Monitors

On this week's episode, Chris and Steph weigh-in on curved monitors, discuss how pairing improves productivity and team morale, and respond to two listener questions inquiring what makes Rails successful and new project nerves.

Vote for us for 'Best Dev' Podcast in this year's Noonie Awards.

Ruby – AWS Developer Blog 

Introducing the ‘aws-rails-provisioner’ gem developer preview

AWS is happy to announce that the aws-rails-provisioner gem for Ruby is now in developer preview and available for you to try!

What is aws-rails-provisioner?

The new aws-rails-provisioner gem is a tool that helps you define and deploy your containerized Ruby on Rails applications on AWS. It currently only supports AWS Fargate.

aws-rails-provisioner is a command line tool using the configuration file aws-rails-provisioner.yml to generate AWS Cloud Development Kit (CDK) stacks on your behalf. It automates provisioning AWS resources to run your containerized Ruby on Rails applications on AWS Fargate with a few commands. It can also generate a CI/CD AWS CodePipeline pipeline for your…

Why use aws-rails-provisioner?

Moving a local Ruby on Rails…

Honeybadger Developer Blog 

What if I called FLUSHALL on your Redis instance? 😱

At Honeybadger, we use Redis a lot. It's our Swiss Army Knife; it's a cache, a single source of truth, it stores background jobs, and more. Basically, Redis is one of those services that should never fail.

I was pondering the DevOps apocalypse recently, as one does (could Redis be one of the four horsemen?), which led me to jump into our #ops channel to ask Ben a simple question:

josh [13:58]
what are the risks if someone executed flushall on our redis instances?

Ben [13:58]
you just gave me a micro heart attack

josh [13:59]
rofl
Sorry :)
I didn’t do it, for the record

Ben [14:00]
all kinds of badness would happen... the job queues would be flushed, there would be a potential for…

Don't worry, Ben recovered after a few hours, and is mostly back…

RubyGuides 

How to Use The Ruby Uniq Method To Remove Duplicates

With the uniq method you can remove ALL the duplicate elements from an array.

Let’s see how it works!

If you have an array like this one:

n = [1,1,1,2,3,4,5]

Where the number 1 is duplicated.

Calling uniq on this array removes the extra ones & returns a NEW array with unique numbers.

Example:

n.uniq

# [1,2,3,4,5]

Notice that uniq won’t change n (the original array), so we need to either call uniq!, or to save the new array.

Example:

unique_numbers = n.uniq

Pretty easy, right?

But a lot of people don’t know that uniq takes a block.

With a block, you can do more advanced things.

Let me explain…

How to Use Ruby Uniq Method With A Block

When you call uniq, it works by making a hash out…

Drifting Ruby Screencasts 

Working with Large Data

When database tables get large, things can slow down significantly. In this episode, we look at a few things which helps keep databases performant and the client side responsive.
Martian Chronicles, Evil Martians’ team blog 

Speeding up Go Modules for Docker and CI

Author: Sergey Ponomarev, Team Lead at Evil Martians

Finally, the Golang world has a built-in, conventional dependency manager in the ecosystem: Go Modules. What began in Go 1.11 as an opt-in feature has become widely adopted by the community, and we are so close to Go 1.13 when Go Modules will be enabled by default. The delightful dilemma of choosing the “best” tool can be finally resolved.

I can’t help but mention two features which are very close to my heart:

  • No more $GOPATH imprisonment! In my years of experience, I’d gotten used to storing everything I work on in ~/Projects/ and its subfolders somewhere in the home directory, no matter the programming language. So, being forced to…
Jekyll • Simple, blog-aware, static sites 

Jekyll 4.0.0.pre.beta1 Released

Dear Jekyllers,

It’s time for another pre-release of Jekyll 4! 🎉

This pre-release moves us further down the path of releasing Jekyll 4.0.0. All the same goodies from the last pre-release are here, along with a few more things I want to highlight:

Jekyll 4.0 is a new major version and it comes with a few breaking changes, notably :

  1. We dropped support for Ruby 2.3 which EOL at the end of March 2019. GitHub Pages runs Ruby 2.5.x, services like Netlify or Forestry already upgraded to latest Ruby 2.6.x.
  2. link tag now include relative_url filter, hurray no more need to prepend {{ site.baseurl }} .
  3. {% highlight %} now behaves like {% raw %}, so you can no longer use include tags within.

If you’re a plugin developer, we still need your feedback! Your plugin may not work with version 4 and we’d like to fix those issues before we release.

Checkout the complete changelog for more details.

To test this pre version run:

gem install jekyll --pre

Justin Collins' Blugh 

Reviving an HP 660LX in 2019

It started off as a joke…

I had spent some time several years ago trying to get Linux running on this machine via the (defunct) JLime project, so I had some of the pieces available to actually get this little “pocket computer” going again - mainly compatible CompactFlash cards and an external card reader. But I was mostly joking.

Then I starting thinking how funny it would be to actually sit in a talk and take notes at DEF CON on an ancient “laptop”…

Battery Power

The reason I was mostly joking is because the batteries in the 660LX were not working at all. So,…

Test Double | Our Blog 

Debrief self.conference 2019.

The organizers of self.conference, held in Michigan, believe that a technical conference should present a mix of human and tech topics. Since one of the organizers is Test Double's own Amber Conville, there are usually a handful of agents in attendance.

This year's conference concluded with the announcement of selfdotorg, a nonprofit that will contain self.conference and other initiatives for tech and humans.

Here's what we had to say about self.conference 2019:

Brittany Moore (twitter)

In the keynote titled Mid-Career Survival Tips for POC, Byron Woodfork offers advice for mid-career developers of color to find mentorship, keep progressing in their careers, and get paid what they deserve.…

AkitaOnRails.com 

[Akitando] #8 - Procure o que você Ama ... SÓ QUE NÃO!

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Mas hoje este vídeo é dedicado aos desenvolvedores de software, ou jovens em geral, que estão tão expostos a uma inundação de frases feitas que os deixam ansiosos, desmotivados, e sem saber muito bem o que fazer da vida. "Procurar o que ama".

Vamos desmistificar isso.

Links:

  • 'You've got to find what you love,' Jobs says (https://news.stanford.edu/2005/06/14/jobs-061505/)
  • A Brutal Truth About Following Your Passion and…
Scott Watermasysk 

😀 Emoji Prompt

In my shell prompt, I typically keep things very simple. Just the current folder I am in and the git branch.

iTerm 3.3 introduced a new customizable status bar. In this new status bar, you can easily view your things like your current directory as well as your current git branch. This means I can further simplify my prompt to…well, nothing really.

With this new real estate I figured I could have a bit of fun and wrote this small shell script which adds an Emoji based on the day of the week.

local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"

get_emoji_based_on_day() {
  case $(LC_ALL=-C date +%u) in
    (1) echo 👉;;
    (2) echo 👍;;
    (3) echo;;
    (4) echo 🤙;;
    (5)
AkitaOnRails.com 

[Akitando] #7 - A Controvérsia da Lerna vs ICE

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Semana passada aconteceu uma pequena controvérsia no mundo Javascript quando um colaborador do Core Team da Lerna decidiu mudar a licença de uso do projeto para proibir colaboradores de empresas como Palantir, Microsoft de usar o projeto.

Vamos entender exatamente o que significa isso.

Seguem os links para este episódio:

  • Lerna project (https://lernajs.io/)
  • Pull Request 1616: (REVERTED): Add Text to MIT License banning ICE…
JetRockets 

Stretchy header in SwiftUI

After the release of SwiftUI, many of the standard UIKit solutions have become inapplicable. On the other hand, it is now possible to give it a try and implement the familiar elements of the user interface in a declarative style. One of these elements is the stretchy header on scrolling screens.
Awesome Ruby Newsletter 

💎 Issue 167 - Stop writing "smart" code

Code with Jason 

How to deal with complex Factory Bot associations in RSpec tests

What’s the best way to handle tests that involve complex setup data? You want to test object A but it needs database records for objects B, C and D first.

I’ll describe how I address this issue but first let me point out why complex setup data is a problem.

Why complex setup data is a problem

Complex setup data can be a problem for two reasons. First, a large amount of setup data can make for an Obscure Test, meaning the noise of the setup data drowns out the meaning of the test.

Second, complex setup data can be a problem if it results in duplication. Then, if you ever need to change the setup steps, you’ll have to make the same change in multiple places.

How to cut down on duplication and…

Ruby Weekly 

Is Rails on Windows finally a pleasant experience?

#461 — August 1, 2019

Read on the Web

Ruby Weekly

Rails on Windows Is Not Just Possible.. It's Fabulous — Ruby and Rails development on Windows has been pretty frustrating for well over a decade. Microsoft’s strides to accommodate the Unix way of life via WSL2 and VS Code have changed that in a big way, says Scott Hanselman. Given how many developers have been experimenting switching from macOS to Windows 10, this is encouraging.

Scott Hanselman

ruby-prof Reaches Version 1.0 — After 14 years of development (yes, really!), version 1.0 of the high speed Ruby profiling tool is out with features like faster…

Semaphore 

Building a Successful Developer Community & the Biggest News from WWDC 2019

Apple fans and developers, rejoice! In this episode of Semaphore Uncut, we have Dave Verwer, who is best known for being the author of the legendary newsletter iOS Dev Weekly. Dave has been an iOS developer since iOS first launched.

In this episode, you’ll learn how Dave grew an iOS development newsletter into a thriving community, as well as which announcements he’s most excited about from this year’s Apple Worldwide Developers Conference (WWDC). What do the announcements say about the next 10 years of Apple development? Will iOS developers have cross-platform compatibility with Mac anytime soon? And what’s the deal with iPadOS?

Watch my full interview with Dave to find out 👇

AkitaOnRails.com 

[Akitando] #6 - 33 exemplos de projetos de ICOs e blockchains

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

FINALMENTE! Este é o último episódio da série Blockchain Week Seoul. Este episódio está BEM mais longo que o normal, mas não se preocupem, é só porque eu queria fechar o assunto o quanto antes. Eu selecionei e menciono nada menos do que 33 projetos neste vídeo, por isso ficou tão longo.

Para facilitar eu dividi este episódio em 7 grandes grupos que você pode pular de acordo com as seguintes marcações:

  1. Novas Tecnologias de…
AkitaOnRails.com 

[Akitando] #5 - Liberdade Econômica, Cripto no Brasil, e para onde aponta o futuro?

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Estamos quase lá! Penúltimo episódio da minha série sobre Seoul e as conferências de criptomoedas. Neste episódio vamos dar mais contexto sobre a principal finalidade do mundo de criptomoedas: Liberdade Econômica.

Links:

  • Spotniks (https://www.youtube.com/watch?v=TO8yBl48DTQ)
  • How Africa is Becoming China's China (https://www.youtube.com/watch?v=zQV_DKQkT8o&t=1s)
  • Hans Rosling's Factfulness…
AkitaOnRails.com 

[Akitando] #3 - Por que a Coréia do Sul é tão grande em Criptomoedas?

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Neste episódio finalmente vamos ver alguns dos assuntos que assisti na conferência Beyond Blocks Summit em Seoul. E no meio da pesquisa esbarrei com uma história muito curiosa que quero contar em mais detalhes aqui:

O que um culto xamanista e um cachorro de estimação podem ter a ver com o impeachment da presidente da Coréia do Sul e como isso pode estar relacionado com o boom das criptomoedas lá?

Este episódio ficou com a…

AkitaOnRails.com 

[Akitando] #2 - Akitando em Seoul - Parte 2

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Esta é a segunda parte da parte turística da minha viagem para Seoul em Julho de 2018. Vamos continuar de onde paramos, no topo da Nansam Tower e visitar outros lugares da cidade.

Hm, e no começo do vídeo eu achava que ainda era possível colocar annotations nos vídeos pra clicar em cima mas o YouTube tirou e eu não sabia :-) Então ficou só o card no topo mesmo, mals pela minha noobice haha

Para quem me acompanha nas redes…

AkitaOnRails.com 

[Akitando] #1 - Akitando em Seoul - Parte 1

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Este é meu episódio piloto e para iniciar quero começar relatando como foram meus 10 dias na Blockchain Week de Seoul. Neste episódio vou começar falando sobre como foi minha primeira vez visitando a cidade de Seoul.

Perdoem o reflexo da iluminação no meu óculos. Vou ajustar isso nos próximos vídeos!

Script

Anyonghaseyo! Fabio Akita o yo! Pangawoyo!

Bem vindos ao episódio piloto deste canal. Como devem ter percebido o…

JetRockets 

Migrate tags in Rails to PostgreSQL array from ActsAsTaggableOn

With a Twist 

Keep It Simple (KISS coding principle)

The app we maintain has a set of steps (currently two) a user may have to fill before moving on. One step is always shown, while the other can be disabled with a feature flag. We assume this list may grow, and even when it doesn’t, we know code is copied over to other parts of the codebase, so we better get it right early.

Our first implementation:

1
2
3
4
5
6
def supported_steps
  {
    current_medications: true,
    allergies_review: Feature.enabled?(PREVISIT_ALLERGIES),
  }.select { |_step_name, enabled| enabled }.keys
end

A suggestion during code review:

1
2
3
4
5
def supported_steps
  steps = [:current_medications]
  steps << :allergies_review if Feature.enabled?(PREVISIT_ALLERGIES)

It’s quicker to get what’s happening in the second option, and while the methods stay short, they are…

BigBinary Blog 

Rails 6 deprecates where.not working as NOR and will change to NAND in Rails 6.1

This blog is part of our Rails 6 series. Rails 6.0 was recently released.

A notable deprecation warning has been added in Rails 6 when using where.not with multiple attributes.

Before Rails 6, if we use where.not with multiple attributes, it applies logical NOR (NOT(A) AND NOT(B)) in WHERE clause of the query. This does not always work as expected.

Let’s look at an example to understand this better.

We have Post model with a polymorphic association.

Rails 5.2

>> Post.all
=> #<ActiveRecord::Relation [
#<Post id: 1, title: "First Post", source_type: "Feed", source_id: 100>,
#<Post id: 2, title: "Second Post", source_type: "Feed", source_id: 101>]>

>> Post.where(source_type: "Feed", sou…

In the last…

GoRails Screencasts 

Ruby's Array() and Array.wrap

Learn how to remove conditionals and make your code simpler and more reliable using Ruby and ActiveSupport's Array wrap methods
JetRockets 

Mistakes to Avoid When Outsourcing Web and Mobile Development

Outsourcing the development of your web or mobile application is an important business decision. If made hastily, it can cost your company a lot of time and money. Finding a reliable technology partner is never a simple task, especially in today's crowded marketplace, saturated as it is with many web and mobile development firms all claiming to offer excellent quality, low prices and outstanding customer support. In this article, I will discuss the most common mistakes made when outsourcing and how best to avoid them.
Riding Rails 

Rails 6.0.0 rc2 released

The final version of Rails 6.0 is almost ready, but before we put a pin in it, please enjoy this second release candidate. We’ve cleared all the blockers that were discovered during the first release candidate, and if nothing new and major is discovered, we’ll ship the final release in a couple of weeks.

There has been 172 commits of changes since rc1.

You can read all about what’s new in Rails 6.0.0 in the first beta announcement. From Action Mailbox to Action Text, multiple database support, parallel testing, and Webpacker handling JavaScript by default. This is a massive step forward for Rails.

This release, and all releases leading up to Rails 6.0 final, was shepherded by release…

Search Results for “ruby” – via @codeship 

Ruby on Rails Developer Series: Power of Strong APIs using JSON and Postgres Database

Reading Time: 4 minutes

Welcome to the second of four Ruby on Rails Developer Series. In this series, the goal is to outline how to strengthen your API with Postgres, how to dockerize your project and add security layers to mitigate attacks to your application. In this article, we’ll cycle through strengthening our API-based application that uses the JSON API from Active Model Serializer. Then we’ll take advantage of JSON API features.

Let’s Begin

The goal of the project has shifted and we’re now advancing our basic CRUD application into an application that allows for a user to have a to-do list. We need to be able to support showing todo cards in our iOS application – 10 cards at a time…

Blog - Saturn Flyer 

How to build a Null Object library like Mimic

If you're not familiar with the Null Object pattern, this will be an eye opener. Before I jump into Mimic, let's just get on the same page...

I've written about this idea in: Avoiding errors when forwarding to missing objects

BUT you don't need to jump off to read that. Here's a super quick explanation of a problem that could be solved with a Null Object.

You've used a method that returns an array of objects. Let's call ours gimme.

You run gimme and it shoots off to the internet or your database or somewhere and returns a collection of 3 people. Or so you think.

You want to iterate over those people and print out their names so you write some code to do it:

gimme.each { |person|
  print…
Martian Chronicles, Evil Martians’ team blog 

Lefthook: Knock your team's code back into shape

Authors: Alexander Abroskin, Back-end Developer at Evil Martians and Andy Barnov, Writer at Evil Martians. Teacher at Le Wagon

Meet Lefthook, the fastest polyglot Git hooks manager out there, and make sure not a single line of unruly code makes it into production. See how easy it is to install Lefthook, recently adopted by Discourse, Logux, and Openstax, for most common front-end and back-end environments and ensure all developers on your team can rely on a single flexible tool. And it also has emojis 🥊

Days, when a single piece of software that millions rely on was created by a single developer in an ivory tower, are long gone. Even Git, universally believed to be the brainchild of…

All Ruby Podcasts by Devchat.tv 

RR 423: The Well-Grounded Rubyist with David A. Black & Joseph Leo III

Sponsors

Panel

  • Charles Max Wood

  • Andrew Mason

With Special Guests: David A. Black and Joseph Leo III

Episode Summary

David A. Black has been a Ruby user for 19 years and has been writing books about Ruby for the last 14 years. Joseph spent 12 years in software and started the company Def Method Inc. Together, they co-authored the book The Well-Grounded Rubyist, which will soon have its third edition released. They give some of the history behind The Well-Grounded Rubyist. Joseph talks about his experience…

Ruby Magic by AppSignal 

Digging Deeper into Ruby Templating: The Parser

Today, we continue our journey into Ruby Templating. With the lexer in place, let’s move on to the next step: The parser.

Last time, we looked at string interpolation and subsequently, dived into creating our own templating language. We started by implementing a lexer that reads a template and converts it into a stream of tokens. Today, we’ll implement the accompanying parser. We will also dip our toes into a bit of language theory.

Here we go!

Abstract Syntax Trees

Let’s look back to our simple example template for Welcome to {{name}}. After using the lexer to tokenize the string, we get a list of tokens like this.

1
2
Magicbars::Lexer.tokenize("Welcome to {{name}}")
# => [[:CONTENT,…
BigBinary Blog 

Rails 6 adds support for Optimizer Hints

Rails 6 has added support to provide optimizer hints.

What is Optimizer Hints?

Many relational database management systems (RDBMS) have a query optimizer. The job of the query optimizer is to determine the most efficient and fast plan to execute a given SQL query. Query optimizer has to consider all possible query execution plans before it can determine which plan is the optimal plan for executing the given SQL query and then compile and execute that query.

An optimal plan is chosen by the query optimizer by calculating the cost of each possible plans. Typically, when the number of tables referenced in a join query increases, then the time spent in query optimization grows…

The Bike Shed 

207: Very-Bad, Or Just Normal-Bad?

On this week's episode, Steph and Chris discuss a handful of utilities that help with their workflows and GitHub, and then dive into a handful of ActiveRecord, SQL, and postgres-related topics. They discuss safe vs unsafe migrations when dealing with larger volumes of data, adding an index safely in migration without downtime, and bringing postgres enums into Rails.

Vote for us for 'Best Dev Podcast' in this year's Noonie Awards.

This episode of The Bike Shed is sponsored by Indeed Prime

RubyMine Blog 

RubyMine 2019.2 Released: Faster Debugger, Ruby 2.7, Rails 6, and Much More

RubyMine 2019.2

RubyMine 2019.2 is now released!  Visit the What’s new page for a detailed overview of the new v2019.2, or check out the highlights below:

Debugger

  • The debugger is significantly faster
  • Investigate every method or block on a line with Smart Step Into
  • Set breakpoints at blocks

Debugger

Ruby 2.7

  • Support for pattern matching
  • Support for numbered block parameters

Ruby 2.7 pattern matching

Rails 6

  • Action Mailbox support
  • Enum support including the new negative scopes

Rails 6 Action Mailbox

YARD

  • Support for @overload and @yieldparam tags
  • Across-the-board improvements

YARD @yieldparam

Factory Bot

  • Rename and Safe Delete refactorings for factories, sequences, and traits
  • Added factories, sequences, and traits in the File Structure view and popup

Factory bot rename refactoring

Shell scripts

Code with Jason 

How do you tell which areas of a project’s test suite need attention?

A client of mine recently asked: “How do you determine, when first opening a project, which areas of testing need attention?”

There are three methods I use for determining what areas of a test suite need attention: 1) looking at the test suite code for “test smells”, 2) asking the team “where it hurts”, and 3) actually working directly with the project.

Looking at the code for “test smells”

Just as there are code smells, there are test smells. The book xUnit Test Patterns: Refactoring Test Code (which I highly recommend) has a list of test smells in the back. Some of these smells are detectible by looking at the code. Some of them can only be found experientially. Here are some that can be…

Code with Jason 

How to get a team to get behind an engineering project

A client of mine recently asked: “What’s the best way to get a team behind a future refactor/architecture goal that hasn’t happened yet?”

This is a great question. Before I answer how to do this successfully, let me point out three certain ways to fail in this endeavor. Then I’ll share the key to giving an idea its best shot at success.

Three ways to fail to get a team behind an engineering project

The effort fails because the project was a genuinely bad idea

I mention this just to get the obvious out of the way: bad ideas often fail and they of course ought to fail. Even though this scenario isn’t necessarily a happy one, there’s nothing unjust about it.

The effort fails because it was…

RubyGuides 

Ruby Infinity: How It Works & Why It Matters

What is infinity in Ruby?

It’s something that has a starting point but no ending.

In Ruby, we can express this concept of infinity with the Float::INFINITY constant.

You may be wondering how this is useful.

Let me explain with examples!

Infinity As A Result Of Arithmetic Operations

Ruby returns an Infinity object, as the result of certain math operations.

For example:

You may be familiar with the “division by zero” error.

Here it is:

1/0
# ZeroDivisionError: divided by 0

But…

If you use a float, you get something else:

1/0.0
# Infinity

Infinity!

But that’s not all.

If you try a division of 0 by 0.0, then you get another special value.

Take a look:

0/0.0
# NaN

What is this NaN?

It…

With a Twist 

Using logs to power up your Rails development workflow

When working on Rails applications, I find tailing the development log and watching it as I navigate through pages very useful. Some of the questions that should be in the back of your mind while looking at it are:

  • Am I hitting the right URL, with the proper HTTP method?
  • Am I sending the right parameters? (Are they all necessary?)
  • Are there any warnings/exceptions that I should handle?
  • Does the ORM generate the right SQL statements?
  • Is my request taking a longer time than expected?
  • Am I making unnecessary 3rd party API requests?

The first three questions have relatively more straightforward answers, and I won’t expand on them in this article.

The first two are not necessarily bad…

JetRockets 

Request Api Adapter

Andy Croll 

Consider Value Objects

In your applications, you’ll often find yourself creating a range of view helpers around the same concept, constructing complex calculation methods, or passing a value (or several) around multiple methods.

When this happens a simple object, smaller than an Active Record model, is trying to reveal itself.

In these cases, consider refactoring the functionality into a “Value Object”, as described by Martin Fowler:

A small simple object, like money or a date range, whose equality isn’t based on identity.

Instead of…

…just using a helper:

def css_color(r, g, b)
  "##{r.to_s(16)}#{g.to_s(16)}#{b.to_s(16)}"
end

Use…

…an extracted “Value Object” to truly capture the concept your…

Ruby on Rails Podcast 

280: Past Rubies, Google Pay and Turbolinks!

Brittany and Nick host another catchup episode. They chat about Nick's Past Rubies project, Brittany's implementation of Google Pay in Rails and why Turbolinks can be awesome!

Links for this episode:

Brought to you by:

Indeed Prime

Indeed Prime is a confidential, free service that puts you in front of leading brands and tech startups with roles you're interested in. So whether…

Test Double | Our Blog 

Defining good work.

What does it mean to do good work?

I recently encountered this question at a content creation workshop during a brainstorming session. This particular question brought me up short because I didn't have an answer. As someone who until recently could have been considered a "junior" or early career developer, I have a pretty good read on what good work looks like after the fact: successful projects, raises, and career opportunities. But looking back, I often struggle to pinpoint what about _my_ work generated those results.

What does it mean for me to do good work?

A couple of weeks ago I asked my manager that question and she promptly rattled off a list of stuff. Just like that, without even…

Remote Ruby 

Joined by Ernesto Tagwerker

The Thoughtnotes | Ruby 

Updating Rails: where’s a memcache gone?

Can you imagine that updating a Rails version may become a real chase for performance? Keep reading to know the whole story.

The first try

Things started to go weird one morning when I have deployed my pull-request updating Rails version from 5.0 to 5.1 (tested both locally and on staging environment) to production. Everything went pretty well in terms of functionality until I discovered that the application works slower and slower as the request rate increases. I decided to take a break and rolled back to the previous release.

Here’s how the NewRelic’s application performance chart looked like:

NewRelic chart

As we can see, Ruby code execution time and Postgres requests time have grown…

Awesome Ruby Newsletter 

💎 Issue 166 - Ruby on Whales: Dockerizing Ruby and Rails development (the exhaustive Docker config for Ruby/Rails apps)