<?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: Vishal Ravi</title>
    <description>The latest articles on DEV Community by Vishal Ravi (@vishalravi).</description>
    <link>https://dev.to/vishalravi</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%2F875319%2F26efb563-31c8-455d-8e65-5f42be407f71.jpg</url>
      <title>DEV Community: Vishal Ravi</title>
      <link>https://dev.to/vishalravi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vishalravi"/>
    <language>en</language>
    <item>
      <title>WAY TO LEARN PROGRAMMING LANGUAGE</title>
      <dc:creator>Vishal Ravi</dc:creator>
      <pubDate>Thu, 20 Apr 2023 16:54:23 +0000</pubDate>
      <link>https://dev.to/vishalravi/way-to-learn-programming-language-5hni</link>
      <guid>https://dev.to/vishalravi/way-to-learn-programming-language-5hni</guid>
      <description>&lt;p&gt;Before beginning to study a programming language, ask yourself why you want to do so. &lt;br&gt;
It's challenging to become a proficient coder without a specific goal. &lt;br&gt;
Consider the reason(s) you choose the specific programming language, and if you can come up with a satisfying response, it will help your learning.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Start with the basics&lt;/strong&gt;: Before moving on to more advanced topics, you should have a firm grasp of some essential ideas in each programming language. You should familiarise yourself with the language's syntax, data types, variables, control structures, and functions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Practice&lt;/strong&gt;: To become proficient at programming, one must practice. Even if the code you produce is only for practice or little programs, you should write it frequently.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Build projects&lt;/strong&gt;: A great method to put your programming skills to use is to build real-world projects. Begin with simple tasks and gradually add complexity as you acquire experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;How can you learn programming languages through building projects?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Building projects&lt;/strong&gt; provide you with practical practice using the language you're learning. You'll face challenges that you must overcome, and you'll learn how to create code that operates in the real world.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Real-world applications&lt;/strong&gt;: You can use the language you're learning to construct projects and real-world apps. You might create a game, a smartphone app, or a website, for instance. This makes it easier for you to see how the language fits into the broader scheme of software development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Problem-solving abilities&lt;/strong&gt;: Building projects necessitates this ability, which is essential for any programmer. You'll discover how to use the characteristics of the language to solve big issues by breaking them down into smaller, more manageable chunks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Creativity&lt;/strong&gt;: Developing projects enables you to use your coding creativity. You can experiment with various strategies and discover brand-new approaches to problem-solving. Finding your own programming voice and growing your talents are both impacted by this.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Portfolio&lt;/strong&gt;: Completing projects gives you a collection of work you can show prospective employers or customers. This will make you stand out from the competition and show off your programming abilities.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What is Google Cloud Run?</title>
      <dc:creator>Vishal Ravi</dc:creator>
      <pubDate>Wed, 01 Feb 2023 15:30:17 +0000</pubDate>
      <link>https://dev.to/vishalravi/what-is-google-cloud-run-314f</link>
      <guid>https://dev.to/vishalravi/what-is-google-cloud-run-314f</guid>
      <description>&lt;p&gt;&lt;strong&gt;Cloud Run&lt;/strong&gt; is a managed compute platform that lets you run containers directly on top of Google's scalable infrastructure.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Deploy and Scale applications fast and securely in a fully managed environment.&lt;/li&gt;
&lt;li&gt;Simple &amp;amp; automated.&lt;/li&gt;
&lt;li&gt;No intra management.&lt;/li&gt;
&lt;li&gt;Developer velocity.
5.Deploy code in any language.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can deploy code written in &lt;strong&gt;any programming language&lt;/strong&gt; on Cloud Run if you can build a container image from it. &lt;br&gt;
In fact, building container images is optional. If you're using Go, Node.js, Python, Java, .NET Core, or Ruby, you can use the source-based deployment option that builds the container for you, using the best practices for the language you're using.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There are two ways to run this code&lt;/strong&gt;&lt;br&gt;
On Cloud Run, your code can either run continuously as a service or as a job. Both services and jobs run in the same environment and can use the same integrations with other services on Google Cloud.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cloud Run services&lt;/strong&gt;. Used to run code that responds to web requests, or events.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;A Cloud Run service provides you with the infrastructure required to run a reliable HTTPS endpoint. Your responsibility is to make sure your code listens on a TCP port and handles HTTP requests.&lt;/p&gt;

&lt;p&gt;Standard service features include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Unique HTTPS endpoint for every service&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fast request-based auto scaling&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Built-in traffic management&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Private and public services&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cloud Run services running on Google Cloud Platform (GCP) are built on top of a managed compute platform that allows you to run stateless containers that are invocable via HTTP requests. Cloud Run is serverless, so you don't need to manage any servers, and you only pay for the compute resources you use. Cloud Run is also highly scalable and can automatically scale up and down in response to incoming requests.&lt;/p&gt;

&lt;p&gt;Cloud Run is designed to be easy to use and allows developers to quickly build and deploy cloud-native apps without having to worry about managing the underlying infrastructure. Cloud Run is also integrated with other GCP services such as Cloud Storage, Cloud Functions and Cloud Pub/Sub, allowing developers to easily build and deploy applications that use these services. Cloud Run is also integrated with Kubernetes and can be used to deploy and manage containerized applications in a Kubernetes cluster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use Cloud Run services&lt;/strong&gt;&lt;br&gt;
Cloud Run services are most useful for situations where you need to quickly scale up or down, without having to manage the underlying infrastructure. This could be for a web application, a containerized API, or a microservice. Cloud Run services are also useful for applications that need to be able to scale up or down based on demand. They are also useful for applications that need to run in a secure and managed environment.&lt;/p&gt;

&lt;p&gt;Cloud Run services are great for code that handles requests or events. Example use cases include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Websites and web applications&lt;/strong&gt;&lt;br&gt;
Build your web app using your favorite stack, access your SQL database, and render dynamic HTML pages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- APIs and microservices&lt;/strong&gt;&lt;br&gt;
You can build a REST API, or a GraphQL API or private microservices that communicate over HTTP or gRPC.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Streaming data processing&lt;/strong&gt;&lt;br&gt;
Cloud Run services can receive messages from Pub/Sub push subscriptions and events from Eventarc.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cloud Run jobs&lt;/strong&gt;. Used to run code that performs work (a job) and quits when the work is done.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your code performs work and then stops (a script is a good example), you can use a Cloud Run job to run your code. You can execute a job from the command line using the gcloud CLI, schedule a recurring job, or run it as part of a workflow.&lt;/p&gt;

&lt;p&gt;Array jobs are a faster way to run jobs&lt;br&gt;
A job can start one container instance to run your code — that's a common way to run a script or a tool. However, you can also start many identical, independent container instances in parallel, that is, an array job.&lt;/p&gt;

&lt;p&gt;Array jobs are a faster way to process jobs that can be split into multiple independent tasks, as shown here:&lt;/p&gt;

&lt;p&gt;Array jobs are a faster way to run parallelizable jobs&lt;/p&gt;

&lt;p&gt;For example, if you are reading 1,000 images from Cloud Storage to resize and crop them, processing them consecutively will be slower than processing them all at the same time with many container instances.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use Cloud Run jobs&lt;/strong&gt;&lt;br&gt;
Cloud Run jobs are well-suited to run code that performs work (a job) and quits when the work is done. Here are a few examples:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Script or tool&lt;/strong&gt;&lt;br&gt;
Run a script to perform database migrations or other operational tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Array job&lt;/strong&gt;&lt;br&gt;
Perform highly parallelized processing of all files in a Cloud Storage bucket.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scheduled job&lt;/strong&gt;&lt;br&gt;
Create and send invoices at regular intervals, or save the results of a database query as XML and upload the file every few hours.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Cloud Run jobs workflow&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The Cloud Run jobs workflow consists of two simple steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create the job&lt;/strong&gt; The job encapsulates all the configuration needed to execute the job, such as the container image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execute the job&lt;/strong&gt;. Use either the Cloud Console or the gcloud CLI and execute the job from the command line.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A job can start &lt;em&gt;one&lt;/em&gt; container instance to run your code, or it can start many identical, independent container instances in parallel by specifying the number of tasks to run. For example, if you are reading 1,000 images from Cloud Storage to resize and crop them, processing them consecutively will be slower than processing them all at the same time with many container instances.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Create the job&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To &lt;a href="https://cloud.google.com/run/docs/create-jobs" rel="noopener noreferrer"&gt;create the job&lt;/a&gt;, you can use either the Cloud Console or the gcloud CLI using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud beta run jobs create JOB_NAME --image IMAGE_URL --region europe-west9 OPTIONS

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

&lt;/div&gt;



&lt;p&gt;Replace:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;JOB_NAME&lt;/code&gt;&lt;/strong&gt; with the name of the job you want to create.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;IMAGE_URL&lt;/code&gt;&lt;/strong&gt; with a reference to the container image.&lt;/li&gt;
&lt;li&gt;Optionally, replace &lt;strong&gt;&lt;code&gt;OPTIONS&lt;/code&gt;&lt;/strong&gt; with any of the available flags. For a complete list of flags, run &lt;strong&gt;&lt;code&gt;gcloud beta run jobs create --help&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example flags include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;-tasks&lt;/code&gt;&lt;/strong&gt; for the number of tasks to run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;–max retries&lt;/code&gt;&lt;/strong&gt; for the number of times a failed task is retried.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;-parallelism&lt;/code&gt;&lt;/strong&gt; for the maximum number of tasks that can run in parallel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;-execute-now&lt;/code&gt;&lt;/strong&gt; to execute the job immediately after it is created.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;-async&lt;/code&gt;&lt;/strong&gt; to exit the job immediately after creating a new execution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also use the usual Cloud Run features to secure your Cloud Run job and connect it to the rest of your Google Cloud Platform (GCP) environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Execute the job&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To execute the job, you can use either the Cloud Console or the gcloud CLI using the following command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the Cloud Console, click on the job name, and click &lt;strong&gt;Execute&lt;/strong&gt; near the top of the page.&lt;/li&gt;
&lt;li&gt;In the gcloud CLI, use the following command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud beta run jobs execute JOB_NAME --region europe-west9 EXECUTION_OPTIONS

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

&lt;/div&gt;



&lt;p&gt;Replace &lt;strong&gt;&lt;code&gt;JOB_NAME&lt;/code&gt;&lt;/strong&gt; with the name of the job. Optionally, replace &lt;strong&gt;&lt;code&gt;EXECUTION_OPTIONS&lt;/code&gt;&lt;/strong&gt; to specify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Immediate&lt;/strong&gt; job execution after you create the job.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud beta run jobs create JOB_NAME --region europe-west9 --execute-now

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;If you want to &lt;strong&gt;wait&lt;/strong&gt; until the execution is complete before exiting.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud beta run jobs create JOB_NAME --region europe-west9 --wait

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;If you want to &lt;strong&gt;exit immediately&lt;/strong&gt; after creating a new execution.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>howto</category>
      <category>discuss</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
