<?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>Forem: Riaz Virani</title>
    <description>The latest articles on Forem by Riaz Virani (@rvirani1).</description>
    <link>https://forem.com/rvirani1</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%2F443081%2Fe9769831-e88b-47f7-b44f-adff3a658b6d.jpeg</url>
      <title>Forem: Riaz Virani</title>
      <link>https://forem.com/rvirani1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/rvirani1"/>
    <language>en</language>
    <item>
      <title>Five Tips for Success: How To Thrive At Your First Dev Job</title>
      <dc:creator>Riaz Virani</dc:creator>
      <pubDate>Wed, 11 Aug 2021 01:20:21 +0000</pubDate>
      <link>https://forem.com/rvirani1/five-tips-for-success-how-to-thrive-at-your-first-dev-job-5hbo</link>
      <guid>https://forem.com/rvirani1/five-tips-for-success-how-to-thrive-at-your-first-dev-job-5hbo</guid>
      <description>&lt;p&gt;So you're trying to break into the industry and spending all your nights and weekends on code exercises, building your portfolio, and just generally being a sponge for all knowledge. Then...&lt;em&gt;you get the job&lt;/em&gt;. &lt;/p&gt;




&lt;p&gt;First, congratulations for your hypothetical self. But it turns out you've only won half the battle. As a senior engineer who's hired multiple juniors, the first year as a full time developer can be tough. I've seen it work with both fantastical success and seen people struggle. &lt;/p&gt;

&lt;h2&gt;
  
  
  What makes the difference?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;It's not pure technical know how&lt;/strong&gt;. It's knowing how to ask for help. It's knowing how to help your manager, who is not an expert in nurturing junior developers, help you develop. Luckily, there are strategies you can follow. Here are FIVE that will definitely help.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tip 1: Ask and You Shall Receive
&lt;/h2&gt;

&lt;p&gt;If you're new at something, you naturally fear the things you don't know to know. So you'll worry about looking like an imposter if you ask the "wrong" question or just too many questions. I've seen developers get stuck and thrash for days in silent frustration rather than ask for help. Worst of all, I've seen some developers glorify this sinkhole of futility as a rite of passage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Junior developers err on the side of asking for too little help rather than too much&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Banging your head on the wall for more than a few hours is not helping you learn nor helping your company. Ask, but ask intelligently and involve others progressively. Don't throw your hands up in the air. Push your team to give you just enough help to you get unstuck and keep going. This feels kind of abstract, so let's try a real example. &lt;/p&gt;

&lt;p&gt;Let's imagine you are stuck on a coding problem. You're even unsure as to whether your approach makes sense. Either way, you just feel lost. So here's what your next morning standup update could be:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hi everyone, so I'm currently working on X feature. I'm not sure how to approach it. But right now, I'm trying Y. I'm going to keep at it this morning, but if I don't make good progress. Would it make sense to grab someone else from the team really quickly to talk through it and get me unstuck?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If I managed this team, this would blow me away. You've essentially done my job for me. I don't have to pry open your current status to figure out whether there is a risk to manage. You haven't thrown up your hands and just tossed it to someone else. You haven't given me a bullshit answer. You've identified a challenge, established at timeline to work on it, and then recommended the next step that involves the least amount of resources to keep you progressing. This is called "managing up" and it's a tremendous skill whenever you are in a new field. &lt;/p&gt;




&lt;h2&gt;
  
  
  Tip 2: Write Now, Worry Later
&lt;/h2&gt;

&lt;p&gt;So you do figure out a solution to the problem mentioned above. You feel relieved. That was hard! You proudly submit a PR for review. The next day you wake to find that a senior developer has requested a dozen changes and asks that you rethink your whole approach. You feel like you've just been punched in the gut. Your self-confidence is shot to hell. Can you even do this job? &lt;/p&gt;

&lt;p&gt;The real tragedy here is that the senior engineer may have no idea they caused any emotional turmoil. They're just in their own little world tackling a task list, but with a little bit of empathy they could make a huge difference. What if one of those notes looked like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hey, I know this is a lot, but that's expected. You're learning and you've made a ton of progress. If you have any questions, I'm happy to help.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Empathy matters. Without a note like this, the junior developer becomes terrified of their next PR. This is a bad place to be.&lt;/p&gt;

&lt;h3&gt;
  
  
  So what's the solution?
&lt;/h3&gt;

&lt;p&gt;There are a couple of solutions here. One is to "manage up" liked we talked about in the last tip. Ask for weekly or biweekly check ins with whomever is your lead so that you can just ask "Hey, how am I doing?", "Where can I improve?". If they have criticism, listen to it. It's better than guessing or worrying.&lt;/p&gt;

&lt;p&gt;The second is to just understand that code is inherently flawed. All the talks in the world you've listened to about how we can do "coding right". Yet all those same presenters have the same problems in their code bases as you. It's just how this business works. Don't get me wrong. Shitty code is very different from flawed code written by people trying their best. There are a lot of shades of grey here.&lt;/p&gt;

&lt;p&gt;You just have to internalize that you only figure out the right path by trying a lot of the wrong ones. That means you can't be afraid of your code. Some of it will suck. If it's a process to learn, then get through it as quickly as possible. Give it your best shot. Feel the pain of debugging it and then iterate till it's less painful.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tip 3: Go Deep, Not Wide
&lt;/h2&gt;

&lt;p&gt;When you're starting, learning too many things can actually hurt you. You can try all the JS frameworks, fiddle with Docker and Kubernetes, and play with CSS. All the things! This is also how most bootcamps work. They'll spend just a few weeks on a multitude of technologies in order to market how many things you'll learn. In the end though, you might not know enough of any one thing to contribute on a team. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You only need one foot in the door, so get good at one thing to start&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Figure out the one thing you're tried that you really enjoy. It could be CSS and design. It could be DevOps. It could be iOS development. Whatever! Then ask your team lead to give you work in that area and just focus on learning how to do that thing at an advanced level. &lt;/p&gt;

&lt;p&gt;You'll very quickly gain credibility with your team because you've now got a domain where they can ask you for help. You'll feel more confident and now have a strong foothold to buy time to learn all the adjacent technologies.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Damn, you must like to read if you're all the way down here. Don't worry the last two tips are super short&lt;/em&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Tip 4: Don't Put Your Teammates on a Pedestal
&lt;/h2&gt;

&lt;p&gt;Earlier we talked about getting help. So let's say you pair with a senior developer and they give you a recommended approach. You try it out, but it doesn't seem to work. Are you just implementing it wrong or is the approach faulty? You don't want to disappoint or contradict the senior developer, so you shoehorn it in. You write a bunch of hacky, clumsy code to make it work. Upon review, the developer who gave you the approach sees its flaws and changes his mind. You have a palm in face moment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Senior developers make just as many mistakes as junior ones&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The big tip here is that if something is painful to you, that means its actually painful and that's valuable information. You get to have an opinion because you also live in this code base. The most valuable thing you can do is articulate that pain. You'll be amazed at how often your pain points will match others even if they've been silent about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tip 5: Pseudocode is your Friend
&lt;/h2&gt;

&lt;p&gt;Most senior developers generally don't write pseudocode before writing the actual code. They've been doing this so long, they can maybe even think in code. If that's not you yet, then here's a little practical tip that can sometimes do wonders. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't think through the logic and syntax at the same time&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Try just putting comments where the code will go describing it. Let it read like human phrases or sentences. Once you have that down, just translate each comment into the syntax of the programming language. You're making it easier for your brain to do one thing at a time, which means it can be more efficient. &lt;/p&gt;

&lt;p&gt;Yeah, this tip is a bit of an outlier since it's not some grand concept. But it does work. Try it!&lt;/p&gt;




&lt;p&gt;That's all folks. Super practical, simple tips to help you succeed. &lt;/p&gt;

</description>
      <category>firstyearincode</category>
    </item>
    <item>
      <title>Should Your Next Backend Be Serverless?: A Perspective From Someone in the Trenches</title>
      <dc:creator>Riaz Virani</dc:creator>
      <pubDate>Sun, 25 Jul 2021 17:22:52 +0000</pubDate>
      <link>https://forem.com/rvirani1/should-your-next-backend-be-serverless-a-perspective-from-someone-in-the-trenches-499l</link>
      <guid>https://forem.com/rvirani1/should-your-next-backend-be-serverless-a-perspective-from-someone-in-the-trenches-499l</guid>
      <description>&lt;h3&gt;
  
  
  Serverless technologies are definitely the new "hotness", but does the hype live up to the reality?
&lt;/h3&gt;

&lt;p&gt;I recently completed a project called &lt;a href="https://chrome.google.com/webstore/detail/listeri/hecmnnbdebmbkiafbaoodedmfkoeplge"&gt;Listeri&lt;/a&gt; where I went all in on serverless after a decade of writing traditional backends. Here's what I learned:&lt;/p&gt;

&lt;h2&gt;
  
  
  What does "serverless" mean?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;TLDR: Skip this if you are familiar with serverless as a concept&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For those of you that aren't familiar with the term, "serverless" doesn't mean there aren't servers. It just means you don't run the servers.&lt;/p&gt;

&lt;p&gt;Let's think about a typical backend. You have a server, which is just a computer somewhere. It runs your application in the background and waits for web requests. You pay for the whole server with all of its memory and CPU no matter how many requests come in and out. I understand there are some variations here in more complicated contexts with autoscaling, docker hackery, and virtualization. Let's just keep it simple for our example. So you've got your computer running somewhere. Now if tomorrow you hit get featured on Hacker New and your user base gets 100x bigger, you have to figure out how to add more servers to handle that load. If that doesn't happen, you are still stuck paying for a full server when you only need part of it.&lt;/p&gt;

&lt;p&gt;Serverless technologies, like AWS Lambda, Netlify Functions, Vercel functions, etc turn that on its head. You don't boot up a server. You just give them your code. It stays dormant until someone makes a web request. The serverless provider then boots up your code, runs it, returns the response. You only pay for the little bit of compute you used. Sounds amazing, right!&lt;/p&gt;

&lt;h2&gt;
  
  
  What's the catch?
&lt;/h2&gt;

&lt;p&gt;Like every new technology, there's a ton of marketing by the providers and tech zeitgeist telling you how to implement serverless functions, but not a lot about whether you should. &lt;/p&gt;

&lt;h3&gt;
  
  
  The Dreaded Cold Boot
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Serverless providers can offer such cheap service because they generally don't keep your code running. If no one visits your site or hits that endpoint for a bit of time, then they put your code to sleep. The next person that visits will often see a 5-7 second delay in getting a response while your code gets booted back up. This can vary a lot by provider.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Workaround:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Have a ton of traffic&lt;/strong&gt; - This isn't a problem if you have a high frequency API that's getting hit all day. If you have a smaller site or API, then it can really ruin the user experience. It will also feel erratic to the user since it will only happen once and then the site will feel fast.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keep Hitting Your Own API to Keep it Alive&lt;/strong&gt; - Yeah, this is a hack, but even the noble developers over at the &lt;a href="https://www.serverless.com/blog/keep-your-lambdas-warm"&gt;serverless framework&lt;/a&gt; kind of recommend this. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use AWS Lambda and fiddle with &lt;a href="https://aws.amazon.com/blogs/compute/new-for-aws-lambda-predictable-start-up-times-with-provisioned-concurrency/"&gt;Provisioned Concurrency&lt;/a&gt;&lt;/strong&gt; - Realizing this is a big problem. Amazon is trying to make it less impactful. There is a setting in AWS Lambda to try and reduce the cold boot time, but it doesn't eliminate it entirely. &lt;a href="https://workers.cloudflare.com/"&gt;Cloudflare Workers&lt;/a&gt; also have an approach to minimize cold boots, but it results in other compromises I won't go into here. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basically, cold boots can be a problem and the right solution isn't clear yet. Everyone is still experimenting with ways to solve it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Database, Anyone?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Most major databases aren't yet built to work with serverless technologies, including MongoDB, PostgresQL, or MySQL. Remember that when your function goes idle, it shuts down. That means it loses its active database connection. That connection has to be reestablished when you boot back up. In a normal server, the connection is persistent since your server is always up. This can create a significant performance issue for your app that's hard to discover. &lt;/p&gt;

&lt;p&gt;Secondly, most hosts for these traditional databases have connection limits as to how many connections you can have open. Serverless providers scale up the number of copies they have of your code running on different machines as they see fit. This means you can very easily blow your connection limit without realizing it. For example, MongoDB Atlas (a Mongo hosting provider) has a 500 connection limit even on their serverless tier! Connections are also very memory intensive for traditional databases so it can hurt performance. &lt;/p&gt;

&lt;p&gt;Workaround&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use a Database With High Connection Limits&lt;/strong&gt; - You can just brute force this by running your own database server on a big machine but now you have to manage a database server! You can also try &lt;a href="https://www.digitalocean.com/products/managed-databases/"&gt;DigitalOcean's Managed Postgres&lt;/a&gt; service, which has PG Bouncer built in. That means you can get up to 5000 connections per database on Digital Ocean.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Amazon DynamoDB or FaunaDB&lt;/strong&gt; - Neither of these have connection limits issues. Dynamo can be really hard to query though and FaunaDB is not as battle tested as MongoDB.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use &lt;a href="https://aws.amazon.com/rds/aurora/serverless/"&gt;Amazon Aurora Serverless&lt;/a&gt; With a Data API&lt;/strong&gt; - This is Amazon's clever way of allowing you to use Postgres and MySQL without a traditional database connection. Instead you make HTTP API calls to your database. This isn't great for performance since now you have the overhead of a &lt;code&gt;SSL&lt;/code&gt; handshake to make a database call. This solution is also very very new at the time of writing this article.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Don't Work Around It&lt;/strong&gt; - Just hope you never get big enough to have this problem. That's kind of ironic though since you probably want to go get big enough to have this problem. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Performance, What?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; In a traditional environment, there is pretty mature tooling for most languages / frameworks to measure performance. That's just not true in serverless, yet. You can measure the total response time for a call, but there are a lot of other factors outside of your code that could impact timings. Was it a cold boot? Was it a cold boot with a delay in connecting to a database? Did your serverless provider glitch and leave you on a box where someone else took all the CPU? Unlike a normal server, you can't look at a chart and see that somehow the CPU spiked. Remember, you can't look at the server!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Workaround:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Add a bunch of logging and tooling by hand&lt;/strong&gt; - Yeah and guess?&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Serverless technologies work, but the ecosystem isn't there in terms of databases, performance management, and reliability to replace traditional server architecture. Even the big players are still experimenting with solutions they might throw away in a few years. If that's fine with you, then go for it. Just do it with eyes open and not clouded by the chatter in the techverse.&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>nextjs</category>
      <category>netlify</category>
    </item>
    <item>
      <title>Five Dev Podcasts You Should Be Listening To</title>
      <dc:creator>Riaz Virani</dc:creator>
      <pubDate>Mon, 19 Jul 2021 01:31:48 +0000</pubDate>
      <link>https://forem.com/rvirani1/five-dev-podcasts-you-should-be-listening-to-4kj2</link>
      <guid>https://forem.com/rvirani1/five-dev-podcasts-you-should-be-listening-to-4kj2</guid>
      <description>&lt;p&gt;I got asked a while back what I listen to as an avid podcast listener. So I thought I'd make a quick post of some of my fav tech related podcasts. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The ReadME Podcast&lt;/li&gt;
&lt;li&gt;The ChangeLog&lt;/li&gt;
&lt;li&gt;CoRecursive&lt;/li&gt;
&lt;li&gt;Software Engineering Daily&lt;/li&gt;
&lt;li&gt;Masters of Scale&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>podcast</category>
      <category>leadership</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Hack your own powerful Chromebook for less than $200</title>
      <dc:creator>Riaz Virani</dc:creator>
      <pubDate>Wed, 07 Jul 2021 13:48:30 +0000</pubDate>
      <link>https://forem.com/rvirani1/hack-your-own-powerful-chromebook-for-less-than-200-2p54</link>
      <guid>https://forem.com/rvirani1/hack-your-own-powerful-chromebook-for-less-than-200-2p54</guid>
      <description>&lt;p&gt;Alright, so you have your main computer, a great powerful MacBook or Windows notebook, that can command the power of the gods on demand. 80 gigabytes in your &lt;code&gt;node_modules&lt;/code&gt; directory? No problem for this beast.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/XXAKgZR1EbAqmuGBE9/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/XXAKgZR1EbAqmuGBE9/giphy.gif" alt="Giphy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But sometimes wouldn't it be great just to have just one more computer? Let's say your friend comes over and forgets his computer. So not only are they eating those amazing cookies you got for yourself but also using your damn computer and snooping across your email. Yeah, we've all been there. &lt;/p&gt;

&lt;p&gt;I'm often surprised at how often programmers assume they need to spend like a thousand dollars on every computer since that's what they use themselves. In fact, there is a super cheap way you can build a powerful (not slow) Chromebook yourself for around $200 or less. &lt;/p&gt;

&lt;p&gt;Here's how you do it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Get a computer
&lt;/h2&gt;

&lt;p&gt;Go on &lt;a href="https://ebay.com"&gt;eBay&lt;/a&gt; and find a used business class laptop that's 3-4 years old. &lt;/p&gt;

&lt;p&gt;See a lot of big companies acquire Dell, HP, and Lenovo business notebooks in masse. Their employees use the machines for 3 years and then they sell them to wholesalers who retail them as used laptops. These wholesalers clean them up, install a new Windows license, and then sell them at a premium. However, some will sell them as-is without any reconditioning for super cheap. That's what we are looking for. We're also specifically looking at business class laptops since they are way more durable than the consumer class laptops that you might normally see at a retail store.&lt;/p&gt;

&lt;p&gt;Here's a good example of one a &lt;a href="https://www.ebay.com/itm/114879975632"&gt;Dell 5480&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The HP EliteBooks are also a good choice. You can see a list of them on &lt;a href="https://en.wikipedia.org/wiki/HP_EliteBook"&gt;Wikipedia&lt;/a&gt;. The older the unit, the slower and cheaper. &lt;/p&gt;

&lt;h2&gt;
  
  
  Install &lt;a href="https://www.neverware.com/#intro"&gt;CloudReady by Neverware&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Make sure the laptop is certified by &lt;a href="https://guide.neverware.com/supported-devices/"&gt;Neverware&lt;/a&gt; as compatible. This is the Google owned company that makes a version of Chrome OS that can be installed anywhere. Most business class laptops are certified though. &lt;/p&gt;

&lt;h2&gt;
  
  
  Adjust coffee table to perfect height using laptop as paper weight.
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Just kidding, go enjoy your new Chromebook&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Ten Ruby gems for Rails you should definitely know about</title>
      <dc:creator>Riaz Virani</dc:creator>
      <pubDate>Sat, 26 Jun 2021 02:00:34 +0000</pubDate>
      <link>https://forem.com/rvirani1/ten-ruby-gems-for-rails-you-should-definitely-know-about-4lkk</link>
      <guid>https://forem.com/rvirani1/ten-ruby-gems-for-rails-you-should-definitely-know-about-4lkk</guid>
      <description>&lt;p&gt;Whenever I join a new project, I love scooping through their Gemfile and digging about. It's kind of like looking through someone else's apartment only to discover that essential oil diffusers are a thing &lt;em&gt;Those things are amazing!&lt;/em&gt;. Weirdly voyeuristic, but incredibly useful to discover new things. &lt;/p&gt;

&lt;p&gt;Over the years, I've found that many of us don't know about popular gems that could be of help to us. So here is my list of ten gems you should know about if you don't already. Well, if you already know of them, you've just wasted a few minutes of your life...&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://github.com/kaminari/kaminari"&gt;Kaminari&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Kaminari hooks onto ActiveRecord associations and makes it super easy to page them. &lt;a href="https://github.com/ddnexus/pagy"&gt;Pagy&lt;/a&gt; is another option that seems to have a solid API but I haven't tried it yet.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://github.com/magnusvk/counter_culture"&gt;Counter Culture&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;If you've ever used Rails counter caches (basically help you keep track of the number of related records in a database) but found sometimes you need something a little different. For example, you needed to track the sum of the values in a different table instead of a count of records, then counter culture is for you. I've used it on many projects and it's been rock solid. &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://github.com/adomokos/light-service"&gt;LightService&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;LightService is my favorite gem for organizing business logic. If you've ever heard about railway programming, that's basically what this gem helps you do. Again, used it for years with no issues.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://github.com/alexreisner/geocoder"&gt;Geocoder&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;This is hands down the best gem to use if you're trying to convert locations to latitude / longitude coordinates or vice versa. It supports a wide variety of APIs, like Google, etc.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://github.com/ankane/lockbox"&gt;Lockbox&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;This gem is just too good. It makes it crazy seamless to encrypt the contents of a database field. However, ActiveRecord basically gets to behave as if it's not encrypted. &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://github.com/RubyMoney/money-rails"&gt;Money-Rails&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Money or as I like to call it...&lt;em&gt;monies&lt;/em&gt;. Money rails gives you great tools to manage money and multiple currencies straight up in your Rails application. &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://viewcomponent.org/"&gt;ViewComponent&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;ViewComponent is GitHub's take on expanding upon the partials system in Rails. ViewComponents are a great adaptation to bring the component model that's so common in front end architecture to Rails.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://github.com/ankane/strong_migrations"&gt;StrongMigrations&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Strong migrations runs some linters on your database migrations to make sure you structure your database correctly. It has made I don't shoot myself in the foot many times.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://github.com/joost/phony_rails"&gt;Phony Rails&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Just like the &lt;code&gt;money-rails&lt;/code&gt; gem above, this gem is all about phone numbers. It makes it really easy to track area codes and standardizes your database to always save phone numbers in the IETF format. Trust me, just use it. &lt;/p&gt;

&lt;p&gt;That's it&lt;/p&gt;

&lt;p&gt;Wait, you say that's only 9 gems. What can you do? Off by one errors...&lt;/p&gt;

</description>
      <category>rails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>So I tried Svelte and it was...interesting</title>
      <dc:creator>Riaz Virani</dc:creator>
      <pubDate>Sat, 20 Mar 2021 03:33:34 +0000</pubDate>
      <link>https://forem.com/rvirani1/so-i-tried-svelte-and-it-was-interesting-3hh3</link>
      <guid>https://forem.com/rvirani1/so-i-tried-svelte-and-it-was-interesting-3hh3</guid>
      <description>&lt;p&gt;When I first started writing my blog, I wanted to try something new. I‘m a big believer in doing what you know works for production, but still taking advantage of opportunities to try new things.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Svelte?
&lt;/h1&gt;

&lt;p&gt;Svelte is a framework a la React and Vue. It uses a componentized approach just like those frameworks. However, it compiles down to plain JS with no runtime. That way it‘s smaller. It also looks a lot more like plain HTML and JS rather than weird custom syntax (I‘m looking at your Angular). It also has first class support for animations, which some other frameworks (cough React) don‘t have.&lt;/p&gt;

&lt;h1&gt;
  
  
  However, there are some problems...
&lt;/h1&gt;

&lt;p&gt;The build ecosystem and routing solutions are a bit of a mess and the maintainers keep changing their mind (despite being well intentioned).&lt;/p&gt;

&lt;p&gt;For example, Svelte initially came with a CLI, then the maintainers switched to a format where they give you a template repo and you clone it via a custom tool called &lt;a href="https://github.com/Rich-Harris/degit"&gt;degit&lt;/a&gt;. They now want to move back to a CLI in a future release.&lt;/p&gt;

&lt;p&gt;The recommended Svelte build tool is called &lt;a href="https://sapper.svelte.dev/"&gt;Sapper&lt;/a&gt;. It‘s been deprecated in favor of a to be released build tool called Svelte Kit that is months and months delayed as of March 2021. They‘re also moving it to &lt;a href="https://www.snowpack.dev/"&gt;Snowpack&lt;/a&gt; for reasons? However even sticking with Sapper, I had a lot of obvious issues, like styling the &lt;code&gt;body&lt;/code&gt; tag without triggering a Sapper warning. Build times for any non-trivial app can also get quite long using the webpack version of Sapper, which is something the maintainers acknowledge but can‘t fix until SvelteKit.&lt;/p&gt;

&lt;p&gt;Additionally, one of the principles of the framework is to bind JS to the UI in a way that looks like normal JS. However, this can lead to some problems. You think you‘re looking at &lt;code&gt;var a = "b"&lt;/code&gt; But it‘s actually doing a ton of magic to watch the value that expression to update the DOM. So when it goes wrong. It‘s a little hard to debug.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;First of all, this is just my opinion and this was my first attempt at using Svelte. However, chances are you‘re in the same boat, so I thought my insights could be valuable. I‘ve said a lot of negative things here, but I don‘t mean to rant. I really like Svelte‘s first class support for animations and the fact that it doesn‘t need to start up a runtime on the client to work. That means Svelte sites are generally fast after compilation. However, the ecosystem needs some more attention. It doesn‘t just need to be bigger but needs for the maintainers to stop using it for experimentation. If an idea is good at one point, it needs overwhelming reasons to change.&lt;/p&gt;

</description>
      <category>svelte</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
