<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Manthan Bhatt</title>
    <description>The latest articles on DEV Community by Manthan Bhatt (@manthanbhatt).</description>
    <link>https://dev.to/manthanbhatt</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%2F578721%2F34b5d99d-dd8e-4fc3-b7b8-1420b7e2d6b3.jpg</url>
      <title>DEV Community: Manthan Bhatt</title>
      <link>https://dev.to/manthanbhatt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/manthanbhatt"/>
    <language>en</language>
    <item>
      <title>DevLaunch - I built a Vercel-inspired dev server manager</title>
      <dc:creator>Manthan Bhatt</dc:creator>
      <pubDate>Fri, 20 Mar 2026 07:03:25 +0000</pubDate>
      <link>https://dev.to/manthanbhatt/devlaunch-i-built-a-vercel-inspired-dev-server-manager-42ip</link>
      <guid>https://dev.to/manthanbhatt/devlaunch-i-built-a-vercel-inspired-dev-server-manager-42ip</guid>
      <description>&lt;p&gt;Every developer who works on multiple projects locally knows the pain.&lt;br&gt;
You've got an Ionic app on port 8101, a Laravel API on 8000, and an Angular portal on 4200. That's three terminal tabs, three commands to remember, three processes to track, and the moment you close a terminal by accident, you're back to square one. I built DevLaunch to fix exactly that.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is DevLaunch?
&lt;/h2&gt;

&lt;p&gt;DevLaunch is a single-file PHP dev server manager with a Vercel-inspired dark UI. You add your local projects, assign them a command and port, and then start, stop, and monitor them all from one browser tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzttnn3jg6krymt82nwaf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzttnn3jg6krymt82nwaf.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No npm install. No composer. No build step. Drop one index.php into any folder served by PHP and open it in your browser.&lt;/p&gt;
&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Single file: the entire app (PHP backend + HTML/CSS/JS frontend) lives in one index.php&lt;/li&gt;
&lt;li&gt;Add any project: browse your filesystem server-side (yes, including Windows drives like D:) to select a project folder; the name is auto-detected&lt;/li&gt;
&lt;li&gt;Any command: ionic s, npm run dev, ng serve, vite, php artisan serve — whatever you run in the terminal&lt;/li&gt;
&lt;li&gt;Custom ports: assign a port per project; the --port flag is auto-appended if not already in your command&lt;/li&gt;
&lt;li&gt;Start/Stop: launches as a real detached background process, kills the full process tree on stop (no zombie node processes)&lt;/li&gt;
&lt;li&gt;Live log viewer: tail stdout/stderr from any running project in a slide-up terminal panel&lt;/li&gt;
&lt;li&gt;Running detection: auto-detects whether a process is still alive after page refresh or system events&lt;/li&gt;
&lt;li&gt;Windows + Linux + macOS: works everywhere PHP runs&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/ManthanBhatt/dev-launch.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Drop the folder inside your XAMPP/Laragon htdocs (or anywhere served by PHP), then open:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost/dev-launch/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or use PHP's built-in server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;dev-launch
php &lt;span class="nt"&gt;-S&lt;/span&gt; localhost:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;The whole thing is a single PHP file that serves two roles depending on the request:&lt;br&gt;
As an API - when a request comes in with the X-DevLaunch-API header, PHP handles actions like start_project, stop_project, browse_dirs, and get_log. Project data is stored in a plain devlaunch_data.json file, and running PIDs are tracked in devlaunch_pids.json.&lt;br&gt;
As the UI - for every other request, PHP outputs the full HTML page with embedded CSS and JavaScript.&lt;br&gt;
Starting a project uses proc_open() to launch the command as a real detached background process in the correct working directory. The process writes its output to a temp log file that the log viewer polls every 2 seconds.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$process&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;proc_open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'cmd'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nv"&gt;$descriptors&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$pipes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'path'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="nv"&gt;$status&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;proc_get_status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$process&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;$pid&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nv"&gt;$status&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'pid'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Windows, it wraps the command in cmd /C so tools like ionic, npm, and ng resolve correctly from PATH. Stopping a project calls taskkill /F /T to kill the entire process tree - no orphan Node processes lingering in Task Manager.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why PHP?
&lt;/h2&gt;

&lt;p&gt;Honestly, the goal was zero setup. PHP is already running on most local dev environments - XAMPP, Laragon, MAMP, or the built-in server. No runtime to install, no package manager, no compilation. You just put a file somewhere and it runs.&lt;br&gt;
Single-file PHP also means the whole thing is trivially auditable - there are no hidden dependencies, no transitive packages, nothing that phones home. It's ~1,200 lines of code you can read in one sitting.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;Some ideas I'm thinking about for future versions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Environment variable editor per project&lt;/li&gt;
&lt;li&gt;Auto-restart on crash with configurable retry&lt;/li&gt;
&lt;li&gt;Multiple commands per project (e.g. spin up a frontend + backend simultaneously with one click)&lt;/li&gt;
&lt;li&gt;Export/import project list for sharing across machines&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it / Contribute
&lt;/h2&gt;

&lt;p&gt;The project is MIT licensed and open source on GitHub:&lt;br&gt;
&lt;a href="https://github.com/ManthanBhatt/dev-launch" rel="noopener noreferrer"&gt;github.com/ManthanBhatt/dev-launch&lt;/a&gt;&lt;br&gt;
If you work on multiple local projects and find this useful, a ⭐ on GitHub goes a long way. PRs, issues, and feature ideas are all welcome.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Built out of frustration with terminal tab juggling. Hope it helps someone else too.Share&lt;/em&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>devtool</category>
    </item>
    <item>
      <title>What's up?</title>
      <dc:creator>Manthan Bhatt</dc:creator>
      <pubDate>Sun, 28 Jul 2024 14:11:18 +0000</pubDate>
      <link>https://dev.to/manthanbhatt/whats-up-5bm9</link>
      <guid>https://dev.to/manthanbhatt/whats-up-5bm9</guid>
      <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I hope everyone is having a great relaxing weekend.&lt;/p&gt;

&lt;p&gt;I have created this post in intent to connect with the dev all over the world.&lt;/p&gt;

&lt;p&gt;You can share things about yourself and things you have been working on or anything that comes to your mind.&lt;/p&gt;

&lt;p&gt;I'll start with myself.&lt;/p&gt;

&lt;p&gt;I'm Manthan Bhatt. I have been working as a Full stack developer. I love playing games with friends 😁 and explore places with great coffee ☕&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>writing</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>Boost Your Productivity as a Developer with OpenAI's ChatGPT</title>
      <dc:creator>Manthan Bhatt</dc:creator>
      <pubDate>Fri, 10 Feb 2023 05:32:28 +0000</pubDate>
      <link>https://dev.to/manthanbhatt/boost-your-productivity-as-a-developer-with-openais-chatgpt-1n5l</link>
      <guid>https://dev.to/manthanbhatt/boost-your-productivity-as-a-developer-with-openais-chatgpt-1n5l</guid>
      <description>&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;As a developer, you're constantly searching for ways to increase your productivity and get more done in less time. With the ever-growing demands of the tech industry, it's more important than ever to stay ahead of the curve and work efficiently. Fortunately, OpenAI's ChatGPT provides a solution that can help you increase your productivity and streamline your workflow. In this blog post, we'll explore how ChatGPT can help you boost your productivity as a developer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automated Code Generation:
&lt;/h2&gt;

&lt;p&gt;ChatGPT can be trained to generate code based on specific programming languages and frameworks. This can save you hours of time and effort, allowing you to focus on more important tasks. ChatGPT can also generate code snippets, making it easier to quickly implement new features and functionalities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Documentation and Comments Generation:
&lt;/h2&gt;

&lt;p&gt;ChatGPT can also be trained to generate documentation and comments for your code, making it easier to understand and maintain your code over time. This can save you time and effort in the long run, as well as improving the overall quality of your code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Research and Data Collection:
&lt;/h2&gt;

&lt;p&gt;ChatGPT can be used to perform research and data collection, allowing you to gather information on specific topics and technologies in a fraction of the time it would take you to do it manually. This can save you hours of time and effort, giving you more time to focus on your coding and development work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Error Checking:
&lt;/h2&gt;

&lt;p&gt;ChatGPT can also be used to perform error checking and debugging, reducing the amount of time and effort you need to spend on this task. By automating this process, you can spend more time on other important tasks, such as coding and development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Collaboration:
&lt;/h2&gt;

&lt;p&gt;ChatGPT can be used to collaborate with other developers and team members, allowing you to communicate and share information in real-time. This can improve communication and collaboration within your team, making it easier to get things done and stay on track.&lt;/p&gt;

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

&lt;p&gt;In conclusion, ChatGPT is a game-changer for developers looking to increase their productivity and streamline their workflow. With its ability to automate code generation, perform error checking, and improve collaboration, ChatGPT is a must-have tool for anyone looking to boost their productivity and get more done in less time. So, why not give it a try and see how it can help you take your productivity to the next level?&lt;/p&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>ai</category>
      <category>chatgpt</category>
    </item>
    <item>
      <title>5 Reasons Why GraphQL is the Future of API Development</title>
      <dc:creator>Manthan Bhatt</dc:creator>
      <pubDate>Thu, 09 Feb 2023 03:45:25 +0000</pubDate>
      <link>https://dev.to/manthanbhatt/5-reasons-why-graphql-is-the-future-of-api-development-jgp</link>
      <guid>https://dev.to/manthanbhatt/5-reasons-why-graphql-is-the-future-of-api-development-jgp</guid>
      <description>&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;API development is a crucial aspect of modern web development, as it allows communication between the frontend and the backend. Over the past few years, the popularity of GraphQL has skyrocketed, making it one of the most talked about topics in the tech industry. In this blog post, we will discuss five reasons why GraphQL is the future of API development.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Flexibility: GraphQL offers a highly flexible approach to API development, as it allows developers to request exactly the data they need. This means that the client can specify exactly what information it requires, resulting in a more efficient and effective API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ease of use: GraphQL is incredibly easy to use, as it eliminates the need for multiple round trips to the server. This results in a much simpler and faster API, as well as reducing the amount of code required to make API calls.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strong type system: GraphQL has a strong type system that allows developers to define the structure of the data being transmitted between the client and server. This type system helps catch potential errors early in the development process, reducing the likelihood of bugs and unexpected behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improved performance: With GraphQL, clients are able to fetch multiple resources in a single request, as opposed to multiple requests in traditional REST APIs. This can greatly improve performance and reduce server load, especially in cases where a lot of data is needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Growing community: GraphQL has a growing and passionate community of developers, who are constantly contributing to its development and improvement. With a large number of companies and projects already using GraphQL, it has a bright future and is here to stay.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;In conclusion, GraphQL offers numerous benefits over traditional REST APIs, including greater flexibility, ease of use, a strong type system, improved performance, and a growing community of developers. As the technology continues to evolve and mature, it's likely that we'll see an even greater adoption of GraphQL in the future. If you haven't already, it's time to start exploring the benefits of GraphQL and see how it can improve your API development process.&lt;/p&gt;

</description>
      <category>tooling</category>
      <category>plugins</category>
      <category>ai</category>
    </item>
    <item>
      <title>Why Ionic and Capacitor are the Future of Cross-Platform Mobile Development</title>
      <dc:creator>Manthan Bhatt</dc:creator>
      <pubDate>Wed, 08 Feb 2023 07:38:48 +0000</pubDate>
      <link>https://dev.to/manthanbhatt/why-ionic-and-capacitor-are-the-future-of-cross-platform-mobile-development-10l9</link>
      <guid>https://dev.to/manthanbhatt/why-ionic-and-capacitor-are-the-future-of-cross-platform-mobile-development-10l9</guid>
      <description>&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;Mobile development has come a long way in recent years, with a multitude of options available for building cross-platform apps. One such framework that has gained a lot of attention lately is Ionic, along with its accompanying runtime Capacitor. In this blog post, we'll explore why Ionic and Capacitor are the future of cross-platform mobile development.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Native Experience: Ionic and Capacitor make it possible to build apps that deliver a truly native experience on both iOS and Android platforms. With the ability to access native device features and functionality, such as camera, accelerometer, and more, Ionic and Capacitor apps are indistinguishable from native apps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code Reusability: Ionic allows developers to write code once and run it on multiple platforms, reducing the time and effort required to build and maintain separate codebases for iOS and Android. This can save a significant amount of time and money, especially for small teams and startups.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance: With Capacitor as the underlying runtime, Ionic apps have the performance and speed of native apps, without sacrificing the ease of development offered by cross-platform frameworks. Capacitor's architecture allows it to bridge the gap between web and native, providing the best of both worlds.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Large Community: Ionic has a large and active community of developers, who constantly contribute to its development and improvement. With over 5 million developers worldwide, the Ionic community is a valuable resource for anyone looking to build cross-platform apps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Plugins and Tools: Ionic and Capacitor come with a vast array of plugins and tools, allowing developers to easily add functionality and enhance their apps. From push notifications to geolocation, these plugins make it simple to add native-like features to your app.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;In conclusion, Ionic and Capacitor are the future of cross-platform mobile development. With the ability to deliver a truly native experience, save time and effort with code reusability, offer high performance, a large community of developers, and a range of plugins and tools, it's no wonder why so many developers are choosing Ionic and Capacitor. Whether you're a seasoned developer or just starting out, now is the perfect time to dive into Ionic and Capacitor and start building amazing cross-platform apps.&lt;/p&gt;

</description>
      <category>announcement</category>
      <category>community</category>
      <category>writing</category>
      <category>royalties</category>
    </item>
    <item>
      <title>How I can go to the next level?</title>
      <dc:creator>Manthan Bhatt</dc:creator>
      <pubDate>Wed, 14 Sep 2022 06:12:44 +0000</pubDate>
      <link>https://dev.to/manthanbhatt/how-i-can-go-to-the-next-level-1j72</link>
      <guid>https://dev.to/manthanbhatt/how-i-can-go-to-the-next-level-1j72</guid>
      <description>&lt;p&gt;Working as software developers many times we have questions in mind about how I can move to the next level. Or what new skill should I learn so that I can move forward in my career?&lt;/p&gt;

&lt;p&gt;If we don't have a clear idea or vision of what to do then we feel stuck while working which became a bottleneck for our success in our career life.&lt;/p&gt;

&lt;p&gt;Let's discuss some potential ways of how we can move forward when you get to a certain level in your career when you don't have a clear vision of what to do now.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Suggest me something for reading</title>
      <dc:creator>Manthan Bhatt</dc:creator>
      <pubDate>Tue, 23 Aug 2022 05:53:21 +0000</pubDate>
      <link>https://dev.to/manthanbhatt/suggest-me-something-for-reading-3c63</link>
      <guid>https://dev.to/manthanbhatt/suggest-me-something-for-reading-3c63</guid>
      <description>&lt;p&gt;I want to learn the fundamentals of programming and other concepts from the base with the following topics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data Structure and Algorithms&lt;/li&gt;
&lt;li&gt;System Design&lt;/li&gt;
&lt;li&gt;AI&lt;/li&gt;
&lt;li&gt;ML&lt;/li&gt;
&lt;li&gt;Cloud&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please do suggest me material which will be great to learn the things.&lt;br&gt;
I'm also open to video material or other type of content&lt;/p&gt;

&lt;p&gt;Feel free to share your experience while learning the mentioned thing which will be helpful to me and people encountering this post.&lt;/p&gt;

&lt;p&gt;Let's discuss it!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>discuss</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>What things you do for starting new project?</title>
      <dc:creator>Manthan Bhatt</dc:creator>
      <pubDate>Sat, 06 Aug 2022 06:56:12 +0000</pubDate>
      <link>https://dev.to/manthanbhatt/what-things-you-do-for-starting-new-project-4k7o</link>
      <guid>https://dev.to/manthanbhatt/what-things-you-do-for-starting-new-project-4k7o</guid>
      <description>&lt;p&gt;I was curious about what a developer do when they start any new project that they are interest in building.&lt;/p&gt;

&lt;p&gt;Are there any rituals that they follow for starting new project?&lt;/p&gt;

&lt;p&gt;How they plane the initial development for the project?&lt;/p&gt;

&lt;p&gt;Let's discuss it!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Implement Binary Search Using JavaScript</title>
      <dc:creator>Manthan Bhatt</dc:creator>
      <pubDate>Tue, 12 Jul 2022 04:36:59 +0000</pubDate>
      <link>https://dev.to/manthanbhatt/implement-binary-search-using-javascript-34d7</link>
      <guid>https://dev.to/manthanbhatt/implement-binary-search-using-javascript-34d7</guid>
      <description>&lt;p&gt;Binary search technique is used to search for any element in a sorted array using divide and conquer approach.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/**
 * Binary Search
 * Note - It works only for the sorted array. start and end are left and right of the array.
 *
 * Recursive Approach
 * - If starting index is greater than the ending index return false
 * - Compute the middle index.
 * - Compare the middle element with the number x. If equal return true.
 * - If greater, call the same function with ending index = middle-1 and repeat step 1.
 * - If smaller, call the same function with starting index = middle+1 and repeat step 1.
 * 
 * Time Complexity: O(logN)
 * Auxiliary Space: O(1)
 */

const arr = [1, 3, 5, 7, 8, 9];

const binarySearchRecursive = (arr, val, start, end) =&amp;gt; {
    if (start &amp;gt; end) return false;

    const mid = Math.floor((start + end) / 2);

    if (arr[mid] === val) return mid;

    const left = arr[mid] &amp;gt; val ? start : mid + 1;
    const right = arr[mid] &amp;gt; val ? mid - 1 : end;

    return binarySearchRecursive(arr, val, left, right);
}

console.log(binarySearchRecursive(arr, 5, 0, arr.length - 1)); // -&amp;gt; 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>algorithms</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Bubble Sort - Typescript</title>
      <dc:creator>Manthan Bhatt</dc:creator>
      <pubDate>Thu, 06 Jan 2022 08:54:52 +0000</pubDate>
      <link>https://dev.to/manthanbhatt/bubble-sort-typescript-4e1p</link>
      <guid>https://dev.to/manthanbhatt/bubble-sort-typescript-4e1p</guid>
      <description>&lt;p&gt;Bubble sort algorithm is simple and easy. In bubble sort every pair of adjacent value is compared and swap if the first value is greater than the second one. By this with every iteration the greatest value goes to the right side making it ascending order.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fasfmbhsv8q0r7ltfc2sk.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fasfmbhsv8q0r7ltfc2sk.gif" alt="Bubble Sort" width="500" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Time Complexity
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Best: O(n)&lt;/li&gt;
&lt;li&gt;Average: O(n^2)&lt;/li&gt;
&lt;li&gt;Worst: O(n^2)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const bubbleSort = (arr: number[]): number[] =&amp;gt; {
    const len = arr.length;

    for (let i = 0; i &amp;lt; len; i++) {
        for (let j = 0; j &amp;lt; len; j++) {
            if (arr[j] &amp;gt; arr[j + 1]) {
                [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];
            }
        }
    }

    return arr;
}

bubbleSort([5, 3, 1, 4, 6])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Output
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Output: [1, 3, 4, 5, 6]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here how the code is working&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Iteration 0 (unsorted array): [5, 3, 1, 4, 6]&lt;/li&gt;
&lt;li&gt;Iteration 1, key is 3 (was at index 1): [5, &lt;u&gt;3&lt;/u&gt;, 1, 4, 6] → [&lt;u&gt;3&lt;/u&gt;, &lt;u&gt;5&lt;/u&gt;, 1, 4, 6]&lt;/li&gt;
&lt;li&gt;Iteration 2, key is 1 (was at index 2): [3, 5, &lt;u&gt;1&lt;/u&gt;, 4, 6] → [&lt;u&gt;1&lt;/u&gt;, &lt;u&gt;3&lt;/u&gt;, &lt;u&gt;5&lt;/u&gt;, 4, 6]&lt;/li&gt;
&lt;li&gt;Iteration 3, key is 4 (was at index 3): [1, 3, 5, &lt;u&gt;4&lt;/u&gt;, 6] → [1, 3, &lt;u&gt;4&lt;/u&gt;, &lt;u&gt;5&lt;/u&gt;, 6]&lt;/li&gt;
&lt;li&gt;Iteration 4, key is 6 (was at index 4): [1, 3, 4, 5, &lt;u&gt;6&lt;/u&gt;] → [1, 3, 4, 5, &lt;u&gt;6&lt;/u&gt;] — because 6 was already in the right place, no changes are made&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s all for the bubble sort, thanks for reading!&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>programming</category>
      <category>beginners</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>Selection Sort - Typescript</title>
      <dc:creator>Manthan Bhatt</dc:creator>
      <pubDate>Thu, 06 Jan 2022 05:09:10 +0000</pubDate>
      <link>https://dev.to/manthanbhatt/selection-sort-typescript-3j14</link>
      <guid>https://dev.to/manthanbhatt/selection-sort-typescript-3j14</guid>
      <description>&lt;p&gt;Selection sort is simple and easy to implement. But it is also very inefficient in terms of time complexity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Time Complexity
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Best: &lt;strong&gt;Ω(n^2)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Average: &lt;strong&gt;Ω(n^2)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Worst: &lt;strong&gt;Ω(n^2)&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In selection sort, we loop through the array by selecting the smallest value and then swapping it to the left side of the array till it is sorted in ascending order.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgglrh4swclc6chmdoi00.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgglrh4swclc6chmdoi00.gif" alt="Selection Sort" width="399" height="285"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const selectionSort = (arr: number[]): number[] =&amp;gt; {
    const len: number = arr.length;
    let minInd: number = -1;
    for (let i = 0; i &amp;lt; (len - 1); i++) {
        minInd = i

        for (let j = (i + 1); j &amp;lt; len; j++) {
            if (arr[j] &amp;lt; arr[minInd]) {
                minInd = j
            }
        }

        if (minInd !== i) {
            [arr[i], arr[minInd]] = [arr[minInd], arr[i]];
        }
    }
    return arr;
}

const result = selectionSort([64, 25, 12, 22, 11]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Output
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Output: [11, 12, 22, 25, 64]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here how the code is working&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The function takes the unsorted array [64, 25, 12, 22, 11].&lt;/li&gt;
&lt;li&gt;Iteration 1: [&lt;u&gt;11&lt;/u&gt;, 25, 12, 22, &lt;u&gt;64&lt;/u&gt;] → i = 0,  minInd = 4 and min value is 11.&lt;/li&gt;
&lt;li&gt;Iteration 2: [11, &lt;u&gt;12&lt;/u&gt;, &lt;u&gt;25&lt;/u&gt;, 22, 64] → i = 1,  minInd = 2 and min value is 12.&lt;/li&gt;
&lt;li&gt;Iteration 3: [11, 12, &lt;u&gt;22&lt;/u&gt;, &lt;u&gt;25&lt;/u&gt;, 64] → i = 2,  minInd = 3 and min value is 22.&lt;/li&gt;
&lt;li&gt;Iteration 4: [11, 12, 22, &lt;u&gt;25&lt;/u&gt;, 64] → i = 3,  minInd = 3 and min value is 25.&lt;/li&gt;
&lt;li&gt;For iteration 4 it won't swap the value as the minInd and i are the same so there are no unnecessary swap.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s all for the selection sort, thanks for reading!&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>javascript</category>
      <category>datastructure</category>
      <category>programming</category>
    </item>
    <item>
      <title>Difference between a developer, programmer, and software engineer</title>
      <dc:creator>Manthan Bhatt</dc:creator>
      <pubDate>Wed, 29 Dec 2021 04:14:46 +0000</pubDate>
      <link>https://dev.to/manthanbhatt/difference-between-a-developer-programmer-and-software-engineer-260a</link>
      <guid>https://dev.to/manthanbhatt/difference-between-a-developer-programmer-and-software-engineer-260a</guid>
      <description>&lt;p&gt;There are many types of professions in the technology field, including system administrators, UI UX, developers, programmers, and engineers. From some of the things I mentioned I will only explain what programmers, developers, and engineers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Programmer
&lt;/h2&gt;

&lt;p&gt;Programmer is someone who translates human-readable requirements into machine code. It’s the physical act of writing the source code that enables the software to perform its intended function. In that sense, it is the lowest-level task in the software development process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Developer
&lt;/h2&gt;

&lt;p&gt;Developer who is the in charge of the process by which software is created from &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requirements Gathering &lt;/li&gt;
&lt;li&gt;Task Creation &lt;/li&gt;
&lt;li&gt;Sprint Planning &lt;/li&gt;
&lt;li&gt;Programming &lt;/li&gt;
&lt;li&gt;Unit Testing &lt;/li&gt;
&lt;li&gt;Integration Testing &lt;/li&gt;
&lt;li&gt;Usability / Acceptance Testing &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It encompasses the end-to-end of conceiving a software system through delivering it as a product.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engineer
&lt;/h2&gt;

&lt;p&gt;Software Engineer has the most broad type of work of the three. It is the application of computer science and mathematics theory to the invention, design, research, development, maintenance, improvement, and innovation of software. &lt;/p&gt;

&lt;p&gt;It is more about the problem being solved. Sometimes a good software engineer can solve the problem without requiring any new lines of code be written. Sometimes solving the problem means coordinating the development of multiple software systems that interact in complex ways. And sometimes software engineering means deleting code, deprecating services, and designing the next system to take its place.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>developer</category>
      <category>engineer</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
