<?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: Hafsa Jabeen</title>
    <description>The latest articles on DEV Community by Hafsa Jabeen (@hafsajabeen).</description>
    <link>https://dev.to/hafsajabeen</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%2F1123295%2F41778687-f8cb-48a5-8cc6-e5ed1ea9cdc7.png</url>
      <title>DEV Community: Hafsa Jabeen</title>
      <link>https://dev.to/hafsajabeen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hafsajabeen"/>
    <language>en</language>
    <item>
      <title>How to Deploy Gleam on Codesphere?</title>
      <dc:creator>Hafsa Jabeen</dc:creator>
      <pubDate>Thu, 25 Apr 2024 10:37:16 +0000</pubDate>
      <link>https://dev.to/hafsajabeen/how-to-deploy-gleam-on-codesphere-4fc5</link>
      <guid>https://dev.to/hafsajabeen/how-to-deploy-gleam-on-codesphere-4fc5</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XJe14Cd3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2024/04/Gleam-1.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XJe14Cd3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2024/04/Gleam-1.webp" alt="How to Deploy Gleam on Codesphere?" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Gleam is a newly released language, claimed to be optimized for concurrency and refactoring. It is compact and easy-to-learn (as per the creators you can learn it in an afternoon). This Elm and Rust-inspired language has a compiler that serves as a programming assistant. To sum up some of the features of Gleam, we can say its small surface area gives it the simplicity of Go while also enabling you to leverage Erlang and Elixir tools. In addition, it is type-safe, and functional, as well as highly scalable.&lt;/p&gt;

&lt;p&gt;Gleam can run on JS runtimes, which means you can run it anywhere including (but not limited to) mobile devices and browsers. Let’s create a Gleam project for a simple backend web application. Once the project is set up, we'll proceed to deploy it on &lt;a href="https://codesphere.com/?ref=codesphere.ghost.io"&gt;Codesphere&lt;/a&gt;.       &lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a Gleam Project
&lt;/h2&gt;

&lt;p&gt;We are going to work on a simple Gleam backend web application and deploy it on Codesphere. Let’s start by creating a gleam project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gleam new my_web_app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace “my_web_app” with the name you want to give to your project. It will create a Gleam project, you can then run this command to go to your project directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd my_web_app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now open src/my_web_app.gleam file and write this code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mport gleam/io
import mist
import gleam/erlang/process
import gleam/bytes_builder
import gleam/http/response.{Response}

pub fn main() {
  let assert Ok(_) =
    web_service
    |&amp;gt; mist.new
    |&amp;gt; mist.port(3000)
    |&amp;gt; mist.start_http
  process.sleep_forever()
}

fn web_service(_request) {
  let body = bytes_builder.from_string("Hello, Gleam!")
  Response(200, [], mist.Bytes(body))
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Running Gleam on Codesphere
&lt;/h2&gt;

&lt;p&gt;It is pretty straightforward to run gleam on Codesphere. All you have to do is create a ci.yml file in your project directory and replace the contents with this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;prepare:
  steps:
    - command: "nix-env -iA nixpkgs.gleam"
    - command: "nix-env -iA nixpkgs.erlang"
    - command: "nix-env -iA nixpkgs.rebar3"
    - command: gleam add mist gleam_http gleam_erlang
test:
  steps: []
run:
  steps:
    - command: gleam run

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will install Gleam and all the required dependencies like Erlang, Rebar, and Mist to run this web application. Go to CI pipeline, hit prepare and run stages and your Gleam web application will be up and running in no time. &lt;/p&gt;

&lt;p&gt;You can access the code here from the &lt;a href="https://github.com/Hafsa-jabeen/gleam-web-app?ref=codesphere.ghost.io"&gt;&lt;u&gt;GitHub repository&lt;/u&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I hope you enjoyed exploring Gleam as much as I did!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>programminglanguages</category>
      <category>webapplications</category>
    </item>
    <item>
      <title>Building a beginner-friendly C# application</title>
      <dc:creator>Hafsa Jabeen</dc:creator>
      <pubDate>Tue, 21 Nov 2023 20:19:04 +0000</pubDate>
      <link>https://dev.to/hafsajabeen/building-a-beginner-friendly-c-application-50f8</link>
      <guid>https://dev.to/hafsajabeen/building-a-beginner-friendly-c-application-50f8</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8Z3S5NGD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/11/csharp.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8Z3S5NGD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/11/csharp.webp" alt="Building a beginner-friendly C# application" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;C# was developed by Microsoft and released in the early 2000s as part of the company's .NET initiative. It was designed with a focus on simplicity, type safety, and object-oriented principles. Since then, it has become a popular language used mainly to develop Windows and web applications using ASP.NET. I wanted to show you how easy it is to run a C# application on &lt;a href="https://codesphere.com/?ref=codesphere.ghost.io"&gt;Codesphere&lt;/a&gt;. In this tutorial, I will walk you through the step-by-step process of doing so. &lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up the web project
&lt;/h2&gt;

&lt;p&gt;Since we are using Blazor web assembly, we first initialize our web project by the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dotnet new blazor -o NotesApp

cd BlazorApp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we add code to the Home.razor file that represents the default home page of your web application. This file contains the markup and logic associated with the main content that users see when they navigate to the home or root URL of your application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@page "/"
@rendermode InteractiveServer
@using StickyNotes.Components.Components

&amp;lt;PageTitle&amp;gt;Home&amp;lt;/PageTitle&amp;gt;

&amp;lt;button @onclick="AddNote"&amp;gt;Add Note&amp;lt;/button&amp;gt;

@foreach (var note in notes)
{
    &amp;lt;Note OnDelete="() =&amp;gt; DeleteNote(note)" /&amp;gt;
}

@code {
    private List&amp;lt;NoteModel&amp;gt; notes = new List&amp;lt;NoteModel&amp;gt;();

    private void AddNote()
    {
        notes.Add(new NoteModel());
        StateHasChanged();
    }

    private void DeleteNote(NoteModel noteToDelete)
    {
        notes.Remove(noteToDelete);
    }

    private class NoteModel { }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we add this code to  Note.razor file which provides a user interface for creating and deleting notes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@code {
    private string noteContent;
}

&amp;lt;div class="note-container"&amp;gt;
    &amp;lt;textarea @bind="noteContent" placeholder="Write your note here..."&amp;gt;&amp;lt;/textarea&amp;gt;
    &amp;lt;button @onclick="DeleteNote"&amp;gt;Delete Note&amp;lt;/button&amp;gt;
&amp;lt;/div&amp;gt;

@code {
    // You can define an EventCallback if you want to notify a parent component
    [Parameter]
    public EventCallback OnDelete { get; set; }

    private void DeleteNote()
    {
        // Logic to delete the note
        // If this component is part of a collection, you might want to call OnDelete to notify the parent to remove it
        OnDelete.InvokeAsync(null);
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you like you can find the source code of this project &lt;a href="https://github.com/Hafsa-jabeen/Notes?ref=codesphere.ghost.io"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the project in Codesphere
&lt;/h2&gt;

&lt;p&gt;To get this project running on Codesphere, you can create an empty working space and import the code from GitHub.&lt;/p&gt;

&lt;p&gt;Then you would need to set the dotnet environment and run these commands:&lt;/p&gt;

&lt;p&gt;Now we download the dotnet installer for Linux using wget.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we assign it the roles that are necessary to run the application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod +x ./dotnet-install.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now add this command to install dotnet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./dotnet-install.sh --version latest --install-dir /home/user/app/.dotnet --no-path
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next step is to change the default port from "5000" to "3000" in /Properties/launchSettings.json&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "applicationUrl": "http://0.0.0.0:3000",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we use the run command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/home/user/app/.dotnet/dotnet watch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will launch the web app.&lt;/p&gt;

&lt;p&gt;Alternatively, you can find a preconfigured version of this application in our templates. You can create a workspace and from the drop-down choose this template. You will have all these commands in the CI pipeline.&lt;/p&gt;

&lt;p&gt;To understand how you can run a CI pipeline head over to &lt;a href="https://codesphere.com/articles/angular-template?ref=codesphere.ghost.io"&gt;Creating an Angular Template for Codesphere&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I hope you found this article useful, stay tuned for more.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>csharp</category>
      <category>webapp</category>
    </item>
    <item>
      <title>5 Best Free Cloud GPU Providers For Hobbyists</title>
      <dc:creator>Hafsa Jabeen</dc:creator>
      <pubDate>Thu, 09 Nov 2023 12:08:17 +0000</pubDate>
      <link>https://dev.to/hafsajabeen/5-best-free-cloud-gpu-providers-for-hobbyists-4eic</link>
      <guid>https://dev.to/hafsajabeen/5-best-free-cloud-gpu-providers-for-hobbyists-4eic</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d-qyybp9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/11/Free-Cloud-GPU-Providers.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d-qyybp9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/11/Free-Cloud-GPU-Providers.webp" alt="5 Best Free Cloud GPU Providers For Hobbyists" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The advances in AI are great but the computing requirements are higher than ever and GPUs are multiple times more expensive than CPUs. Therefore, developers looking to get hands-on experience with these new technologies need to be resourceful in looking for GPU-providing companies that give away computing resources for free. &lt;/p&gt;

&lt;p&gt;There are many options out there offering different kinds of freebies and conditions so in this article we set out to compare the most commonly known offerings. We considered several factors such as the availability of resources, computational power, quality of GPUs offered, idle time, persistent memory, as well as the limitations of use. Let’s see what each GPU provider currently offers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Google Colab
&lt;/h2&gt;

&lt;p&gt;Google Colaboratory or Google Colab is a notebook-based instance given by Google. It allows users to write and execute Python code in a web-based interactive environment. Google Colab is mainly designed for data science and machine learning tasks. You can access it by just signing in to your Google account. You don’t need to sign up with the entire Google Cloud.&lt;/p&gt;

&lt;p&gt;Google Colab provides you Nvidia K80s or a Tesla T4 GPU if available with up to 16 GB of memory.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;You get 12 hours of free GPU access &lt;/li&gt;
&lt;li&gt;It is easy to use and set up.&lt;/li&gt;
&lt;li&gt;It does not require an extra cloud account setup.&lt;/li&gt;
&lt;li&gt;You can create and use  public and private notebooks&lt;/li&gt;
&lt;li&gt;It can be integrated with Google Drive where you can save notebooks and access them anytime from Google Colab.&lt;/li&gt;
&lt;li&gt;As the name suggests, you can collaborate with other users in real-time.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;It can only work with notebooks.&lt;/li&gt;
&lt;li&gt;The GPU you get is shared.&lt;/li&gt;
&lt;li&gt;30 minutes of being idle will stop your runtime.&lt;/li&gt;
&lt;li&gt;Practically not useful for bigger models because you can run into memory issues because of the shared nature of the GPU.&lt;/li&gt;
&lt;li&gt;You need to reauthenticate and remount Google Drive every time you use it.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Kaggle
&lt;/h2&gt;

&lt;p&gt;Kaggle is a popular platform for data science and machine learning enthusiasts. It has 50k versatile and publicly available data sets you can use for practice or research. On this platform, you get access to interactive courses and tutorials on several data science and machine learning topics. &lt;/p&gt;

&lt;p&gt;Kaggel provides a notebook service just like Google Colab and is a step up from Google Colab. You get at least 30 hours/week of GPU usage. You can choose the GPU option you prefer. The two options are the  NVIDIA Tesla P100 with 16 GB GPU memory and the Dual Tesla T4 that comes with 15 GB GPU memory. However, there are other limitations like nine hours of consecutive runtime.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;You get a good 30 Hours/Week of GPU.&lt;/li&gt;
&lt;li&gt;The 16 GB of GPU memory is not shared.&lt;/li&gt;
&lt;li&gt;The notebooks can run in the background and can be private or public.&lt;/li&gt;
&lt;li&gt;Kaggel gives default access to Kaggle datasets.&lt;/li&gt;
&lt;li&gt;Notebooks shared with people can be commented on which makes it easy to collaborate..&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;The idle time of 20 minutes will stop your runtime.&lt;/li&gt;
&lt;li&gt;You can only work with Notebooks.&lt;/li&gt;
&lt;li&gt;The GPU options provided are slower than Google Colab.&lt;/li&gt;
&lt;li&gt;There is a limit of 9 hours on consecutive use.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Codesphere
&lt;/h2&gt;

&lt;p&gt;Codesphere is an end-to-end DevOps platform that combines IDE and infrastructure. You can deploy any AI model on codesphere within seconds. When you sign up you get a free shared GPU to use along with 20 GB of storage. In addition to that you get some ready-to-use templates. So, you can just sign up and start using one of the pre-configured models. The server goes to sleep after 60 minutes of idle time but boots up in seconds on restart. &lt;/p&gt;

&lt;p&gt;If you use the “of when unused” feature you can get each extra GPU for just $10 a month. The coolest thing about Codesphere GPU is that it is not just limited to notebooks and you can do practically anything you want. In addition, you can also get paid state-of-the-art GPUs like T4 and A100 on order.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;You are not restricted to work only with notebooks.&lt;/li&gt;
&lt;li&gt;There are no consecutive hours restrictions.&lt;/li&gt;
&lt;li&gt;You do not have to go through a complex setup procedure.&lt;/li&gt;
&lt;li&gt;You get awarded an unlimited number of hours each month.&lt;/li&gt;
&lt;li&gt;Background execution of models is possible.&lt;/li&gt;
&lt;li&gt;The workspaces provide collaboration with others.&lt;/li&gt;
&lt;li&gt;You do not need a credit card to get started.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;You get a shared GPU.&lt;/li&gt;
&lt;li&gt;Some of the other providers offer a bit higher storage.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Gradient by Paperspace
&lt;/h2&gt;

&lt;p&gt;Gradient is an AI and ML development platform that offers MLOps services. It is meant to provide a number of tools and services that make it easy to develop and deploy ML models. When it comes to the free GPU, Paperspace seems like it is the best of the bunch but also the least practical of all. It gives you the highest RAM and the highest number of CPUs. On the other hand, it has the least amount of storage, and notebooks are not private.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Gradient provides 30 GB RAM which is the highest amongst all.&lt;/li&gt;
&lt;li&gt;The idle time can be between 1-6 hours.&lt;/li&gt;
&lt;li&gt;It is extremely user-friendly.&lt;/li&gt;
&lt;li&gt;The format allows for collaboration between people.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Gradient offers an almost negligible storage capacity of just 5 GB.&lt;/li&gt;
&lt;li&gt;It can only work with Notebooks.&lt;/li&gt;
&lt;li&gt;All the notebooks are public.&lt;/li&gt;
&lt;li&gt;Maximum execution time per session is 6 hours.&lt;/li&gt;
&lt;li&gt;In the free tier, you cannot access notebook terminals.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Sagemaker by Amazon
&lt;/h2&gt;

&lt;p&gt;Sagemaker Studio Lab is considered a direct Google Colab competitor and Amazon owns it. Like Google Colab, it is also limited to Notebooks. However, you do not need to enter a credit card to get started or make an AWS account. To get started, you have to just provide your email, and wait for your request to get approved. Sagemaker provides a Tesla T4 GPU with persistent 15 GB storage. Even though the storage and GPU are powerful, it allows a very limited runtime.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;You get 15 GB of persistent storage.&lt;/li&gt;
&lt;li&gt;It offers a Powerful GPU with 16GB memory (not shared).&lt;/li&gt;
&lt;li&gt;With Sagemaker, background executions are possible.&lt;/li&gt;
&lt;li&gt;You do not have to provide credit card details.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;It allows only four hours of runtime.&lt;/li&gt;
&lt;li&gt;You can use it for 8 hours a day.&lt;/li&gt;
&lt;li&gt;You have to wait a few days for AWS to review and accept your access request. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Google Cloud GPU
&lt;/h2&gt;

&lt;p&gt;When we talk about computing in any sense, it goes without saying that Google Cloud has something to do with it. Although with Google Cloud you don’t get a free GPU, you do get one-time 300$ credits when you sign up. The Google Cloud AI seems to solve all the abovementioned problems but comes with a hefty price once your credits run out. This actually defeats the purpose of using it for a considerable period of time for free. &lt;/p&gt;

&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;It is not limited to Notebooks and provides a complete system. &lt;/li&gt;
&lt;li&gt;High memory and high CPU can be demanded. &lt;/li&gt;
&lt;li&gt;The 300$ credit is granted on signup.&lt;/li&gt;
&lt;li&gt;You can easily integrate with all Google services.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;The free credit is usually used within days if not hours.&lt;/li&gt;
&lt;li&gt;A credit card is required to get started.&lt;/li&gt;
&lt;li&gt;It is not ideal because your project can be interrupted anytime your free credits run out.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bRPbYXZW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh7-us.googleusercontent.com/fcO7r-mf9EKoNulURWrdNmy_M_LRCpk6SKxI6EDJJx4vtgbH9hIrSVx2riDHcRMOZTh-k6eX_JYRaUHjyMRy6-216l14RuC4_eq8BKL0Bk7RuzACJs9RogNXNc7CQz-XhRmvjuRGbkO8_nXXIh6rM2jCUzkF7CHXJdPy4e9TLuv1_ftxz0MEbTanNJKfPg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bRPbYXZW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh7-us.googleusercontent.com/fcO7r-mf9EKoNulURWrdNmy_M_LRCpk6SKxI6EDJJx4vtgbH9hIrSVx2riDHcRMOZTh-k6eX_JYRaUHjyMRy6-216l14RuC4_eq8BKL0Bk7RuzACJs9RogNXNc7CQz-XhRmvjuRGbkO8_nXXIh6rM2jCUzkF7CHXJdPy4e9TLuv1_ftxz0MEbTanNJKfPg" alt="5 Best Free Cloud GPU Providers For Hobbyists" width="800" height="626"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;A comparison table of different Free Cloud GPU Providers&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapup: Use a Combination of Free Cloud GPU Providers
&lt;/h2&gt;

&lt;p&gt;All the Free Cloud GPU-providing platforms in the list, offer unique features. While choosing, it is advised to consider the requirements of your task, the suitable GPU, and the platform's limitations. It is also important to notice that the terms of use and availability of these free GPU providers might change with time, so it is good to visit their respective websites. We would also advise to combine multiple free offerings to get what you need.&lt;/p&gt;

&lt;p&gt;We hope you found this article informative and helpful. Do let us know, if you think we missed any free GPU provider that should have made it to the list.&lt;/p&gt;

</description>
      <category>informative</category>
      <category>ai</category>
      <category>generativeai</category>
      <category>llm</category>
    </item>
    <item>
      <title>Generative AI: How Self-Hosting Can Help Your Bussiness</title>
      <dc:creator>Hafsa Jabeen</dc:creator>
      <pubDate>Tue, 31 Oct 2023 17:19:16 +0000</pubDate>
      <link>https://dev.to/hafsajabeen/generative-ai-how-self-hosting-can-help-your-bussiness-2gej</link>
      <guid>https://dev.to/hafsajabeen/generative-ai-how-self-hosting-can-help-your-bussiness-2gej</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E9cEIq1J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/GenerativeAI.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E9cEIq1J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/GenerativeAI.webp" alt="Generative AI: How Self-Hosting Can Help Your Bussiness" width="800" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is a lot of uproar about AI and its implications around the world. We do not believe that AI will be sentient anytime soon. Some of the hype around AI is just that, hype. However, companies need to understand the true effect of AI to stay ahead in the competitive market. Organizations should try to explore the possible use cases of generative and the way it can help their businesses.&lt;/p&gt;

&lt;p&gt;We are going to discuss what artificial intelligence is and how generative AI has developed to its current state. We will also talk about the ways businesses can integrate self-hosted LLMs in their workflows and how &lt;a href="https://codesphere.com/?ref=codesphere.ghost.io"&gt;Codesphere&lt;/a&gt; can help. So, let’s dive right in.  &lt;/p&gt;

&lt;h2&gt;
  
  
  What is AI?
&lt;/h2&gt;

&lt;p&gt;Artificial Intelligence is a field of computer science, that has gained insane popularity in the last two decades. AI tries to build a machine capable of making human-like intelligent decisions. AI systems are designed to analyze, reason, learn, and adapt. It allows them to perform tasks, such as problem-solving, language understanding, and decision-making. &lt;/p&gt;

&lt;p&gt;An AI model is basically a program that can be trained on data and make predictions or decisions based on it. The field of AI encompasses an array of technologies including machine learning, deep learning, natural language processing, and robotics. AI's potential is vast, and it continues to shape the future of technology. AI offers solutions to complex problems and unlocks new horizons in automation and decision support.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Generative AI?
&lt;/h2&gt;

&lt;p&gt;Generative AI is a sub-field of artificial intelligence where algorithms are used to generate plausible patterns for things like language or images. The general narrative about generative AI is that it makes machines able to come up with original ideas, like writing stories or making art. For example, it can write stories or generate images without being given specific examples. However, in reality, these machines are basically extremely efficient at recognizing patterns from the data they are trained on and recreating similar patterns. Generative AI is often used for things like making chatbots, translating languages, and creating content. &lt;/p&gt;

&lt;h2&gt;
  
  
  History of Generative AI
&lt;/h2&gt;

&lt;p&gt;Much like every other field, generative AI has also had gradual and at times abrupt advances. If we try to trace back the history, we can see that it has been around since 1913, when the Markovian chain algorithm was developed. It was a statistical tool to generate new data. Here the input defined how the next sequence of data would look like.&lt;/p&gt;

&lt;p&gt;However, the more useful generative AI era began after 2012. It was then we finally had powerful enough computers to train deep-learning models. These models were trained on large data sets. Deep learning models considerably improved many organizational tasks like language translation, image-to-text, and art generation. &lt;/p&gt;

&lt;p&gt;In 2014, a game-changing algorithm by Ian Goodfellow was released. The development of the Generative Adversarial Networks enabled the deep learning models to self-evaluate using game theory. It’s said that Generative Adversarial Networks (GANs) gave computers the ability to be creative while generating content. &lt;/p&gt;

&lt;h2&gt;
  
  
  Innovations in Generative AI
&lt;/h2&gt;

&lt;p&gt;Shortly after the GANs, another technique called transformer networks came. This technique was based on the idea of attention. It gave an “attention score” to different parts of speech. It immensely improved AI models in understanding and generating content. This technique combined with the power of deep learning, gave birth to Large Language Models that we see today. &lt;/p&gt;

&lt;h2&gt;
  
  
  What are LLMs?
&lt;/h2&gt;

&lt;p&gt;Large Language Models (LLMs) are complex deep learning models that are trained on huge datasets. They have ability to understand and use human language in a really advanced way. They can effectively perform tasks like text generation, language translation, chatbot development, and content summarization. These models are highly adaptable and efficient, which is why they are important in the development of advanced AI-driven solutions for various industries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Large Language Model Revolution
&lt;/h2&gt;

&lt;p&gt;Previously there were a lot of smaller language models that were specific to different industries. These models needed months of work by AI experts. They were also extremely resource-intensive and time-consuming as they also took a lot of time to train. Moreover, the data required to train these models needed to be gathered, labeled, and prepared. &lt;/p&gt;

&lt;p&gt;So the innovation of large language models made this technology general and easier to use. LLMs didn’t serve a specific field, so they could be used for several use cases. They didn’t require you to gather labeled datasets and specialized engineering capabilities. This made them reliable and robust to be used anywhere. &lt;/p&gt;

&lt;p&gt;However, LLMs needed extremely high computing power to train and were expensive. This meant the big tech had a monopoly and the only option to use them was through the provided APIs. Many organizations could not use them because of several issues like lack of control over models, data protection, and data sovereignty. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4do4bjO5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/LLMs.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4do4bjO5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/LLMs.webp" alt="Generative AI: How Self-Hosting Can Help Your Bussiness" width="800" height="455"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Small language models vs Large language models&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Things took a turn after Meta released LLAMA-2. It made top-notch LLM models available to everyone that could be used by anyone without compromising data integrity. The open-source community has been since rolling out many updated versions on a daily basis. Now, you can find a ready-to-use, fine-tuned version for almost any niche or use case. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Suggested Reading: &lt;a href="https://codesphere.com/articles/7-open-source-llm-text-generators?ref=codesphere.ghost.io"&gt;7 Open Source LLMs you need to know about&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How Can You Use LLMs?
&lt;/h2&gt;

&lt;p&gt;Now you may ask how to use LLMS on an organizational or business level. Let’s talk about different ways to do that.  &lt;/p&gt;
&lt;h3&gt;
  
  
  Prompt Engineering
&lt;/h3&gt;

&lt;p&gt;One way to work with LLMs is prompt engineering. It involves asking LLM the right questions. You can test different models rapidly using prompt engineering. So, It is a fast and efficient way to get the results you want.&lt;/p&gt;

&lt;p&gt;Nonetheless, there are drawbacks to consider. It sends out data to OpenAI, which is not suitable for sensitive data. The other downside is that the prompt you can send out cannot be more than 2048 words, which is very limiting. &lt;/p&gt;
&lt;h3&gt;
  
  
  RAG (Retrieval-Augmented-Generation)
&lt;/h3&gt;

&lt;p&gt;Retrieval Augmented Generation known as RAG is basically an AI framework. It tries to improve the quality and accuracy of responses generated by LLMs. This framework allows you to integrate an external database, which your LLM can fetch information from. &lt;/p&gt;

&lt;p&gt;How it works is, that when a query is made, RAG first searches the database to find relevant information. The retrieved information is then used to craft a coherent response to the query. This makes these models factually accurate and relatively fast to implement. &lt;/p&gt;

&lt;p&gt;Although, you will still need to deploy your own LLM if you don’t want to share your data with OpenAI. Also, whether you use self-hosted LLMs or API-based you would require ML OPs or DevOps engineers. &lt;/p&gt;
&lt;h3&gt;
  
  
  Fine-tunning
&lt;/h3&gt;

&lt;p&gt;This approach involves improving or customizing an existing LLM model with your own unique data. Multiple experiments have shown that smaller LLMs trained with specific data perform as well as or better than larger LLMs.&lt;/p&gt;

&lt;p&gt;The benefit of this approach is that you get complete data autonomy. It also allows you to have complete control over your LLM model as it won’t get impacted by any updates of terms from an API provider. Moreover, on a large scale, this could be the cheapest possible solution for you. The downside to this approach is that you need your own data center and DevOps experts to implement these models.&lt;/p&gt;
&lt;h2&gt;
  
  
  Comparison of API-Based vs Self-Hosted LLMs
&lt;/h2&gt;

&lt;p&gt;If you look at the benefits and drawbacks of &lt;a href="https://codesphere.com/articles/self-hosted-vs-api-based-llms?ref=codesphere.ghost.io"&gt;API-based vs self-hosted LLMs&lt;/a&gt;, these are the points that will stand out.&lt;/p&gt;
&lt;h3&gt;
  
  
  API-Based LLMs Highlights
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You can start using them immediately and get a good performance from the get-go.&lt;/li&gt;
&lt;li&gt;The initial pricing for these models is low and you don’t need ML Ops engineers to set up.&lt;/li&gt;
&lt;li&gt;With managed LLMs you can only work only with very limited data, typically limited to a few thousand words only, even if data is injected via RAG and your company does not own the IP.&lt;/li&gt;
&lt;li&gt;You have to send your sensitive data over the internet to large (maybe foreign) companies.&lt;/li&gt;
&lt;li&gt;You do not have control over the model and can be affected by the changing policies or terms of the service provider.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Self-Hosted LLMs Highlights
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;These models are customizable and fast.&lt;/li&gt;
&lt;li&gt;You do not risk any data leaving the country where your data centers are located.&lt;/li&gt;
&lt;li&gt;You can work with unlimited amounts of data via fine-tuning.&lt;/li&gt;
&lt;li&gt;Self-hosted LLMs typically require expensive hardware, typically a few A100 GPUs that cost ~15k per month.&lt;/li&gt;
&lt;li&gt;These models also need constant infrastructure maintenance that can cost you around 20% of your project cost. &lt;/li&gt;
&lt;li&gt;You need expensive DevOps Engineers for the setup, hosting, versioning, and application layer around the model. In addition to that to evaluate, fine-tune and improve the model you require ML Ops engineers.&lt;/li&gt;
&lt;li&gt;After all these financial and workforce resources it can take up to 6 months until the infrastructure project is set up.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  How Codesphere Helps Businesses Self-Host LLMs?
&lt;/h2&gt;

&lt;p&gt;So, the two major issues when it comes to self-hosted LLMs are cost and complexity. Here is how Codesphere can help you navigate through these challenges.&lt;/p&gt;
&lt;h3&gt;
  
  
  Cost
&lt;/h3&gt;

&lt;p&gt;Servers where you run LLMs usually have a fixed size regarding computing and memory. Running inference (serving requests/sending queries and getting an output) for AI models takes high computing resources per request. This is quite higher than what a normal website takes. &lt;/p&gt;

&lt;p&gt;In LLMs, a single request from a user takes multiple seconds and (almost) fully occupies one server. If we want to serve multiple requests in parallel we need multiple servers or server cores (which refer to the number of virtual CPUs in a server). &lt;/p&gt;

&lt;p&gt;The traffic and the number of requests your model gets fluctuate and are hard to predict accurately. What happens usually is that organizations estimate the peak traffic and pay for them to accommodate the peak hours. This for obvious reasons increases the cost. &lt;/p&gt;

&lt;p&gt;Codesphere offers “off when un-used” server plans, which automatically turn off when you are not getting user requests. These servers have super fast cold starts and they can be up and running in (10-20ms in the future) 1-5 seconds currently. For example, if you have a chatbot for internal use in your organization, it will only cost you computing resources during office hours. &lt;/p&gt;

&lt;p&gt;Our educated estimate suggests it is over 90% cheaper to run low-traffic models. Moreover, scaling your models can be 35% cheaper because you do not have to reserve the maximum computing capacity to accommodate peak traffic hours.&lt;/p&gt;

&lt;p&gt;&amp;lt;!--kg-card-begin: html--&amp;gt;&amp;lt;br&amp;gt;
@import &amp;amp;quot;&amp;lt;a href="https://rsms.me/inter/inter.css"&amp;gt;https://rsms.me/inter/inter.css&amp;lt;/a&amp;gt;&amp;amp;quot;;&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;:root {&amp;lt;br&amp;gt;
  font-family: &amp;amp;#39;Inter&amp;amp;#39;, sans-serif;&amp;lt;br&amp;gt;
}&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;@supports (font-variation-settings: normal) {&amp;lt;br&amp;gt;
  :root {&amp;lt;br&amp;gt;
    font-family: &amp;amp;#39;Inter var&amp;amp;#39;, sans-serif;&amp;lt;br&amp;gt;
  }&amp;lt;br&amp;gt;
}&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;.info_&amp;lt;em&amp;gt;container{display:flex;padding:40px;align-items:center;justify-content:center;position:relative;overflow:hidden;border-radius:19px;border:2px solid rgba(129,75,246,.4);background:linear-gradient(0deg,rgba(43,27,78,.4) 0%,rgba(43,27,78,.6) 100%),#080809}.content&amp;lt;/em&amp;gt;&amp;lt;em&amp;gt;wrap{display:flex;align-items:center;max-width:900px;flex-direction:row;gap:16px;justify-content:space-between}.blur-effect{width:728px;height:311px;position:absolute;left:-25px;bottom:-71px;fill:linear-gradient(140deg,rgba(175,44,187,.45) 0%,rgba(0,26,255,.45) 100%);opacity:.4000000059604645;filter:blur(52px)}.left __container{display:flex;position:relative;z-index:999;flex-basis:37%;flex-direction:column;justify-content:center;align-items:flex-start;gap:24px;align-self:stretch}.text&amp;lt;/em&amp;gt;_ container{display:flex;flex-direction:column;align-items:flex-start;gap:16px;align-self:stretch}.text &amp;lt;strong&amp;gt;heading{display:flex;flex-direction:column;align-self:stretch;margin:0;color:#FFF;font-family:Inter;font-size:32px;font-style:normal;font-weight:700;line-height:96.023%}.text&amp;lt;/strong&amp;gt; desc{display:flex;flex-direction:column;align-self:stretch;margin:0;color:#CCC;font-family:Inter;font-size:16px;font-style:normal;font-weight:400;line-height:normal}.btn{display:flex;padding:10px 40px;justify-content:center;align-items:center;gap:10px;border-radius:3px;background:#814BF6;color:#FFF!important;font-family:Inter;font-size:16px;font-style:normal;line-height:normal;text-decoration:none!important}.btn:hover{background-color:rgba(129,75,246,.75)}.right &amp;lt;strong&amp;gt;container{display:flex;position:relative;z-index:999;flex-basis:63%;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:32px;align-self:stretch}.usp&amp;lt;/strong&amp;gt; container{display:flex;align-items:center;justify-content:start;gap:26px;align-self:stretch}.usp &amp;lt;strong&amp;gt;icon{display:flex;padding:8px;justify-content:center;align-items:center;border-radius:5px;border:1px solid #814BF6}.usp&amp;lt;/strong&amp;gt; text span{color:#FFF;font-family:Inter;font-size:16px;font-style:normal;font-weight:700;line-height:normal}.usp &amp;lt;strong&amp;gt;text p{color:#CCC;font-family:Inter;font-size:16px;font-style:normal;margin:0}.usp&amp;lt;/strong&amp;gt; svg{width:24px}.text_&amp;lt;em&amp;gt;container p{padding:0 0 0 0!important;margin:0 0 0 0!important}&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; screen and (max-width:600px){.content&amp;lt;/em&amp;gt;&amp;lt;em&amp;gt;wrap{flex-direction:column;gap:40px}}&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; screen and (min-width:950px){.left&amp;lt;/em&amp;gt;_container{flex-basis:33%}}&amp;lt;br&amp;gt;
&lt;br&gt;
&lt;br&gt;
    &lt;br&gt;
  &lt;br&gt;
    &lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
    &lt;br&gt;
    &lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
    &lt;br&gt;
  &lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Zero config cloud made for developers&lt;/p&gt;

&lt;p&gt;From GitHub to deployment in under 5 seconds.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://signup.codesphere.com/?utm_source=blogSnippet&amp;amp;utm_campaign=blog"&gt;Sign Up!&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;Review Faster by spawning fast Preview Environments for every Pull Request.&lt;/p&gt;



&lt;p&gt;AB Test anything from individual components to entire user experiences.&lt;/p&gt;



&lt;p&gt;Scale globally as easy as you would with serverless but without all the limitations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Complexity
&lt;/h3&gt;

&lt;p&gt;Setting up an AI model is easy on Codesphere. It takes under two minutes to &lt;a href="https://codesphere.com/articles/self-hosted-chatgpt-in-codesphere?ref=codesphere.ghost.io"&gt;deploy an open-source LLM model like LLAMA2&lt;/a&gt;. You do not need to have DevOps or Machine learning engineers to set it up or maintain it. So, there are no maintenance costs. &lt;/p&gt;

&lt;p&gt;If you want to fine-tune your model, that can be done by anyone. This can be achieved by fine-tuning your model with the help of services like chatGPT. Moreover, setting up the whole application follows Google’s software development standards. It is pre-set and can be used without any configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Suggested Reading: &lt;a href="https://codesphere.com/articles/software-development-process?ref=codesphere.ghost.io"&gt;Software Development: Moving Away from Sequential Workflows&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Generative AI has progressed exponentially in recent years in terms of performance as well as availability. The open-source LLM models are at par with the API-based LLMs and much more beneficial in most cases. It is neither complex nor expensive to host your own LLMs anymore. It is a great development for businesses and organizations who want to use the technology without giving up data autonomy and control. Codesphere, effectively resolves the cost and complexity issues that organizations face when they opt for self-hosting.&lt;/p&gt;

</description>
      <category>informative</category>
      <category>largelanguagemodels</category>
      <category>generativeai</category>
      <category>business</category>
    </item>
    <item>
      <title>Software Development: Moving Away From Expensive Sequential Workflows</title>
      <dc:creator>Hafsa Jabeen</dc:creator>
      <pubDate>Tue, 24 Oct 2023 08:12:50 +0000</pubDate>
      <link>https://dev.to/hafsajabeen/software-development-moving-away-from-expensive-sequential-workflows-57lm</link>
      <guid>https://dev.to/hafsajabeen/software-development-moving-away-from-expensive-sequential-workflows-57lm</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u46UXW4m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/Software.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u46UXW4m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/Software.webp" alt="Software development: Moving away from expensive sequential workflows" width="794" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“Software will eat the world,” said Marc Andreessen in 2011. He predicted software would revolutionize and change the way industries function. Which by the way happened to be true. The question here is, that software development has disrupted the way the world works but not its own processes, why? There is no doubt software development processes have come a long way, but they are still the same at their core. The software development workflows are sequential, time-consuming, and full of painful backsteps. What if the software development process was parallelized? &lt;/p&gt;

&lt;p&gt;Let’s discuss what I mean by this, but let me walk you through the basics first.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is software development?
&lt;/h2&gt;

&lt;p&gt;Software development is the process of building computer programs and applications. It all starts with careful planning and design, followed by writing the actual code. Software developers use various programming languages and frameworks to write the code that instructs computers to perform specific tasks. After that software testing is done to detect and fix any errors or bugs. Once it is stable, the software is reviewed and built. It moves through different stages, including quality assurance and staging, before going live. In essence, software development is the driving force behind the wide range of applications we come across from mobile games to complex enterprise software systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Software development process:
&lt;/h2&gt;

&lt;p&gt;There are certain stages in the software development life cycle. We will discuss what they are and then later talk about how different development models handle these stages. The prerequisites of software development are carrying out market research to &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check the viability of product&lt;/li&gt;
&lt;li&gt;Define the project goals and developer tasks&lt;/li&gt;
&lt;li&gt;Design software architecture
&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Code&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After you are done with the above things, the actual process of writing the code and burning your application to life starts. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Test&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This implies local testing after writing the code, to identify and rectify any issues, bugs, or vulnerabilities within the software. This phase ensures that the program functions as intended and is free of errors.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Review&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The review phase involves a critical examination of the code and the overall software structure. It often includes peer reviews or code inspections to enhance code quality and maintainability.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Build&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The build stage means building your code into executable files or packages that can be deployed on various platforms. This process transforms the code into a usable software application.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Stage&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Software applications are deployed in staging environments to further test and evaluate them. Staging is done to ensure a smooth transition into the production environment.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;QA&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Quality assurance is an ongoing process throughout software development. It focuses on maintaining the quality, reliability, and performance of the software. It makes sure the software application meets all required standards and specifications.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Live&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is the production environment where software is finally deployed and made available to end-users or customers. In the “live” phase users can interact with and benefit from the software's functionality.&lt;/p&gt;

&lt;h2&gt;
  
  
  What do typical software development processes look like?
&lt;/h2&gt;

&lt;p&gt;Typical software development processes can take several forms. Let’s discuss two of the main software development methodologies to understand the process better.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Waterfall Model&lt;/li&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This methodology takes on a sequential and linear approach towards software development. It typically includes distinct phases such as requirements gathering, design, implementation, testing, deployment, and maintenance. Each phase must be completed before moving to the next. This is what makes it difficult to make any changes to the project once a phase is completed.  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;DTAP Model&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The DTAP (Development, Test, Acceptance, Production) model is another framework in software development and deployment. It involves a sequential progression of environments, starting with Development, where code is created and tested. It is then followed by testing and acceptance for user validation. The final stage is production, which is the live environment. This approach ensures that software is thoroughly vetted before reaching end-users, reducing the risk of errors in production. However, the process can be challenging due to the potential need for backsteps, where issues discovered in later stages may require revisiting earlier ones. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Iterative Model&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The other common approach towards software development is iterative or incremental. This approach involves breaking the project into smaller parts or iterations. Each iteration goes through the entire development cycle, which allows for incremental improvements. This approach provides constant feedback and hence more room for adaptability. However, the issue of repetition stays the same although it is a bit faster than the waterfall model. &lt;/p&gt;

&lt;p&gt;All of these software development models are linear with possible repetitions and backsteps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Development Process&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The typical software development process follows almost the same steps irrespective of the model used. It starts with a developer writing the code, which is then pushed to a remote repository. It then gets deployed to some QA instance or preview environment. Then it undergoes testing and if any bugs are found the developer has to check out that branch locally again and fix bugs. The same cycle from step one gets repeated again. It is like tracing back your steps in sand and then redoing everything, which definitely takes a lot of time and seems counterproductive. This cycle of code refinement and retesting may iterate until the software is bug-free and ready for deployment.&lt;/p&gt;

&lt;p&gt;Another highlight of the process is how different phases of the software development cycle are handled typically. There are two different departments handling development and operations separately. &lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges with typical process
&lt;/h2&gt;

&lt;p&gt;While the software development process works, it carries certain challenges. The iterative nature of development, with repeated code fixes and retesting, can lead to increased development time and potential delays in project completion. This means you end up with higher costs and lose a substantial amount of time going back and forth. &lt;/p&gt;

&lt;p&gt;Additionally, the problem gets even bigger when you are working on large scales or in big companies. People are usually part of smaller teams in such instances and all the teams have a different version of the above-discussed software development process in place. It means people cannot easily switch between projects because of the lack of knowledge of all the different kinds of processes. &lt;/p&gt;

&lt;p&gt;The cherry on top here is having separate development and operation teams. The divided functionality leads to inefficiencies, communication barriers, and slower deployments, due to a lack of collaboration and coordination between the two teams. This is what we commonly call “DevOps Silos”.&lt;/p&gt;

&lt;p&gt;Each bug identification and rectification cycle demands additional effort from developers, resulting in a slower go-to-market speed. It means two things: one, that you will be solving the wrong problems. What that means is the current software world is changing very fast, you have to act fast to meet the demand. If it takes you long enough, by the time your product goes to market it won’t be relevant or way behind what the market demands. Secondly, the later you find a bug, the more it costs you. It is called the defect cost multiplier. For example, catching and rectifying a bug that has already affected the end user will cost you more than the one caught at an early stage. Both because of the loss of trust and having to go through all the backsteps again. Here is a graphical representation of the phenomena.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P_Hc4DLX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh7-us.googleusercontent.com/mGSH-AMJ9FKt5lreUdERES04GjbKrgKez4wwjxTO_R5a58d0KLoy3Y6bZifKTIuPSPelW9pFErrkm3ZcLls34uLKw6chWgqVxvieHXQ5vLx9b3-bQMF4vv3kGD4jeXdOhWMCfKoy3DVFxuW4Skr_cfc" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P_Hc4DLX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh7-us.googleusercontent.com/mGSH-AMJ9FKt5lreUdERES04GjbKrgKez4wwjxTO_R5a58d0KLoy3Y6bZifKTIuPSPelW9pFErrkm3ZcLls34uLKw6chWgqVxvieHXQ5vLx9b3-bQMF4vv3kGD4jeXdOhWMCfKoy3DVFxuW4Skr_cfc" alt="Software development: Moving away from expensive sequential workflows" width="800" height="383"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Defect Cost Multiplie for&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On top of that, after all this, you need to have DevOps engineers to deploy the code and servers to host that code, further putting a money strain. All this racks up pretty quickly, resulting in a slow software development process with high resource and operational costs. Most of the solutions to improve the dev processes today require a lot of redundant computing resources (i.e. preview deployments etc.) - this can become unmanageable and expensive for larger teams. For example, if we talk about Codesphere, our dev team already has ~700 branches and 200+ pull requests.  Each of them requires resources to run independent versions of codesphere. These numbers grow even bigger as the size of the team grows. Without on-demand resource allocation, this makes preview deployments too expensive.                                                          &lt;/p&gt;

&lt;h2&gt;
  
  
  Trends in Software Development Processes
&lt;/h2&gt;

&lt;p&gt;The history of software development has witnessed a dynamic evolution regarding methodologies. The waterfall model is a rather old and linear way of handling things that originated in the 1970s. Software development has evolved and passed through many stages since. In the early nineties, the term continuous integration was first coined which later emerged as CI/CD, an approach focusing on automating the build, testing, and deployment processes to ensure quicker, more reliable software delivery. In the meanwhile, software development in general leaned towards the Agile approach as opposed to the waterfall model.  Agile emphasizes flexibility, collaboration, and continuous iteration, allowing for more adaptive development.&lt;/p&gt;

&lt;p&gt;There have been several other micro trends or approaches like serverless introduced by Amazon, which gained popularity in the last decade. It introduced cloud-based computing platforms that abstracted server management. However, it was later proved to not be as revolutionary as it was once thought to be. Recently, Amazon came out to say it became unsustainable cost-wise when used on a larger scale. &lt;/p&gt;

&lt;p&gt;Another, approach that got popular at the same time was using a microservices architecture. It implies breaking down monolithic applications into smaller, independent services. This modular approach tries to simplify development, scalability, and maintenance. It also fosters flexibility in deploying only the required services.&lt;/p&gt;

&lt;p&gt;The historical trajectory of software development shows a shift in approach from rigid, linear models to more adaptable and, automated models. This brings us to the question, what does the future hold for software development?&lt;/p&gt;

&lt;h2&gt;
  
  
  Interview with Codesphere Founders
&lt;/h2&gt;

&lt;p&gt;We interviewed Codesphere founders to ask them how they handled the software development process at Codesphere. We also asked them to reflect on their thoughts about the software development process in the next 5 years. &lt;/p&gt;

&lt;p&gt;Each topic is followed by a question for Roman on practical tips on how we handle this internally and Elias for an outlook into the future.&lt;/p&gt;

&lt;p&gt;Let’s see what they have to say about it. &lt;/p&gt;

&lt;p&gt;.tg {border-collapse:collapse;border-spacing:0;}&lt;br&gt;
.tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;&lt;br&gt;
  overflow:hidden;padding:10px 5px;word-break:normal;}&lt;br&gt;
.tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;&lt;br&gt;
  font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}&lt;br&gt;
.tg .tg-0pky{border-color:inherit;text-align:left;vertical-align:top}&lt;/p&gt;

&lt;p&gt;| &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--70lESV9X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/T01DXUTF5GV-U01EDLJRT5X-79c816c7ac67-512.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--70lESV9X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/T01DXUTF5GV-U01EDLJRT5X-79c816c7ac67-512.jpeg" alt="Software development: Moving away from expensive sequential workflows" width="512" height="512"&gt;&lt;/a&gt; | Elias: Elias Groll is the CEO of Codesphere. He started coding before he turned 10. At 15, he started studying Computer Science, taking university classes while still in high school. Elias then joined Google as an employee in 2019. Not being impressed by the technology there he co-founded Codesphere. |&lt;br&gt;
| &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fzjlRhY7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/T01DXUTF5GV-U01ET47UM16-42b193b0f089-512.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fzjlRhY7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/T01DXUTF5GV-U01ET47UM16-42b193b0f089-512.jpeg" alt="Software development: Moving away from expensive sequential workflows" width="512" height="512"&gt;&lt;/a&gt; | Roman Forlov: A boy who started working in hospitality at the age of 14, taught himself computer science at the age of 21 while working at a bar. Co-founded a startup, failed, and then co-founded codesphere at the age of 25 to make the DevOps experience better and more accessible to everyone. |&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Elias:&lt;/strong&gt; Elias Groll is the CEO of Codesphere. He started coding before he turned 10. At 15, he started studying Computer Science, and taking university classes while still in high school. Elias then joined Google as an employee in 2019. Not being impressed by the technology there he co-founded Codesphere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Roman Forlov:&lt;/strong&gt; A boy who started working in hospitality at the age of 14, taught himself computer science at the age of 21 while working at a bar. He co-founded Codesphere at the age of 25 to make the DevOps experience better and more accessible to everyone.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Painful backsteps: “Repeated code fixes and retesting, can lead to increased development time and potential delays in project completion” *&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Roman: how do we tackle this challenge at Codesphere internally?&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;At Codesphere, we write automated tests, which allows us to move faster as we have higher confidence in making changes to the code base - if a change breaks something, we’ll catch and fix it early thanks to the existing tests.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elias: What will this process look like in the future?&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Parallelization of process steps is key for improving the time to market and luckily that is increasingly easy to do in practice. Instead of sequential steps that require starting back at step one if issues need to be fixed with tools like Codesphere developers will be able to make code changes in any step of the process. This makes dev teams much faster!&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ktlviHHj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh7-us.googleusercontent.com/5h3Nb2zOEf6qiycLjK1jNPRpQM_z8Bk9zqzeJKSG-3jFbONbX6UxpwrzylWl8aG4J_jZN0klzIjBf-U4VPQenFObEDjZcoOZ0Eq_AOlG7hgTkxHsR6AQwJEIElcWZlJtgtxw2-e348ulcOf7HIEpjIk" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ktlviHHj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh7-us.googleusercontent.com/5h3Nb2zOEf6qiycLjK1jNPRpQM_z8Bk9zqzeJKSG-3jFbONbX6UxpwrzylWl8aG4J_jZN0klzIjBf-U4VPQenFObEDjZcoOZ0Eq_AOlG7hgTkxHsR6AQwJEIElcWZlJtgtxw2-e348ulcOf7HIEpjIk" alt="Software development: Moving away from expensive sequential workflows" width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Separate Dev and Ops teams: “Companies have challenges with separated development and ops teams, what we commonly call “DevOps Silos”.”&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Roman: How are our teams at Codesphere positioned to avoid this?&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Collaboration is key to a productive company. We avoid silos by having cross-functional teams and regular syncs between departments. On top of that, we often work on projects together.&lt;/li&gt;
&lt;li&gt;Additionally, our teams rotate on important functions like weekly QA &amp;amp; BuildCop (making sure CI/CD runs smoothly)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elias: 5 years from now - will there still be DevOps Silos or will the problem shift elsewhere?&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;We are already seeing a shift towards a unified function where the developers are more and more enabled to manage their own infrastructure eliminating the potential for silos. Developers will be able to do much more with the same amount of resources and that’s a very exciting development! One thing that will remain challenging in the future is making sure business use cases (which might actually still increase in complexity) and development are aligned - the time freed up on the infrastructure side will be very helpful here.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*&lt;em&gt;Non-streamlined dev processes: “People are usually organized in smaller teams and the individual teams have different versions of the software development process, making it hard to switch individuals between teams and creating knowledge silos” *&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Roman: What guidelines and rules do we set internally to avoid discrepancies between our software teams?&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;All teams adhere to the company-wide knowledge base where each engineer can contribute.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elias: What is your take on - a universally streamlined dev process that any company (of any size and vertical) can follow sounds like it is too good to be true?&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Codesphere doesn’t force everyone onto the same process! The key to a universally adaptable process is to maintain flexibility and extensibility without increasing the complexity to an unmanageable level. Codesphere’s standardization in software operations sets industry-leading standards that will make your teams faster - if your specifics require a custom change though that’s doable and envisioned. For enterprises, we have technical account managers &amp;amp; experts that can help.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Infrastructure costs: “A lot of the solutions to improve development speed (i.e. preview deployments) require high amounts of computing resources which gets expensive as companies grow”&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Roman: How do we ensure efficient computing consumption during our dev processes?&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;We only run what absolutely needs to and as long as it needs to, thus avoiding unnecessary costs coming from deployments that run unused or have excessive resources.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elias: Codesphere is working on an on-demand infrastructure innovation that will eliminate this altogether. Can you give a rough idea of where we stand today compared to how much improvement we still expect over the next few years?&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Our patent-pending fast cold-starting on-demand infrastructure can already achieve a 90% cost reduction for preview deployments and low traffic, high compute use cases like internal LLMs. Today cold starts take a few seconds but with the patented technology we believe we can get this down to milliseconds which will broaden the range of use cases that can profit from this on-demand infrastructure -  this will be nothing short of game-changing. Imagine you can vertically (server size) and horizontally (amount of servers serving parallel requests) change the compute in split seconds - you can go from overprovisioning and 90% of resources being unused 90% of the time to very efficient underprovisioning that scales with demand in real-time. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;In summary, while software development has revolutionized industries, its own processes remain outdated and prone to challenges. Traditional sequential workflows, like the Waterfall and Iterative models, lead to extended timelines and increased costs.&lt;/p&gt;

&lt;p&gt;Looking ahead, we anticipate a more parallel approach to software development. The optimization of resource utilization and innovations in on-demand infrastructure will drive down operational costs and increase adaptability. The industry is on the verge of a significant transformation, resulting in faster, more efficient, and adaptable software development processes. &lt;/p&gt;

&lt;p&gt;What are your thoughts on the current state of the software development process and the innovations that might come in next five years?&lt;/p&gt;

</description>
      <category>informative</category>
      <category>softwaredevelopment</category>
      <category>scrum</category>
      <category>sdlc</category>
    </item>
    <item>
      <title>7 Open Source LLM Text Generators You Need to Know About</title>
      <dc:creator>Hafsa Jabeen</dc:creator>
      <pubDate>Fri, 20 Oct 2023 14:15:03 +0000</pubDate>
      <link>https://dev.to/hafsajabeen/7-open-source-llm-text-generators-you-need-to-know-about-13gd</link>
      <guid>https://dev.to/hafsajabeen/7-open-source-llm-text-generators-you-need-to-know-about-13gd</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Dz48Ymas--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/LLM-text-generator.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Dz48Ymas--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/LLM-text-generator.webp" alt="7 Open Source LLM Text Generators You Need to Know About" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enterprises, startups, or a hobbyist, whichever category you fall in, you would want to know about these LLM text generators. After Meta released LLAMA2, the open-source community has been rolling out fine-tuned models that perform exceptionally well. We have hundreds of models coming out each month. Think of almost any use case and you can find an open-source fine-tuned model you can start using. &lt;/p&gt;

&lt;p&gt;You might think why should you use a &lt;a href="https://codesphere.com/articles/self-hosted-vs-api-based-llms?ref=codesphere.ghost.io"&gt;self-hosted model vs an API-based&lt;/a&gt; one? Well,self-hosted LLMs not only provide you with better transparency, data security, and control, but they are more customizable and cheaper at scale. Alright, enough about that, let me tell you about 7 LLM text generators that were released or upgraded last month, yes, that recently. &lt;/p&gt;

&lt;p&gt;Let’s dive right in.&lt;/p&gt;

&lt;h3&gt;
  
  
  1- Zephyr-7b-alpha.Q4
&lt;/h3&gt;

&lt;p&gt;This is the first LLM text generator on our list. It was released 9 days ago. Zephyr represents a collection of language models designed to function as useful assistants. The first model in this series is known as Zephyr-7B-α. It has undergone fine-tuning based on the Mistral-7B-v0.1. Mistral was trained using Direct Preference Optimization (DPO) on a combination of publicly available and synthetic datasets.&lt;/p&gt;

&lt;h3&gt;
  
  
  2- Sqlcoder2
&lt;/h3&gt;

&lt;p&gt;SQLCoder is a model comprising 15 billion parameters. It is designed specifically for tasks related to natural language to SQL conversion. According to Defog.ai, the model creator, this model demonstrates superior performance in comparison to get-3.5-turbo based on their sql-eval framework. Moreover, it consistently surpasses the performance of all commonly used open-source models in this context. &lt;/p&gt;

&lt;p&gt;SQLCoder's fine-tuning process is built upon the foundation of the base StarCoder model.&lt;/p&gt;

&lt;p&gt;When fine-tuned with a specific schema, SQLCoder even surpasses the capabilities of Gpt-4. &lt;/p&gt;

&lt;h3&gt;
  
  
  3- Mythalion-13B
&lt;/h3&gt;

&lt;p&gt;This model is based on Llama2. This LLM is trained specifically to write fiction for entertainment. The creators warn that any other use is out of scope as it might create factually wrong or misleading text. This model is the result of a collaborative effort between PygmalionAI and Gryphe, blending the Pygmalion-2 13B model with Gryphe's Mythomax L2 13B model. It is available for unrestricted use, both commercially and non-commercially, in compliance with the Llama-2 license terms.&lt;/p&gt;

&lt;h3&gt;
  
  
  4- Mistral-7B-Instruct-v0.1
&lt;/h3&gt;

&lt;p&gt;This LLM is a finetuned generative text version of the Mistral-7B-v0.1 model. It is trained on multiple conversation data sets that are publicly available. The creators have claimed Mistral 7B which is a 7.3B parameter model performs better on all benchmarks than Llama 13B. There is a &lt;a href="https://huggingface.co/mistralai/Mistral-7B-v0.1?ref=codesphere.ghost.io#:~:text=Hosted%20inference%20API"&gt;hosted inference API&lt;/a&gt; available if you want to check it out quickly. This model is intended to demonstrate ease to fine-tune the base model for any task.&lt;/p&gt;

&lt;h3&gt;
  
  
  5- Collectivecognition-v1.1-mistral-7b.Q8_0
&lt;/h3&gt;

&lt;p&gt;Collective Cognition v1.1 is a cutting-edge model fine-tuned using the Mistral approach. It stands out for its remarkable performance, surpassing the capabilities of many 70B models on the TruthfulQA benchmark. It will come as a surprise that it was trained on just 100 data points on the data from the Collective Cognition website. This promises a substantial improvement in results with dataset expansion.&lt;/p&gt;

&lt;h3&gt;
  
  
  6- Dolphin 2.1 Mistral 7B
&lt;/h3&gt;

&lt;p&gt;This text-generation LLM model was released 9 days ago by Eric Hartford. This a16z sponsored model is derived from mistralAI. It is suitable for both noncommercial and commercial use. It has been trained on the Dolphin dataset, which is an open-source of Orca by Microsoft. It is an uncensored model as the dataset was filtered to remove any bias or alignment. It is suggested by the creator to add an alignment layer before using the said model as a service. &lt;/p&gt;

&lt;h3&gt;
  
  
  7- ToRA-code-13B-v1.0-GGUF
&lt;/h3&gt;

&lt;p&gt;Released 5 days ago, this model is trained on ToRA-Corpus 16k. These Tool-Integrated Reasoning Agents are focused on solving mathematical reasoning problems. They achieve it by interacting with tools like symbolic solvers and computation libraries. It is the first open-source model to have over 50% accuracy on the math dataset. It is at par with GPT-4 in regards to solving problems with programs and outperforms the CoT results of GPT-4 (51.0 vs. 42.5).&lt;/p&gt;

&lt;h2&gt;
  
  
  Hosting the LLM text generators on Codesphere
&lt;/h2&gt;

&lt;p&gt;To use these LLM text generators using &lt;a href="https://codesphere.com/?ref=codesphere.ghost.io"&gt;Codesphere&lt;/a&gt;, you need to follow these simple steps.&lt;/p&gt;

&lt;p&gt;Start with creating a workspace in Codesphere and clone &lt;a href="https://github.com/codesphere-cloud/text-generation-web-ui?ref=codesphere.ghost.io"&gt;this repository&lt;/a&gt; or choose the ready-to-use template. &lt;/p&gt;

&lt;p&gt;Next, you need to go to &lt;a href="https://huggingface.co/?ref=codesphere.ghost.io"&gt;HuggingFace&lt;/a&gt; and click on a model you want to try.&lt;/p&gt;

&lt;p&gt;Copy the slug and paste it into the circled box.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FpyuaIMx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/webui.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FpyuaIMx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/webui.webp" alt="7 Open Source LLM Text Generators You Need to Know About" width="800" height="395"&gt;&lt;/a&gt;&lt;br&gt;
_ WebUI for LLM text generators_&lt;/p&gt;

&lt;p&gt;In the files and versions on HuggingFace, you can choose whichever version you prefer. Click it and paste it in the box highlighted.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DneE27cH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/webui2.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DneE27cH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/10/webui2.webp" alt="7 Open Source LLM Text Generators You Need to Know About" width="800" height="396"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The version of LLM Text Generator in WebUI&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Click download and then refresh the page. You can then choose the model from the “Model loader” drop-down and click load.&lt;/p&gt;

&lt;p&gt;Your model is ready to use, go to the chat window and start using it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which text-generating LLM would you prefer?
&lt;/h2&gt;

&lt;p&gt;The open-source models are better than ever and perform better than their API-based counterparts in some instances. I had a lot of fun using all these text-generating models and would love to know which one you like the best.&lt;/p&gt;

&lt;p&gt;If you face any problem hosting these on Codesphere, get in touch.&lt;/p&gt;

</description>
      <category>informative</category>
      <category>ai</category>
      <category>largelanguagemodels</category>
    </item>
    <item>
      <title>Stay On Top of Your Tasks: Build a TO-DO Application with Angular</title>
      <dc:creator>Hafsa Jabeen</dc:creator>
      <pubDate>Fri, 29 Sep 2023 20:25:25 +0000</pubDate>
      <link>https://dev.to/hafsajabeen/stay-on-top-of-your-tasks-build-a-to-do-application-with-angular-d8k</link>
      <guid>https://dev.to/hafsajabeen/stay-on-top-of-your-tasks-build-a-to-do-application-with-angular-d8k</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sQQDAYzd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/To-do.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sQQDAYzd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/To-do.webp" alt="Stay On Top of Your Tasks: Build a TO-DO Application with Angular" width="800" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whatever profession we might have, or any field we work in, we often find ourselves tangled in a number of tasks. Sometimes, it is just all too much to remember and we sometimes end up forgetting one while doing the other. I was once given a very old but very effective advice by my father “Write all the tasks on a  paper when you start your day, list them according to their urgency and importance, and by the end of your day, it will be all done.” It has so far worked nicely for me but as I spend more and more time on the computer, I realize the practice needs some upgradation. I need something I can access from anywhere or on any device.&lt;/p&gt;

&lt;p&gt;So, today, here we are, building a TO-DO application with angular. Angular is a development platform that is built on Typescript. Let’s get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to build a to-do list application
&lt;/h2&gt;

&lt;p&gt;This article will take you step by step through the process of building a to-do list app. First things first, we need to install Angular on our system. However, we need to have the following for that:&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1-&lt;/strong&gt; Node.js: We need Node.js to work with Angular. You can run the following command to check if you have it already installed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you don’t have it, you can install &lt;a href="https://nodejs.org/en/download?ref=codesphere.ghost.io"&gt;Node.js&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2-&lt;/strong&gt; The second thing we need is an npm package manager because different features and functions of Angular, Angular CLI as well as the Angular application depend on npm packages. You can run npm -v to check if you have it, as it is installed with Node.js.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up the Application
&lt;/h2&gt;

&lt;p&gt;Now we are going to install the Angular CLI by using the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g @angular/cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To create our application we will write this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng new todo --routing=false --style=css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We would navigate to our project now with the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd todo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we have to run this application on the server by giving this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can now see your to-do application running locally at &lt;a href="http://localhost:4200/"&gt;http://localhost:4200/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Structure of the to-do application
&lt;/h2&gt;

&lt;p&gt;Now we will start adding logic to our application and we will be able to see the changes in real time. We are trying to create an application that allows us to add new tasks, tick off completed tasks, and delete the tasks we don’t want.&lt;/p&gt;

&lt;p&gt;App.Component.ts is the file where all the logic for our application’s main page will be stored. Here is what the code looks like for that.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Component } from '@angular/core';
import { Item } from "./item";

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'todo';

  filter: "all" | "active" | "done" = "all";
  allItems = [
    {description: "Work on article", done: true },
    {description: "Send outreach emails", done: false},
    {description: "Post on socials", done: false},
    {description: "Create a content plan", done: true}, 
  ];

  get items() {
    if (this.filter=="all") {
      return this.allItems;
    }
    return this.allItems.filter((item)=&amp;gt;
    this.filter=="done" ? item.done:
    !item.done
    );
  }
  addItem(description: string) {
    this.allItems.unshift({
      description,
      done: false
    });
  }
  remove(item: Item) {
    this.allItems.splice(this.allItems.indexOf(item), 1);
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here you can find the complete code for the &lt;a href="https://github.com/Hafsa-jabeen/Todo?ref=codesphere.ghost.io"&gt;to-do application&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hosting Angular App on Codesphere
&lt;/h2&gt;

&lt;p&gt;To host our application on codesphere we need to log in and create a workspace. We can directly import the code from GitHub. To run the application we will create a CI pipeline in a file named ci.yml. The “Prepare” stage will look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n3WXiG2j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/prepare-stage.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n3WXiG2j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/prepare-stage.webp" alt="Stay On Top of Your Tasks: Build a TO-DO Application with Angular" width="800" height="462"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Prepare stage for to do list application&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Then we will add the following steps in the “ Run” Stage&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K21aVZZ9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/Run-Stage.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K21aVZZ9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/Run-Stage.webp" alt="Stay On Top of Your Tasks: Build a TO-DO Application with Angular" width="800" height="748"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Run stage for to do list application&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After saving these steps in our CI pipeline. We need to switch to the “CI pipeline” window from the “Terminal” window located at the bottom left side of your screen.&lt;/p&gt;

&lt;p&gt;All we have to do now is select the “Prepare” stage and click run to build our application. After this, we select the “Run” stage and click the run button. You can now go back to the workspace overview and click on the domain connected to your application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SqUPuNrW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/CI-Pipeline.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SqUPuNrW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/CI-Pipeline.webp" alt="Stay On Top of Your Tasks: Build a TO-DO Application with Angular" width="800" height="289"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;CI Piprline stages On Codesphere&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap up
&lt;/h2&gt;

&lt;p&gt;I definitely see myself using this application in my daily routine. However, this is a rather simple application to build. You can certainly add more functionality to it. I would like to hear how would you like to tweak it to make it more suitable for your day-to-day routine.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>webappdevelopment</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Self-hosted vs. API-based LLMs: Which One is Better?</title>
      <dc:creator>Hafsa Jabeen</dc:creator>
      <pubDate>Wed, 20 Sep 2023 19:54:44 +0000</pubDate>
      <link>https://dev.to/hafsajabeen/self-hosted-vs-api-based-llms-which-one-is-better-583b</link>
      <guid>https://dev.to/hafsajabeen/self-hosted-vs-api-based-llms-which-one-is-better-583b</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--puGWtlhR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/UntitledSelf-hosted-vs-api-based.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--puGWtlhR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/UntitledSelf-hosted-vs-api-based.webp" alt="Self-hosted vs. API-based LLMs: Which One is Better?" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Large language models commonly known as LLMs are generative artificial intelligence models. These sophisticated AI models are trained on vast amounts of text data to understand and generate human-like text based on the input they receive. LLMs can perform a wide range of language-related tasks, including text generation, language translation, question answering, and more. They use deep learning techniques, particularly transformers, to capture complex linguistic patterns, making them highly versatile tools for natural language processing tasks.&lt;/p&gt;

&lt;p&gt;If you have been searching for answers to questions like “How good are open-source LLMs? Or What are the best open-source LLMs”, your search ends today. We are going to discuss open-source vs. API-based LLMs regarding quality, security, customization, cost, and maintenance. So, let’s dive right in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Significance of LLMs like LLAMA 2
&lt;/h2&gt;

&lt;p&gt;The history of Large Language Models (LLMs) is a relatively recent but rapidly evolving one. One of the developments that hugely impacted NLP was the introduction of transformer architecture in 2017. Soon after that came BERT and GPT-1 in 2018. After that, both the open-source community and big tech realized the impact and importance of LLMs.&lt;/p&gt;

&lt;p&gt;In 2020, GPT-3 was released which was trained on 175 billion parameters. The race to create bigger and bigger models started. However, there was a major problem that hindered the progress of the open-source community. The cost of training LLMs like GPT-3 was millions of dollars. The independent AI labs or open source community did not have enough means to compete with big tech companies. So self-hosted LLMs were not at par with API-based LLMs and businesses had no choice but to use models like GPT-3.5 or GPT-4.&lt;/p&gt;

&lt;p&gt;However, that changed recently when LLAMA-2 was released by Meta and Microsoft collaboratively. It is allowed to be used for both experimental and commercial purposes. It has three versions available 7B, 13B, and 70B, the latter of which surpasses ChatGPT-3.5 in speed and efficiency as per these experiments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C1GPKOQp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/Llama2-vs-gpt.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C1GPKOQp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/Llama2-vs-gpt.webp" alt="Self-hosted vs. API-based LLMs: Which One is Better?" width="800" height="521"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;LLAMA 2 vs GPT comparison table, source: neoteric&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparison between Self-hosted vs. API-based LLMs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Quality&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first thing to consider is the quality of the created content. Earlier, there was a huge quality difference between self-hosted and API-based models. However, the release of LLAMA2 has almost instantly bridged the quality gap between self-hosted and API-based LLMs.  A quick look at the table shows that LLAMA 2 is at par with GPT 3.5 in main benchmarks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Tkoz8QIe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/LLAMA2-vs-GPT-comparison.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Tkoz8QIe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/LLAMA2-vs-GPT-comparison.webp" alt="Self-hosted vs. API-based LLMs: Which One is Better?" width="800" height="221"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Main benchmark comparison between different LLMs source: Meta&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xll9mWVZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/LLAMA-vs-GPT-Comparison-graph-.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xll9mWVZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/LLAMA-vs-GPT-Comparison-graph-.webp" alt="Self-hosted vs. API-based LLMs: Which One is Better?" width="800" height="334"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Graphical representation of main benchmarks&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;However, experiments run by Anyscale to check the factual accuracy of different LLM models revealed interesting results. The larger models like the 70B version of LLAMA-2 were at par with GPT-4 in understanding the prompt and generating results.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Customization/fine-tuning&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is an interesting observation that smaller models trained on domain-specific large data sets can compete with generally larger LLMs in terms of performance. The good news is fine-tuning open-source models can be done with a relatively small budget and data. Interestingly, you can now find pre-trained models for a vast range of use cases. One such example is Vicuna which achieved more than 90% of Chat-GPT quality.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One big advantage of using API-based models was the cost factor, especially at lower levels. However, the prices escalate quickly if you are using the services on a larger scale. For comparison, we are going to look at the cost of low and high-scale use.&lt;/p&gt;

&lt;p&gt;ChatGPT is priced based on the number of tokens.&lt;/p&gt;

&lt;p&gt;1 Token= ¾ words&lt;/p&gt;

&lt;p&gt;The total number of tokens is determined by combining both the input prompts and the generated output. If we consider an input of 75 words and an output of 375 words. It makes 450 words in total. Each query of 450 words uses 600 tokens.&lt;/p&gt;

&lt;p&gt;Assuming you get around 10,000 queries per day, let’s have a cost breakdown.&lt;/p&gt;

&lt;p&gt;Input tokens used a day= 100*10,000=1000000&lt;/p&gt;

&lt;p&gt;Output Tokens used a day= 500*10,000 = 5000000&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Model&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;Input&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;Daily Cost&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;Monthly Cost&lt;/p&gt;

&lt;p&gt;|&lt;br&gt;
| &lt;/p&gt;

&lt;p&gt;GPT-3 4K context&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$0.0015/ 1K tokens&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$0.002/ 1K tokens&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$ 13&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$390&lt;/p&gt;

&lt;p&gt;|&lt;br&gt;
| &lt;/p&gt;

&lt;p&gt;GPT-3 16K context&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$0.003/ 1K tokens&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$0.004/ 1K tokens&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$50&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$1500&lt;/p&gt;

&lt;p&gt;|&lt;br&gt;
| &lt;/p&gt;

&lt;p&gt;GPT-4 8K context&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$0.03/ 1K tokens&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$0.06/ 1K tokens&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$360&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$10800&lt;/p&gt;

&lt;p&gt;|&lt;br&gt;
| &lt;/p&gt;

&lt;p&gt;GPT-4 32K &lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$0.06/ 1K tokens&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$0.12/ 1K tokens&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$720&lt;/p&gt;

&lt;p&gt;| &lt;/p&gt;

&lt;p&gt;$21600&lt;/p&gt;

&lt;p&gt;|&lt;/p&gt;

&lt;p&gt;We can see, that API-based models may have usage costs that can add up, especially for high-volume applications. On the other hand, most of the fine-tuned models are 7B or 13B models, which can be run on user-grade GPUs and cost less. How? We will talk more about this later.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Development and maintenance&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The narrative so far was that for API-based models you don't need to worry about model development, infrastructure setup, or deployment. You can typically integrate them into your applications with just a few lines of code. Whereas, it requires a significant investment in time, expertise, and resources. Whereas It might still be true for a small number of cases the open-source community has rolling out developments daily. As a result, you can easily find a pre-trained model for whatever use case you want. With such developments, having a dedicated ML team isn’t a necessity anymore for a self-hosted LLM. Using these open-source models is as easy as the API-based closed-source models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Suggested Reading:&lt;/strong&gt; &lt;a href="https://codesphere.com/articles/self-hosted-chatgpt-in-codesphere?ref=codesphere.ghost.io"&gt;&lt;strong&gt;Running Llama2 in Codesphere&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Transparency and Control&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The transparency and control that you have with a self-hosted model is simply not possible with an API-based model. You are in charge of maintaining and updating your model and endpoint. This may take time and effort but gives you saves you from unexpected issues. You don’t have to worry about being subjected to updates or changes that might break the application you have built on top of it. We have seen multiple mentions of deterioration of response quality with Api-based models, which is not the case when you self-host.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data Privacy and safety&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Data autonomy and privacy is one of the biggest reasons for using self-hosted LLMs. The terms of use of openai mention they can use content from services other than their API. Enterprises that are concerned about proprietary data leaking to any API provider can manage where data gets stored and sent with these self-hosted options. One option is to use Azure OpenAI services, which are offered as private Azure hosting. However, watch out for the cost because if we take the same assumptions as before, hosting a 70 B LLAMA 2 will end up emptying §17000+ out of your pocket.&lt;/p&gt;

&lt;p&gt;Now, this may seem a little too much for small to medium-scale businesses. We have a solution for you, that will help you keep your data integrity intact without breaking your bank.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hosting with Codesphere
&lt;/h2&gt;

&lt;p&gt;Hosting your LLM model in Codesphere is extremely easy thanks to the open source community. We at Codesphere decided to do a time-run of how long it takes to set up a LLAMA 2 model and it came out to be 1 minute 38 seconds. If we talk about costs, as mentioned earlier most business use 7B or 13B domain-trained models.&lt;/p&gt;

&lt;p&gt;You can run a 7B model on Codesphere with our pro plan that includes 8 vCPUs, 16GB RAM, and 100GB of storage. It costs only $80 per month with our normal workspaces and as low as $8 with our off-when-unused feature. Or it can be free. We just launched a free GPU plan, head over here to know the details: &lt;a href="https://ai.codesphere.com/?ref=codesphere.ghost.io"&gt;Host your custom LLM&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Even if you go for the largest 70B model, you self-host them with Codesphere. We offer dedicated and shared high-power GPU. You can pre-order these GPUs- via our demo process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Future of LLMs
&lt;/h2&gt;

&lt;p&gt;After the release of Llama2, one thing was evident. The monopoly of big tech is fading because these API-based LLMs are expensive and pose a threat to data privacy.&lt;br&gt;&lt;br&gt;
For example, right now, an average CPU that is in our computers and laptops takes around 2 minutes for one inference on Llama2. Another big revolution can be such that for each query it takes less than a second or maybe even a fraction of the second. This speed increase is such an important issue. Because it addresses a crucial barrier preventing many industries from adopting these models for production, or at least from doing so cost-effectively.&lt;/p&gt;

&lt;p&gt;Moreover, the open-source community has hundreds and thousands of people contributing every day. On the other hand, big tech pays a limited number of people to do the same job. With the basic issue of the cost to train a model out of the way, we believe the open-source community will soon be at par if not surpass the quality of API-based models.&lt;/p&gt;

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

&lt;p&gt;LLMs have made a huge impact on how we humans interact with technology. There was a large disparity between close-source and open-source technology at first but Llama2 opened up a wide array of possibilities, primarily through the process of fine-tuning the pre-trained model. One notable transformation is taking place within domain-specific industries. Each industry now has the opportunity to tailor the LLM to its unique requirements. Llama2 came out in May of this year and already there are several domain-specific variants, that perform better than vanilla GPTs on that particular domain. The choice of API-based vs. self-hosted LLM is still something we leave to you.&lt;/p&gt;

</description>
      <category>informative</category>
      <category>ai</category>
      <category>opensource</category>
      <category>openai</category>
    </item>
    <item>
      <title>Build an LSI Keywords Tool with Node JS</title>
      <dc:creator>Hafsa Jabeen</dc:creator>
      <pubDate>Tue, 12 Sep 2023 08:47:52 +0000</pubDate>
      <link>https://dev.to/codesphere/build-an-lsi-keywords-tool-with-node-js-1cem</link>
      <guid>https://dev.to/codesphere/build-an-lsi-keywords-tool-with-node-js-1cem</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_12necUD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/Webscraping.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_12necUD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/Webscraping.webp" alt="Build an LSI Keywords Tool with Node JS" width="800" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While rummaging through our blog the past few weeks, I noticed we have lots of short-form tutorial articles. I also gauged there isn’t a high chance of optimizing and ranking them for any high-density keywords or any specific long tail keyword with decent volume. So, I tried finding some LSI keywords and some long-tail keywords anyway to make them more SERP-friendly. Well, why put any effort into something like this? Because these are some interesting projects that need to be found in my opinion. So, what I did instead was, I found some LSI keywords and lightly sprinkled them throughout the article. To my surprise (or not) it actually worked and increased article clicks.&lt;/p&gt;

&lt;p&gt;At &lt;a href="https://codesphere.com/?ref=codesphere.ghost.io"&gt;Codesphere&lt;/a&gt; we actively strive to build our own tools, we  even have our own Llama models running. So, I thought about building an application that provides LSI keywords based on the top ten Google articles. Let’s build one together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Related Reading:&lt;/strong&gt; &lt;a href="https://codesphere.com/articles/building-email-marketing-engine-expressjs-sendgrid-part-1?ref=codesphere.ghost.io"&gt;Building an Email Marketing Engine&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Web scrapping with Node JS
&lt;/h2&gt;

&lt;p&gt;The first task of this project is to scrape Google Search Results and that would require us to install some libraries. We will use Express framework and Puppeteer for web scraping and rendering dynamic web pages. So here is what we will need to install:&lt;/p&gt;

&lt;p&gt;1- &lt;a href="https://nodejs.org/en?ref=codesphere.ghost.io"&gt;Node JS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2- Puppeteer JS&lt;/p&gt;

&lt;p&gt;3- Express JS&lt;/p&gt;

&lt;p&gt;4- Fetch&lt;/p&gt;

&lt;p&gt;Install Node JS using the links provided and for the rest, run these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install puppeteer 
npm install express
npm install fetch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we are ready to start building our application. First, create an HTML page that takes input and makes a get request based on it to get the raw HTML data from Google. We will use Puppeteer to get the HTML data and parse it.&lt;/p&gt;

&lt;p&gt;Since we are aiming to extract the title, URL and, content of the first ten articles we need to search HTML tags for them. Right-click anywhere and choose the inspect option. It will look like the picture attached below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J1s28ryW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/html-tags.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J1s28ryW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/html-tags.webp" alt="Build an LSI Keywords Tool with Node JS" width="800" height="464"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Finding HTML tags for the content being extracted&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The next step is to create an HTML page using the express framework to view the extracted data along with a fetch button that we will later use to communicate with openai API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MrClEM0N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/Search-result-page.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MrClEM0N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/Search-result-page.webp" alt="Build an LSI Keywords Tool with Node JS" width="800" height="782"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Result page for LSI Keyword tool&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So, in your project create a views directory and in this directory create a file named results.ejs. Here is the code for this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;title&amp;gt;Search Results&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;h1&amp;gt;Search Results&amp;lt;/h1&amp;gt;
  &amp;lt;ul&amp;gt;
    &amp;lt;% searchData.forEach(result =&amp;gt; { %&amp;gt;
      &amp;lt;li&amp;gt;
        &amp;lt;a href="&amp;lt;%= result.link %&amp;gt;" target="_blank"&amp;gt;&amp;lt;%= result.title %&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;
        &amp;lt;button onclick="fetchWebsiteContent('&amp;lt;%= result.link %&amp;gt;')"&amp;gt;Fetch Content&amp;lt;/button&amp;gt;
        &amp;lt;div id="&amp;lt;%= result.link %&amp;gt;Content"&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;/li&amp;gt;
    &amp;lt;% }); %&amp;gt;
  &amp;lt;/ul&amp;gt;

  &amp;lt;script&amp;gt;
    async function fetchWebsiteContent(url) {
      const contentContainer = document.getElementById(`${url}Content`);
      contentContainer.innerHTML = 'Fetching content...';

      try {
        const response = await fetch(`/content?url=${encodeURIComponent(url)}`);
        const data = await response.text();

        contentContainer.innerHTML = `${data}`;
      } catch (error) {
        contentContainer.innerHTML = `Error: ${error.message}`;
      }
    }
  &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Integrate the Openai API&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We have a functioning web scrapping application now. To get LSI keywords based on this content, let’s use openai API. However, there are a limited number of tokens we can send as a query to openai, and the content provided often exceeds the number of tokens allowed. So, to resolve this issue we will split the text and send it in iterations.&lt;/p&gt;

&lt;p&gt;Upon clicking the fetch button on the “Search Result” page you will get LSI keywords based on the content of each article.&lt;/p&gt;

&lt;p&gt;Congratulations now you have tens of relevant keywords to choose from.&lt;/p&gt;

&lt;p&gt;Here is the complete code for this project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require('express');
const puppeteer = require('puppeteer');
const fetch = require('node-fetch');
const app = express();
const OpenAI = require('openai');
const path = require('path');
const port = 3000;

app.use(express.urlencoded({ extended: true }));
app.set('view engine', 'ejs');
app.set('views', path.join(__dirname, 'views'));

const openai = new OpenAI({
apiKey:'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', 

});
//openai.baseURL = 'https://43882-3000.2.codesphere.com/v1'

app.get('/', (req, res) =&amp;gt; {
  res.send(`
    &amp;lt;html&amp;gt;
      &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt;Google Search&amp;lt;/title&amp;gt;
      &amp;lt;/head&amp;gt;
      &amp;lt;body&amp;gt;
        &amp;lt;h1&amp;gt;Google Search&amp;lt;/h1&amp;gt;
        &amp;lt;form action="/search" method="post"&amp;gt;
          &amp;lt;input type="text" name="query" placeholder="Enter your search query" required&amp;gt;
          &amp;lt;button type="submit"&amp;gt;Search&amp;lt;/button&amp;gt;
        &amp;lt;/form&amp;gt;
      &amp;lt;/body&amp;gt;
    &amp;lt;/html&amp;gt;
  `);
});

app.post('/search', async (req, res) =&amp;gt; {
  const query = req.body.query;
  const lang = 'en';

  try {
    const browser = await puppeteer.launch({ headless: true });
    const page = await browser.newPage();
    const url = `https://www.google.com/search?q=${encodeURIComponent(query)}&amp;amp;hl=${lang}`;

    await page.goto(url, {
      waitUntil: 'networkidle2',
    });

    const searchData = await page.evaluate(() =&amp;gt; {
      const searchResults = [];
      const resultContainers = document.querySelectorAll('.tF2Cxc');

      for (let i = 0; i &amp;lt; resultContainers.length &amp;amp;&amp;amp; i &amp;lt; 10; i++) {
        const result = resultContainers[i];
        const titleElement = result.querySelector('h3');
        const linkElement = result.querySelector('a');

        if (titleElement &amp;amp;&amp;amp; linkElement) {
          const title = titleElement.textContent;
          const link = linkElement.getAttribute('href');

          searchResults.push({ title, link });
        }
      }

      return searchResults;
    });

    await browser.close();

    res.render('results', { query, searchData });
  } catch (e) {
    res.send('Error: ' + e);
  }
});

app.get('/content', async (req, res) =&amp;gt; {
  const url = req.query.url;
  const query = req.body.query;
  //try {
    const browser = await puppeteer.launch({ headless: true });
    const page = await browser.newPage();

    await page.goto(url, {
      waitUntil: 'domcontentloaded',
    });

    const websiteContent = await page.$eval('*', (el) =&amp;gt; el.innerText);
    // Working uptill now
    // const aiModelEndpoint = 'https://42955-3000.2.codesphere.com';
    // const encodedEndpoint = encodeURIComponent(aiModelEndpoint);
    // const aiModelResponse = await fetch(encodeURIComponent, {
    // method: 'POST',
    // body: JSON.stringify({ content: websiteContent }),
    // headers: { 'Content-Type': 'application/json' },
    // });

    // Our new code
    const websiteContentList = websiteContent.split(/\s+/);
    const lengthOfwebsiteContentList = websiteContentList.length;
    const maxLimit = 4000;
    var aiModelResponse = ''
    var counter = 0;
    for(var i = 0; i &amp;lt; lengthOfwebsiteContentList; i + maxLimit ) {
      if (counter &amp;gt; 2) {
        break
      }
      var limitedWebsiteContent = websiteContentList.slice(i, i + maxLimit).join(' ');
      var completion = await openai.chat.completions.create({
        messages: [{ role: 'user', content: 'Based on the following HTML, give a list of top 5 LSI keywords without numbering them\n'+ limitedWebsiteContent}],
        model: 'gpt-3.5-turbo',
      });
      aiModelResponse = aiModelResponse + completion.choices[0].message.content;
      counter = counter + 1;
    }

    //res.send(JSON.stringify(aiModelResponse))
    const cleanedResponse = aiModelResponse.replace(/\n/g, '&amp;lt;br&amp;gt;').replace(',', '&amp;lt;br&amp;gt;');
    res.send(JSON.stringify(cleanedResponse))

    await browser.close();
  //} catch (e) {
  // res.send('Error: ' + e);
  //}
});

app.listen(port, () =&amp;gt; {
  console.log(`Server is running on port ${port}`);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Set it up in Codesphere
&lt;/h2&gt;

&lt;p&gt;Log in to Codesphere and create a workspace. We can directly import the repository using our Git account. Now, we have to install all the dependencies here again using the same prompts we used earlier. We might also need to install some additional libraries like libnss3 and our application will be up and running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap up
&lt;/h2&gt;

&lt;p&gt;Overall, this code sets up an Express server that provides a simple web interface for conducting Google searches and fetching content from URLs. It leverages Puppeteer for web scraping and OpenAI for generating content based on fetched web pages. The LSI keywords you get this way are very accurate and we have got results to prove it.&lt;/p&gt;

&lt;p&gt;If you are interested in using &lt;a href="https://codesphere.com/articles/self-hosted-chatgpt-in-codesphere?ref=codesphere.ghost.io"&gt;self hosted LLama model&lt;/a&gt;, instead of openai head over to &lt;a href="https://discord.com/channels/889432631672983562/1024702962599198740?ref=codesphere.ghost.io"&gt;Codesphere Discord Community&lt;/a&gt; for more info.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>node</category>
      <category>nodejstutorial</category>
      <category>ai</category>
    </item>
    <item>
      <title>Software Deployment in 2023: Strategies, Importance &amp; Best Practices</title>
      <dc:creator>Hafsa Jabeen</dc:creator>
      <pubDate>Tue, 05 Sep 2023 07:46:09 +0000</pubDate>
      <link>https://dev.to/codesphere/software-deployment-in-2023-strategies-importance-best-practices-4cfg</link>
      <guid>https://dev.to/codesphere/software-deployment-in-2023-strategies-importance-best-practices-4cfg</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vGR-V9Tg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/Software-Deployment-1.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vGR-V9Tg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/Software-Deployment-1.webp" alt="Software Deployment in 2023: Strategies, Importance &amp;amp; Best Practices" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Software deployment has come a long way since 1947 when the earliest programmable computer was loaded with a software program. It has evolved into a central and sophisticated part of the software development lifecycle. Organizations are adopting &lt;a href="https://codesphere.com/articles/continuous-integration-pipelines-everything-you-ought-to-know?ref=codesphere.ghost.io"&gt;continuous integration&lt;/a&gt;and continuous deliver (CI/CD pipelines) deployment models, to automate the deployment process.&lt;/p&gt;

&lt;p&gt;This article will walk you through the software deployment checklist, strategies, challenges, and ways to deal with them. We will also talk about deployment software and deployment tools and how they can make software deployment faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Software Deployment or Application Deployment?
&lt;/h2&gt;

&lt;p&gt;Deploying software means making a software application or the system available to use by the end user. Software deployment involves a combined effort of development and operation, which is now done mainly by a DevOps team. The main goal is to take the software from a development or testing environment to a production environment and ensure it runs smoothly. Application deployment requires a combination of technical tasks, quality assurance, and coordination.&lt;/p&gt;

&lt;p&gt;The deployments can be either manual or automated and are often carried out at times that do not affect the workflow of the organization. The specific steps involved in a software deployment vary depending on the nature of the software, the deployment environment, and the organizational requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is Software Deployment Important?
&lt;/h2&gt;

&lt;p&gt;Software deployment happens to be the final stage of the software development life cycle (SDLC). Let us list some of the things that make it so important.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Improvement and Staying Competitive:&lt;/strong&gt; Regular software deployments enable organizations to iterate and improve their software. By releasing updates, bug fixes, and new features, your software evolves at the same speed as the market. Being able to deploy new software quickly helps an organization meet changing user needs and gives them a competitive advantage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Efficiency and Cost Saving:&lt;/strong&gt; Properly deployed software can streamline operations, automate manual tasks, and improve efficiency within an organization. This can lead to cost savings and increased productivity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ensuring Reliability &amp;amp; Security:&lt;/strong&gt; Software deployment rigorous testing as well as implementing security measures, access controls, and vulnerability management. This ensures the software works reliably in a production environment and users are not exposed to any data security risks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Risk Mitigation:&lt;/strong&gt; Deployment plans often include rollback procedures and disaster recovery strategies. This helps mitigate risks associated with software deployment failures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-functional Collaboration:&lt;/strong&gt; Deployment requires contributions from several different teams like development, operations, quality assurance, and security. This fosters a collaborative approach towards software delivery and organizational goals.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Software deployment Processes
&lt;/h2&gt;

&lt;p&gt;Although software deployment processes vary depending upon different factors, certain steps are followed in each case. These steps are commonly referred to as a software deployment checklist. This checklist encompasses four stages and tasks that should be performed:&lt;/p&gt;

&lt;h3&gt;
  
  
  Planning
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Objective:&lt;/strong&gt; The planning phase serves as the foundation of the entire deployment process. Its primary goal is to establish a comprehensive strategy and roadmap for how the software will be deployed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Activities:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Informing stakeholders and collaborators: Deploying software takes team effort so it is important to notify and brief all the involved teams to have a safe sailing during the process. Moreover, inform and educate your users about the functionality of new rollouts.&lt;/li&gt;
&lt;li&gt;Gathering Requirements: Gather detailed requirements from stakeholders, including hardware, software, and configuration needs.&lt;/li&gt;
&lt;li&gt;Allocating Resources: Allocate resources such as servers, network resources, and personnel for deployment tasks, based on the project's scope and requirements.&lt;/li&gt;
&lt;li&gt;Deployment Strategy: Develop a deployment strategy, considering factors like the deployment model, rollout strategy (phased or all at once), and contingency plans.&lt;/li&gt;
&lt;li&gt;Performance metrics and Goals: Define specific performance metrics and goals for the deployed software. This includes metrics such as response times, throughput, and resource utilization that the software must meet to ensure optimal user experience.&lt;/li&gt;
&lt;li&gt;Timeline Creation: Create a deployment timeline, including milestones, deadlines, and dependencies to ensure a well-organized and coordinated deployment process.&lt;/li&gt;
&lt;li&gt;Risk Assessment: Identify potential risks and challenges that may arise during deployment. The next thing to do is to develop mitigation plans to address those challenges if they occur.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt; The primary output of the planning phase is a comprehensive deployment plan that outlines what, when, and how deployment activities will take place. This plan serves as a guiding document for the entire deployment team.&lt;/p&gt;

&lt;h3&gt;
  
  
  Testing
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Objectives:&lt;/strong&gt; The&lt;a href="https://codesphere.com/articles/software-testing-ultimate-guide?ref=codesphere.ghost.io"&gt;software testing&lt;/a&gt; phase is dedicated to ensuring that the software functions correctly in the deployment environment and meets quality and security standards before it reaches the production environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Activities:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unit Testing: Unit testing focuses on verifying individual code units, employing specific tests to check if they function correctly and are in accordance with predefined requirements.&lt;/li&gt;
&lt;li&gt;Functional Testing: Rigorously test the software's features and functions to ensure they work correctly and meet the specified requirements.&lt;/li&gt;
&lt;li&gt;Integration Testing: Verify that the software seamlessly integrates with other components and systems in the deployment environment. Also, identify and resolve any compatibility issues.&lt;/li&gt;
&lt;li&gt;Performance Testing: Assess the software's performance under various loads and conditions to identify bottlenecks, optimize resource allocation, and ensure responsiveness.&lt;/li&gt;
&lt;li&gt;Security Testing: Conduct comprehensive security assessments, including vulnerability scanning, penetration testing, and code review, to identify and address security vulnerabilities.&lt;/li&gt;
&lt;li&gt;User Acceptance Testing (UAT): Involve end-users or representatives from the user community to perform usability and acceptance testing, ensuring the software aligns with user expectations and needs.&lt;/li&gt;
&lt;li&gt;Smoke Testing: Use smoke tests to act as a safety net during the deployment phase. They can quickly assess whether or not the software is fundamentally sound and stable for production use. If any critical regressions are detected, the deployment can be stopped.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt; At the end of the testing phase, the software is validated, and any identified issues, defects, or vulnerabilities are documented and addressed. The software is now ready for staging.&lt;/p&gt;

&lt;h3&gt;
  
  
  Staging
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Objective:&lt;/strong&gt; Staging phase serves as an intermediate test ground between the development and production environment. The &lt;a href="https://docs.codesphere.com/getting-started/staging-environments?ref=codesphere.ghost.io"&gt;staging environment&lt;/a&gt;is a replica of your production environment. Here you can deploy your software before it goes live for the end users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Activities:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Environment Setup: Configure staging servers and infrastructure to mimic the production environment closely.&lt;/li&gt;
&lt;li&gt;Data Migration: If applicable, migrate data from the old system to the new one, ensuring data integrity.&lt;/li&gt;
&lt;li&gt;Final Testing: Conduct a final round of testing in the staging environment to validate that everything works as expected before going to production.&lt;/li&gt;
&lt;li&gt;User Training: Train operational staff or end-users on the new software and procedures.&lt;/li&gt;
&lt;li&gt;Rollback Testing: Verify that rollback procedures are in place and tested. Make sure they allow for a quick return to the previous state if needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Codesphere allows you to do preview deployment where you can deploy a new version or roll back to the old one with a single click.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt; At the end of the staging phase, the software is fully prepared for production deployment, and all stakeholders are trained and ready for the transition.&lt;/p&gt;

&lt;h3&gt;
  
  
  Production
&lt;/h3&gt;

&lt;p&gt;The production phase is the final stage of the deployment process, where the software is officially released to the live production environment for use by end-users or customers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Activities:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deployment Execution: Deploy the software to the production servers, following the deployment strategy established in the planning phase.&lt;/li&gt;
&lt;li&gt;Monitoring and Support: Continuously monitor the software in the production environment, proactively identifying and addressing any issues or anomalies that may arise to ensure uninterrupted service.&lt;/li&gt;
&lt;li&gt;User Communication: Communicate with end-users or customers about the deployment, any potential downtime, and changes they may expect, ensuring a smooth user experience.&lt;/li&gt;
&lt;li&gt;Performance Optimization: Continuously optimize the software's performance in the production environment, addressing any unforeseen challenges that may arise during real-world usage.&lt;/li&gt;
&lt;li&gt;Documentation: Maintain up-to-date documentation about the deployed software, configurations, and any changes made in the production environment for reference and auditing purposes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt; The software is live and accessible to users in the production environment. Post-deployment activities, including monitoring, support, and documentation maintenance, become ongoing responsibilities in this phase.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--A8ibqbte--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/Software-Deployment-Chhecklist.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A8ibqbte--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/09/Software-Deployment-Chhecklist.webp" alt="Software Deployment in 2023: Strategies, Importance &amp;amp; Best Practices" width="800" height="612"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Step by Step Software Deployment Checklist&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Different Strategies for Software Deployment
&lt;/h2&gt;

&lt;p&gt;There are several different types or models of software deployment. You can use any software strategy depending on the specific needs, infrastructure, and goals of an organization. Here are some prominent software deployment strategies:&lt;/p&gt;

&lt;h3&gt;
  
  
  Blue-green deployment
&lt;/h3&gt;

&lt;p&gt;Blue-Green Deployment is a deployment strategy used in DevOps to ensure seamless and low-risk updates to applications or systems. In this approach, two nearly identical environments are maintained. The "blue" environment represents the current production environment, while the "green" environment is a duplicate that receives the new version or changes.&lt;/p&gt;

&lt;p&gt;The core idea of this deployment is to test and validate changes, updates, or new software versions in the green environment while keeping the blue environment fully operational. After successful testing and validation, the traffic is progressively switched from the blue environment to the green one. This results in green environment being the new production environment.&lt;/p&gt;

&lt;p&gt;Blue-Green Deployment minimizes downtime and risk because, at any point, one environment is stable and available for users while the other undergoes changes and testing. It offers a reliable and efficient way to manage deployments, rollbacks, and updates in a controlled manner.&lt;/p&gt;

&lt;h3&gt;
  
  
  Canary deployment
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://codesphere.com/articles/canary-deployments?ref=codesphere.ghost.io"&gt;Canary Deployment&lt;/a&gt; is a deployment strategy that entails releasing a new version of software or updates incrementally to a small, carefully selected subset of users or servers, often referred to as the "canary group."&lt;/p&gt;

&lt;p&gt;This approach serves as a risk mitigation mechanism, similar to sending a canary into a coal mine to detect potential issues early. By exposing a limited user base or infrastructure to the changes, developers and operators can closely monitor performance, gather feedback, and assess any unexpected behavior. If issues or anomalies are detected, they can be addressed promptly before software is released to the entire user population. Canary deployments are particularly beneficial in scenarios where the impact of software changes needs to be carefully managed, ensuring a smoother transition and higher overall system reliability.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recreate deployment
&lt;/h3&gt;

&lt;p&gt;Recreate Deployment involves creating an entirely new environment or infrastructure for deploying a new version of the software. Instead of updating the existing environment, the approach is to "recreate" it from scratch with the updated software or changes.&lt;/p&gt;

&lt;p&gt;This strategy offers several advantages, including the ability to test the deployment process rigorously. It reduces the risk of compatibility issues with previous configurations. Recreate deployments also facilitate easy rollback to the previous environment in case of unexpected issues since the previous environment remains intact. However, these deployments can be resource-intensive and require careful management to ensure data continuity and minimal downtime during the transition. This approach is often favored in cloud-native and &lt;a href="https://codesphere.com/articles/serverless-vs-containers?ref=codesphere.ghost.io"&gt;containerized environments&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ramped/Rolling deployment
&lt;/h3&gt;

&lt;p&gt;Rolling Deployment is a software deployment strategy that focuses on updating a system or application in an incremental manner. In a rolling deployment, new software versions or updates are released to a subset of servers or instances at a time, typically one at a time or in small groups. The key benefit is that it allows a system to remain operational while the deployment progresses. This is because a portion of the infrastructure continues to run the old version, providing uninterrupted service to users. This approach ensures that there's no sudden disruption to the entire user base.&lt;/p&gt;

&lt;p&gt;Rolling deployments are particularly useful for large-scale applications with distributed architectures where taking down the entire system for an update is not feasible. It also allows for a smoother transition, easy monitoring of each update's impact, and the ability to quickly address issues as they arise.&lt;/p&gt;

&lt;h3&gt;
  
  
  Shadow deployment
&lt;/h3&gt;

&lt;p&gt;Shadow Deployment is used to introduce new software updates alongside the existing production environment without impacting end-users. In this approach, the new version is deployed in a "shadow" mode, where it runs in parallel with the current production system. The incoming requests are duplicated and traffic is sent to both the production and shadow model. However, the predictions generated by the shadow version are not used so its output or actions are not visible to users.&lt;/p&gt;

&lt;p&gt;This deployment technique allows for real-world testing and validation of the new software in a controlled environment, ensuring it behaves as expected without risking user experience. It's particularly valuable for large-scale systems, enabling organizations to thoroughly evaluate the new version's performance, security, and functionality before making it the primary environment.&lt;/p&gt;

&lt;p&gt;Once the shadow deployment is confirmed to work seamlessly, the switch to the new version is smooth, as any possible issues have already been addressed. Shadow deployments offer a way to ensure the reliability and stability of software updates in complex and high-stakes environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  A/B testing deployment
&lt;/h3&gt;

&lt;p&gt;AB Testing Deployments, also known as split testing or bucket testing, is a deployment strategy widely used in software development and digital marketing. This approach involves releasing multiple variations (A and B) of a software feature, webpage, or application to different user groups to compare their performance and effectiveness. Group A experiences the current version (the control group), while Group B is exposed to the new version (the test group) with the changes or updates. By carefully measuring and analyzing user interactions, behaviors, and outcomes, organizations can make data-driven decisions about which version performs better. The performance is measured in terms of business metrics like user engagement, click-through rates, conversion rates, etc. It's a powerful strategy to optimize user experiences and achieve business goals.&lt;/p&gt;

&lt;h3&gt;
  
  
  Continuous Integration and Continuous Deployment (CI/CD)
&lt;/h3&gt;

&lt;p&gt;CI/CD is an advanced deployment strategy where code changes are automatically built, tested, and deployed to production whenever they pass automated tests. It aims for rapid releases. &lt;a href="https://docs.codesphere.com/getting-started/ci-pipelines?ref=codesphere.ghost.io"&gt;Continuous Integration&lt;/a&gt; involves the frequent and automated merging of code changes from various developers into a shared codebase or repository. Each integration triggers a series of automated tests to ensure that the new code doesn't introduce errors or conflicts with the existing code. Continuous Deployment then extends this process further by automating the release of code changes that pass these tests to either a staging or production environment. This deployment strategy streamlines the development lifecycle, reducing integration issues and enabling fast, reliable software releases.&lt;/p&gt;

&lt;h3&gt;
  
  
  Custom deployment
&lt;/h3&gt;

&lt;p&gt;Custom Deployment is a flexible approach to deploying software or applications that diverges from standardized deployment methods. Unlike predefined deployment strategies, custom deployments are specifically designed to meet the unique requirements of a particular project, organization, or system. This approach often involves a manual deployment process that considers the intricacies of the software, the infrastructure, and any specific security, compliance, or performance needs.&lt;/p&gt;

&lt;p&gt;Custom deployments may be preferred when dealing with complex legacy systems, highly regulated industries, or when existing automated solutions do not adequately address the nuances of a project. Custom deployments can be resource-intensive and require careful planning and execution. On the flip side, they offer the advantage of adaptability, and customization to meet an organization’s goals and requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Software Deployment Best Practices
&lt;/h2&gt;

&lt;p&gt;There are a few things that can help streamline an otherwise tedious task of deployment. Let’s talk about the best software deployment practices.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automation:&lt;/strong&gt; It involves scripting and automating the deployment process as much as possible. This reduces human error, ensures consistency, and speeds up deployments. Automation tools can handle tasks like package installation, configuration, and even rollback procedures, making deployments more reliable and efficient.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version Control:&lt;/strong&gt; Version control systems (e.g., Git) are essential for tracking changes in code and configuration files. They enable teams to collaborate, manage different versions of the software, and roll back to previous states if issues arise during deployment. Version control ensures code integrity and provides a history of changes for reference.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing and Validation:&lt;/strong&gt; Rigorous software testing and validation are crucial to ensure that the software functions as intended after deployment. This includes unit testing, integration testing, user acceptance testing, and more. Automated testing helps catch and address issues early in the deployment process. It reduces the risk of bugs reaching the production environment because then it is both expensive and hard to fix them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rollback Plans:&lt;/strong&gt; Rollback plans are contingency strategies for switching back to the previous state in case of deployment failures or unforeseen issues. Having well-defined rollback plans is essential to minimize downtime and user impact. These plans include steps to undo changes and return the system to a stable state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation:&lt;/strong&gt; Comprehensive documentation is vital for both the deployment process and the software itself. Documentation should cover deployment procedures, configurations, dependencies, and troubleshooting guides. It aids in knowledge transfer, onboarding new team members, and ensuring consistent deployment practices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitoring and Logging:&lt;/strong&gt; Effective monitoring and logging provide visibility into the performance and efficiency of the deployed software. Monitoring tools track resource utilization, error rates, and user behavior, while logs capture detailed information about system activities, helping diagnose issues and optimize performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Software deployment Challenges
&lt;/h2&gt;

&lt;p&gt;Deploying software is a complex process and not without challenges. Common challenges include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Compatibility Issues:&lt;/strong&gt;  It is time-consuming and hard to ensure that the software works seamlessly with different operating systems, hardware configurations, and third-party software.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure:&lt;/strong&gt; It is important to understand the nuances of different infrastructures and tailor deployment strategies to address their specific requirement. Resource allocation is a key consideration in containerized environments while mitigating cold start latency is essential in serverless architectures. Proper planning and optimization are the keys to overcoming these deployment challenges effectively.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configuration Management:&lt;/strong&gt; Managing configurations consistently across different environments (development, testing, production) is no easy task. Mismatched configurations can lead to unexpected behavior and errors during deployment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version Control:&lt;/strong&gt; Ensuring that the correct version of the software is deployed, tracking changes, and managing dependencies can be complex, especially in large-scale applications with multiple components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Migration:&lt;/strong&gt; Transitioning data from the old system to the new one without data loss or corruption needs attention and planning, particularly in software updates or system replacements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Previously, in-detail planning, collaboration, and rigorous testing were the only ways to tackle said issues. Although these things still hold importance, there are deployment tools like &lt;a href="https://codesphere.com/?ref=codesphere.ghost.io"&gt;Codesphere&lt;/a&gt; that aid development teams in navigating these challenges better. Let’s discuss what these tools are and how can they help you during the deployment phase.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment Software/Software Deployment tools
&lt;/h2&gt;

&lt;p&gt;Deployment software or deployment tools aim to make the deployment process faster, reliable, and easy to manage. These tools effectively manage various environments, each with its specific configurations, and simplify the deployment process. Moreover, some of these tools support scalability by automatically adjusting resources based on demand, enabling efficient resource utilization and enhancing application performance. There are tools that integrate with monitoring and logging solutions, enabling real-time performance monitoring and error tracking.&lt;/p&gt;

&lt;p&gt;The problem is, that nowadays, there are so many tools available in the market, each focused on different aspects of the software deployment process. Some offer cheap hosting or online IDEs, others offer things like deployment automation or hyperscaling. However, there are just so many tools you can buy, not to mention some are very complex to use.&lt;/p&gt;

&lt;p&gt;Codesphere aims to solve this problem by offering features that assist you throughout the software development lifecycle. Let’s dive deeper into how codesphere is revolutionizing the development experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy your software with Codesphere under 5 Seconds
&lt;/h2&gt;

&lt;p&gt;Codesphere offers an all-in-one solution that combines the capabilities of different software tools into a single platform. You can seamlessly take your code from development to deployment in under 5 seconds, do preview deployments, conduct code reviews without switching contexts, and utilize CI pipelines for automated deployments. But the real game changer is our innovative "off-when-unused" workspaces feature. These workspaces deactivate automatically after 60 minutes of inactivity, thus saving you money.&lt;/p&gt;

&lt;p&gt;Codesphere uses proprietary deployment algorithms and smart scheduling which allow us to spin up new servers faster than any competitor. With this, we can offer super fast cold starts that enable development resources to be served on demand. This reduces the cloud cost by 90% without causing latency or compromising efficiency.&lt;/p&gt;

&lt;p&gt;This feature also makes split-second autoscaling possible. As autoscaling usually requires holding a lot of additional resources on hold for a few busy peaks which adds up to the cost. With this feature, you do not have to pay a whole month for a service you use for a few hours a week. You pay for what you actually use and for the duration of time, you use it for.&lt;/p&gt;

&lt;p&gt;Additionally, Codesphere simplifies your workflow with a user-friendly UI that allows you to clone workspaces with a few simple clicks. This functionality proves invaluable for preview deployments and progressive release strategies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapup
&lt;/h2&gt;

&lt;p&gt;In conclusion, software deployment has evolved into a critical aspect of SDLC, enabling organizations to stay competitive, efficient, and secure. It includes several stages like planning, testing, staging, and final execution. There are several strategies you can use to deploy your application progressively. However, deployment is a vital and complicated process and requires experienced developers as well as resources. On top of that, there are several infrastructural and management challenges when it comes to deployment. Adopting best practices, and choosing strategies based on organizational goals can help you navigate through challenges better. You can also use deployment tools like Codesphere to help resolve these issues, streamline your workflows, and make deployment more manageable.&lt;/p&gt;

</description>
      <category>informative</category>
      <category>deployment</category>
      <category>abtesting</category>
      <category>previewdeployments</category>
    </item>
    <item>
      <title>Software Testing in 2023: The Ultimate Guide</title>
      <dc:creator>Hafsa Jabeen</dc:creator>
      <pubDate>Thu, 17 Aug 2023 10:33:46 +0000</pubDate>
      <link>https://dev.to/codesphere/software-testing-in-2023-the-ultimate-guide-ni5</link>
      <guid>https://dev.to/codesphere/software-testing-in-2023-the-ultimate-guide-ni5</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QwEywVux--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/08/Untitled-_5_.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QwEywVux--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/08/Untitled-_5_.webp" alt="Software Testing in 2023: The Ultimate Guide" width="800" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not long ago the world witnessed a tragedy where 5 people lost their lives in a fatal implosion where a submersible wasn’t able to withstand high underwater pressure. It later came to light that it wasn’t tested properly to work under such harsh conditions, No surprise! You already know where we are going with this. Lack of testing can cause problems in real life as well as in the software world. On 8th August 2022, a major NHS data breach happened that left patient care records in chaos for months. It resulted in missing records, compromised the safety of documents, and missed medication doses.&lt;/p&gt;

&lt;p&gt;On the other hand, often it can be geared toward user experience and expectations. In the present software world, there are tons of applications out there for people to choose from. They can just as easily switch to another provider, that is what makes &lt;a href="https://codesphere.com/articles/leverage?ref=codesphere.ghost.io#:~:text=disrupt%20established%20markets.-,UX%20%26%20UI%20Emphasis,-Dropbox%27s%20success%20can"&gt;UX and UI&lt;/a&gt; even more important. These are the factors that can set you apart from your competitors.&lt;/p&gt;

&lt;p&gt;Last year, Tiktok witnesses a glitch that suddenly showed zero followers and kept blocking people out of their accounts, which caused massive frustration among users. People actively took it to social media and in no time this whole fiasco was trending on several sites. Although, it got resolved overnight something like this could be avoided with thorough software testing.&lt;/p&gt;

&lt;p&gt;Let’s first discuss what is testing and why we need it.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is software testing?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Software testing is a systematic process of rigorously evaluating a software product or system to identify bugs and errors before it is deployed. It involves a detailed series of scenarios and cases that are carried out to ensure that the software is working as intended and provides a high-quality user experience. Software testing includes testing software for functionality, performance, reliability, security, and compatibility with different environments. By uncovering and addressing flaws during the testing phase, software testing contributes to the creation of reliable, robust, and dependable software solutions. It ultimately helps you prevent any undesirable post-release problems and enhances user experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why is software testing important?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;After reading the above-mentioned examples, it’s hard to argue against the benefits of software testing. From taking a hit on your brand’s reputation to losing substantial amounts of money, the downsides of lack of insufficient testing are countless. But what are the objectives and advantages you ask? Let’s list some:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Early bug detection:&lt;/strong&gt; Testing is done for the purpose of digging out any defects and anomalies. They help developers find and rectify errors in the software at a pre-release stage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High-quality software:&lt;/strong&gt; It is a direct consequence of the above-mentioned point. You are left with better-functioning software after going through the process of testing and correcting bugs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduced development costs:&lt;/strong&gt; It costs more to fix bugs after the software has been released. Figuring out problems early reduces rework and all the related expenses as well.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Risk mitigation:&lt;/strong&gt; Thorough testing means you encounter nearly all possible risks before your software is available to users. It helps avoid system failures and security breaches later on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Happy users:&lt;/strong&gt; With ever-increasing digitization and worthy competitors, user experience can be the make or break point for your product. An error-free and tested software means there are no unpleasant surprises for the end users. It leads to customer satisfaction, loyalty, and positive feedback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compliance with industry standards:&lt;/strong&gt; Testing ensures that software adheres to industry standards, regulations, and compliance requirements, avoiding legal and regulatory issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Role of Testing in Software Development Lifecycle(SDLC)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In SDLC the role of testing is pivotal as it ensures the creation of a dependable and high-quality software product. It begins even before the actual development process starts by validating requirements and designs to find any discrepancies there.&lt;/p&gt;

&lt;p&gt;The next step where testing comes into action is at the developmental stage where unit testing is done to check the functionality of each individual component. As these components integrate, testing shifts to assessing their interactions in the integration phase. At the final stage of development, system testing evaluates the entire software for functionality, performance, and adherence to requirements. Throughout SDLC, testing ensures software stability, security, and optimal performance. It also supports cross-team collaboration between developers and quality assurance engineers to deliver a product that meets user expectations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--79JJ2a-l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/08/Untitled-_2_.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--79JJ2a-l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/08/Untitled-_2_.webp" alt="Software Testing in 2023: The Ultimate Guide" width="800" height="664"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Testing throughout the Development Lifecycle&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Common Testing Myths and Misconceptions&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;There are several misconceptions surrounding the process of testing which often result in misaligned expectations. These misconceptions can hinder the effectiveness of testing efforts and impact the overall quality of software products. Here are the five most common inaccurate assumptions about testing and why they are wrong:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1- Testing is expensive and time-consuming.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While there is no doubt, software testing requires resources and a workforce, it is substantially cheaper to fix problems pre-release. Investing in testing pays off in the long term for the company.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2- Testing is only about bug detection.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While finding bugs is a part of the testing process, there is more to it. It also validates requirements, enhances user experience, and improves software quality software.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3- Testing is the sole responsibility of the software tester.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Testing and quality assurance is a collaborative process. Designers, developers, and stakeholders play a crucial role in the testing process. Moreover, each individual developer is responsible for testing their own code before they pass it on for review or testing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4- Automated testing replaces manual testing altogether.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Although in several cases automated testing is the right solution, it is not a replacement for human intuition and exploratory testing. Automation can save you many working hours but you need to manually set up the scripts and do regular maintenance. On top of that, you first need to manually test things atleast once before deciding what to automate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5- More testing means perfect software.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Exhaustive testing is not a feasible approach. There are factors to consider like resource usage and time allocation. You can instead try to test the suspected points of failure. A balanced approach targets critical areas, balancing risk and resources for effective results.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Different types of software tests&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;There are several different approaches and methods for testing. Depending on the specific goals and objectives different kinds of software tests can be carried out. Let’s discuss categories and types of testing.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Functional&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Functional tests focus on verifying the features and functions of a software application are working as expected and are in conformance with the predetermined requirements. This testing approach examines the software's external behavior and how it interacts with users, inputs, and the environment. Here are some of the common functional tests.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unit testing:&lt;/strong&gt; This testing approach is used to test each individual part of the software before integration. It is done while developers are writing and building the code. Unit tests help build a sound foundation for more complex and integrated features of the software.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration testing:&lt;/strong&gt; This is the second step where several individual modules are tested to check if they work smoothly when integrated together. Integration tests detect any compatibility or communication issues that might not surface during individual testing. For example, microservices are a big part of modern development infrastructure. It is important to test if all these services communicate with each other properly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smoke testing:&lt;/strong&gt; Build verification or smoke testing is carried out whenever a new build is made. They help you decide whether more time-consuming and expensive tests should be done or not by checking the stability of the build.  Smoke tests help catch issues early in the development cycle and prevent wasting time on further testing if the build is fundamentally flawed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System testing:&lt;/strong&gt; As the name reflects this involves testing the whole software as a complete and integrated system. It is used to validate the software's functionality, performance, and alignment with user expectations before it's released.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Boundry testing:&lt;/strong&gt; It is a software testing technique that evaluates how the software behaves under load and extreme conditions. It involves testing the minimum and maximum values, as well as values just below and above these boundaries. Boundary testing helps identify boundary-related defects and issues related to data validation and handling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can read about how at &lt;a href="https://codesphere.com/?ref=codesphere.ghost.io"&gt;Codesphere&lt;/a&gt; this year ran high stress tests and ensured &lt;a href="https://female-leadership-academy.de/?ref=codesphere.ghost.io"&gt;smooth performance through mulriserver hosting&lt;/a&gt; for one of our clients.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User acceptance testing:&lt;/strong&gt; UAT or pre-production testing is the last phase of the testing process. These are formal manual tests run to determine the compatibility of the software with business requirements as well as to check if it is ready for delivery. The primary goal is to validate that the software aligns with user expectations, functions correctly in the user's environment, and delivers the intended value.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In agile and DevOps these tests are used in functional testing approaches like Acceptance Test-Driven Development (ATDD), Behavior-Driven Development (BDD), and Exploratory Testing.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Non-functional&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This type focuses on &lt;a href="https://dev.to/simoncodephere/the-future-of-ui-testing-ai-automated-testing-with-askui-l0n?ref=codesphere.ghost.io"&gt;testing user interface&lt;/a&gt;aspects like performance, security, usability, compatibility, and reliability. The goal is to ensure the software's overall quality, enhance user satisfaction, and minimize risks associated with performance, security, and other critical aspects. Let’s introduce us to some of the basic non-functional software tests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance Testing:&lt;/strong&gt; It is focused on ensuring the developed software performs accurately or as expected under certain workloads. Performance testing evaluates the speed, throughput, resource utilization, etc to identify bottlenecks and performance issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Testing:&lt;/strong&gt; It is done to fish out vulnerabilities and weaknesses in a software application's design and implementation. Security testing helps prevent unauthorized access and data breaches by simulating real-world attack scenarios and employing techniques like penetration testing and vulnerability assessment.These tests are are part of every serious vetting process, if you want serious clients to use your software, you should have a standard security testing protocol inplace.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Usability Testing:&lt;/strong&gt; These tests are designed to evaluate how user-friendly and intuitive a software application is. Usability tests help identify design problems, uncover improvement opportunities, and study user behavior and preferences. The goal is to amplify user satisfaction, engagement and boost the success of the software.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compatibility Testing:&lt;/strong&gt; Compatibility testing checks how well a software application functions across different platforms, browsers, devices, and operating systems. By simulating various configurations and setups, compatibility testing identifies issues related to rendering, functionality, and user experience discrepancies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability Testing:&lt;/strong&gt; This testing process assesses the ability of an application to scale down or scale up in response to varying users and workloads without affecting user experience. Scalability testing identifies bottlenecks, limitations, and potential performance degradation that could arise as the software scales. Hence, it empowers you to design software that can keep up with future demands and growth.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gEyD39MY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/08/Pong-Game-in-Javascript-_1_.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gEyD39MY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/08/Pong-Game-in-Javascript-_1_.webp" alt="Software Testing in 2023: The Ultimate Guide" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;A comparison table between functional and non functional testing&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Maintenance&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This testing comes into play after a software application has been deployed and is in active use. The aim of maintenance testing is to validate if the implemented changes sit well with the existing system. This part of testing is crucial to maintain the integrity of your software in the long run.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Regression testing:&lt;/strong&gt; It is basically retesting of a software application. It is done to make sure that any new releases do not negatively impact the features that were working perfectly before. It involves rerunning previously executed test cases to verify that the changes have not caused a regression (unwanted disruptions).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Different Approaches to software testing&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Software testing can be further divided into different categories based on the mode and approach of testing.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;White Box vs Black Box Testing&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;White box or clear box testing is a testing approach that examines the internal logic, code, and structure of a software program. These tests are designed by software testers with a thorough understanding of the code, and the architecture of the software to identify coding errors, ensure complete code coverage, and validate the accuracy of algorithms and calculations. The goal of these software tests is to determine if the code is functioning correctly, adhering to design specifications, and covering all probable execution paths.&lt;/p&gt;

&lt;p&gt;On the other hand, black box testing focuses on the user-facing testing of the software, which does not require an understanding of the software code or architecture. In this approach, test cases are designed to imitate real-world scenarios. This testing approach is done to monitor if the software meets functional requirements, behaves as expected, and delivers the intended outcomes to users.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Manual vs Automated Testing&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;These are basically the two most basic categories when it comes to software testing. Manual testing requires humans to execute test cases manually, to stimulate user interaction and scenarios. It is effective for exploratory testing, usability testing, and scenarios requiring human intuition.&lt;/p&gt;

&lt;p&gt;On the other hand, automated testing utilizes scripts and testing tools. It is highly efficient for repetitive, time-consuming tasks as well as for regression testing, and large-scale test suites. It requires ongoing maintenance and initial setup. Both these approaches have their upsides and downsides. Human testing is great for adaptability, and for the sense of design sometimes whereas automated testing offers speed, precision, and repetition. The choice between them depends on the project's requirements, timeline, resources, and the balance between human insight and machine precision.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How Can You Automate Software Testing?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;At this point, we can all agree that test automation is here to stay. So, how to automate your testing process? Test automation is a testing process that streamlines the testing process through specialized tools and scripts.&lt;/p&gt;

&lt;p&gt;You can start by first choosing the tools that align with your application's technology stack and testing requirements. Then you can identify the test cases that are repetitive and time-consuming. Then you can create test scripts and set up an environment that includes necessary configurations, test data, and dependencies. In test automation, you would also need stubs, mocks, fakes, and appropriate test data to control the testing environment, validate outcomes and execute tests efficiently.&lt;/p&gt;

&lt;p&gt;The next steps involve parametrizing software tests for data-driven testing and integrating automated tests into your CI/CD pipeline for seamless execution upon code commits. Moreover, it is important to set detailed reporting mechanisms to analyze test results. After that, you will need to regularly update and maintain test scripts to accommodate any changes in the application. This test automation approach tends to optimize your testing process for maximum efficiency, coverage, and consistency.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How We Automate Testing Internally At Codesphere&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;At Codesphere, we heavily advocate and rely on automating the development and testing process for our users as well as for our internal processes. The concept behind our platform is to provide developers with a streamlined development environment and encourage them to make frequent commits. However, that means more frequent testing as well. We also believe the current technology is no substitute for human intuition and insights. So, we take an approach where we use a mix of both manual and automated testing.&lt;/p&gt;

&lt;p&gt;For every commit in &lt;a href="https://dev.to/codesphere/tutorial-how-to-use-github-in-codesphere-12b5?ref=codesphere.ghost.io"&gt;Git&lt;/a&gt;, our automated unit tests are carried out. Although, few optimizations have been put in place to make sure these tests run only when they are actually needed to save on time and resources. The automated testing takes place as soon as the commits are made. Other than that, we extensively use and provide our users a manual testing environment with a preview deployment to do manual tests (e.g user acceptance testing).&lt;/p&gt;

&lt;p&gt;Our three testing teams are also the ones that are developing the code and take rotations weekly to remove any bias towards the features developed by their own team. It also fosters an environment of close collaboration and transparency. One developer monitors our &lt;a href="https://codesphere.com/articles/continuous-integration-pipelines-everything-you-ought-to-know?ref=codesphere.ghost.io"&gt;CI pipeline&lt;/a&gt; and we scrutinize and check our tests and see if we have any flaky tests. Deflakers are checked every day. The strategy is to automate as much as we can to save time that someone has to work on it all without compromising on the integrity of our software.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Wrap-up&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Software testing ensures robust, functional, and excellent quality software which increases user satisfaction and boosts brand loyalty and reputation. The dire consequences of negligence when it comes to software testing are evident throughout the recent and far history of software. Collaborative efforts among designers, developers, stakeholders, and software testers can help navigate through misconceptions, align goals, set realistic expectations, and help achieve desired goals. When it comes to the best testing methods highly depend on your individual goals and software product. However, it is always great to have a balanced blend of manual and automated testing, recognizing the value of human intuition and technological precision.&lt;/p&gt;

</description>
      <category>informative</category>
      <category>testing</category>
      <category>automatedtesting</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Build Your Own Content Optimizer with Django</title>
      <dc:creator>Hafsa Jabeen</dc:creator>
      <pubDate>Wed, 09 Aug 2023 07:50:06 +0000</pubDate>
      <link>https://dev.to/codesphere/build-your-own-content-optimizer-with-django-3fb2</link>
      <guid>https://dev.to/codesphere/build-your-own-content-optimizer-with-django-3fb2</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---9YBj1wx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/08/Untitled.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---9YBj1wx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/08/Untitled.webp" alt="Build Your Own Content Optimizer with Django" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All digital marketers and content creators will unanimously agree that SEO optimization of an article is sometimes a rather uninteresting and cumbersome task. There is a plethora of tools and software that provide you with additional information like missing keywords or spelling errors etc. However, going back and forcefully adding sentences and keywords to your original writing takes time and adds lots of extra effort. Wouldn’t it be nice to have your blog article or post optimized with the click of a button? It sure would be a time-saving, and effortless way to have ready-to-go content.&lt;/p&gt;

&lt;p&gt;The idea appealed to us at &lt;a href="https://codesphere.com/?ref=codesphere.ghost.io"&gt;codesphere&lt;/a&gt;, so in this article, we will harness the power of Django, a versatile and high-performance web framework, to lay the foundation of an interactive web app that optimizes content to make it more search engine friendly.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How does the Optimization App Work?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The app is built using Django (a Python framework) and we use OpenAI API to optimize our content. The app allows you to paste your content in a form with a button at the bottom. When you hit the “optimize” button, the content is processed and displayed on a page&lt;/p&gt;

&lt;p&gt;Here is a visual representation of how it looks like:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1- Taking Content from the User&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Q_-7oleD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/08/Screenshot-2023-08-08-at-13.01.38.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Q_-7oleD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/08/Screenshot-2023-08-08-at-13.01.38.webp" alt="Build Your Own Content Optimizer with Django" width="800" height="374"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Imitation of the webpage that accepts content input&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2- Displaying the Optimized Content&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--koS1ZPwP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/08/optimized.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--koS1ZPwP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://codesphere.ghost.io/content/images/2023/08/optimized.webp" alt="Build Your Own Content Optimizer with Django" width="800" height="285"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Page that displays the optimized content&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The app allows you to paste your content in a form with an optimize button at the bottom. When you hit that button, the content is optimized and displayed on a page.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;How to Set Up the Application?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This example is a simplified illustration and setting it up doesn’t take a lot of time. Here is a step-by-step guide on how to set up this content optimization app.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Create the Application&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The first step you need to take is to create the application. You can either do it on your Github account and clone it on your local machine or you can do this locally. To do that go to the terminal and check which Python version you have, for that write&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python -- version&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you don’t have Python you can &lt;a href="https://www.python.org/downloads/?ref=codesphere.ghost.io"&gt;download any Python version&lt;/a&gt; easily. The next step is to install django. Write the command:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;pip3 install django&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now to create the project write:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;django-admin startproject content_optimizer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It will create a content-optimizer directory. Now to create your app, write:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python manage.py start seoapp&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It will create an app for you.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;The Code&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In the views files of your app, you can add this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.shortcuts import render
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
import openai
import os

openai.api_key = os.environ.get('OPEN_AI_KEY')

def index(request):
  return render(request,"seoapp/index.html")

@csrf_exempt
def optimize(request):
    if request.method == 'POST':
        content = request.POST['content']
        output_text = optimize_with_chatgpt(content)
        context = {
            'optimized_content': output_text,
            'length': len(output_text), 
            }
        return render(request, "seoapp/optimize.html", context)


def optimize_with_chatgpt(content):
    response = openai.Completion.create(
        engine="davinci", # You can experiment with different engines
        prompt=content,
        max_tokens=1000 # Adjust this based on your desired length
    )
    optimized_content = response.choices[0].text.strip()
    return optimized_content
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Deploy the Django app on Codesphere&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You are now ready to deploy your web app. Codesphere allows you to do that within minutes, and to do that in Codesphere's IDE:&lt;/p&gt;

&lt;p&gt;1- Clone the &lt;a href="https://github.com/Hafsa-jabeen/optimize_content.git?ref=codesphere.ghost.io"&gt;GitHub repo for content optimizer&lt;/a&gt; or create an empty workspace and follow the instructions in article.&lt;/p&gt;

&lt;p&gt;2- Type &lt;strong&gt;pipenv install openai&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once it is done, you can move on and create a ci.yml file in your project for a Django pipeline in Codesphere. It should look like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;prepare:
  steps:
    - name: Install Dependencies
      command: pipenv install   
test:
  steps: []
run:
  steps:
    - name: Start Server
      command: pipenv run python manage.py runserver 0.0.0.0:3000

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the “settings” directory now change the default port to "3000" and in “allowed hosts” add the server it is supposed to be running on. It should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ALLOWED_HOSTS = ['42569-3000.2.codesphere.com']
runserver.default_port = '3000'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can run the command :&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;pipenv run python manage.py runserver 0.0.0.0:3000&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your application will be up and running on the server provided by codesphere. You can choose to run it on your own domain if you like.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What Can be Added to It?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Effective SEO optimization requires a deeper understanding of SEO principles, keyword research, content strategy, and website architecture. Additionally, using libraries like Beautiful Soup can help with parsing and manipulating HTML content to make SEO improvements.&lt;/p&gt;

&lt;p&gt;It is a considerably simple version that takes in content and improves it but you can build on it to replace certain words with SEO-optimized versions or to take input for the keywords you want to incorporate into your content. You get the jist, possibilities are endless.&lt;/p&gt;

&lt;p&gt;We hope the tutorial helped you create a basic version of the app and we urge you to play around and build on top of it.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>python</category>
      <category>django</category>
      <category>webapp</category>
    </item>
  </channel>
</rss>
