<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Levelingup on Medium]]></title>
        <description><![CDATA[Stories by Levelingup on Medium]]></description>
        <link>https://medium.com/@levelingupweekly?source=rss-278103051dd2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lHXfnjmRIzyyIK0v2MGvKQ.png</url>
            <title>Stories by Levelingup on Medium</title>
            <link>https://medium.com/@levelingupweekly?source=rss-278103051dd2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 15:30:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@levelingupweekly/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Leveling Up Weekly: Ruby on Rails — Issue #7]]></title>
            <link>https://medium.com/@levelingupweekly/leveling-up-weekly-ruby-on-rails-issue-7-89db4a667745?source=rss-278103051dd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/89db4a667745</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Levelingup]]></dc:creator>
            <pubDate>Sat, 18 Dec 2021 15:07:02 GMT</pubDate>
            <atom:updated>2021-12-18T15:07:02.348Z</atom:updated>
            <content:encoded><![CDATA[<h3>Leveling Up Weekly: Ruby on Rails — Issue #7</h3><p>I started this newsletter to help junior and mid-level engineers level up their skills in my favorite framework — Ruby on Rails. Each week, I will hand pick resources with the purpose of delivering you interesting and easily digestible material.</p><p>If you have enjoyed reading this newsletter, please share with friends!</p><p>If you have any feedback, please email me at levelingupweekly@gmail.com</p><p><strong>**News**</strong> I am going to start offering 1-on-1 coaching sessions starting at $20 for 30 minutes. You may use this time however you please — we can discuss a project you’re working on, brainstorm app ideas, prep for an engineering job, problems you’re stuck on, work-related issues, etc.</p><p>👉 <a href="https://calendly.com/jeffcoh23">https://calendly.com/jeffcoh23</a></p><h3>Content</h3><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*gsVMDscEoDyD6R7I" /></figure><p><a href="https://rubyonrails.org/2021/12/15/Rails-7-fulfilling-a-vision?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Ruby on Rails — Rails 7.0: Fulfilling a vision</strong></a><strong> — </strong><a href="https://rubyonrails.org/2021/12/15/Rails-7-fulfilling-a-vision"><strong>rubyonrails.org</strong></a></p><p><strong>Announcement</strong>: The moment we’ve all been waiting for — the Rails 7 release! This post discusses the changes, the vision, and some key highlights including the <em>new </em>JavaScript approach and encrypted attributes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*tJaM0P2d7rAuxs1_" /></figure><p><a href="https://rubyonrails.org/?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Ruby on Rails — Homepage</strong></a><strong> — </strong><a href="https://rubyonrails.org/"><strong>rubyonrails.org</strong></a></p><p><strong>Homepage:</strong> One of the best things I did early in my career was sit down and read the Rails documentation front to back. I learned an incredible amount, was no longer fuzzy about how all of the pieces worked together, and even learned a few new tips and tricks. The Homepage just received a really nice visual update that added some much needed organization.</p><h4><a href="https://www.youtube.com/watch?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter&amp;v=mpWFrUwAN88">Rails 7: The Demo</a></h4><p><a href="https://www.youtube.com/watch?v=mpWFrUwAN88">www.youtube.com</a></p><p><strong>Demo: </strong>To wrap up the Rails 7 release, DHH published a Build A Blog video using all the new tools and updates. If you’ve never seen him do a screencast, it is worth the watch — I feel inspired every time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*XOWwZYIa02Le3F9_" /></figure><p><a href="https://frontdeveloper.pl/2021/12/4-tips-on-how-to-make-more-out-of-sidekiq/?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>4 tips on how to make more out of Sidekiq</strong></a><strong> — </strong><a href="https://frontdeveloper.pl/2021/12/4-tips-on-how-to-make-more-out-of-sidekiq/"><strong>frontdeveloper.pl</strong></a></p><p>Sidekiq is a background job processor that is a very common choice for Rails developers. It is relatively simple to implement, but can get very complicated to manage and scale, and even more complicated to debug. These 4 excellent tips will help you manage your Sidekiq jobs while sleeping at night.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*pp92bOij-O_Vfny4" /></figure><p><a href="https://buttercms.com/blog/graphql-vs-rest-api?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>GraphQL vs Rest API: A Quick Comparative Guide</strong></a><strong> — </strong><a href="https://buttercms.com/blog/graphql-vs-rest-api"><strong>buttercms.com</strong></a></p><p>A newer approach to backend development, GraphQL has slowly become more popular in the Rails ecosystem. This article explains and compares a traditional REST API vs GraphQL.</p><h4><a href="https://rails.new/?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">From New Mac to Rails Development in 11 Minutes</a></h4><p><a href="https://rails.new/">rails.new</a></p><p>Install Ruby on Rails on macOS in 11 minutes with Bullet Train’s automated installation script. This is a pretty cool project and certainly a help for newbies. I will be following along to see what else they add.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*ZjwKEB6z_aNRv0WL" /></figure><p><a href="https://blog.kiprosh.com/rails-7-brings-import-maps-into-the-limelight/?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Rails 7 brings Import Maps into the limelight</strong></a><strong> — </strong><a href="https://blog.kiprosh.com/rails-7-brings-import-maps-into-the-limelight/"><strong>blog.kiprosh.com</strong></a></p><p>“Rails 7 puts forward an alternative approach to bundling JS called Import Maps. Read this blog to find out more about it.” Import Maps is an important step in simplifying the JavaScript approach as it relies on ES Modules to help keep your JavaScript configurations minimal and simple.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*Rr8iyXnxuD6UALE9" /></figure><p><a href="https://salonimehta27.medium.com/action-cable-chatapp-with-react-hooks-69d5d55c7475?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Action Cable ChatApp with React hooks </strong></a><strong>— </strong><a href="https://salonimehta27.medium.com/action-cable-chatapp-with-react-hooks-69d5d55c7475"><strong>salonimehta27.medium.com</strong></a></p><p>While it is not often advertised, you can use Action Cable outside of Rails. React and other frameworks support WebSockets, which allows you to use Action Cable with them. Check out this tutorial to see how to build a simple chat app using both Rails and React.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*M_2IotPB71Hud1_R" /></figure><p><a href="https://rubyrogues.com/3-fundamental-pillars-you-need-to-succeed-as-an-entrepreneur-bonus?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Ruby Rogues: 3 Fundamental Pillars You Need to Succeed as an Entrepreneur</strong></a><strong> — </strong><a href="https://rubyrogues.com/3-fundamental-pillars-you-need-to-succeed-as-an-entrepreneur-bonus"><strong>rubyrogues.com</strong></a></p><p>“Mani has summarized hundreds of business books that outline how to build, grow, and operate a business and he shares his expertise with Chuck and the listeners in this special episode.”</p><p>Not necessarily Rails based, but this is a good listen for those who are thinking about building their own software company!</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*TJMj_0GgU1Cwkhxo" /></figure><p><a href="https://medium.com/@levelingupweekly/what-ive-learned-through-countless-software-engineering-interviews-3f0e2c2dbd78?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>What I’ve Learned Through Countless Software Engineering Interviews</strong></a><strong> — </strong><a href="https://medium.com/@levelingupweekly/what-ive-learned-through-countless-software-engineering-interviews-3f0e2c2dbd78"><strong>medium.com</strong></a></p><p>I wrote this article a while ago with an accompanying Twitter thread. Both write-ups outline how best to go about getting a new job and both are still getting a lot of engagement!</p><h3>Tweet Of The Week</h3><h3>Resources</h3><p><em>Disclaimer: All recommendations are from resources I have personally read and recommend! However, I may receive a small percentage of the sale proceeds as an affiliate marketer for some of the resources below.</em></p><p><a href="https://www.amazon.com/HTML-CSS-Design-Build-Websites/dp/1118008189?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>HTML and CSS: Design and Build Websites: Duckett, Jon</strong></a><strong> — </strong><a href="https://www.amazon.com/HTML-CSS-Design-Build-Websites/dp/1118008189"><strong>www.amazon.com</strong></a></p><p>Learning the fundamentals of HTML and CSS is vital for any web developer regardless of framework. Jon Duckett’s book is an excellent primer for CSS and HTML and was vital in giving me a strong frontend knowledge base.</p><p><a href="https://www.amazon.com/Practical-Object-Oriented-Design-Agile-Primer/dp/0134456475?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Practical Object-Oriented Design: An Agile Primer Using Ruby: Metz, Sandi</strong></a><strong> — </strong><a href="https://www.amazon.com/Practical-Object-Oriented-Design-Agile-Primer/dp/0134456475"><strong>www.amazon.com</strong></a></p><p>The second edition of a classic for any Ruby developer. Sandi Metz uses the Ruby language to explain proper object-oriented programming which Ruby is ideal for.</p><p><a href="https://www.amazon.com/Ruby-Rails-Tutorial-Addison-Wesley-Professional/dp/0136702651?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Ruby on Rails Tutorial (Addison-Wesley Professional Ruby Series): Hartl, Michael</strong></a><strong> — </strong><a href="https://www.amazon.com/Ruby-Rails-Tutorial-Addison-Wesley-Professional/dp/0136702651"><strong>www.amazon.com</strong></a></p><p>Michael Hartl, founder of “Learning Enough”, is a highly regarded author who has numerous books on Ruby, Rails, Git, the Command Line, among many others. I have read a few of his books (including this one) and they are all top notch.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89db4a667745" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Next Job: What Size Company Should You Choose?]]></title>
            <link>https://medium.com/@levelingupweekly/your-next-job-what-size-company-should-you-choose-ddd470a244c8?source=rss-278103051dd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddd470a244c8</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[rails]]></category>
            <dc:creator><![CDATA[Levelingup]]></dc:creator>
            <pubDate>Mon, 13 Dec 2021 20:00:26 GMT</pubDate>
            <atom:updated>2021-12-13T20:00:26.181Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ogNUg1KbGDWry3Fkk-lgg.jpeg" /></figure><p><strong><em>Note</em></strong><em>: I run a weekly newsletter to help junior to mid-level Ruby on Rails developers level up their skills! </em><a href="https://www.getrevue.co/profile/levelingupweekly?via=twitter-card-webview"><em>https://www.getrevue.co/profile/levelingupweekly</em></a></p><h3>Overview</h3><p>One of the most underrated and overlooked aspects of choosing your next job is deciding on the size of the company you want to work for. There are massive differences in how small vs. large companies operate that will greatly impact your growth trajectory, general happiness, and learning opportunities. In my experience, smaller startups provide a more comprehensive learning experience, while larger companies offer a more comfortable and potentially lucrative option. The remainder of this article is dedicated to breaking down the differences between the two and will arm you with most of the necessary information to make your next move.</p><h3>Learning</h3><p><strong>Small Company</strong></p><p>One of the greatest benefits of working at a smaller company is your growth trajectory in terms of learning. You will get more direct hands-on experience dealing with time-sensitive bugs, bigger projects for you to individually work on, and dealing with a variety of stakeholders including project managers, the CTO, and other important players in the company. You will also see firsthand the successes and pitfalls of your experience as your team scrambles (and potentially struggles) from scaling, growing pains, choosing the right paths forward, technology/architecture decisions, among others. Some of the best learning experiences you will have comes from the chaos of working in a startup.</p><p>Right out of college I worked at a startup and was thrown somewhat into the deep end. I learned a tremendous amount working on a whole slew of projects and got experience in design, product decisions, technical choices (using React, Rails, MobX, Typescript, alerting and monitoring tools, AWS, etc.). This experience was invaluable and at times it was hard to believe I was compensated to learn so aggressively.</p><p><strong>Larger Company</strong></p><p>At a larger company, you will typically be siloed into a specific team working on one of the company’s various platforms. You could work on a team with consumer facing applications, internal facing applications, or something less visible such as infrastructure. Due to this focus, there is a greater opportunity for your learning trajectory to grow in a specific field — an example being AWS, building APIs, etc. Specializing in a specific domain can be a great path forward for some, but if you’re trying to figure out what you want to do and be a generalist, this may not be what you desire.</p><p>Working at a Fortune 100 was not a great choice for me. I worked on a very narrow scope of work and found that the company moved rather slowly, making sure every detail (e.g. monitoring and alerting, accessibility, testing, etc.) was meticulously thought out. On the flip side however, I learned how to build proper and fully-fledged out features that had minimal risk for bugs.</p><h3>Compensation</h3><p><strong>Smaller Company</strong></p><p>As a general rule of thumb, companies with fewer financial resources will compensate you less. There are certainly exceptions to the rule, but startups that have tighter budgets will naturally try to save money where they can. Your salary, benefits, and bonus will probably be lower than at a big company, but you will often have the opportunity to get equity, which in some cases, can turn into life changing money. However, it is very important to note that equity is usually given on a vesting schedule over the course of four or five years, and if this is a contributing factor to your decision, you should go into this job with the idea that you will stick around for years. Additionally, and of equal importance, is doing back-of-the-napkin math and having a realistic understanding of the equity being offered. If you are offered ~$10k worth of equity at a company with a valuation of ~$30 million, chances are that unless the company becomes a unicorn, you will not get rich. You may receive a sizable payout, but amortized over the length of your career at this company, it may not become life changing.</p><p><strong>Larger Company</strong></p><p>Larger companies have more capital to pay their employees well and typically do so. Larger companies will offer engineers bigger salaries, bonuses, and occasionally, some sort of equity to lure engineers away from more attractive startups. Companies like the FAANGs and other public companies have the ability to pay an engineer nearly double what they would make a startup. The downside of course is the lack of upside in startup equity, but this is not always the case. Companies like Peloton will offer engineers a lot of equity (or in other forms such as restricted stock units) in terms of the dollar amount and while it may not have growth multiples of a startup, it can turn into a truly sizable amount.</p><h3>Growth Opportunity</h3><p><em>Growth in this case is in terms of receiving a job promotion. An example being Associate Engineer -&gt; Senior Engineer -&gt; Principal Engineer -&gt; Management -&gt; …</em></p><p><strong>Smaller Company</strong></p><p>In my experience, smaller companies have always had fewer levels of bureaucracy — the organization chart is typically thinner with fewer levels between an engineer and a CTO than at a larger company. This can often mean that engineers can only grow to a senior level engineering position and do not have the opportunity to jump into a management role. Again, this is not a steadfast rule as the company can grow and positions such as Head of Engineering can open up allowing you to take the role.</p><p>The startup I was at after college had only two levels in the hierarchy — Engineer and CTO. The company eventually grew and named two senior engineers as VPs of Engineering, but the remainder of the engineers stayed at their level. If positions do not matter much to you, this may be a moot point.</p><p><strong>Larger Company</strong></p><p>Due to the sheer number of employees, larger companies are more keen on developing chains of command. It is not uncommon for there to be 10-20 levels between a junior level engineer and the CTO of the company. Filled in the middle are well defined roles for both individual contributors and various levels of management. If you have a desire to manage people, a larger company is well positioned to help you get there. On top of this, larger companies typically have more standardized assessments of your growth and opportunities for raising your rank.</p><p>In my experience at a Fortune 100, there were well defined guidelines for going from one level to the next. If you put in consistent time, effort, and showed strong interest in rising up, there was a clear and attainable plan for you to do so.</p><h3>Work-Life Balance</h3><p><strong>Smaller Company</strong></p><p>In their desire to attain growth, smaller companies will typically expect more output from their fewer resources. Note: Do not be fooled by the “<em>work hard, play hard</em>” selling point you will often hear from a company’s recruiting person. That phrase, or derivatives of it, typically means you will work long hours, but they will occasionally repay you by giving you a few beers on a Friday night. I learned early in my career that this was not a worthwhile trade.</p><p>In addition to typically longer hours, engineers at a startup are often expected to be more on-call. Bugs and other problems crop up at all hours of the day, and you are expected to be reachable when trouble calls. I once had to work on a car ride to my cousin’s wedding on a day that I was supposed to have off. If you heavily value your work-life balance, you should make sure you understand the company’s expectations before joining.</p><p><strong>Larger Company</strong></p><p>Due to the impact larger companies will feel if a bug gets into production, they will typically be more thorough in their development process — valuing safety and consistency over moving quickly and breaking things. Consequently, there is less of an expectation for you to be available at all hours, and while there will be deadlines, they are usually set safely to avoid rushing and sloppiness.</p><p>The hours I had at the Fortune 100 were about the same as the startup (which was very considerate with regard to work-life balance), but the main difference was that when 5pm hit at the Fortune 100, there was very little communication expected out of you. Naturally, there are exceptions to this rule, but there was a strong delineation between work time and free time.</p><h3>Conclusion</h3><p>The choice to work at a startup versus a well-established company has a lot of tradeoffs and the specific company you work for will vary in the magnitude of these tradeoffs. In short, if you are looking to grow as much as you can as an engineer, which is what I suggest if you are just getting started, you should look into joining a startup. The amount I learned in my first three years at a startup was invaluable and has set me up for success moving forward. If you feel you already have a solid technical basis and are looking for a more consistent and higher paying role, a position at a larger company may be what you’re looking for.</p><p>It goes without saying that the aforementioned comparisons are more so guidelines rather than rules and you should not make assumptions based on this article alone.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddd470a244c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leveling Up Weekly: Ruby on Rails — Issue #6]]></title>
            <link>https://medium.com/@levelingupweekly/leveling-up-weekly-ruby-on-rails-issue-6-1937376c5975?source=rss-278103051dd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/1937376c5975</guid>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Levelingup]]></dc:creator>
            <pubDate>Thu, 09 Dec 2021 22:19:59 GMT</pubDate>
            <atom:updated>2021-12-09T22:19:59.054Z</atom:updated>
            <content:encoded><![CDATA[<h3><a href="https://medium.com/p/9161bd7869bf/edit?source=your_stories_page----------------------------------------">Leveling Up Weekly: Ruby on Rails — Issue #</a>6</h3><p>New issue (#6) of Leveling Up Weekly: Ruby on Rails!</p><p><a href="https://www.getrevue.co/profile/levelingupweekly/issues/leveling-up-weekly-ruby-on-rails-issue-6-921756">https://www.getrevue.co/profile/levelingupweekly/issues/leveling-up-weekly-ruby-on-rails-issue-6-921756</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1937376c5975" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning To Learn As A Software Developer]]></title>
            <link>https://medium.com/@levelingupweekly/learning-to-learn-as-a-software-developer-9265742cab8b?source=rss-278103051dd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/9265742cab8b</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Levelingup]]></dc:creator>
            <pubDate>Tue, 07 Dec 2021 23:59:38 GMT</pubDate>
            <atom:updated>2021-12-07T23:59:38.564Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MsFqZTTwyOW7y5SeDUwfiQ.jpeg" /></figure><p>I remember pairing with a senior engineer when I was about two months into my college internship, watching him casually writing what I perceived to be a complex ActiveRecord query (<em>Ruby on Rails reference</em>), and just saying to him in awe, “how did you learn to do this?”. He laughed, and said <strong>“just a lot of practice”</strong>.</p><p>Unfortunately, and despite my firmly held belief that I could rewrite the firmly written rules in the journey of a software developer, you can’t hack your way to success. George Hotz once said, “if you want to get good at something, do it for 20 years” — true expertise isn’t something you can expedite or take shortcuts on. The aforementioned quote holds especially true when beginning your career as a software developer. To add to this uncertain equation, the path(s) you choose to take are also of great importance.</p><p>When starting out with learning a new language, framework, library, etc. there is a common desire to go straight for tutorials (e.g. “Getting Started With React” from a Medium article), but this is a flawed approach. Articles/tutorials are often low quality, filled with the developer’s personal preferences, and are usually for use cases you’ll never need. An example of this is a React tutorial that uses Redux from the start. If you learn React only through the Redux context, you’ll surely miss out on some fundamental React knowledge.</p><p>It took me a long time to realize that you must build a foundation before building a house. Pick up a CSS book before hopping into Tailwind, pick up an intro to JavaScript book before picking up React, read an HTML book before hacking away your front end HTML. Once you’re comfortable with the basics, you should look at documentation.</p><p>Big frameworks like Rails, React, etc. have great documentation that explain the framework, built-in opinions, purpose, and gives you the building blocks necessary to build your house. Read fully through them, you will often find nuggets of useful information that you can then use to impress your coworkers/friends! If you still want to do a tutorial, go for it, but now you’ll have the prerequisite knowledge to understand the framework, the author’s choices, their pitfalls, their intelligent choices, etc. You may even find there is a better way of achieving the outcome of their tutorial.</p><p>From here, the most important thing is practicing. Don’t worry that you’re not building the next big thing. Start with a todo app, then move to something like a simplified version of Twitter. Your project doesn’t need to take weeks — use it as an exercise to practice and struggle with the things you’re learning. By struggling and then persevering, you’re growing. I like to think of it as “loading bullets in the chamber”. When that big idea does come, or when that big project gets assigned to you at work, you’ll be ready to shoot your proverbial weapon and execute. That is the best way to level up and move forward. Reading articles and following simple tutorials won’t cut it. You must get your hands dirty.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9265742cab8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What I’ve Learned Through Countless Software Engineering Interviews]]></title>
            <link>https://medium.com/@levelingupweekly/what-ive-learned-through-countless-software-engineering-interviews-3f0e2c2dbd78?source=rss-278103051dd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f0e2c2dbd78</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Levelingup]]></dc:creator>
            <pubDate>Wed, 01 Dec 2021 21:17:40 GMT</pubDate>
            <atom:updated>2021-12-01T21:17:40.072Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6iyzShvy3Y0GBO_IYDsylA.jpeg" /></figure><h3>Background</h3><p>I recently wrote a <a href="https://twitter.com/_leveling_up/status/1465697824843042818">Tweet thread</a> about what I’ve learned through all of my years and experiences interviewing as a software engineer. It has gotten some traction and a <a href="https://www.reddit.com/r/programming/comments/r6i4n5/good_notes_on_interviewsinterview_prep/hmu7ozc/?context=3">Reddit user suggested writing an article on it</a> — so here we go. Note: this article is targeted towards those in the tech industry, but the same principles can apply to other industries.</p><h3>Step 0</h3><p>Arguably the most important step in the interview process is, as expected, finding interviews. There is no shortage of places to find job postings and theoretically, you can apply to an endless number of jobs. However, not all job boards/websites are created equally.</p><p>The most important metric when applying to jobs is the ROI on <strong>your</strong> time — you do not have endless time to apply to jobs. In other words, you want to get as many quality job interviews in as little time as possible. The way you will avoid time wasting is by <strong>not </strong>using job boards such as LinkedIn or Indeed. Why?</p><ol><li>These massive job boards get an infinite number of job applications, you are unlikely to get a response.</li><li>They require cover letters, essays, and various other form fillers — a huge time suck.</li></ol><p>Instead, you will flip the script and <strong>make employers come after you</strong>. Sign up for services such as hired.com, woo.io, AngelList, and others. To use these sites, you will fill out a profile (only once!), cite your preferences (such as desired company size, pay, industry, etc.), and then you’ll watch the interview requests pour in while freeing yourself to do whatever you want in the meantime. No cover letters, no essays, no forms, and most importantly, if you are interested, you’ll more than likely just fill out a time on the interviewers calendar, and boom you’re onto the next round. <strong>Bonus</strong>: the aforementioned sites will often have a feature where you can promote your profile to employers — I’ve even had to turn this feature off due to too many interview requests.</p><p>Another avenue you can pursue is finding recruiters who can promote you to the various companies they are recruiting for. I’ve typically found that recruiters will reach out to me on LinkedIn. Find a few you like and stick with them. Developing a relationship with a good recruiter can pay dividends in both finding your next job and jobs in the future. <strong>Bonus: </strong>recruiters are very plugged into the industry and can be a great asset in helping you determine your market value (salary), companies that you’ve never heard of that could be the next big thing, interview processes, etc.</p><p>At this point, you should start seeing an influx of job opportunities — the last step of the process is vetting the respective company for any serious red flags. Go to Glassdoor and read through the Interviews section as well as the Reviews section. Ultimately, you’re looking to see if there are any major deterrents — 17 rounds of painful interviews, a crazy CEO, major scandals that could derail the company, financial struggles, etc.</p><p>Once you’ve determined there are no red flags, it is time to move into the real interview process. Typically this will look like the following:</p><p>Step 1: Intro call (~30 min), usually with an internal or external recruiter, or if the startup is small enough, this could be with the CTO or Head of Engineering.</p><p>Step 2: Technical round(s), usually 1–3 rounds (1–3 hours per round) or a take home assessment (time varies).</p><p>Step 3: Final round / Super Day (2–5 hours).</p><h3>Step 1: Intro Call</h3><p>The intro call is basically a way for the company to determine if you’re normal (enough), a decent fit technically, and excited about the opportunity. They are ultimately looking for red flags of their own. To convey your normalcy, technical ability, and excitement, you will:</p><ul><li>Be calm and conversational — people can hear a lack of confidence or stress in your voice.</li><li>Tell them about your resume. Don’t just go through your education/experience line by line — they have that in front of them. Instead, turn your resume into a story (you can rehearse this) about who you are and what you’ve done. This should be no more than two minutes maximum.</li><li>You will be asked what you’re looking for in your next role. Examples you can answer with: <em>I want to contribute to the product roadmap in terms of user experience and tech architecture, I want to work with X and Y technology, I want to work for a company changing the industry for *climate change/musicians/athletes* </em>(fill in with whatever industry they are in)</li><li>Be kind, genuine, and engaging, but do not overdo it — they can also detect an act over the phone.</li><li>Have questions for them at the end. You can ask about company culture, the team structure, tech stack, cool things they’re working on, etc.</li><li>Ask what the remaining interview process is like.</li></ul><p>You may struggle with this at first, but the more calls you do, the more this will turn into a rehearsal — you should be acing these after your fifth call.</p><h3>Step 2: Technical Rounds</h3><p>Technical interviews are notoriously dreaded by software engineers because they are both time consuming, difficult, tough to prepare for, nerve-wracking, and often an ender to the interview process. It is unfortunate, but it is just how the world of interviewing works.</p><p>Don’t be deterred — luckily, performing well in these is a learned skill!</p><p>The best way to get better at handling technical interviews is to use services like Leetcode. Practice their problem sets in all difficulty levels. Then, practice some more. You will start noticing that patterns emerge. For instance, I’ve found that <em>a lot</em> of interview questions are something along the lines of “loop through an array and then find and print the string that appears the most”. To answer this, use a hash that increments the count of each string. Seriously, converting a loop to a hash is a shockingly common technical interview question.</p><p><strong>Tip: </strong>These interviews are naturally stressful — it is absolutely imperative that you train yourself to stay calm. When you get nervous, your brain shuts down and you are unable to think logically and clearly — this will kill your problem solving abilities. Practice with self-imposed pressure and it will pay dividends when the time comes to do it in an interview.</p><p><strong>Optional Tip: </strong>I ask the interviewer if it matters whether or not I communicate with them while working on the problem. I have difficulty speaking as I start coding, so if you’re not being graded on your communication skills and it hurts your performance, don’t do it. However, if you’re struggling on a problem, you should communicate with your interviewer (if it is a live pairing session) by telling them your strategy, where you may be stuck, and possibly even asking if they have any tips or pointers. They are there to help you, or should be. I’ve moved onto the next round even after admitting I was stuck and was not sure how to go about my solution.</p><h3><strong>Step 3: Final Round</strong></h3><p>Congrats on making it to the final round, this is a big accomplishment in its own right. As stated above, final rounds are typically 2–5 hours long and will usually happen all on a single day. Each interview will last somewhere between 30 minutes to an hour.</p><p>You will most likely have a mixture of technical and non-technical interviews. For the non-technical portions, you may meet with people from product, design, marketing, etc. You may even meet with the CEO. The purpose of these non-technical rounds is to see how well you can communicate, speak <em>their </em>language, and ultimately show them that you’d be an enjoyable person to work with. Show them you are curious about their jobs — everyone likes feeling important.</p><p><em>Example: If you are speaking with someone on the design team, ask how they work with product to design a new feature. Is it data-driven? Is it collaborative? Do they build an MVP first, collect data, and then iterate from there?</em></p><p>The technical portion of the final round will probably have a combination of algorithms, data structures, white boarding, system designs, etc. You can find good resources for each of these online, but again, you should practice Leetcode. These rounds, like the technical rounds in Step 2 will be difficult and tough to predict. Additionally, you need to remember to stay calm for the reasons outlined above.</p><h3>Conclusion</h3><p>There is no getting around it — interviews are hard. You can greatly improve your chances of getting a job offer by following the steps outlined above and by practicing Leetcode until you feel comfortable with whatever questions come at you. Remember: stay calm, be positive, be genuine, and try your best — sometimes you just need a bit of luck on your side!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f0e2c2dbd78" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leveling Up Weekly: Ruby on Rails — Issue #4]]></title>
            <link>https://medium.com/@levelingupweekly/leveling-up-weekly-ruby-on-rails-issue-4-92304a32b6e5?source=rss-278103051dd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/92304a32b6e5</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[ruby-on-rails-development]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Levelingup]]></dc:creator>
            <pubDate>Fri, 19 Nov 2021 00:43:59 GMT</pubDate>
            <atom:updated>2021-11-19T00:43:59.509Z</atom:updated>
            <content:encoded><![CDATA[<h3>Leveling Up Weekly: Ruby on Rails — Issue #4</h3><p>I started this newsletter to help junior and mid-level engineers level up their skills in my favorite framework — Ruby on Rails. Each week, I will hand pick resources with the purpose of delivering you interesting and easily digestible material.</p><p>If you have enjoyed reading this newsletter, please share with friends!</p><p>If you have any feedback, please email me at levelingupweekly@gmail.com</p><h3>Content</h3><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*3h2IV-Ee6ObUoCiv" /></figure><p><a href="https://bignerdranch.com/blog/where-is-ruby-headed-in-2021/?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Where is Ruby Headed in 2021? — Big Nerd Ranch</strong></a><strong> — </strong><a href="https://bignerdranch.com/blog/where-is-ruby-headed-in-2021/"><strong>bignerdranch.com</strong></a></p><p>An analysis of where Ruby is headed based on talks at RubyConf 2021, which just wrapped up about a week ago. Running code asynchronously, performance, and static typing are all touched on in this article.</p><p><a href="https://www.codewithjason.com/not-write-tests/?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>What should I NOT write tests for?</strong></a><strong> — </strong><a href="https://www.codewithjason.com/not-write-tests/"><strong>www.codewithjason.com</strong></a></p><p>“One of the most common questions about testing, including what to write tests for, is what NOT to write tests for. When people ask me what to write tests for, my honest but maybe not very helpful answer is ‘basically everything’. But I don’t test literally absolutely everything.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*bqeMcQrDkZDHAsiO" /></figure><p><a href="https://ignaciochiazzo.medium.com/rack-middlewares-using-ruby-on-rails-af690b7bc3f8?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Rack Middleware using Ruby on Rails</strong></a><strong> — </strong><a href="https://ignaciochiazzo.medium.com/rack-middlewares-using-ruby-on-rails-af690b7bc3f8"><strong>ignaciochiazzo.medium.com</strong></a></p><p>You may not be aware of it, but if you’ve used ever used Rails, you’ve almost certainly used Rack. Rack provides a fundamental layer that allows for communication between your Ruby app and your client (e.g. web browser). I’ve been asked about it on multiple interviews!</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*Db16ZAnk2mupTQ0W" /></figure><p><a href="https://www.honeybadger.io/blog/railway-programming-dry-monads/?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Railway Oriented Programming In Rails Using Dry-Monads — Honeybadger Developer Blog</strong></a><strong> — </strong><a href="https://www.honeybadger.io/blog/railway-programming-dry-monads/"><strong>www.honeybadger.io</strong></a></p><p>In this article, Abiodun walks us through a novel error-handling process called Railway Oriented Programming and shows us how to implement it with dry-rb’s monads. It may take some time to digest this one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*Wcc0FjYZD3vNcluh" /></figure><p><a href="https://medium.com/@sophiejoliver19/metaprogramming-in-ruby-b7ed73abd4a1?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Metaprogramming in Ruby</strong></a><strong> — </strong><a href="https://medium.com/@sophiejoliver19/metaprogramming-in-ruby-b7ed73abd4a1"><strong>medium.com</strong></a></p><p>Metaprogramming is typically viewed as an advanced topic, but it is worth knowing the basics as it powers a lot of Rails code. Even if you don’t think you’ll use it (and there are good reasons you shouldn’t) give it a read if you’re curious.</p><p><a href="https://arohi-adhyaru.medium.com/a-comprehensive-checklist-of-top-6-ruby-on-rails-security-best-practices-75c788e9661b?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>A Comprehensive Checklist of Top 6 Ruby on Rails Security Best Practices</strong></a><strong> — </strong><a href="https://arohi-adhyaru.medium.com/a-comprehensive-checklist-of-top-6-ruby-on-rails-security-best-practices-75c788e9661b"><strong>arohi-adhyaru.medium.com</strong></a></p><p>Security is often viewed as an afterthought in the Rails world, especially since Rails provides some critical measures out of the box. This article covers some well known, and some not well known strategies to give your app some protection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*KLZ-rw_8UGNalnRC" /></figure><p><a href="https://medium.com/@chrisgavlon/securing-and-drying-up-your-code-using-rescue-from-d957029b7157?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Drying Up Your Code Using rescue_from </strong></a><strong>— </strong><a href="https://medium.com/@chrisgavlon/securing-and-drying-up-your-code-using-rescue-from-d957029b7157"><strong>medium.com</strong></a></p><p>An interesting approach to globally handling exceptions in Rails to make your code and error handling DRY-er and more consistent.</p><p><a href="https://www.therubyonrailspodcast.com/392?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>The Ruby on Rails Podcast Episode 392: I’m Actually Totally Happy (Brittany &amp; Brian)</strong></a><strong> — </strong><a href="https://www.therubyonrailspodcast.com/392"><strong>www.therubyonrailspodcast.com</strong></a></p><p>Are you in the job market? In this podcast, Brittany and Brian catch up on the Rails recruiting trends. They discuss how companies need to up the ante now that so many are remote first, how interviews should be structured and whether it is worth getting in the door if it is not for the role you want.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*nGia7McW_7VGQ_DI" /></figure><p><a href="https://medium.com/@shehanatuk/how-to-use-aws-rekognition-using-ruby-on-rails-a5ad545bd750?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>How to use AWS Rekognition using Ruby on Rails!</strong></a><strong> — </strong><a href="https://medium.com/@shehanatuk/how-to-use-aws-rekognition-using-ruby-on-rails-a5ad545bd750"><strong>medium.com</strong></a></p><p>AWS Rekognition is a machine learning tool provided by AWS for image classification. This brief tutorial shows you how to set up Rekognition so that you can upload an image and see the objects it identifies as well as confidence it has in identifying those respective objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*_nNyAdCZHJ2iFs9x" /></figure><p><a href="https://medium.com/scalereal/integrating-stripe-webhooks-with-rails-ade6e0501eec?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Integrating Stripe Webhooks with Rails</strong></a><strong> — </strong><a href="https://medium.com/scalereal/integrating-stripe-webhooks-with-rails-ade6e0501eec"><strong>medium.com</strong></a></p><p>Stripe, as many of you probably know, is a widely used tool for handling payment processing. Using webhooks (which are explained in this article), you can notify your application whenever a payment “event” has occurred.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*pGnISpeRNTACfqH8" /></figure><p><a href="https://andycroll.com/ruby/dont-use-floats-use-ruby-money-for-representing-currency/?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Don’t Use Floats and Use the Ruby Money Gem to Represent Currencies</strong></a><strong> — </strong><a href="https://andycroll.com/ruby/dont-use-floats-use-ruby-money-for-representing-currency/"><strong>andycroll.com</strong></a></p><p>Have you been representing money in your application via floats and decimals? As the author explains in this article, you probably shouldn’t — there are edge cases that could cause some unexpected behavior in your app. Check out the “money” gem instead!</p><h3>Tweet Of The Week</h3><h3>Resources</h3><p><em>Disclaimer: All recommendations are from resources I have personally read and recommend! However, I may receive a small percentage of the sale proceeds as an affiliate marketer for some of the resources below.</em></p><p><a href="https://www.amazon.com/HTML-CSS-Design-Build-Websites/dp/1118008189?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>HTML and CSS: Design and Build Websites: Duckett, Jon</strong></a><strong> — </strong><a href="https://www.amazon.com/HTML-CSS-Design-Build-Websites/dp/1118008189"><strong>www.amazon.com</strong></a></p><p>Learning the fundamentals of HTML and CSS is vital for any web developer regardless of framework. Jon Duckett’s book is an excellent primer for CSS and HTML and was vital in giving me a strong frontend knowledge base.</p><p><a href="https://www.amazon.com/Practical-Object-Oriented-Design-Agile-Primer/dp/0134456475?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Practical Object-Oriented Design: An Agile Primer Using Ruby: Metz, Sandi</strong></a><strong> — </strong><a href="https://www.amazon.com/Practical-Object-Oriented-Design-Agile-Primer/dp/0134456475"><strong>www.amazon.com</strong></a></p><p>The second edition of a classic for any Ruby developer. Sandi Metz uses the Ruby language to explain proper object-oriented programming which Ruby is ideal for.</p><p><a href="https://www.amazon.com/Ruby-Rails-Tutorial-Addison-Wesley-Professional/dp/0136702651?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Ruby on Rails Tutorial (Addison-Wesley Professional Ruby Series): Hartl, Michael</strong></a><strong> — </strong><a href="https://www.amazon.com/Ruby-Rails-Tutorial-Addison-Wesley-Professional/dp/0136702651"><strong>www.amazon.com</strong></a></p><p>Michael Hartl, founder of “Learning Enough”, is a highly regarded author who has numerous books on Ruby, Rails, Git, the Command Line, among many others. I have read a few of his books (including this one) and they are all top notch.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92304a32b6e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leveling Up Weekly: Ruby on Rails — Issue #3]]></title>
            <link>https://medium.com/@levelingupweekly/leveling-up-weekly-ruby-on-rails-issue-3-1f8de8617a11?source=rss-278103051dd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f8de8617a11</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Levelingup]]></dc:creator>
            <pubDate>Fri, 12 Nov 2021 14:59:24 GMT</pubDate>
            <atom:updated>2021-11-12T14:59:24.782Z</atom:updated>
            <content:encoded><![CDATA[<h3>Leveling Up Weekly: Ruby on Rails — Issue #3</h3><p>I started this newsletter to help junior and mid-level engineers level up their skills in my favorite framework — Ruby on Rails. Each week, I will hand pick resources with the purpose of delivering you interesting and easily digestible material.</p><p>If you have enjoyed reading this newsletter, please share with friends!</p><p>If you have any feedback, please email me at levelingupweekly@gmail.com</p><h3>Content</h3><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*xCB_XkaRsxg76HDN" /></figure><p><a href="https://www.honeybadger.io/blog/chat-app-rails-actioncable-turbo/?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Building a Real-Time Chat App in Rails Using ActionCable and Turbo — Honeybadger Developer Blog</strong></a><strong> — </strong><a href="https://www.honeybadger.io/blog/chat-app-rails-actioncable-turbo/"><strong>www.honeybadger.io</strong></a></p><p>A thorough tutorial on building a real-time chat application with ActionCable, Turbo, and a bit of Stimulus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*gOdkaFDXbsSD5QWR" /></figure><p><a href="https://dev.to/nemuba/how-to-change-the-database-in-a-rails-application--3ca?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>How to change the database in a Rails application?</strong></a><strong> — </strong><a href="https://dev.to/nemuba/how-to-change-the-database-in-a-rails-application--3ca"><strong>dev.to</strong></a></p><p>Have you ever needed to change the database system after already creating a Rails application? Starting in Rails 6, there is actually a one line command to do so.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*-MPqQ90GlEAytNsA" /></figure><p><a href="https://dev.to/muthuannamalai12/top-10-youtube-channels-to-learn-web-development-13nc?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Top 10 Youtube Channels To Learn Web Development</strong></a><strong> — </strong><a href="https://dev.to/muthuannamalai12/top-10-youtube-channels-to-learn-web-development-13nc"><strong>dev.to</strong></a></p><p>I have never been much of a Youtube learner, but if that changes, I do now know there are plenty of great channels to use!</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*1OaLMLVbrkghIquy" /></figure><p><a href="https://dev.to/jjhiggz/holy-st-i-love-blitzjs-5h3p?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Holy S**T, I love BlitzJS</strong></a><strong> — </strong><a href="https://dev.to/jjhiggz/holy-st-i-love-blitzjs-5h3p"><strong>dev.to</strong></a></p><p>Modeled with heavy inspiration from Rails, BlitzJS is a React-based framework that leans heavily towards the configuration over convention approach popularized by Rails. If you’re looking to make a JavaScript heavy application and enjoy React as well as Rails’ paradigms, this could be the choice for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*-eS5Ta-vb-suAhco" /></figure><p><a href="https://www.bigbinary.com/blog/rails-7-adds-activerecord-query-methods-in-order-of?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Rails 7 adds in_order_of</strong></a><strong> — </strong><a href="https://www.bigbinary.com/blog/rails-7-adds-activerecord-query-methods-in-order-of"><strong>www.bigbinary.com</strong></a></p><p>Using “.order” is great if you’re sorting by something that is well, easily sortable, such as dates, ids, integers, etc. However, for less sortable data such as an enrollment status (e.g. “graduated”, “enrolled”, “suspended”), ActiveRecord’s new method, “.in_order_of” allows you to specify your preferred sorting order.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*RdWABuu3IxrbkMLn" /></figure><p><a href="https://medium.com/unagi/how-to-build-a-ruby-open-source-application-f869fb4410f4?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>How to build a Ruby open-source application</strong></a><strong> — </strong><a href="https://medium.com/unagi/how-to-build-a-ruby-open-source-application-f869fb4410f4"><strong>medium.com</strong></a></p><p>“In this article, I will tell you how we’ve adapted a Ruby on Rails application in order to share it as free software with the community, along with all the decisions and changes we considered that could be helpful for your project, whether it’s open-source or not.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*3iVXiepdM_KODb5Z" /></figure><p><a href="https://www.driftingruby.com/episodes/speeding-up-requests?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Speeding Up Requests | Drifting Ruby</strong></a><strong> — </strong><a href="https://www.driftingruby.com/episodes/speeding-up-requests"><strong>www.driftingruby.com</strong></a></p><p>A demonstration on performance pitfalls with large datasets and how to fix them. David talks about various PostgreSQL and ActiveRecord search strategies to build out a fully functional and performant search feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*Wh5LnZ4R-j9EL6Hy" /></figure><p><a href="https://www.bigbinary.com/blog/rails-7-adds-weekday_options_for_select-and-weekday_select?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Rails 7 adds weekday_options_for_select and weekday_select </strong></a><strong>— </strong><a href="https://www.bigbinary.com/blog/rails-7-adds-weekday_options_for_select-and-weekday_select"><strong>www.bigbinary.com</strong></a></p><p>Rails 7 ships with support for weekday selections!</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*9eQ8n1X-KFEIQj0o" /></figure><p><a href="https://jwood206.medium.com/json-web-tokens-jwt-with-rails-and-react-c133c21f6c75?source=topics_v2---------2-84--------------------d5279d75_996d_4c80_852a_3bbf745073bf-------19---&amp;utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>JSON Web Tokens (JWT) with Rails and React</strong></a><strong> — </strong><a href="https://jwood206.medium.com/json-web-tokens-jwt-with-rails-and-react-c133c21f6c75?source=topics_v2---------2-84--------------------d5279d75_996d_4c80_852a_3bbf745073bf-------19---"><strong>jwood206.medium.com</strong></a></p><p>This tutorial goes over using JWTs for handling authentication. Using JWTs instead of session-based authentication is a very common approach in Rails apps, especially Rails API-only apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*4txqeIlo6ZjLdO-d" /></figure><p><a href="https://rubyrogues.com/how-ruby-method-lookups-work-ft-kingsley-chijioke-ruby-522?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Ruby Rogues: How Ruby Method Lookups Work ft. Kingsley Chijioke</strong></a><strong> — </strong><a href="https://rubyrogues.com/how-ruby-method-lookups-work-ft-kingsley-chijioke-ruby-522"><strong>rubyrogues.com</strong></a></p><p>A podcast by Ruby Rogues about how Ruby Method Lookup Paths work based on <a href="https://tinyurl.com/phdt2t3w">this article</a>. Both resources are a great way to learn about the inner-workings of classes, modules, using keywords like “prepend” vs. “include” vs. “extend”, and much more.</p><h3>Tweet Of The Week</h3><h3>Resources</h3><p><em>Disclaimer: All recommendations are from resources I have personally read and recommend! However, I may receive a small percentage of the sale proceeds as an affiliate marketer for some of the resources below.</em></p><p><a href="https://www.amazon.com/HTML-CSS-Design-Build-Websites/dp/1118008189?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>HTML and CSS: Design and Build Websites: Duckett, Jon</strong></a><strong> — </strong><a href="https://www.amazon.com/HTML-CSS-Design-Build-Websites/dp/1118008189"><strong>www.amazon.com</strong></a></p><p>Learning the fundamentals of HTML and CSS is vital for any web developer regardless of framework. Jon Duckett’s book is an excellent primer for CSS and HTML and was vital in giving me a strong frontend knowledge base.</p><p><a href="https://www.amazon.com/Practical-Object-Oriented-Design-Agile-Primer/dp/0134456475?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Practical Object-Oriented Design: An Agile Primer Using Ruby: Metz, Sandi</strong></a><strong> — </strong><a href="https://www.amazon.com/Practical-Object-Oriented-Design-Agile-Primer/dp/0134456475"><strong>www.amazon.com</strong></a></p><p>The second edition of a classic for any Ruby developer. Sandi Metz uses the Ruby language to explain proper object-oriented programming which Ruby is ideal for.</p><p><a href="https://www.amazon.com/Ruby-Rails-Tutorial-Addison-Wesley-Professional/dp/0136702651?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Ruby on Rails Tutorial (Addison-Wesley Professional Ruby Series): Hartl, Michael</strong></a><strong> — </strong><a href="https://www.amazon.com/Ruby-Rails-Tutorial-Addison-Wesley-Professional/dp/0136702651"><strong>www.amazon.com</strong></a></p><p>Michael Hartl, founder of “Learning Enough”, is a highly regarded author who has numerous books on Ruby, Rails, Git, the Command Line, among many others. I have read a few of his books (including this one) and they are all top notch.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f8de8617a11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leveling Up Weekly: Ruby on Rails — Issue #2]]></title>
            <link>https://medium.com/@levelingupweekly/leveling-up-weekly-ruby-on-rails-issue-2-33b9b4799f91?source=rss-278103051dd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/33b9b4799f91</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Levelingup]]></dc:creator>
            <pubDate>Thu, 04 Nov 2021 22:37:31 GMT</pubDate>
            <atom:updated>2021-11-04T22:37:31.994Z</atom:updated>
            <content:encoded><![CDATA[<h3>Leveling Up Weekly: Ruby on Rails — Issue #2</h3><p>I started this newsletter to help junior and mid-level engineers level up their skills in my favorite framework — Ruby on Rails. Each week, I will hand pick resources with the purpose of delivering you interesting and easily digestible material.</p><p>If you have enjoyed reading this newsletter, please share with friends!</p><p>If you have any feedback, please email me at levelingupweekly@gmail.com</p><h3>Content</h3><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*4EzEbNmuChnQNQhO" /></figure><p><a href="https://www.youtube.com/watch?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter&amp;v=IP3I_t2rR6A"><strong>The Singleton Pattern in Ruby</strong></a><strong> — </strong><a href="https://www.youtube.com/watch?v=IP3I_t2rR6A"><strong>www.youtube.com</strong></a></p><p>The Singleton Pattern helps with restricting the number of instances a class can create allowing you to reference a single instance globally. This video has the dual benefit of demonstrating some of Ruby’s object-oriented patterns and how to use them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*5M02tup8mZ2vt97-" /></figure><p><a href="https://jasongong83.medium.com/observations-about-redirect-to-and-return-in-rails-controller-actions-e9879776920e?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>A lesson about the redirect_to and return keywords</strong></a><strong> — </strong><a href="https://jasongong83.medium.com/observations-about-redirect-to-and-return-in-rails-controller-actions-e9879776920e"><strong>jasongong83.medium.com</strong></a></p><p>By debugging his own issue in his Rails controller, Jason shares his learnings about when it is necessary to prepend a “redirect_to” with a “return”. He also touches on using before_actions and guard clauses for cleaner controllers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*LbWmEdSInq9MJ6Aa" /></figure><p><a href="https://dev.to/colocodes/how-ive-got-a-web-development-job-one-week-after-publishing-my-portfolio-3o6g?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Landing a development job after publishing a portfolio</strong></a><strong> — </strong><a href="https://dev.to/colocodes/how-ive-got-a-web-development-job-one-week-after-publishing-my-portfolio-3o6g"><strong>dev.to</strong></a></p><p>A story (filled with actionable resources) about how Damian was able to land a job as a web developer by buckling down, learning the basics, and creating a portfolio he could show off to hiring companies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*LvTtanosGEcf5k4g" /></figure><p><a href="https://dev.to/baweaver/lets-read-eloquent-ruby-ch-6-3eom?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Let’s Read — Eloquent Ruby — Ch 6</strong></a><strong> — </strong><a href="https://dev.to/baweaver/lets-read-eloquent-ruby-ch-6-3eom"><strong>dev.to</strong></a></p><p>Brandon has been breaking down chapters in what he calls arguably his favorite book for “learning to program Ruby like a Rubyist”, Eloquent Ruby. If you’re short on time, but want to get all the best insights from the book, I suggest you check it out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*8TC78vUIeoMSrnpk" /></figure><p><a href="https://dev.to/nicholasdill/ruby-on-rails-is-definitely-dead-right-954?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Ruby on Rails is Definitely Dead… Right?</strong></a><strong> — </strong><a href="https://dev.to/nicholasdill/ruby-on-rails-is-definitely-dead-right-954"><strong>dev.to</strong></a></p><p>An argument as old as time — Nicholas explains why Ruby is as alive as ever, citing massive companies that use it, high salaries, and the velocity of releases for the Rails open-source project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*7cLS_B-ovVwMGZ3D" /></figure><p><a href="https://dev.to/nemuba/blog-demo-using-rails-7-hotwire-rails-tailwindcss-stimulus-railsrequestjs-2c7a?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Blog Demo using Rails 7 + Hotwire Rails + TailwindCss + Stimulus</strong></a><strong> — </strong><a href="https://dev.to/nemuba/blog-demo-using-rails-7-hotwire-rails-tailwindcss-stimulus-railsrequestjs-2c7a"><strong>dev.to</strong></a></p><p>A short and sweet blog tutorial with Ruby 3 and Rails 7 (and look how easy it is to get Tailwind in by default!).</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*hUtNLFdUYbuAzwWE" /></figure><p><a href="https://dev.to/raftlabs/a-detailed-roadmap-to-be-a-full-stack-developer-in-2021-2o2e?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>A Detailed Roadmap to be a Full Stack Developer in 2021</strong></a><strong> — </strong><a href="https://dev.to/raftlabs/a-detailed-roadmap-to-be-a-full-stack-developer-in-2021-2o2e"><strong>dev.to</strong></a></p><p>This article outlines <em>some </em>of the different technologies one can use to become a full stack developer. It is certainly not an exhaustive list, but does a nice job outlining the different layers of full stack development. A note of personal advice: learn the fundamentals before jumping into learning specifics, such as different CSS frameworks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*LfTvA0PrAxM8Wzh_" /></figure><p><a href="https://dev.to/knowndecimal/being-restful-about-your-routes-1gmf?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Being RESTful about your routes</strong></a><strong> — </strong><a href="https://dev.to/knowndecimal/being-restful-about-your-routes-1gmf"><strong>dev.to</strong></a></p><p>Have you ever thought your routes don’t necessarily <em>match </em>the behavior they describe? This article shows how you can make better choices about your route structure while adhering to RESTful design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*Q81QQixxLdEOhdaK" /></figure><p><a href="https://www.youtube.com/watch?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter&amp;v=tmw2ULIMbA8"><strong>Upgrading a Rails 6.1 application to Rails 7</strong></a><strong> — </strong><a href="https://www.youtube.com/watch?v=tmw2ULIMbA8"><strong>www.youtube.com</strong></a></p><p>Rails 7 has not been officially released yet, but this video may become quite useful for those looking to upgrade in the upcoming months.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*sUDICuBPTnLVJlQk" /></figure><p><a href="https://www.reddit.com/r/learnprogramming/comments/ql8jti/i_am_having_trouble_planning_and_designing_big/hj1cs62/?context=3&amp;utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=web2x&amp;utm_source=share"><strong>I am having trouble planning and designing big applications.</strong></a><strong> — </strong><a href="https://www.reddit.com/r/learnprogramming/comments/ql8jti/i_am_having_trouble_planning_and_designing_big/hj1cs62/?utm_medium=web2x&amp;utm_source=share&amp;context=3"><strong>www.reddit.com</strong></a></p><p>Check out this comment by Jason Swett for how he goes about teetering the balance of <em>getting stuff done </em>and planning for the future.</p><h4><a href="https://bhserna.com/determine-if-my-n-plus-one-queries-can-hurt-performance.html?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">How can I determine if my n+1 queries fix can hurt the performance?</a></h4><p><a href="https://bhserna.com/determine-if-my-n-plus-one-queries-can-hurt-performance.html">bhserna.com</a></p><p>Fixing N+1 queries is often understood to be an automatic and worthwhile change to make, but sometimes that is not the case. This article explains how to identify N+1 queries, and how to measure the performance implications of the fix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*1AR2tIbPT6h-mcD4" /></figure><p><a href="https://medium.com/@levelingupweekly/rails-api-building-the-resourceful-way-cec9871b84fa?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Bonus: Rails API Building: The Resourceful Way</strong></a><strong> — </strong><a href="https://medium.com/@levelingupweekly/rails-api-building-the-resourceful-way-cec9871b84fa"><strong>medium.com</strong></a></p><p>I wrote an article outlining how I go about building endpoints in Rails.</p><h3>Tweet Of The Week</h3><h3>Resources</h3><p><em>Disclaimer: All recommendations are from resources I have personally read and recommend! However, I may receive a small percentage of the sale proceeds as an affiliate marketer for some of the resources below.</em></p><p><a href="https://www.amazon.com/HTML-CSS-Design-Build-Websites/dp/1118008189?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>HTML and CSS: Design and Build Websites: Duckett, Jon</strong></a><strong> — </strong><a href="https://www.amazon.com/HTML-CSS-Design-Build-Websites/dp/1118008189"><strong>www.amazon.com</strong></a></p><p>Learning the fundamentals of HTML and CSS is vital for any web developer regardless of framework. Jon Duckett’s book is an excellent primer for CSS and HTML and was vital in giving me a strong frontend knowledge base.</p><p><a href="https://www.amazon.com/Practical-Object-Oriented-Design-Agile-Primer/dp/0134456475?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Practical Object-Oriented Design: An Agile Primer Using Ruby: Metz, Sandi</strong></a><strong> — </strong><a href="https://www.amazon.com/Practical-Object-Oriented-Design-Agile-Primer/dp/0134456475"><strong>www.amazon.com</strong></a></p><p>The second edition of a classic for any Ruby developer. Sandi Metz uses the Ruby language to explain proper object-oriented programming which Ruby is ideal for.</p><p><a href="https://www.amazon.com/Ruby-Rails-Tutorial-Addison-Wesley-Professional/dp/0136702651?utm_campaign=Leveling%20Up%20Weekly%20-%20Ruby%20on%20Rails&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Ruby on Rails Tutorial (Addison-Wesley Professional Ruby Series): Hartl, Michael</strong></a><strong> — </strong><a href="https://www.amazon.com/Ruby-Rails-Tutorial-Addison-Wesley-Professional/dp/0136702651"><strong>www.amazon.com</strong></a></p><p>Michael Hartl, founder of “Learning Enough”, is a highly regarded author who has numerous books on Ruby, Rails, Git, the Command Line, among many others. I have read a few of his books (including this one) and they are all top notch.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33b9b4799f91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rails API Building: The Resourceful Way]]></title>
            <link>https://medium.com/@levelingupweekly/rails-api-building-the-resourceful-way-cec9871b84fa?source=rss-278103051dd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/cec9871b84fa</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[ruby-on-rails-api]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Levelingup]]></dc:creator>
            <pubDate>Fri, 08 Oct 2021 22:29:03 GMT</pubDate>
            <atom:updated>2021-10-26T19:56:39.365Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Note: I am writing a </em><strong><em>free</em></strong><em>, once-weekly newsletter of curated resources, tutorials, articles, news, etc. with the goal of helping junior and mid-level Ruby on Rails developers level up their skills. Use</em><a href="http://tinyurl.com/59zda7n5"><strong><em> this link</em></strong></a><em> to sign up! </em><strong><em>Twitter: </em></strong><a href="https://twitter.com/_leveling_up"><strong><em>@_leveling_up</em></strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h4TLlisFk7XvtREAsS7C7Q.jpeg" /></figure><p>In the following post, I will show you a relatively uncommon approach to building a Rails REST API that will contain reusable resources, a closer allegiance with standard REST practices, and (what I believe) to be an overall cleaner architecture.</p><p>With the rising popularity of JavaScript frameworks, Ruby on Rails has become increasingly used as a REST API that serves up resources to a client. Consequently, developers have shifted from using standard haml/ erb templates to using a variety of methods to serve JSON to the client. In most Rails REST API tutorials, the common pattern is to use something like the following for a standard show method in a UsersController .</p><pre>@user = User.find(params[:id])<br>if @user<br>  render json: @user<br>else<br>...<br>end</pre><p>Other common implementations rely on using various serializers that either ship with Rails by default or are from third-party gems, such as <a href="https://github.com/jsonapi-serializer/jsonapi-serializer">Netflix’s jsonapi-serializer</a>. There is nothing inherently wrong with using these options, but you may eventually run into the situation where the respective library cannot meet your requirements. Additionally, writing your own custom code can be a helpful exercise in learning API development.</p><p>Let the demo begin! <strong>Note: For simplicity sake, a lot of the following code is pseudocode and has not been tested in a Rails app.</strong></p><p>For this tutorial, we will be modeling our schema in typical blog format — <strong>Users</strong> create <strong>Posts</strong> and <strong>Posts</strong> have <strong>Comments</strong>.</p><pre># Schema<br>User<br> id: integer<br> username: string </pre><pre> has_many :posts<br>---------------------------------------</pre><pre>Post<br> id: integer<br> content: text<br> title: string<br> user_id: integer # foreign_key for the user that wrote the Post</pre><pre> belongs_to :user<br> has_many :comments</pre><pre>----------------------------------------</pre><pre>Comment<br> id: integer<br> text: text<br> post_id: integer # foreign_key for the Post that the respective Comment is on</pre><pre> belongs_to :post<br>---------------------------------------</pre><p>We will create a PostsController that has two actions — an index action to show all the posts and a show action to show a single post. Some of the following code may look a bit strange, but continue reading for explanations. <strong>Note: The following code assumes the presence of a global </strong><strong>current_user .</strong></p><pre># app/controllers/posts_controller.rb</pre><pre>def index<br>  posts = Posts.all.includes(:comments)<br>  render json: PostsResource.new(posts: posts, current_user:  current_user, base_url: request.base_url)<br>end</pre><pre>def show<br>  post = Post.find(params[:id)<br>  if post<br>    render json: PostResource.new(post: post, current_user: current_user, base_url: request.base_url)<br>  else <br>    # handle errors<br>  end<br>end</pre><p>What is this unfamiliar ...Resource stuff above? We will be creating reusable Resources which are effectively POROs (Plain Old Ruby Objects) that will be rendered as JSON in our controllers. These Resources are designed to be flexible and customized.</p><pre># app/models/posts_resource.rb</pre><pre>class PostsResource</pre><pre>  # By including this module below, we have access to the url helpers that are typically seen in Rails haml/erb views. i.e. `posts_url(https://medium.com/...)`<br>  <br>  include Rails.application.routes.url_helpers</pre><pre>  def initialize(posts:, current_user:, base_url:)<br>    @posts = posts<br>    @current_user = current_user<br>    @base_url = base_url<br>  end</pre><pre>  # This is the method Rails uses under the hood when rendering<br>  # JSON content. We are overriding it so we can send our own<br>  # custom JSON including our data `payload` and our `links` <br>  # (explained later).</pre><pre>  def as_json(*)<br>    { <br>      payload: payload,<br>      links: links<br>    } <br>  end</pre><pre>  private<br>  <br>  # we use attr_reader so that we can reference our instance <br>  # variables without using `@`. This also ensures that we don&#39;t <br>  # accidentally overwrite our instance variables by making<br>  # them read-only. <br>  # More info: <a href="https://www.rubyguides.com/2018/11/attr_accessor/">https://www.rubyguides.com/2018/11/attr_accessor/</a></pre><pre>  attr_reader :posts, :current_user, :base_url</pre><pre>  # Here we are mapping over the `posts` array and creating an individual PostResource for each Post.</pre><pre>  def payload<br>    posts.map { |post| PostResource.new(post: post, current_user: current_user, base_url: base_url }<br>  end</pre><pre>  # Links are used to provide the client with an array of available<br>  # endpoints to fetch from. In this instance, we are<br>  # programmatically providing a URL for the &quot;/posts&quot; endpoint. <br>  # Side note: every resource should have its own &#39;self&#39; link as a <br>  # means of showing where the resource came from.  </pre><pre>  def links<br>    [self_link]<br>  end</pre><pre>  def self_link<br>    {<br>      href: posts_url(https://medium.com/posts,%20host:%20base_url,%20format:%20:json),<br>      rel: &#39;self&#39;,<br>      type: &#39;application/json&#39;,<br>      method: &#39;GET&#39;<br>    }<br>  end<br>end</pre><pre><br>--------------------------------------------------------------------</pre><pre># app/models/post_resource.rb</pre><pre>class PostResource<br>  <br>  include Rails.application.routes.url_helpers</pre><pre>  def initialize(post:, current_user:, base_url:)<br>    @post = post<br>    @current_user = current_user<br>    @base_url = base_url<br>  end</pre><pre>  def as_json(*)<br>    { <br>      payload: payload,<br>      links: links<br>    } <br>  end</pre><pre>  private</pre><pre>  attr_reader :post, :current_user, :base_url</pre><pre>  def payload<br>    {<br>      id: post.id<br>      content: post.content,<br>      title: post.title<br>    }<br>  end</pre><pre>  def links<br>    [self_link, comments_link]<br>  end</pre><pre>  def self_link<br>    {<br>      href: post_url(https://medium.com/post,%20host:%20base_url,%20format:%20:json),<br>      rel: &#39;self&#39;,<br>      type: &#39;application/json&#39;,<br>      method: &#39;GET&#39;<br>    }<br>  end</pre><pre>  def comments_link<br>    {<br>      href: post_comments_url(https://medium.com/post,%20host:%20base_url,%20format:%20:json),<br>      rel: &#39;comments&#39;,<br>      type: &#39;application/json&#39;,<br>      method: &#39;GET&#39;<br>    }<br>  end<br>end</pre><p>The above links content may look quite confusing, but what we are doing here is using Rails’ built-in URL helpers to create URLs on the server that we can then access on the client! By providing the format: json and host: base_url options, we can generate a full URL as thehref value. More simply, instead of writing code to create the URL on the client, we can just <em>find </em>the link and use the href value.</p><p>Example in a React application:</p><pre># Old way (JavaScript)<br>const link = `http:localhost:3000/posts.json`<br>fetch(link)<br>...</pre><pre># New way (JavaScript)<br>const link = postsResource.links.find(l =&gt; l.rel === &quot;self&quot;)<br>fetch(link.href)<br>...</pre><p>The benefit outlined above is that we can reference links by their rel name instead of having to manually create them in our client-side code. This allows us to not worry about our backend endpoints changing, avoids error prone typos, and creates a cleaner architecture.</p><p>Additionally, if we want to find the Comments for a Post, we can do the following.</p><pre># Old way (JavaScript)<br>const link = `http://localhost:3000/posts/{id}/comments.json`<br>fetch(link)<br>...</pre><pre># New way (JavaScript)<br>const link = postResource.links.find(l =&gt; l.rel === &quot;comments&quot;)<br>fetch(link)<br>...</pre><p>As ours applications get more complex, creating URLs on the client gets more difficult. Additionally, when we decide to change our backend structure, we have to manually find and replace all the client-side URLs — quite the stressful undertaking!</p><p>Bonus: If we would like to get more advanced, we can start adding logic to our links. For instance, let’s say that if a post does not have any comments, we do not want to show a Comments section in our client-side application. We can change our PostResourcecode to the following:</p><pre># app/models/post_resource.rb</pre><pre>...</pre><pre>def links<br>  [self_link, comments_link].compact<br>end</pre><pre>def comments_link<br>  return nil if post.comments.none?<br>  {<br>    href: post_comments_url(https://medium.com/post,%20host:%20base_url,%20format:%20:json),<br>    rel: &#39;comments&#39;,<br>    type: &#39;application/json&#39;,<br>    method: &#39;GET&#39;<br>  }<br>end</pre><p>We can now use our Post&#39;s&quot;comments&quot; link to determine if we should show our Comments section on the client.</p><pre>// React Application Example</pre><pre>const CommentsComponent = () =&gt; {<br>  const commentsLink = postResource.links.find(l =&gt; l.rel === &quot;comments&quot;)<br>  return (<br>    {commentsLink ? &lt;CommentsSection /&gt; : &lt;&gt;&lt;/&gt;<br>  )<br>}</pre><p>In conclusion, we can use the aforementioned Resources architecture to help us organize both our server-side and client-side code. By creating our own custom Resources, we have greater flexibility in the JSON we send to the client— removing or adding a JSON field is a breeze, we can easily add complex model methods, we can use links to effectively <em>communicate</em> with the client, and can reuse Resources (DRY coding!) as we see fit.</p><p>Advanced Bonus: I did not mention it above, but part of proper REST API building is using HATEOS (Hypermedia as the Engine of Application State) — a means of providing links by the server to dictate client-side behavior. By communicating via links, we can create a stronger dialogue between the server and client.</p><p>Further Reading: <a href="https://restfulapi.net/hateoas/">https://restfulapi.net/hateoas/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cec9871b84fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>