Alberto Almagro
Alberto Almagro
  • Видео 40
  • Просмотров 19 192
The 7 most common reasons for having flaky tests in Ruby on Rails
Flaky tests is one of the most annoying things developers must deal with, but what are they? And most importantly, how can you get rid of them?
In this video you will learn what are flaky tests and also the 7 most common reasons for having them in Ruby on Rails, together with suggestions on how to fix them! 💎
The contents of the video are:
1. Intro (00:00)
2. What are flaky tests? (00:17)
3. Checking for array equality when ordering is not guaranteed (01:07)
4. Capybara tests that check an element that takes too long to load (02:22)
5. Explicitly setting IDs (03:52)
6. Expecting the database to create a predictable ID (05:12)
7. Time dependent tests (06:53)
8. Depending on requests to third party s...
Просмотров: 251

Видео

TDD in Ruby on Rails made easy
Просмотров 2,4 тыс.2 года назад
Everyone is talking about TDD these days... do you use TDD? In this video you will learn what is TDD and how to use it in Ruby on Rails with a practical code example. It's easier than you think! 💎 The contents of the video are: 1. Intro (00:00) 2. What is TDD? (00:11) 3. Code example: TDD applied to Rails (00:50) 4. Outro (15:31) THANK YOU FOR WATCHING! 🙌 Please do not forget to smash the like ...
How to do migrations with confidence in Ruby on Rails
Просмотров 3252 года назад
Modifying the database schema used to be one of the most complicated tasks a software developer had to do back in the day. Thankfully ActiveRecord migrations simplified this a lot. However, even with this great tool, you need to learn how to use it properly. In this video you will learn a tool that will help you to do migrations with confidence in Ruby on Rails. 💎 The contents of the video are:...
How to write readable specs in RSpec: The Four Phase test pattern
Просмотров 5422 года назад
Sometimes people go too far with the DRY mantra in RSpec. Abusing let, before and other RSpec constructions can make very difficult to understand what is being tested by just looking at a test example alone. In this video we first discuss the problem and then I present you the Four-Phase test pattern alternative that I use to achieve great test readability. The contents of the video are: 1. Int...
My strategy to add tests on a budget to a poorly tested app
Просмотров 1252 года назад
My strategy to add tests on a budget to a poorly tested app
Learn when to use Background jobs in Ruby on Rails and best practices 💎
Просмотров 1 тыс.2 года назад
Learn when to use Background jobs in Ruby on Rails and best practices 💎
Rails helpers: How to use them right
Просмотров 1,1 тыс.2 года назад
Rails helpers: How to use them right
How to keep your data confidential with Active Record Encryption
Просмотров 4422 года назад
How to keep your data confidential with Active Record Encryption
Persist encrypted passwords in Rails with has_secure_password
Просмотров 4022 года назад
Persist encrypted passwords in Rails with has_secure_password
Rack Attack! Block and throttle abusive requests in Rails
Просмотров 1,1 тыс.2 года назад
Rack Attack! Block and throttle abusive requests in Rails
Does Ruby support multiple inheritance?
Просмотров 2982 года назад
Does Ruby support multiple inheritance?
Adding indexes in Ruby on Rails with NO downtime
Просмотров 9112 года назад
Adding indexes in Ruby on Rails with NO downtime
How to use Explain in Ruby on Rails
Просмотров 6472 года назад
How to use Explain in Ruby on Rails
How to use include, prepend and extend in Ruby
Просмотров 1,2 тыс.2 года назад
How to use include, prepend and extend in Ruby
Decorator pattern, the Ruby way
Просмотров 9592 года назад
Decorator pattern, the Ruby way
[EN] 3 things you must know about Ruby's bang methods (!)
Просмотров 3323 года назад
[EN] 3 things you must know about Ruby's bang methods (!)
[ES] Las 3 cosas que deberías saber sobre los métodos bang (!) en Ruby
Просмотров 1093 года назад
[ES] Las 3 cosas que deberías saber sobre los métodos bang (!) en Ruby
[EN] Tutorial: How to create an extension for Spree Commerce
Просмотров 5913 года назад
[EN] Tutorial: How to create an extension for Spree Commerce
[ES] Tutorial: Cómo crear una extensión para Spree Commerce
Просмотров 2343 года назад
[ES] Tutorial: Cómo crear una extensión para Spree Commerce
[ES] ¡He creado una extensión para Spree Commerce! Te muestro cómo funciona
Просмотров 1343 года назад
[ES] ¡He creado una extensión para Spree Commerce! Te muestro cómo funciona
[EN] I created a Spree Commerce extension! Let's check it out
Просмотров 1753 года назад
[EN] I created a Spree Commerce extension! Let's check it out
Service Objects en Ruby on Rails, como me gustan a mi
Просмотров 5263 года назад
Service Objects en Ruby on Rails, como me gustan a mi
Service Objects in Ruby on Rails, as I see them
Просмотров 2,2 тыс.3 года назад
Service Objects in Ruby on Rails, as I see them

Комментарии

  • @nainabulbule6617
    @nainabulbule6617 4 месяца назад

    Thanks for the video

  • @crisnahine1570
    @crisnahine1570 7 месяцев назад

    I love to do whenever

  • @crisnahine1570
    @crisnahine1570 7 месяцев назад

    Thank you Alberto. upload more please. thank you!

  • @appcolab
    @appcolab 8 месяцев назад

    I am curious, can spree work as a multi store e-commerce platform? I am looking for something were users can create stores with different designs.. something like Shopify. Thanks for the video

  • @bishoy437
    @bishoy437 8 месяцев назад

    What do you think of view_components vs helpers

  • @kirindev
    @kirindev 11 месяцев назад

    thank you.

  • @kirindev
    @kirindev 11 месяцев назад

    thank you

  • @默-c1r
    @默-c1r Год назад

    Thanks! Very helpful!

  • @erezbens
    @erezbens Год назад

    Thanks

  • @LeFavs
    @LeFavs Год назад

    I’m glad I found your channel!! I was having trouble to understand some topics about Rails and you manage to make them easy and straightforward. Thanks for sharing!🙌🏻✨

    • @alberto_almagro
      @alberto_almagro Год назад

      Thank you so much! Is there any topic you wish a video about?

    • @LeFavs
      @LeFavs Год назад

      @@alberto_almagro Well, now I’m trying to implement a service to make api call. A video about working with rest api and rails would be very useful 😁

  • @sanila2011
    @sanila2011 Год назад

    great tutorial

  • @devnoon571
    @devnoon571 Год назад

    According to Rubocop, It's better to use subject (:biller) { described.new(order) } and call it in examples as an exercise like: biller.invoice

  • @rickbacker1
    @rickbacker1 Год назад

    Good job! Thank you, it was helpful!

  • @rickbacker1
    @rickbacker1 Год назад

    Thank you for your video, it was helpful!

  • @JosePerez-zr7tx
    @JosePerez-zr7tx Год назад

    Excellent and vast explanation! 👍👍

  • @raulvegaruelas8948
    @raulvegaruelas8948 Год назад

    Thank you for share 👍

  • @arielbrusa3903
    @arielbrusa3903 Год назад

    thanks for the wise advise, it's very useful

  • @JessicaJonas21
    @JessicaJonas21 Год назад

    Great video, thanks!

  • @khaledibrahim96
    @khaledibrahim96 Год назад

    Perfect, Thank you

  • @vd1587
    @vd1587 Год назад

    Thanks a lot for this awesome video! 👍

  • @pablo_fernandez
    @pablo_fernandez Год назад

    Thank you for the info! Flaky tests can be so freaking annoying!

    • @alberto_almagro
      @alberto_almagro Год назад

      True thing! One of the most annoying things developers must deal with. Thanks for watching and commenting!

  • @azizdevfull
    @azizdevfull Год назад

    amazing : )

  • @nelsondias1226
    @nelsondias1226 Год назад

    Very good! Precious information.

  • @marianograziano3595
    @marianograziano3595 Год назад

    Alberto, muy buenos tus videos de Ruby. Un comentario, el link a tu eccomerce en la descripción de este video está mal. Saludos!

    • @alberto_almagro
      @alberto_almagro Год назад

      ¡Mil gracias Mariano por hacérmelo saber! Se ve que la RUclips interpretaba los paréntesis que envolvían la URL como parte de ella. Ya está solucionado. ¡Muchas gracias de nuevo y muchas gracias por ver mis vídeos!

  • @abdu5822
    @abdu5822 Год назад

    Great video. I really like your explanation and simplicity. If possible i'd love to see Hotwire series + project. Thanks man!

    • @alberto_almagro
      @alberto_almagro Год назад

      Thank you Abdu for watching and commenting! Noted your suggestions for future videos ✅

  • @BraisonsCrece
    @BraisonsCrece 2 года назад

    An interesting topic in my opinion would be to talk and explain about the most difficult queries you have seen in your career as a developer. And on the other hand, the most conflicting types of relationships between models. I always wonder... how far can things get too complicated? 🤔🤯

    • @alberto_almagro
      @alberto_almagro 2 года назад

      Thank you Braison! Most of the time you deal with easy relationships. Sometimes things get complicated, but frameworks are typically designed to support most common use cases. That means that if what you are dealing with is a typical scenario chances are that ActiveRecord has built something for that.

    • @BraisonsCrece
      @BraisonsCrece 2 года назад

      Nice, thanks for the reply. 👏

    • @alberto_almagro
      @alberto_almagro 2 года назад

      @@BraisonsCrece my pleasure 🙏

  • @BraisonsCrece
    @BraisonsCrece 2 года назад

    Very interesting Alberto, thanks again for sharing.

  • @BraisonsCrece
    @BraisonsCrece 2 года назад

    thanks! very useful! pity I didn't know about it before

    • @alberto_almagro
      @alberto_almagro 2 года назад

      At least from now on you can create Rails projects in any version you have installed 😉

  • @BraisonsCrece
    @BraisonsCrece 2 года назад

    Very interesting, thank's for sharing! 👏

    • @alberto_almagro
      @alberto_almagro 2 года назад

      My pleasure Brais! Happy to be helpful 🙏

  • @kirk7784
    @kirk7784 2 года назад

    Nice work! Love seeing TDD content

  • @ollimacgja
    @ollimacgja 2 года назад

    These are also called ternary ifs

  • @islambahnas
    @islambahnas 2 года назад

    so easy Thanks!

  • @EmmetGibney
    @EmmetGibney 2 года назад

    In Rails guides it says not to commit your master key. Is it safe to store this in your environment variables on Heroku for example?

    • @alberto_almagro
      @alberto_almagro 2 года назад

      Hi Emmet! You are right, you should not commit your master key to keep it safe. As you say, a good alternative is to store it as an ENV variable with the key RAILS_MASTER_KEY, provided that you keep access to it safe. Other alternatives are Hashicorp Vault and AWS Secrets Manager.

  • @EnjoytheMents
    @EnjoytheMents 2 года назад

    Thank you so much this helped me finally understand tdd testing with rails. Please make more of it!

    • @alberto_almagro
      @alberto_almagro 2 года назад

      Yay!! 👏 I’m so happy that it helped you!! Thanks for letting me know 🙏

  • @pierrequintero9484
    @pierrequintero9484 2 года назад

    Great Video !!! thanks for your great tutorials,, are you planning a video series building a RoR project from scratch? , greetings!!!

    • @alberto_almagro
      @alberto_almagro 2 года назад

      Thank you so much Pierre! I'm actually writing a book on Rails API development in which I'll guide you writing a Rails API from scratch... but I wasn't thinking about a video series... 🤔 Which kind of project would you like me to build? Cheers!

  • @aboozarrajabi4740
    @aboozarrajabi4740 2 года назад

    Bravo for getting out of your comfort zone! And just a point about the video. I didn't like how you removed 'call' and defined different methods for 'daily', 'monthly', ... statistics. In fact, I think it's better to follow 'single responsibility' here as well and dedicate your service to a single task. This way you can call the class name 'monthly', 'daily', ... and it gonna be clear what it does! Also, it helps your code to be clean, following best practices and easier to write the tests. If these 'daily', 'monthly', ... statistic service objects sharing the same behaviour or using the same logics, you can inherit them from a main class for sure. Let me know please what do you think.

    • @alberto_almagro
      @alberto_almagro 2 года назад

      Thank you Aboozar and also thank your for sharing your point of view 🙏 I believe that way people can see that there are different possibilities and then make the best choice for them. Regarding SRP in the example I would say that the single responsibility of that service is to create reports... although now that I think more about it I probably should have named that class Report... something instead of StatisticsGatherer 🤔😆

  • @samgomez1460
    @samgomez1460 2 года назад

    Wonderful video Alberto, it was super helpful! 🙂

    • @alberto_almagro
      @alberto_almagro 2 года назад

      Thank you for your kind words Sam! I'm very happy to know that it helped you 🙏

  • @phanta5m
    @phanta5m 2 года назад

    Nice explanation. So basicly makes pattern to write our code is better than forcing clean code

    • @alberto_almagro
      @alberto_almagro 2 года назад

      Thank you Ryan! I am happy that you liked it! 🙏

  • @martinarce8138
    @martinarce8138 2 года назад

    Q guay tus vídeos. Molan! Mil gracias. Podrías hacer alguno de como hacer el deploy de las aplicaciones?

    • @alberto_almagro
      @alberto_almagro 2 года назад

      Me alegro de que te gusten Martín! Muchas gracias por verlos y por sugerirme un nuevo tema 🙏 Te gustaría deploy de aplicaciones a Heroku? Planeo desplegar una en las próximas semanas que valdría para el vídeo

  • @BraisonsCrece
    @BraisonsCrece 2 года назад

    Jeje

  • @ciscolegrand
    @ciscolegrand 2 года назад

    nice!!! good explanation! i think about it

  • @JuanVqz
    @JuanVqz 2 года назад

    Interesting! I knew AAA, Arrange, Act, Assert, which is “the same” as The Fourt-Phase but didn’t hear about it before. Thanks for sharing! Adiós 👋

    • @alberto_almagro
      @alberto_almagro 2 года назад

      Didn't know that way of calling it Juan! Thank you so much for mentioning it 😊 Adiós!! 😉

  • @juanjoseriveracastano24
    @juanjoseriveracastano24 2 года назад

    🔝🔝🔝

  • @AzharKalamazhar
    @AzharKalamazhar 2 года назад

    :full_name is what?

    • @alberto_almagro
      @alberto_almagro 2 года назад

      Thank you for watching! That is a symbol 💎

  • @tiagolelinskimarin4242
    @tiagolelinskimarin4242 2 года назад

    Good video! Thanks!

  • @juanfernandovilladiegomade9423
    @juanfernandovilladiegomade9423 2 года назад

    Grande bro!!!

  • @corentindiard3544
    @corentindiard3544 2 года назад

    Hello, Just a question for the PostHelper example. Used a decorator method would be better for this example no ?

    • @alberto_almagro
      @alberto_almagro 2 года назад

      Hello Corentin! Thank you for watching and commenting! 🙏 You could use decorators (like presenters) but I honestly think a helper is better than the decorator in this example since this is all display logic which is one of the use cases of Rails helpers.

  • @remotronic
    @remotronic 2 года назад

    👍

  • @adrianvalenzuelacodesstuff67
    @adrianvalenzuelacodesstuff67 2 года назад

    Really good content

    • @alberto_almagro
      @alberto_almagro 2 года назад

      Thank you for your kind words Adrian 🙏

  • @CharlesDv
    @CharlesDv 2 года назад

    Podrías hacer un video de resumen sobre la construcción de gemas para Spree o diferencias con Solidus?

    • @CharlesDv
      @CharlesDv 2 года назад

      Olvida el comentario, ya vi el otro video. Gracias de nuevo.

    • @alberto_almagro
      @alberto_almagro 2 года назад

      @@CharlesDv Perfecto! Te iba a comentar que lo tienes aquí 😊 ruclips.net/video/yNTn6Pc_KV8/видео.html