<?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 Ahmad Bilal on Medium]]></title>
        <description><![CDATA[Stories by Ahmad Bilal on Medium]]></description>
        <link>https://medium.com/@ahm4d.bilal?source=rss-7e155a721c14------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-DvpCAUmlK10bHe8-e1Wfw.jpeg</url>
            <title>Stories by Ahmad Bilal on Medium</title>
            <link>https://medium.com/@ahm4d.bilal?source=rss-7e155a721c14------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 07:32:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ahm4d.bilal/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[Why Flutter is Great for Web Apps but Terrible for Websites (and Why I Still Prefer React)]]></title>
            <link>https://medium.com/@ahm4d.bilal/why-flutter-is-terrible-for-websites-but-great-for-web-apps-and-why-i-still-prefer-react-a6e59ae322ed?source=rss-7e155a721c14------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6e59ae322ed</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[flutter-vs-react]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[web-app-development]]></category>
            <dc:creator><![CDATA[Ahmad Bilal]]></dc:creator>
            <pubDate>Sat, 22 Jun 2024 13:58:04 GMT</pubDate>
            <atom:updated>2024-06-23T00:08:44.061Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xdp9ibjeWtO_xmY5h7Y6Tw.png" /></figure><p>Flutter has been around for a while now and I have to say that it is one of the best frameworks to build your mobile apps. But it still lacks behind when it comes to websites. Although you can create amazing web apps with Flutter, websites on the other hand are terrible when built using Flutter.</p><p>You might be wondering what’s the difference between a website and a web app. Let’s start with that!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*YcvrAvffAgqDaZmChxHcZA.gif" /><figcaption>Keep talking…</figcaption></figure><h3>Understanding the Difference: Websites vs. Web Apps</h3><p>First things first, let’s clarify the difference between websites and web apps.</p><h4>Websites:</h4><p>Think of these as your online storefronts or information hubs. They need to be easily found on search engines, load quickly, and provide a seamless experience for users navigating through static pages and content. SEO (Search Engine Optimization) is crucial here to ensure your site ranks well on Google and other search engines.</p><h4>Web Apps:</h4><p>These are more dynamic and interactive. They function more like software applications you use on your computer or phone, offering complex functionalities like dashboards, data visualization, and real-time updates. User interaction is a key focus here, rather than just content consumption.</p><p>Simply put, if it’s main goal is to help user perform a task then it’s a web app. For example google maps, Facebook and more.</p><p>If it’s only supposed to have bunch of information, articles or blogs for users to come and read then it’s a website.</p><h3>Why Flutter Falls Short for Websites</h3><p>Flutter is an amazing tool, but it has a critical flaw when it comes to building websites: <strong>SEO</strong>.</p><p>SEO is the backbone of any successful website. It’s what helps your site get discovered in the vast ocean of the internet. Its reliance on client-side rendering makes it terrible for SEO. Search engine bots struggle to index these pages effectively, which means your website’s visibility could suffer significantly.</p><p>Moreover, traditional websites often need to load fast and perform well on a variety of devices and network conditions. While Flutter is designed to create beautiful, responsive UIs, it sometimes falls short in delivering the lightning-fast load times and the lightweight footprint that static websites need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*Logdvqzh065xOzt-XxUiVQ.gif" /><figcaption>I see…..</figcaption></figure><h3>The Sweet Spot for Flutter: Web Apps</h3><p>Now, where Flutter truly shines is in building web apps. Here’s why:</p><p>1. <strong>Unified Codebase</strong>: One of Flutter’s biggest advantages is its ability to let you write once and run everywhere. I’ve personally found it incredibly convenient to build an app that works seamlessly on Android, iOS, and the web without juggling multiple codebases. This not only saves time but also reduces the complexity of maintaining different versions of your app.</p><p>2. <strong>Beautiful UIs</strong>: Flutter’s widget system allows for stunning, highly customizable user interfaces. This is a huge plus for web apps where user experience and interaction are paramount.</p><p>3. <strong>Performance</strong>: Flutter compiles to native ARM code, uses the GPU, and can deliver near-native performance. For web apps that need to handle complex, interactive tasks, Flutter’s performance capabilities are a significant benefit.</p><h3><strong>Why I Still Prefer React for Web Apps</strong></h3><p>Even though Flutter has its merits, I believe <strong>React</strong> is a better choice for developing both web apps and websites if that’s the only thing you’re building. Here’s why:</p><p>1. <strong>SEO-Friendly</strong>: React can be used with Next.js to create server-side rendered apps, making it much more SEO-friendly. This hybrid approach allows you to build web apps that can also function well as traditional websites.</p><p>2. <strong>Vast Ecosystem</strong>: React has a huge ecosystem of libraries and tools that can simplify development and add powerful capabilities to your projects. The community support is also robust, which means finding solutions to problems is usually just a Google search away.</p><p>3. <strong>Flexibility</strong>: React’s component-based architecture provides great flexibility. You can build complex applications with reusable components, which can be easier to manage and scale.</p><p>4. <strong>Performance</strong>: While Flutter offers great performance, React is no slouch either. With tools like React Profiler and libraries like React Query, you can optimise and fine-tune your web apps to perform exceptionally well.</p><p>In case you’re building mobile and web app, then it really depends on your prefrence and the complexity of your project. Since Flutter can has an edge in the single code base perspective, which makes it a lot easier to manage a product that is targetted to multiple platforms.</p><h3>My Experience with Flutter</h3><p>Despite my preference for React for web apps, I can’t deny the ease and efficiency Flutter has brought to my development process, especially for mobile apps.</p><p>I was able to build a Flutter app that was deployed on Android, iOS and Web. I only had to worry about making the UI fit to all screen sizes and I had successfully created a product for all three screen sizes. Which in my opinion is amazing.</p><p>In conclusion, while Flutter is a powerful tool, it’s crucial to choose the right tool for the right job. For SEO-driven websites, look elsewhere. But for dynamic, interactive web apps, Flutter can be a fantastic choice — though React might still edge it out in versatility and community support.</p><p>Catcha later!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*jLQMDBDJr49oIpy6LZpdIA.gif" /><figcaption>Aligator</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6e59ae322ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutterflow: From the Perspective of a Senior Flutter Developer]]></title>
            <link>https://medium.com/@ahm4d.bilal/flutterflow-from-the-perspective-of-a-senior-flutter-developer-860386d29f82?source=rss-7e155a721c14------2</link>
            <guid isPermaLink="false">https://medium.com/p/860386d29f82</guid>
            <category><![CDATA[no-code-development]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[flutterflow]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Ahmad Bilal]]></dc:creator>
            <pubDate>Fri, 01 Mar 2024 02:35:17 GMT</pubDate>
            <atom:updated>2024-03-01T02:35:17.751Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gA077GmbHG0aR3SO8rJemA.png" /></figure><p>Salam!</p><p>Having immersed myself in Flutter app development for the past four years, I recently dove into the world of FlutterFlow, intrigued by its rising popularity.</p><p>Honestly, my first impression wasn’t great.</p><p>FlutterFlow felt restrictive compared to the freedom I was used to in traditional Flutter development.</p><p>But!</p><p>It wasn’t as bad as it felt in the beginning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SsVyytb-iP67ClGFw64GYA.jpeg" /><figcaption>iniiii de beneeenginguh!</figcaption></figure><h3>The beginning: Initial Impressions</h3><p>I started Flutterflow by helping a friend out who had absolute zero knowledge of Flutter.</p><p>While trying to create some demo apps with Flutterflow he often required my help as a Flutter developer in explaining various concepts that were common in both Flutter and Flutterflow.</p><p>While teaching him about basic Flutter I started getting my initial exposure to Flutterflow.</p><p>Not gonna lie, I downright hated it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*AeOudRSgjvZe1ExZzZN2bg.gif" /><figcaption>This was literally me</figcaption></figure><p>Things that were a piece of cake to build on Flutter were extremely frustrating for me on Flutterflow.</p><p>The main cringe that I faced with Flutterflow was that I failed to create very simple widgets. The tool felt useless for me when creating even basic UI components was a nightmare.</p><p>This frustration was only a result of the change that I had to experience with Flutterflow.</p><h3>Discovering the Potential</h3><p>As I continued, I started getting used to the overall workflow of developing Flutterflow apps.</p><p>Although Flutterflow didn’t really make much sense for me initially but after creating multiple teeny tiny apps I started to discover the potential of Flutterflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*20cJmkyET_bp6AVZSI7ZxQ.gif" /><figcaption>Turns out, it’s not that bad</figcaption></figure><p>Creating basic components wasn’t nightmare because Flutterflow is not a good tool. It was because I just did not have enough experience with it.</p><p>Soon I started to feel that it wasn’t that bad. I was just not comfortable with it.</p><h3>Flutterflow is Amazing</h3><p>Now that I have started to develop real world apps with Flutterflow I actually like working on it.</p><p>It has a lot of screen templates that come with already integrated functionality.</p><p>For example, it took me no longer than 5 minutes to add both sign in and sign up screens with all the fields AND the business logic as well. Basically the entire authentication process with Firebase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*z6h5dS7we_3ovl3C6_qWVw.gif" /><figcaption>Didn’t expect it to be soo good!</figcaption></figure><p>All I had to do was search for an authentication template that matched my UI requirements and add it to my project and BOOM! The entire feature was already implemented in my app.</p><p>Once you learn how everything is structured, it becomes extremely easy and straight forward to create Android, iOS and Web apps with Flutterflow.</p><h3>Limitations</h3><p>Although Flutterflow is an incredible tool, it does have its fair share of limitations.</p><p>If your designs have a lot of complex UI components with a bunch of custom animations, it can become a headache to replicate all that in Flutterflow.</p><p>Since you control the entire codebase of your Flutter projects, it gives you a lot more freedom of playing around with your skills. Which is not the case with Flutterflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*e92E0TotU2HeT7GQ14T4pQ.gif" /><figcaption>‘guess I can live with it</figcaption></figure><p>Don’t get me wrong, Flutterflow does allow you to add custom code which can be used to implement complex widgets and other complex business logic requirements.</p><p>But it’s not as convenient as Flutter, maybe it’s only because I’m still embracing the change.</p><p>Anyways, Flutterflow isn’t a no-code platform, it’s low-code. You will often find yourself writing custom code to full-fill your requirements.</p><h3>Is It Worth It?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*3_aXn39pEcv5V97DzN7nMA.gif" /><figcaption>Can’t think of a caption you guys have to do without it</figcaption></figure><p>A big YES. I am surprised by how easy it has become for me to create commercial apps.</p><p>I’ve mentored a bunch of my friends in their programming career and I have started suggesting them to start Flutterflow as well.</p><p>It’s not that hard to learn and it has a huge potential.</p><p>Not to mention it is already starting to be the first choice for a lot people who are looking to build MVPs or simple apps or even big complex apps with a lot of features.</p><h3><strong>Final Thoughts</strong></h3><p>Although Flutterflow might seem a bit complex or frustrating in the beginning for Flutter developers, it actually is really good.</p><p>The ability to add custom code in Flutterflow allows the developers to build almost anything they could build with Flutter.</p><p>Kudos to the Flutterflow team for creating such an outstanding tool!</p><p>And with that,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*iohCOObbu-De1bjszyPVig.gif" /><figcaption>See you in the next one!</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=860386d29f82" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The ROI of Unit Testing: Reducing Bugs, Enhancing Efficiency]]></title>
            <link>https://medium.com/@ahm4d.bilal/the-roi-of-unit-testing-reducing-bugs-enhancing-efficiency-13777d35f23c?source=rss-7e155a721c14------2</link>
            <guid isPermaLink="false">https://medium.com/p/13777d35f23c</guid>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[bug-fixes]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[code-architecture]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Ahmad Bilal]]></dc:creator>
            <pubDate>Wed, 02 Aug 2023 23:09:08 GMT</pubDate>
            <atom:updated>2023-08-02T23:09:08.047Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QaxPkX4Inr3P2zqTgtm-8w.jpeg" /></figure><p>After my experience in working on huge projects with amazing features and functionalities, the only thing that resisted productivity and efficiency was bugs. Even after following the best coding practices and well thought architecture the progress still never was up to the expectations.</p><p>Developing new stuff kept breaking perfectly working old features and nobody really can be held responsible for this in a team of developers because no body expects outcomes like these. Everybody really is responsible for completing the tasks that they are assigned and testing to make sure that the task assigned to them works the way it is expected to work, they can’t test a hundred other things that they didn’t touch it is just not practical.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*SKbBNp-YqQlNKOUo4L3QkA.gif" /><figcaption>You may ask.</figcaption></figure><p>The problem is, that is exactly when unexpected bugs start showing up. Developers might write a single line of code that they thought would not break anything because it seems like a harmless addition thanks to the very good architecture they have only to find out a feature developed a month ago is now starting to break.</p><p>As a consequence, the devs have to work on the feature they already completed, which then affects a few other things and those other things affect yet more stuff and the whole progress goes off like chain reaction of a nuclear bomb and nobody is able to make sense of what is going on.</p><p>This is where unit tests play there role. Before we dive into the importance of unit tests let me tell you what unit tests actually are.</p><h4>What is Unit Testing:</h4><p>The “Unit” refers to the smallest part of your code that you are testing. It could be a line of code, a method, a class or even a module. Unit testing is simply a process of testing those units of code by writing more code that ensures that the unit that is being tested is doing what it is supposed to do.</p><p>For example, suppose you just wrote a function called “sumTwoNumbers” that takes two integers as parameters and it is supposed to return the sum of those two numbers. A unit test for this function would be to write a code that calls this function with different numbers and verify whether the returned result matches the expected sum.</p><h4>Importance of Unit Testing:</h4><p>Let’s consider the “sumTwoNumbers” from the example in last section. Let’s suppose that you now have to write a function named “squareTheSumOfTwoNumbers” that calculates a + b squared. You can simply create a function that calls the <em>sumTwoNumbers</em>, multiply the result with itself and you now have the result that you’re expecting.</p><p>But for the function <em>squareTheSumOfTwoNumbers </em>to work as expected you have to be 100% sure that the <em>sumTwoNumbers </em>function also works as expected. Fortunately, we don’t have to manually test the function because we already have a piece of code that automatically tests it for us. All you have to do is run the test and if it passed then you know that the <em>sumTwoNumbers </em>function is actually intact and working like it is supposed to.</p><p>Now imagine a huge project with thousands of lines of code that is with a whole lot of functions dependant on other functions. Adding a new feature and being 100% sure that it works with previous features in harmony is almost impossible. You can’t manually test each an every function because it will take an enormous amount of time to do so but still it is crucial to do so for you to be 100% sure that your project is bug free.</p><p>If you’ve written unit tests for each part of your project you will only have to worry about the new things that you add in your project and the unit tests will make sure that the old things don’t break because of it. What takes indefinite amount of time to do manually will be done in matter of seconds and it will keep the integrity of your project intact at all times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*UGTRY4ZeGsdTZxkVi_9OLg.gif" /><figcaption>Fully concentrated</figcaption></figure><h4>Benefits of Unit Tests:</h4><p>It might seem like writing unit test can slow the process of development given that you have to write the feature and the tests for it as well but trust me when I say that unit tests only speed up the process. Now with tools like ChatGPT you don’t even have to write the cases, you just have to provide the code to ChatGPT and it’ll write the tests for you, of course you might have to do some changes but GPT will do most of the work for you.</p><p>Here are some of the many benefits of writing unit tests:</p><ol><li><strong>Bug Prevention and Early Detection<br></strong>Unit tests are a huge help in making sure that you project is bug free. You don’t have to go test everything manually to find bugs. In fact you don’t even have to compile your project you just have to run the tests and find any anomalies with a single command.</li><li><strong>Code Stability and Refactoring:<br></strong>Unit Tests make ensure the stability of your code. You are forced to write more isolated clean code for it to be testable using unit tests. Hence improving the overall quality and stability of code.</li><li><strong>Enhancing Collaboration:<br></strong>Having Unit Tests in place make it very easy for collaborators to work on a project. By providing a clear and standardized specification for the behavior of individual code units, unit tests bridge communication gaps between team members. Developers can confidently understand how a particular component is expected to function based on its tests.</li><li><strong>Enabling Continuous Integration:<br></strong>The biggest enemy of CI/CD is unstable buggy code. You can’t deploy a code that has bugs and it is very hard to eliminate them without unit tests. When you have written unit tests you don’t have to spend hours to test your project before deploying but let the Unit Tests do that for you so you can spend the time in developing more cooler stuff for the next deployment.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*tCjoapU1yOsGa8L6G7-i4Q.gif" /><figcaption>Damn son!</figcaption></figure><h4><strong>Conclusion</strong></h4><p>In a nutshell, unit testing is like giving your code a health check-up — but without the stethoscope. By testing each tiny part all by itself, we make sure they’re all working as they should. But it’s not just about catching bugs; unit tests are like the secret recipe for a happy developer family. They help us work together smoothly, understand each other’s code, and make sure no one breaks anything accidentally. So, remember, writing unit tests isn’t just for geeks — it’s like adding an extra layer of superhero protection to your code. And who doesn’t want their code to wear a cape? Happy coding, testing, and cape-wearing!</p><p>Adios!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*kxBvmeovdjj6CkmvDcG9nA.gif" /><figcaption>Peace Out!</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13777d35f23c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Flutter Hooks and Creating Custom Hooks in Flutter]]></title>
            <link>https://medium.com/@ahm4d.bilal/understanding-flutter-hooks-and-creating-custom-hooks-in-flutter-d23998a0fcd5?source=rss-7e155a721c14------2</link>
            <guid isPermaLink="false">https://medium.com/p/d23998a0fcd5</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter-hooks]]></category>
            <dc:creator><![CDATA[Ahmad Bilal]]></dc:creator>
            <pubDate>Tue, 04 Jul 2023 19:13:39 GMT</pubDate>
            <atom:updated>2024-06-17T09:32:24.316Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FwWxqshEnCFcEAb2W_nLCw.jpeg" /></figure><p>Hello keyboard magicians!</p><p>I remember the time when the phrase ‘Flutter Hooks’ seemed like a scary thing that is only for the gurus of Flutter and a noob like me should stay away from these fancy terms. But when I created my first hook I was thrilled by how simple and readable my code turned out because of a simple hook and I’m like Monica from F.R.I.E.N.D.S when it comes to cleanliness of code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0UPVQeZfYJtH5grDxd927A.png" /></figure><h3>Introduction:</h3><p>Flutter hooks are a powerful tool for managing state and performing side effects in Flutter applications. They simplify code structure, improve reusability, and enhance performance. In this article, we’ll explore what hooks are and learn how to create custom hooks. Get ready to streamline your Flutter development with the flexibility and simplicity of Flutter hooks. Let’s get started!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*Z-F8zU7b2ESO9_4Fzn-oUg.gif" /></figure><h3>Creating a Custom Hook:</h3><p>The best way to understand what a Flutter hook really is is to create your own. That’s how I got to make sense of it.</p><p>Let’s make a hook that will help us use the TextEditingController without having to worry about its disposal.</p><p>Let me show you how it’s done!</p><p><strong>Import the flutter_hooks package:</strong></p><p>Let’s start with importing the Flutter Hooks package into our project:</p><pre>flutter pub add flutter_hooks</pre><p>Run this command in your terminal and you’ll have the flutter_hooks package ready to use in your project, or do it the boring way and go to the pub.dev site to copy and paste it manually.</p><p><strong>Create a hook class:</strong></p><p>Let’s create a file named <strong>text_editing_controller_hook.dart</strong> and start cooking some stuff in it.</p><pre>class _TextEditingControllerHook extends Hook&lt;TextEditingController&gt; {<br>  const _TextEditingControllerHook();<br><br>  @override<br>  _TextEditingControllerHookState createState() =&gt; <br>                    _TextEditingControllerHookState();<br>}</pre><p>To create a <em>Hook</em> class you extend your class with <em>Hook&lt;T&gt; </em>class where <em>T </em>can be anything that you expect this hook to return you when you’re calling it. Since we’re creating a Hook to use <em>TextEditingController </em>I’ve extended my <em>Hook </em>class with <em>Hook&lt;TextEditingController&gt;</em>.</p><p>Another thing that you might notice is the <em>_TextEditingControllerHookState</em>. This is the part where all the cool stuff happens. Every hook has a state just like every Stateful widget has a state. We haven’t created a state for our hook yet so let’s get that done.</p><p><strong>Create hook state class:</strong></p><pre>class _TextEditingControllerHookState extends HookState&lt;TextEditingController, _TextEditingControllerHook&gt; {<br>  TextEditingController controller;<br><br>  @override<br>  void initHook() {<br>    super.initHook();<br>    controller = TextEditingController();<br>  }<br><br>  @override<br>  TextEditingController build(BuildContext context) {<br>      return controller;<br>  }<br><br>  @override<br>  void dispose() {<br>    controller.dispose();<br>    super.dispose();<br>  }<br>}</pre><p>This literally looks exactly like the <em>State </em>of a <em>Stateful </em>widget, the only difference here is that the build method returns a <em>TextEditingController </em>instead of a <em>Widget</em>.</p><p>Just like the <strong><em>initState </em></strong>of a Stateful widget, <strong><em>initHook </em></strong>is the method where you can initialize all of your values, <strong><em>build </em></strong>method returns those values to the caller and the <strong><em>dispose </em></strong>method is called at the end of the Hook’s lifecycle where you can dispose off any values that need disposals.</p><p><strong>Final Step:<br></strong>Final step in creating the Hook is creating a method that will allow us to use the hook that we just created.</p><pre>TextEditingController useTextEditingController(){<br>  return use(const _TextEditingControllerHookState());<br>}</pre><p>That’s it! You’ve just created you’re own hook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*rqybwXlv3GtwV_s2HpKJWA.gif" /><figcaption>Wuhoo!!</figcaption></figure><p>This is how your <strong>text_editing_controller_hook.dart </strong>should look like in the end<strong>.</strong></p><pre>TextEditingController useTextEditingController(){<br>  return use(const _TextEditingControllerHookState());<br>}<br><br>class _TextEditingControllerHook extends Hook&lt;TextEditingController&gt; {<br>  const _TextEditingControllerHook();<br><br>  @override<br>  _TextEditingControllerHookState createState() =&gt; <br>                    _TextEditingControllerHookState();<br>}<br><br>class _TextEditingControllerHookState extends HookState&lt;TextEditingController, _TextEditingControllerHook&gt; {<br>  TextEditingController controller;<br><br>  @override<br>  void initHook() {<br>    super.initHook();<br>    controller = TextEditingController();<br>  }<br><br>  @override<br>  TextEditingController build(BuildContext context) {<br>      return controller;<br>  }<br><br>  @override<br>  void dispose() {<br>    controller.dispose();<br>    super.dispose();<br>  }<br>}<br></pre><h3>Using Hooks in your widgets:</h3><p>To use Hooks in your widgets you have to extend them HookWidget class instead of Stateless or Stateful.</p><pre>class Example extends HookWidget {<br>  const Example({Key? key, required this.duration})<br>      : super(key: key);<br><br>  final Duration duration;<br><br>  @override<br>  Widget build(BuildContext context) {<br>    final controller = useTextEditingController();<br>    return Container();<br>  }<br>}</pre><p>And that’s it. You don’t have to worry about disposing this controller as the hook takes care of it already. All you have to do is have fun with it.</p><h3><strong>Prebuilt Flutter Hooks:</strong></h3><p>Here are some cool prebuilt hooks that you can use.</p><ol><li><a href="https://pub.dartlang.org/documentation/flutter_hooks/latest/flutter_hooks/useAnimationController.html">useAnimationController</a></li><li><a href="https://pub.dartlang.org/documentation/flutter_hooks/latest/flutter_hooks/useSingleTickerProvider.html">useSingleTickerProvider</a></li><li><a href="https://pub.dev/documentation/flutter_hooks/latest/flutter_hooks/useTextEditingController-constant.html">useTextEditingController</a>(Yeah it’s prebuilt you didn’t have to do all that lol)</li></ol><p>Head on to <a href="https://pub.dev/packages/flutter_hooks">flutter_hooks</a> package to discover more hooks that you can use.</p><h3><strong>Conclusion:</strong></h3><p>In conclusion, Flutter hooks simplify state management and code reusability in Flutter apps. Creating custom hooks allows you to encapsulate logic and reuse it throughout your app. By leveraging hooks, you can write cleaner, modular code and enhance your development process. Explore prebuilt hooks for common use cases and unlock the power of Flutter hooks in your projects. <strong>Don’t Be a Stranger, Please!</strong></p><p><em>NOTE: I regularly go through my comments, if you have any questions or if you want me to write a guide for something you’re struggling with, leave a comment below and I’ll make sure to help you out!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*ZsH0BHiv3ejI-XOAcIEhbg.gif" /><figcaption>Bon Voyage</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d23998a0fcd5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using GoRouter’s ShellRoute in Flutter for Nested Navigation]]></title>
            <link>https://medium.com/@ahm4d.bilal/using-gorouters-shellroute-in-flutter-for-nested-navigation-777a9a20642f?source=rss-7e155a721c14------2</link>
            <guid isPermaLink="false">https://medium.com/p/777a9a20642f</guid>
            <category><![CDATA[bottomnavigationbar]]></category>
            <category><![CDATA[nested-navigation]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[Ahmad Bilal]]></dc:creator>
            <pubDate>Mon, 15 May 2023 17:41:08 GMT</pubDate>
            <atom:updated>2024-06-17T09:32:52.304Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello developers!</p><p>I had recently worked on developing a nested navigation feature with a persistent bottom navigation bar using go_router and it’s new feature ShellRoute and it works like a charm.</p><p>Ladies and Gentlemen, let me show you how the boss does it.(That’s Pheonix’s line from Valorant)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*qQvZYaN08kuIFrN6dQEskg.gif" /></figure><h3>1. Introduction:</h3><h4>GoRouter</h4><p>go_router is a package for Flutter app development that provides a powerful and flexible way to handle navigation in your app. It provides a router system that allows you to define routes and map them to specific widgets in your app. One of its key features is the ShellRoute, which provides a persistent bottom navigation bar that can be used to switch between different screens or tabs in your app.</p><h4>ShellRoute</h4><p>The ShellRoute feature in go_router allows you to create a parent route with a bottom navigation bar, which can then be used to display different child routes as tabs or screens. This was introduced in go_router v7.0.0. This provides a convenient and user-friendly way to navigate between different sections or features of your app, without having to navigate back and forth through a series of screens. The ShellRoute also allows you to easily switch between different tabs or screens, while preserving the state of each screen.</p><p>Overall, the go_router package and ShellRoute feature provide a powerful and flexible way to handle navigation in your Flutter app, while also providing a user-friendly and intuitive way to switch between different sections or features of your app.</p><h4>Importance Of Persistent Bottom Navigation Bar</h4><p>A well-designed persistent bottom navigation bar can greatly enhance the user experience and make the app more user-friendly. It can help users easily explore the app’s different sections and features, improving engagement and retention. Additionally, a persistent bottom navigation bar can give the app a more polished and professional look, improving the overall brand image.</p><p>In summary, a persistent bottom navigation bar is an important design element for a Flutter app, providing easy navigation and enhancing the user experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*n6GetP4BlzpIwFIHJezhng.gif" /></figure><h3>2. Prerequisites:</h3><ol><li>Make sure you have the latest Flutter SDK on your PC</li><li>Run the following command to create a new Flutter project:</li></ol><pre>flutter create go_router_demo</pre><p>3. To add go_router in your project run the following command:</p><pre>flutter pub add go_router</pre><h3><strong>3. Bottom Navigation Bar Scaffold:</strong></h3><p>Let’s create a parent screen which will hold the bottom navigation bar. This will accept a child widget as it’s argument. This child widget will help us display child routes in our app while keeping the BottomNavigationBar persistent across all child routes.</p><pre>  int currentIndex = 0;<br><br>  @override<br>  Widget build(BuildContext context) {<br>    return Scaffold(<br>      body: widget.child,<br>      bottomNavigationBar: BottomNavigationBar(<br>        onTap: changeTab,<br>        backgroundColor: const Color(0xffe0b9f6),<br>        currentIndex: currentIndex,<br>        items: const [<br>          BottomNavigationBarItem(icon: Icon(Icons.home), label: &#39;Home&#39;),<br>          BottomNavigationBarItem(icon: Icon(Icons.chat), label: &#39;Chat&#39;),<br>        ],<br>      ),<br>    );<br>  }</pre><p>The <em>changeTab </em>function will take care of navigating between the Home and Chat tabs.</p><pre>void changeTab(int index) {<br>    switch(value){<br>      case 0:  <br>        context.go(&#39;/&#39;);<br>        break;<br>      case 1:  <br>        context.go(&#39;/chat&#39;);<br>        break;<br>      default:<br>        context.go(&#39;/&#39;);<br>        break;<br>    }<br>    setState(() {<br>      currentIndex = value;<br>    });<br>  }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/246/1*OsfeWqkayJSX0KYe-74j3Q.gif" /></figure><h3>4. Setting up router:</h3><p>This is the part where all of the magic happens.</p><p>For the sake of this guide, I’ve created 4 pages:</p><ol><li>Home</li><li>Chat</li><li>Settings</li><li>Terms Of Services</li></ol><p>To have nested navigation for these pages you are required to have separate navigator keys for each level of nesting. In our case, we will create 2 navigator keys:</p><pre>final _rootNavigatorKey = GlobalKey&lt;NavigatorState&gt;();<br>final _shellNavigatorKey = GlobalKey&lt;NavigatorState&gt;();</pre><p>The <em>_rootNavigatorKey </em>will be used for the parent navigation stack while the <em>_shellNavigatorKey </em>will serve it’s purpose in nested navigation with ShellRoute.</p><p>The <em>_rootNavigatorKey</em> will help us in all of the routes that are not suppose to have the persistent <em>BottomNavigationBar</em>, while the <em>_shellNavigatorKey</em> will be used for all the routes that should have the <em>BottomNavigationBar</em>.</p><p>Now, let’s create a bunch of routes for this noble purpose of ours:</p><pre>final router = GoRouter(<br>  navigatorKey: _rootNavigatorKey,<br>  routes: [<br>    ShellRoute(<br>      navigatorKey: _shellNavigatorKey,<br>      builder: (context, state, child) =&gt;<br>          BottomNavigationBarScaffold(child: child),<br>      routes: [<br>        GoRoute(<br>          path: &#39;/&#39;,<br>          parentNavigatorKey: _shellNavigatorKey,<br>          builder: (context, state) =&gt; const HomePage(),<br>        ),<br>        GoRoute(<br>          path: &#39;/chat&#39;,<br>          parentNavigatorKey: _shellNavigatorKey,<br>          builder: (context, state) =&gt; const ChatPage(),<br>        ),<br>        GoRoute(<br>          path: &#39;/settings&#39;,<br>          parentNavigatorKey: _shellNavigatorKey,<br>          builder: (context, state) =&gt; const SettingsPage(),<br>          routes: [<br>            GoRoute(<br>              path: &#39;terms-of-services&#39;,<br>              parentNavigatorKey: _rootNavigatorKey,<br>              builder: (context, state) =&gt; const TermsOfServicesPage(),<br>            ),<br>          ],<br>        ),<br>      ],<br>    )<br>  ],<br>);</pre><p>I’ve created the pages in the following hierarchy:</p><pre>-&gt; Botton Navigation Bar Scaffold<br>   -&gt; Home<br>   -&gt; Chat<br>   -&gt; Settings<br>      -&gt; Terms of Service</pre><p>All Routes except for the Terms Of Service has <em>_shellNavigatorKey </em>as their parent navigator key. This will result in all routes navigating within the <em>BottomNavigationBarScaffold </em>except for the <em>TermsOfServicePage</em>, which will open as an entirely new page on the parent navigation stack without the bottom navigation bar.</p><h3>5. Navigating Between Routes:</h3><p>It’s all done. You’ve successfully implemented nested navigation in your project. Wuhoo!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*-lKavvf7-diWZdV-9TCDcg.gif" /></figure><p>All you have to do now is to use context.go() method provided by go_router to start navigating between your screens and the router that we just set up will do all of the work for us. Isn’t that cool?!</p><p><strong>Note:</strong></p><p>Big shout out to</p><h3>Conclusion:</h3><p>In conclusion, the go_router package and ShellRoute feature provide a powerful solution for implementing a persistent bottom navigation bar in your Flutter app. By following the steps outlined above, you can enhance the navigation experience and improve the overall user interface of your app. Happy coding!</p><p>Note: The code snippets provided in this article are for demonstration purposes and may require customisation to fit your specific app structure and design.</p><p><em>NOTE: I regularly go through my comments, if you have any questions or if you want me to write a guide for something you’re struggling with, leave a comment below and I’ll make sure to help you out!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*FX70ARrhtMfCV40g0ttlAQ.gif" /></figure><p>See you on my next article, Ma’assalama!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=777a9a20642f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Efficient State Management in Flutter with Stacked: A Guide to the Latest Version and Stacked CLI]]></title>
            <link>https://medium.com/@ahm4d.bilal/efficient-state-management-in-flutter-with-stacked-a-guide-to-the-latest-version-and-stacked-cli-28e12ff406d0?source=rss-7e155a721c14------2</link>
            <guid isPermaLink="false">https://medium.com/p/28e12ff406d0</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[cli]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[stacked]]></category>
            <dc:creator><![CDATA[Ahmad Bilal]]></dc:creator>
            <pubDate>Wed, 12 Apr 2023 04:25:40 GMT</pubDate>
            <atom:updated>2023-07-05T12:33:33.811Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello fellow geeks!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*iEo9FASqZHN3GU3gA2UqOg.gif" /></figure><p>FilledStacks recently introduced a new CLI for us Flutter developers and it is just amazing!</p><p>It helps you create new views, services, bottom sheets and dialogs without you having to manually create files for each of them.</p><p>The thing about this CLI that amazes me the most is that you don’t have to do any manual setup anymore. The CLI takes care of all the boilerplate for you so you can focus on more cooler stuff.</p><p>Here’s a step by step guide on how to use it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/1*RBu6fGgq8-5AKXpiCxY26g.gif" /></figure><h3>Introduction</h3><p>Stacked is a popular state management solution for Flutter, which helps in streamlining the development process. It uses reactive programming principles to manage state within the app. With the release of version 3.2.0, the Stacked package introduces a new command-line interface tool called Stacked CLI, which simplifies the project setup process.</p><h3>Prerequisites</h3><p>Before we get started, make sure that you have installed the following software:</p><ul><li>Flutter SDK (version 2.0 or higher)</li><li>Dart SDK (version 2.12 or higher)</li></ul><h3>Installation</h3><p>To install the Stacked CLI, open your terminal and run the following command:</p><pre>dart pub global activate stacked_cli</pre><p>Tada! Stacked CLI has now made home in your machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*r-osfVhoBl0RsYLcAol60Q.gif" /></figure><h3>Creating a Stacked Project</h3><p>Let’s create a new Flutter project with all of the initial setup for Stacked state management system. The boring part!</p><p>Thanks to the CLI you can cut the 20 minutes of setup by just running this one command.</p><pre>stacked create app</pre><p>This command will prompt you to enter a project name and description. After entering this information, the Stacked CLI will create a new Flutter project with the Stacked package installed.</p><p>And boom! we’re done with the initial setup in less than 30 seconds. How cool is that!</p><h3>Generating a Stacked View</h3><p>Now how about creating a new Stacked view using the CLI? Run the following command in your terminal:</p><pre>stacked create view [view_name]</pre><p>Replace [view_name] with the name of the widget you want to create. This command will generate a new Stacked widget in your project, along with a corresponding view and viewmodel.</p><p>AND!</p><p>It also generates named routes for the corresponding view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*3reU7fSrSZQ6YMbHuY22rw.gif" /></figure><h3>Running the App</h3><p>To run the app, navigate to the root directory of your project in your terminal and run the following command:</p><pre>flutter run</pre><p>This will launch the app in debug mode on your connected device or emulator.</p><h3>Other Cool Commands:</h3><p>Here’s a set of other commands that you can have fun with:</p><p><strong>1. Create Bottom sheet:</strong></p><pre>stacked create bottom_sheet</pre><p>Creates a bottom sheet with all associated files and makes necessary code changes for adding a bottom sheet.</p><p><strong>2. Create Dialog:</strong></p><pre>stacked create dialog</pre><p>Creates a dialog with all associated files and makes necessary code changes for adding a dialog.</p><p><strong>3. Create Service:</strong></p><pre>stacked create service</pre><p>Creates a service with all associated files and makes necessary code changes to include that service.</p><p><strong>4. Delete a View:</strong></p><pre>stacked delete view</pre><p>Deletes a view with all associated files and makes necessary code changes for deleting a view.</p><p><strong>5. Delete a Service:</strong></p><pre>stacked delete service</pre><p>Deletes a service with all associated files and makes necessary code changes for deleting a service.</p><h3>Conclusion</h3><p>Voila! Now you guys posses an ability to wield the powers of Stacked CLI.</p><p>For more info head over to the official <a href="https://stacked.filledstacks.com/docs/Tooling/stacked-cli"><strong>docs</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*nz22kWIzhflKmpyYcrBeuw.gif" /></figure><p>Adios!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28e12ff406d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[State Management with Stacked | Flutter]]></title>
            <link>https://medium.com/@ahm4d.bilal/state-management-with-stacked-flutter-1aa21218ef48?source=rss-7e155a721c14------2</link>
            <guid isPermaLink="false">https://medium.com/p/1aa21218ef48</guid>
            <dc:creator><![CDATA[Ahmad Bilal]]></dc:creator>
            <pubDate>Tue, 04 Apr 2023 00:18:40 GMT</pubDate>
            <atom:updated>2023-04-04T00:55:12.262Z</atom:updated>
            <content:encoded><![CDATA[<p>Stacked is a popular state management library for Flutter that provides a simple and efficient way to manage your app’s state. In this step-by-step guide, I’ll show you how to get started with Stacked in your Flutter project.</p><p>Ever since I’ve been developing applications with Flutter I’ve always preferred Stacked as my state management system. I’ve always loved the principals that Stacked comes with. It helps me keep my code very clean.</p><h3>Step 1: Add the Stacked Package to Your Flutter Project</h3><p>The first step in using Stacked is to add the package to your Flutter project. To do this, open your project’s pubspec.yaml file and add the following dependency:</p><pre>dependencies:<br>  stacked: ^3.2.0</pre><p>After adding the dependency, save the file and run flutter pub get to download the package.</p><h3>Step 2: Create Your ViewModel</h3><p>In Stacked, the ViewModel is the class that holds your app’s state and business logic. To create your ViewModel, extend the BaseViewModel class from the Stacked package and add your state variables and functions.</p><p>Here’s an example ViewModel:</p><pre>import &#39;package:stacked/stacked.dart&#39;;<br><br>class MyViewModel extends BaseViewModel {<br>  String _name = &#39;John&#39;;<br><br>  String get name =&gt; _name;<br><br>  void updateName(String value) {<br>    _name = value;<br>    rebuildUi();<br>  }<br>}</pre><p>In this example, the ViewModel has a name variable and an updateName function that updates the name variable and notifies the listeners.</p><h3>Step 3: Connect Your ViewModel to Your View</h3><p>To connect your ViewModel to your view, you’ll need to use the StackedView widget from the Stacked package. The StackedView widget listens to the ViewModel&#39;s state changes and rebuilds the view accordingly.</p><p>Here’s an example View that uses the StackedView widget:</p><pre>import &#39;package:flutter/material.dart&#39;;<br>import &#39;package:stacked/stacked.dart&#39;;<br><br>import &#39;my_view_model.dart&#39;;<br><br>class MyView extends StackedView&lt;MyViewModel&gt; {<br>  const MyView({Key? key}) : super(key: key);<br><br>  @override<br>  Widget builder(BuildContext context, MyViewModel viewModel, Widget? child) {<br>    return Scaffold(<br>      body: Center(<br>        child: Text(model.name),<br>      ),<br>      floatingActionButton: FloatingActionButton(<br>        onPressed: () {<br>          model.updateName(&#39;Jane&#39;);<br>        },<br>        child: const Icon(Icons.edit),<br>      ),<br>    );<br>  }<br><br>  @override<br>  MyViewModel viewModelBuilder(BuildContext context)=&gt;<br>    MyViewModel();<br>}</pre><p>In this example, the StackedView widget creates a new instance of the MyViewModel by calling viewModelBuilder method and listens to its state changes. The builder function is called whenever the ViewModel&#39;s state changes, and it rebuilds the view accordingly.</p><h3>Step 4: Run Your Flutter App</h3><p>That’s it! You’ve successfully integrated Stacked into your Flutter project. Run your app and test it out to make sure everything is working as expected.</p><h3>Conclusion</h3><p>Stacked is a powerful state management library for Flutter that provides a simple and efficient way to manage your app’s state. In this guide, I’ve shown you guys how to get started with Stacked by adding the package to your project, creating your ViewModel, connecting your ViewModel to your view using the StackedView widget, and running your Flutter app. With these steps, you can easily implement Stacked in your Flutter project and simplify your app&#39;s state management.</p><p>For more on Stacked visit <a href="https://www.filledstacks.com/">FilledStacks</a>.</p><p>Adios!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1aa21218ef48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clean Code Importance and Tips]]></title>
            <link>https://medium.com/@ahm4d.bilal/clean-code-importance-and-tips-9f6aae3ee5ce?source=rss-7e155a721c14------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f6aae3ee5ce</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Ahmad Bilal]]></dc:creator>
            <pubDate>Thu, 20 Oct 2022 11:48:29 GMT</pubDate>
            <atom:updated>2022-10-20T11:51:05.031Z</atom:updated>
            <content:encoded><![CDATA[<p>In software development, “clean code” is code that is easy to read, understand, and modify. It is well-organized, well-documented, and follows industry best practices. Importance of clean code can not be denied. This article will go through the importance of clean code and I will give you some tips on how to write clean code.</p><h3>Importance</h3><p>There are many benefits to writing clean code. For one, it can help make your code more maintainable and error-prone. This is because clean code is easier to read and understand, and thus it is easier to find and fix bugs. Additionally, clean code can make your code more reusable. This is because it is easier to understand and modify, and thus it can be used in other projects or adapted to new situations.</p><p>Lastly, writing clean code can improve your reputation as a software developer. This is because others will see that you take the time to write well-organized and well-documented code, and they will be more likely to trust and respect your work.</p><h3>So, how do you write clean code?</h3><p><strong>Here are some tips:</strong></p><ol><li>Use descriptive variable and function names.</li><li>Use comments to explain what your code does.</li><li>Organize your code into logical sections.</li><li>Follow industry best practices.</li><li>Use a consistent coding style.</li></ol><p><strong>Let me explain these points:</strong></p><ol><li><em>Use descriptive variable and function names.</em> It means that your function/variable name should describe its purpose. When another developer comes around and observes your code, they should be able to have an idea of why a certain variable or function exists. It increases the code readability by a lot. Once it is determined why a variable or function exists, understanding the inside logic of the function or usage of a variable becomes much easier.</li><li><em>Use comments to explain what your code does.</em> In certain situations, you might not be able to come up with good descriptive names. This could make the code less readable, but it can be handled by adding small comments explaining why a certain part of code exists, or how it does what it is doing.</li><li><em>Organise your code into logical sections.</em> Write more functions and create more variables. When you write more functions your code reusability increases. And if you name those functions in a good way the code readability also gets better. Each function should be doing only one job, and the name should be describing what job is being done by the function.</li><li><em>Follow industry best practices. </em>When you follow the practices that other people in your industry are following, everyone starts to looking at your code as their own. They start to understand it more easily.</li><li><em>Use a consistent coding style. </em>Finally, your code should always be consistent. Following the above given tips, you should come up with a coding style that you follow for your projects. Consistency in code makes the code easier to understand.</li></ol><p><strong>Final word</strong></p><p>Coders are authors. Become a good author, write a code that is eye catching like a well written book that follows the grammar and is divided into multiple chapters and topics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f6aae3ee5ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>