<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: RubyCademy</title>
    <description>The latest articles on DEV Community by RubyCademy (@rubycademy).</description>
    <link>https://dev.to/rubycademy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1039135%2F4535154a-b42b-48b1-9cc2-8d1d5bd00ad0.jpg</url>
      <title>DEV Community: RubyCademy</title>
      <link>https://dev.to/rubycademy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rubycademy"/>
    <language>en</language>
    <item>
      <title>How Learning Ruby Helped Me Succeed in My Agency</title>
      <dc:creator>RubyCademy</dc:creator>
      <pubDate>Sun, 01 Dec 2024 17:29:38 +0000</pubDate>
      <link>https://dev.to/rubycademy/how-learning-ruby-helped-me-succeed-in-my-agency-igp</link>
      <guid>https://dev.to/rubycademy/how-learning-ruby-helped-me-succeed-in-my-agency-igp</guid>
      <description>&lt;p&gt;A few years ago, I was running my agency with four clients at the same time.&lt;/p&gt;

&lt;p&gt;On paper, it sounded great—steady projects, different challenges, and a growing business.&lt;/p&gt;

&lt;p&gt;But the reality? It was very intense. Managing meetings, deliverables, and deadlines was already a full-time job. On top of that, I also had to handle the technical work—coding, debugging, and deploying—which made everything even more complicated.&lt;/p&gt;

&lt;p&gt;Luckily, I had spent years learning advanced Ruby concepts, techniques, and patterns. More importantly, I knew how to combine these tools to create simple and effective solutions. This skillset became my superpower, allowing me to deliver results quickly and with confidence, no matter how tight the deadline or how complex the request.&lt;/p&gt;

&lt;p&gt;That is the beauty of Ruby—it is a language designed to help developers focus on solving problems, not on repetitive code. With the knowledge I had built over the years, I could automate repetitive tasks, simplify complex requirements, and deliver maintainable code quickly.&lt;/p&gt;

&lt;p&gt;The technical side of my work was no longer a burden; it became a source of confidence and clarity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This change in my approach is one of the main reasons I created &lt;a href="https://www.rubycademy.com" rel="noopener noreferrer"&gt;RubyCademy&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I wanted to help other developers learn this skillset—mastering advanced Ruby techniques and understanding how to apply them in real-world situations. I know how important it is when your technical skills allow you to take control of your work, face challenges with confidence, and succeed under pressure.&lt;/p&gt;

&lt;p&gt;If you are managing multiple clients or projects and feeling the pressure, remember: investing in your skills is the most valuable thing you can do.&lt;/p&gt;

&lt;p&gt;With the right knowledge and tools, you can turn the technical side of your work from a source of stress into a strength. Let Ruby be the foundation that helps you achieve more with less effort—and enjoy the process along the way.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://www.rubycademy.com" rel="noopener noreferrer"&gt;rubycademy.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>freelance</category>
    </item>
    <item>
      <title>12 Best Practices to ABSOLUTELY Destroy Your Codebase! 🧨</title>
      <dc:creator>RubyCademy</dc:creator>
      <pubDate>Fri, 01 Sep 2023 12:40:01 +0000</pubDate>
      <link>https://dev.to/rubycademy/12-best-practices-to-absolutely-destroy-you-codebase-57b</link>
      <guid>https://dev.to/rubycademy/12-best-practices-to-absolutely-destroy-you-codebase-57b</guid>
      <description>&lt;h3&gt;
  
  
  Are you tired of writing clean, maintainable code?
&lt;/h3&gt;

&lt;p&gt;&lt;br&gt;Do you yearn for spaghetti code that's impossible to debug?&lt;/p&gt;

&lt;p&gt;Well, you're in luck!&lt;/p&gt;

&lt;p&gt;Today, we're going to explore the 12 best practices that will &lt;strong&gt;ABSOLUTELY&lt;/strong&gt; destroy your codebase.&lt;/p&gt;

&lt;p&gt;Let's dive right in and wreak some havoc!&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Never Test Your Code
&lt;/h4&gt;

&lt;p&gt;&lt;br&gt;Testing is for cowards who are afraid of bugs.&lt;/p&gt;

&lt;p&gt;Avoid writing tests for your code. Skip unit tests, integration tests, and end-to-end tests, making it difficult to catch and fix bugs.&lt;/p&gt;

&lt;p&gt;Just push your code directly to production and let your users be your testers. They'll appreciate the surprise. 🎁&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Overcomplicate Your Models
&lt;/h4&gt;

&lt;p&gt;&lt;br&gt;Who needs simple, straightforward models when you can create complex, convoluted ones? &lt;/p&gt;

&lt;p&gt;Nest your models inside other models, and throw in a few circular references for good measure.&lt;/p&gt;

&lt;p&gt;Also, create monolithic models with hundreds of methods and attributes.&lt;/p&gt;

&lt;p&gt;This makes your models hard to maintain and understand.&lt;/p&gt;

&lt;p&gt;And that's exactly what your team wants to deal with on a daily basis!&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Mix Business Logic with Views
&lt;/h4&gt;

&lt;p&gt;&lt;br&gt;Embed complex business logic within your view templates, making it challenging to test and maintain.&lt;/p&gt;

&lt;p&gt;After all, who doesn't love a good code puzzle, where the solution is hidden amidst layers of views, partials, and tangled logic?&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Never Write Documentation
&lt;/h4&gt;

&lt;p&gt;&lt;br&gt;Documentation is for losers who want their code to be understandable.&lt;/p&gt;

&lt;p&gt;Assume that everyone will understand your code intuitively.&lt;/p&gt;

&lt;p&gt;Why waste time writing comments, READMEs, and API documentation? Let the code speak for itself, even if it's speaking gibberish.&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Reinvent the Wheel
&lt;/h4&gt;

&lt;p&gt;&lt;br&gt;The framework has a ton of built-in features and libraries that can make your life easier. &lt;/p&gt;

&lt;p&gt;IGNORE THEM!&lt;/p&gt;

&lt;p&gt;Write your own authentication system, ORM, and routing framework. You'll definitely do it better. 💪&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  6. Monolithic Everything
&lt;/h4&gt;

&lt;p&gt;&lt;br&gt;Modularization is for the weak. Why break your application into small, manageable pieces when you can have one giant monolithic codebase?&lt;/p&gt;

&lt;p&gt;The more dependencies, the better!&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  7. Nest Routes Excessively
&lt;/h4&gt;

&lt;p&gt;&lt;br&gt;Create deeply nested routes with many levels of resources.&lt;/p&gt;

&lt;p&gt;This can lead to routing confusion and performance issues.&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  8. Don't Bother with Version Control
&lt;/h4&gt;

&lt;p&gt;&lt;br&gt;Git? Who needs it?&lt;/p&gt;

&lt;p&gt;Just keep all your code on your local machine. It's not like you'll ever need to collaborate with others or roll back to a previous version.&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  9. Use Global Variables Everywhere
&lt;/h4&gt;

&lt;p&gt;&lt;br&gt;Why pass parameters when you can make everything a global variable?&lt;/p&gt;

&lt;p&gt;It's a fantastic way to introduce hidden dependencies and make your code impossible to test.&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  10. Forget About Naming Conventions
&lt;/h4&gt;

&lt;p&gt;&lt;br&gt;Who needs conventions when you can name your variables and methods with a random assortment of characters?&lt;/p&gt;

&lt;p&gt;Let's keep our fellow developers guessing and make sure no one understands our code.&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  11. Refactor Only When It's Too Late
&lt;/h4&gt;

&lt;p&gt;&lt;br&gt;If it ain't broke, don't fix it, right?&lt;/p&gt;

&lt;p&gt;Wait until your codebase becomes an unmaintainable mess, and then attempt a massive refactor all at once. What could possibly go wrong?&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  12. Hardcode Everything
&lt;/h4&gt;

&lt;p&gt;&lt;br&gt;Constants, dynamic configurations, and environment variables are for amateurs.&lt;/p&gt;

&lt;p&gt;Hardcode all your configuration settings and magic numbers directly in your code. Changing them will be a breeze!&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;So there you have it, 12 best practices guaranteed to turn your codebase into an unrecognizable disaster!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Of course, this blog post is intended purely for humorous purposes, and we hope you'll do the opposite of these suggestions in your actual development work.&lt;/p&gt;

&lt;p&gt;Building maintainable, clean code is the way to go, so make sure to follow best practices and keep your codebase healthy and happy. Happy coding!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  About Us
&lt;/h4&gt;

&lt;p&gt;You can follow us on &lt;a href="https://www.x.com/RubyCademy"&gt;x.com&lt;/a&gt; as we're very active on this platform. Indeed, we post elaborate code examples every day.&lt;/p&gt;

&lt;p&gt;Additionally, subscribe to RubyCademy if you aim to become a Ruby Ninja 🥷!&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://www.rubycademy.com"&gt;RubyCademy&lt;/a&gt;&lt;/p&gt;



&lt;center&gt;💚&lt;/center&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>coding</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>2 Critical Elements of the Rubyist Mindset</title>
      <dc:creator>RubyCademy</dc:creator>
      <pubDate>Mon, 17 Jul 2023 08:07:56 +0000</pubDate>
      <link>https://dev.to/rubycademy/2-critical-elements-of-the-rubyist-mindset-219o</link>
      <guid>https://dev.to/rubycademy/2-critical-elements-of-the-rubyist-mindset-219o</guid>
      <description>&lt;p&gt;In the realm of programming, a daunting battlefield awaits, demanding mastery of complex problem-solving and vast technical expertise.&lt;/p&gt;

&lt;p&gt;But behold, within the Ruby programming world, a distinct mindset reigns supreme – the &lt;strong&gt;Rubyist mindset&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This mindset exalts simplicity, elegance, and the sheer ecstasy of coding.&lt;/p&gt;

&lt;p&gt;Join us on this blog post as we delve into the core principles of the Rubyist mindset.&lt;/p&gt;

&lt;h2&gt;
  
  
  Embracing Simplicity
&lt;/h2&gt;

&lt;p&gt;Rubyists believe in the power of simplicity when writing code.&lt;/p&gt;

&lt;p&gt;The following example demonstrates how Ruby allows us to express complex ideas in a concise and readable manner&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Calculate the sum of all even numbers between 1 and 10&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="ss"&gt;:even?&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;sum&lt;/span&gt; &lt;span class="c1"&gt;# =&amp;gt; 30&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In just one line of code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;we create a range of numbers from &lt;code&gt;1&lt;/code&gt; to &lt;code&gt;10&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;select&lt;/code&gt; only the &lt;code&gt;even&lt;/code&gt; numbers&lt;/li&gt;
&lt;li&gt;and calculate their &lt;code&gt;sum&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This code showcases Ruby's expressive syntax and the ability to chain methods together, resulting in clear and readable code.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Joy of Programming
&lt;/h2&gt;

&lt;p&gt;Rubyists find joy and fulfillment in coding, considering it a creative endeavor.&lt;/p&gt;

&lt;p&gt;Let's consider a simple example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;module&lt;/span&gt; &lt;span class="nn"&gt;PasswordGenerator&lt;/span&gt;
  &lt;span class="no"&gt;CHARS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sc"&gt;?A&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="sc"&gt;?Z&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;to_a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sc"&gt;?a&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="sc"&gt;?z&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;to_a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sc"&gt;?1&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="sc"&gt;?9&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;to_a&lt;/span&gt; &lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;freeze&lt;/span&gt;

  &lt;span class="kp"&gt;module_function&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="no"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="no"&gt;CHARS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sample&lt;/span&gt; &lt;span class="p"&gt;}.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="no"&gt;PasswordGenerator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;     &lt;span class="c1"&gt;# =&amp;gt; "9w6VAlO8"&lt;/span&gt;
&lt;span class="no"&gt;PasswordGenerator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# =&amp;gt; "r6945143BH"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This Ruby code defines a module called &lt;code&gt;PasswordGenerator&lt;/code&gt; that generates random passwords.&lt;/p&gt;

&lt;p&gt;It includes a constant &lt;code&gt;CHARS&lt;/code&gt;, which represents a frozen array containing &lt;code&gt;uppercase&lt;/code&gt; letters, &lt;code&gt;lowercase&lt;/code&gt; letters, and numbers from &lt;code&gt;1&lt;/code&gt; to &lt;code&gt;9&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This module defines a single module function called &lt;code&gt;generate&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;generate&lt;/code&gt; method takes an optional parameter &lt;code&gt;length&lt;/code&gt;, which defaults to &lt;code&gt;8&lt;/code&gt; if no argument is provided.&lt;/p&gt;

&lt;p&gt;The method then generates a new array of length &lt;code&gt;length&lt;/code&gt; using the &lt;code&gt;Array.new&lt;/code&gt; method.&lt;/p&gt;

&lt;p&gt;For each element in the new array, a random character is sampled from the &lt;code&gt;CHARS&lt;/code&gt; array using the &lt;code&gt;sample&lt;/code&gt; method.&lt;/p&gt;

&lt;p&gt;Finally, the resulting array is joined together into a single string and returned as the generated password.&lt;/p&gt;

&lt;p&gt;Rubyists take pleasure in writing clean and concise code that achieves the desired outcome.&lt;/p&gt;

&lt;p&gt;The joy of programming lies in the ability to solve problems creatively and produce solutions that are both functional and elegant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;By adopting the Rubyist mindset, programmers can enhance their coding experience and produce clean, elegant, and maintainable code.&lt;/p&gt;

&lt;p&gt;So, whether you're a Rubyist or not, incorporating the principles of simplicity, joy, and collaboration into your programming practice can transform the way you approach and experience coding, ultimately leading to better solutions and a more enjoyable programming journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  To go further
&lt;/h2&gt;

&lt;p&gt;You can follow us on &lt;a href="https://www.x.com/RubyCademy"&gt;x.com&lt;/a&gt; as we're very active on this platform. Indeed, we post elaborate code examples every day.&lt;/p&gt;

&lt;p&gt;Additionally, we're currently finalizing our first online course: &lt;strong&gt;Ruby Mastery&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Join the list for an exclusive release alert! 🔔&lt;br&gt;&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://www.rubycademy.com"&gt;Ruby Mastery by RubyCademy&lt;/a&gt;&lt;/p&gt;



&lt;center&gt;💚&lt;/center&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Embrace the Power of Ruby: A Programming Superhero</title>
      <dc:creator>RubyCademy</dc:creator>
      <pubDate>Thu, 06 Jul 2023 10:47:26 +0000</pubDate>
      <link>https://dev.to/rubycademy/ruby-is-a-multi-paradigm-programming-language-2690</link>
      <guid>https://dev.to/rubycademy/ruby-is-a-multi-paradigm-programming-language-2690</guid>
      <description>&lt;p&gt;If programming languages were 🦹‍♀️ &lt;strong&gt;superheroes&lt;/strong&gt; 🦸‍♂️, Ruby would be the master of adaptability.&lt;/p&gt;

&lt;p&gt;It fluently switches between paradigms like a skilled shape-shifter, empowering developers to solve problems using different programming styles, be it object-oriented elegance or functional simplicity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this post, we'll cover the different programming paradigms present in Ruby.&lt;/p&gt;

&lt;p&gt;But first, let's have a quick reminder of what is a paradigm.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a paradigm?
&lt;/h2&gt;

&lt;p&gt;From Wikipedia:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In science and philosophy, a paradigm is a distinct set of concepts or thought patterns, including theories, research methods, postulates, and standards for what constitutes legitimate contributions to a field.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Let's have a look at the Object-Oriented Programming paradigm in to see a concrete example of what is a programming paradigm.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  OOP in Ruby
&lt;/h2&gt;

&lt;p&gt;This paradigm is composed of the following concepts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;objects and attributes&lt;/li&gt;
&lt;li&gt;data encapsulation&lt;/li&gt;
&lt;li&gt;data access control&lt;/li&gt;
&lt;li&gt;methods&lt;/li&gt;
&lt;li&gt;data manipulation via &lt;code&gt;this&lt;/code&gt; or &lt;code&gt;self&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;class as type&lt;/li&gt;
&lt;li&gt;first-class objects&lt;/li&gt;
&lt;li&gt;etc...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In Ruby, all these concepts are present as built-in features.&lt;/p&gt;

&lt;p&gt;These are considered the backbone of the language.&lt;/p&gt;

&lt;p&gt;As a result, Ruby is fundamentally tied to the Object-Oriented Programming paradigm.&lt;/p&gt;

&lt;p&gt;Cool!&lt;/p&gt;

&lt;p&gt;Now that we grasp the concept of programming paradigms, let's examine the range of paradigms that can be linked to Ruby, depending on its language features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Programming Paradigms in Ruby
&lt;/h2&gt;

&lt;p&gt;Here, we'll discuss 3 programming paradigms Ruby can handle:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;the Procedural programming paradigm&lt;/li&gt;
&lt;li&gt;the Functional programming paradigm&lt;/li&gt;
&lt;li&gt;the Generic programming paradigm&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Procedural programming paradigm
&lt;/h3&gt;

&lt;p&gt;This paradigm is based on the concept of procedure calls.&lt;/p&gt;

&lt;p&gt;In computer programming, a procedure is mainly assimilated into a function.&lt;/p&gt;

&lt;p&gt;A function - in opposition to a method - is defined from outside classes.&lt;/p&gt;

&lt;p&gt;So, a procedure call can be seen as a function call.&lt;/p&gt;

&lt;p&gt;In Ruby, functions don't exist.&lt;/p&gt;

&lt;p&gt;But we can create methods outsides of classes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nb"&gt;self&lt;/span&gt; &lt;span class="c1"&gt;# =&amp;gt; main&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;procedure1&lt;/span&gt;
  &lt;span class="s2"&gt;"I'm processing stuff.."&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;procedure2&lt;/span&gt;
  &lt;span class="s2"&gt;"I'm processing another thing.."&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;procedure1&lt;/span&gt; &lt;span class="c1"&gt;# =&amp;gt; "I'm processing stuff.."&lt;/span&gt;
&lt;span class="n"&gt;procedure2&lt;/span&gt; &lt;span class="c1"&gt;# =&amp;gt; "I'm processing another thing.."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;procedure1&lt;/code&gt; and &lt;code&gt;procedure2&lt;/code&gt; are defined from outside classes.&lt;/p&gt;

&lt;p&gt;Then we call these methods procedurally.&lt;/p&gt;

&lt;p&gt;In fact, these methods are still defined within an object: the &lt;code&gt;main&lt;/code&gt; object.&lt;/p&gt;

&lt;p&gt;This way to use Ruby is popular among the DevOps community.&lt;/p&gt;

&lt;p&gt;Indeed, they often need to build scripts to interact with the systems they use.&lt;/p&gt;

&lt;h3&gt;
  
  
  The functional programming paradigm
&lt;/h3&gt;

&lt;p&gt;In the OOP paradigm, everything turns around objects.&lt;/p&gt;

&lt;p&gt;In the functional programming paradigm, everything turns around functions.&lt;/p&gt;

&lt;p&gt;There are 3 main concepts around functional programming:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pure&lt;/strong&gt; functions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Higher-Order&lt;/strong&gt; functions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;First-Class&lt;/strong&gt; functions&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Pure functions
&lt;/h4&gt;

&lt;p&gt;A &lt;strong&gt;pure&lt;/strong&gt; function is a function that always produces the same output for a given input&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;pure_method&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;obj&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;pure_method&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="c1"&gt;# =&amp;gt; 4&lt;/span&gt;
&lt;span class="n"&gt;pure_method&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="c1"&gt;# =&amp;gt; [42, 42]&lt;/span&gt;
&lt;span class="n"&gt;pure_method&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'a'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# =&amp;gt; "aa"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;pure_method&lt;/code&gt; always returns the result of the object passed as an argument, times &lt;code&gt;2&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For a given input, the output will always be the same.&lt;/p&gt;

&lt;p&gt;By intent, the functional programming paradigm is strongly related to the concept of &lt;code&gt;pure&lt;/code&gt; functions – as side effects are the enemies of this programming paradigm.&lt;/p&gt;

&lt;h4&gt;
  
  
  Higher-order functions
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Higher-Order&lt;/strong&gt; functions are functions that can take a function as an argument or return a function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;
&lt;span class="n"&gt;add&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;          &lt;span class="c1"&gt;# =&amp;gt; 2&lt;/span&gt;
&lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Bon'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'jour'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# =&amp;gt; "Bonjour"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the &lt;code&gt;process&lt;/code&gt; method takes an object that responds to &lt;code&gt;call&lt;/code&gt; — a &lt;code&gt;proc&lt;/code&gt; or a &lt;code&gt;lambda&lt;/code&gt; for example — and passes &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; to &lt;code&gt;call&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;As it’s impossible to pass a method as an argument of another method, then we use a &lt;code&gt;proc&lt;/code&gt; to bypass this issue.&lt;/p&gt;

&lt;h4&gt;
  
  
  First-Class functions
&lt;/h4&gt;

&lt;p&gt;A programming language that proposes &lt;strong&gt;Higher-Order&lt;/strong&gt; functions can be defined as a &lt;strong&gt;First-Class&lt;/strong&gt; function programming language.&lt;/p&gt;

&lt;p&gt;Ruby is not a &lt;strong&gt;First-Class&lt;/strong&gt; object programming language.&lt;/p&gt;

&lt;p&gt;But we can use &lt;code&gt;lambda&lt;/code&gt;s and &lt;code&gt;proc&lt;/code&gt;s to elegantly simulate the behavior of a function passed as an argument.&lt;/p&gt;

&lt;h3&gt;
  
  
  Generic programming paradigm
&lt;/h3&gt;

&lt;p&gt;Definition of Generic programming paradigm from Wikipedia:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Algorithms and methods are written in terms of types to be specified later that are then instantiated when needed for specific types provided as parameters.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ruby dynamic typing coupled with the Duck Typing design already provides all the necessary tools to apprehend Ruby as a generic programming language&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;obj2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;obj1&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;obj2&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;         &lt;span class="c1"&gt;# =&amp;gt; true&lt;/span&gt;
&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'bbb'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'aaa'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# =&amp;gt; true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the &lt;code&gt;gt&lt;/code&gt; method expects to receive 2 &lt;strong&gt;comparable&lt;/strong&gt; objects as an argument.&lt;/p&gt;

&lt;p&gt;The method doesn’t depend on the type of argument.&lt;/p&gt;

&lt;p&gt;So this method is generic and can be used for any kind of comparable objects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Ruby, is a fully Object-Oriented programming language. But it also cherry-picks — and implements — concepts from other programming paradigms.&lt;/p&gt;

&lt;p&gt;This approach allows Ruby developers to use this language in a wide variety of applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Eager to learn more about Ruby
&lt;/h3&gt;

&lt;p&gt;You can follow us on &lt;a href="https://www.x.com/RubyCademy"&gt;x.com&lt;/a&gt; as we're very active on this platform. Indeed, we post elaborate code examples every day.&lt;/p&gt;

&lt;p&gt;Additionally, we're currently finalizing our first online course: &lt;strong&gt;Ruby Mastery&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Join the list for an exclusive release alert! 🔔&lt;br&gt;&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://www.rubycademy.com"&gt;Ruby Mastery by RubyCademy&lt;/a&gt;&lt;/p&gt;



&lt;center&gt;💚&lt;/center&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>programming</category>
      <category>coding</category>
    </item>
    <item>
      <title>Your journey as a mid-level Ruby on Rails developer</title>
      <dc:creator>RubyCademy</dc:creator>
      <pubDate>Sun, 18 Jun 2023 14:31:18 +0000</pubDate>
      <link>https://dev.to/rubycademy/your-journey-as-a-mid-level-ruby-on-rails-developer-49if</link>
      <guid>https://dev.to/rubycademy/your-journey-as-a-mid-level-ruby-on-rails-developer-49if</guid>
      <description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;You have been a Ruby on Rails developer for a couple of years.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can finish a ticket from A to Z with a little technical help.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You want to strengthen your Ruby/Rails knowledge and skills.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Get on board and let's sail beyond the horizon.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🌊⛵️🏴‍☠️ &lt;/p&gt;

&lt;h2&gt;
  
  
  This little voice
&lt;/h2&gt;

&lt;p&gt;You have probably written enough lines of Ruby to feel that you are in your comfort zone!&lt;/p&gt;

&lt;p&gt;That's great. But this little voice makes you feel uncomfortable about your stagnation.&lt;/p&gt;

&lt;p&gt;So you probably started to dedicate a part of your time to learning new things: a little bit of StimulusJS, a little bit of ActiveRecord, etc...&lt;/p&gt;

&lt;p&gt;You feel like you're not making significant progress.&lt;/p&gt;

&lt;p&gt;No worries! You are actually in the right mindset!&lt;/p&gt;

&lt;p&gt;The only thing you need is &lt;strong&gt;guidance&lt;/strong&gt;! 🧭&lt;/p&gt;

&lt;h2&gt;
  
  
  🗺️ Your Treasure map
&lt;/h2&gt;

&lt;p&gt;To become a better Rubyist you must take a month (or two) to learn the main concepts of OOP in Ruby.&lt;/p&gt;

&lt;p&gt;Here is an exhaustive list of key concepts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Ruby Object Model&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Ancestor Chain&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Method Lookup Path&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ruby Hook Methods&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Eigenclass&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Private &amp;amp; protected + message handling&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What are modules&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The super keyword in Ruby&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The yield keyword in Ruby&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once you've grasped these fundamental concepts, your coding confidence is bound to soar.&lt;/p&gt;

&lt;p&gt;You'll approach your code with newfound assurance and expertise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your next step
&lt;/h2&gt;

&lt;p&gt;In both our "Ruby for Beginners" and "Advanced Ruby" courses, as well as our 4 mini-projects, we cover the essential concepts and advanced techniques discussed in this blog post.&lt;/p&gt;

&lt;p&gt;Our mini-projects are structured as production-ready gems, giving you a true taste of how professional Ruby projects are organized.&lt;/p&gt;

&lt;p&gt;This isn’t just another collection of examples—you’ll gain practical skills that you can apply immediately.&lt;/p&gt;

&lt;p&gt;Let RubyCademy be your guide on the path to mastering Ruby, helping you save valuable time and accelerate your learning.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://www.rubycademy.com" rel="noopener noreferrer"&gt;https://www.rubycademy.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Voilà!&lt;/p&gt;



&lt;center&gt;💚&lt;/center&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Unlearn programming to learn Ruby</title>
      <dc:creator>RubyCademy</dc:creator>
      <pubDate>Mon, 29 May 2023 09:31:42 +0000</pubDate>
      <link>https://dev.to/rubycademy/unlearn-programming-to-learn-ruby-2ke</link>
      <guid>https://dev.to/rubycademy/unlearn-programming-to-learn-ruby-2ke</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Ruby is a different programming language for at least 2 reasons:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The language is very permissive&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Indeed, most languages are restrictive. They create constraints for developers for their "safety".&lt;/p&gt;

&lt;p&gt;On the other hand, Ruby is a permissive language backed by a set of design principles (duck typing, etc.).&lt;/p&gt;

&lt;p&gt;The decision to follow these design principles (or not) is the responsibility of the developer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The vocabulary of the language is human-friendly&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In most programming languages, the language is seen as an intermediary between the machine and the developer.&lt;/p&gt;

&lt;p&gt;In Ruby, the language is apprehended as a way for the developer to express ideas in a human-friendly way - The famous &lt;strong&gt;Developer Happiness First&lt;/strong&gt; adage.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Ok. So, how about slightly reshaping your way of thinking when using Ruby to enable your full potential?&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The way Ruby responds to a problem
&lt;/h2&gt;

&lt;p&gt;When the Ruby Core Team implements a feature, it's always focused on developer usability. That's why the language seems so natural to use&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;list_cart&lt;/span&gt; &lt;span class="k"&gt;unless&lt;/span&gt; &lt;span class="vi"&gt;@cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;include?&lt;/span&gt; &lt;span class="s1"&gt;'pineapple'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we can read this code as follows:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;List the content of the cart unless the cart includes a pineapple.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this statement, Ruby provides 3 tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the &lt;code&gt;unless&lt;/code&gt; keyword&lt;/li&gt;
&lt;li&gt;the one-liner syntax&lt;/li&gt;
&lt;li&gt;the &lt;code&gt;include?&lt;/code&gt; method&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All these tools can be combined to provide a natural syntax close to what your mind can express to solve this problem. I guess you get the point here.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So, why do we need to unlearn programming to learn Ruby?&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn to unlearn programming
&lt;/h2&gt;

&lt;p&gt;It's exaggerated... You don't need to "unlearn" programming.&lt;/p&gt;

&lt;p&gt;Because Ruby implements all the tools and concepts of &lt;strong&gt;CompSci&lt;/strong&gt;. I want you to focus more about learning to "think" like a Rubyist and not like a developer.&lt;/p&gt;

&lt;p&gt;In general, a developer adapts his way of thinking to a given program to respond to certain constraints imposed by the programming language.&lt;/p&gt;

&lt;p&gt;So this adds layers between the &lt;strong&gt;developer's thoughts&lt;/strong&gt;, the &lt;strong&gt;code&lt;/strong&gt;, and the final program.&lt;/p&gt;

&lt;p&gt;Conversely, Ruby tends to remove the barrier between &lt;strong&gt;developer thoughts&lt;/strong&gt; and the &lt;strong&gt;code&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now let's see how to reshape your way of thinking. To do so, there is a simple exercise that you can quickly implement:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try to transcribe your thoughts into Ruby code.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For instance, how would you write the code for the following need in Ruby?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When the user receives a message then we send an email to this user.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Another way to express this need would be:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Send an email to the user if the user receives a message.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Keep your focus on the statement - and not the methods and objects you need to define for this statement.&lt;/p&gt;

&lt;p&gt;For instance, I didn't define &lt;code&gt;list_cart&lt;/code&gt; and &lt;code&gt;@cart&lt;/code&gt; in the previous section.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;list_cart&lt;/span&gt; &lt;span class="k"&gt;unless&lt;/span&gt; &lt;span class="vi"&gt;@cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;include?&lt;/span&gt; &lt;span class="s1"&gt;'pineapple'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is in a second time that I will define the content of the methods and variables that I need for this sentence.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Feel free to let a comment to share your way to express this need!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Ruby is a different programming language. The Core team genuinely believes in developer happiness. It allows you to express your thoughts as close as possible to human language.&lt;/p&gt;

&lt;p&gt;That's why you should tend to learn and use the tools provided by the language as much as possible to transcribe your thoughts into Ruby code.&lt;/p&gt;

&lt;p&gt;You don't have as many constraints as most programming languages. So take advantage of what Ruby gives you!&lt;/p&gt;

&lt;h2&gt;
  
  
  Eager to learn more about Ruby?
&lt;/h2&gt;

&lt;p&gt;You can follow us on &lt;a href="https://www.x.com/RubyCademy"&gt;x.com&lt;/a&gt; as we're very active on this platform. Indeed, we post elaborate code examples every day.&lt;/p&gt;

&lt;p&gt;Additionally, we're currently finalizing our first online course: &lt;strong&gt;Ruby Mastery&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Join the list for an exclusive release alert! 🔔&lt;br&gt;&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://www.rubycademy.com"&gt;Ruby Mastery by RubyCademy&lt;/a&gt;&lt;/p&gt;



&lt;center&gt;💚&lt;/center&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>programming</category>
      <category>paradigms</category>
    </item>
  </channel>
</rss>
