Baeldung.com is yet another publishing site in which I have published one article. It is a technical article related to a few ways of iterating over Java streams with indices.
Software engineering and personal development
Baeldung.com is yet another publishing site in which I have published one article. It is a technical article related to a few ways of iterating over Java streams with indices.
Developers may feel they do not have that much creativity when it comes to use random words as arguments, or values for many fields. For example, if we have some test cases when we are creating a new instance of a Book object, chances are that we will assign ‘book’ to this object’s title, which does not seem that much interesting. We code because it is something that gives us pleasure, and getting help with these types of difficulties can be helpful. Fortunately, there is a Ruby gem called Faker that generates random fake value that you can use in your tests.
When you select multiple column values using pluck method of ActiveRecord, you usually get an array of arrays. If you want to get an array of hashes with column names as hash keys, you can use this useful Gem called pluck_to_hash.
© 2024 Fatos Morina
Theme by Anders Noren — Up ↑