<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: tbaveja</title>
    <description>The latest articles on Forem by tbaveja (@tbaveja).</description>
    <link>https://forem.com/tbaveja</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%2F552900%2F690cef9c-68c7-4082-9bf6-c50435423851.jpg</url>
      <title>Forem: tbaveja</title>
      <link>https://forem.com/tbaveja</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/tbaveja"/>
    <language>en</language>
    <item>
      <title>GenAI Byte#2 - Prompt Like a Pro: A GenAI Byte for Everyone</title>
      <dc:creator>tbaveja</dc:creator>
      <pubDate>Mon, 22 Dec 2025 09:33:08 +0000</pubDate>
      <link>https://forem.com/tbaveja/genai-byte2-prompt-like-a-pro-a-genai-byte-for-everyone-6ed</link>
      <guid>https://forem.com/tbaveja/genai-byte2-prompt-like-a-pro-a-genai-byte-for-everyone-6ed</guid>
      <description>&lt;h2&gt;
  
  
  Prompt Like a Pro: A GenAI Byte for Everyone
&lt;/h2&gt;

&lt;p&gt;Prompt engineering is quickly becoming one of the most important skills in the Generative AI era. Whether you’re a developer, tester, architect, analyst, or business user — the quality of your prompts directly impacts the quality of AI outputs.&lt;/p&gt;

&lt;p&gt;This post is a &lt;strong&gt;practical walkthrough of Prompt Engineering&lt;/strong&gt;, simplified into a &lt;strong&gt;GenAI Byte&lt;/strong&gt; that anyone can understand and apply.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is Prompt Engineering?
&lt;/h2&gt;

&lt;p&gt;Prompt engineering is the &lt;strong&gt;systematic discipline of designing precise inputs&lt;/strong&gt; that guide AI models to generate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accurate outputs
&lt;/li&gt;
&lt;li&gt;Context-aware responses
&lt;/li&gt;
&lt;li&gt;Actionable results for real-world use cases
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When done right, it delivers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⚡ &lt;strong&gt;Efficiency&lt;/strong&gt; – up to 60–70% time savings
&lt;/li&gt;
&lt;li&gt;🎯 &lt;strong&gt;Quality&lt;/strong&gt; – consistent and reliable outputs
&lt;/li&gt;
&lt;li&gt;🚀 &lt;strong&gt;Speed&lt;/strong&gt; – faster decision-making
&lt;/li&gt;
&lt;li&gt;📚 &lt;strong&gt;Knowledge&lt;/strong&gt; – standardized responses across teams
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The 6-Step Prompt Engineering Framework
&lt;/h2&gt;

&lt;p&gt;A strong prompt is not accidental — it follows structure.&lt;/p&gt;

&lt;h3&gt;
  
  
  1️⃣ Define Objective
&lt;/h3&gt;

&lt;p&gt;Clearly state what you want, why you want it, and how success will be measured.&lt;/p&gt;

&lt;h3&gt;
  
  
  2️⃣ Add Context
&lt;/h3&gt;

&lt;p&gt;Provide background, assumptions, constraints, and domain-specific details.&lt;/p&gt;

&lt;h3&gt;
  
  
  3️⃣ Set Boundaries
&lt;/h3&gt;

&lt;p&gt;Define inclusions, exclusions, limits, and constraints.&lt;/p&gt;

&lt;h3&gt;
  
  
  4️⃣ Define Format
&lt;/h3&gt;

&lt;p&gt;Specify the output format explicitly — bullet points, tables, JSON, steps, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  5️⃣ Provide Examples
&lt;/h3&gt;

&lt;p&gt;Use 1–2 short examples to guide tone, style, and structure.&lt;/p&gt;

&lt;h3&gt;
  
  
  6️⃣ Validate &amp;amp; Refine
&lt;/h3&gt;

&lt;p&gt;Test the output and iterate until results are stable and reliable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Advanced Prompting Techniques
&lt;/h2&gt;

&lt;p&gt;Once you master the basics, these techniques significantly improve accuracy:&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 Role-Based Prompting
&lt;/h3&gt;

&lt;p&gt;Assign a persona like &lt;em&gt;Architect&lt;/em&gt;, &lt;em&gt;Tester&lt;/em&gt;, or &lt;em&gt;Business Analyst&lt;/em&gt; to improve domain precision.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 Chain-of-Thought
&lt;/h3&gt;

&lt;p&gt;Ask the model to reason step-by-step for complex problem-solving.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 Few-Shot Learning
&lt;/h3&gt;

&lt;p&gt;Provide examples to establish expected structure and style.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 Iterative Refinement
&lt;/h3&gt;

&lt;p&gt;Break complex tasks into checkpoints and refine incrementally.&lt;/p&gt;




&lt;h2&gt;
  
  
  Common Prompting Pitfalls (Avoid These!)
&lt;/h2&gt;

&lt;p&gt;Even small mistakes can degrade output quality:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ &lt;strong&gt;Ambiguous instructions&lt;/strong&gt; → inconsistent results
&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Missing context&lt;/strong&gt; → incomplete or wrong answers
&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Overloaded prompts&lt;/strong&gt; → split complex tasks instead
&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;No validation&lt;/strong&gt; → always review before production use
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Security, Compliance &amp;amp; Responsible AI
&lt;/h2&gt;

&lt;p&gt;Prompt engineering must always follow security and governance principles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔐 &lt;strong&gt;Approved Platforms&lt;/strong&gt; – use only organization-sanctioned AI tools
&lt;/li&gt;
&lt;li&gt;🗂 &lt;strong&gt;Data Classification&lt;/strong&gt; – follow data handling and retention policies
&lt;/li&gt;
&lt;li&gt;🧾 &lt;strong&gt;Audit Trails&lt;/strong&gt; – log AI interactions for governance and review
&lt;/li&gt;
&lt;li&gt;🚫 &lt;strong&gt;No PII&lt;/strong&gt; – never include personal or sensitive data
&lt;/li&gt;
&lt;li&gt;🚫 &lt;strong&gt;No Proprietary Data&lt;/strong&gt; – avoid confidential code or documents
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Responsible prompting is non-negotiable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Learning Resources to Go Deeper
&lt;/h2&gt;

&lt;p&gt;If you want to sharpen your skills further:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📘 &lt;strong&gt;OpenAI Best Practices&lt;/strong&gt; – official prompt design patterns
&lt;/li&gt;
&lt;li&gt;📗 &lt;strong&gt;Prompt Engineering Guides&lt;/strong&gt; – structured techniques &amp;amp; examples
&lt;/li&gt;
&lt;li&gt;🎓 &lt;strong&gt;DeepLearning.ai Courses&lt;/strong&gt; – ChatGPT &amp;amp; GenAI fundamentals
&lt;/li&gt;
&lt;li&gt;🧑‍💻 &lt;strong&gt;GitHub Prompt Libraries&lt;/strong&gt; – community-driven examples
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Prompt engineering is not just a technical skill — it’s a &lt;strong&gt;thinking skill&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;As Generative AI becomes part of everyday workflows, the ability to communicate clearly with AI systems will define productivity, quality, and trust.&lt;/p&gt;

&lt;p&gt;This GenAI Byte is just the beginning.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Learn Together, Grow Together !"&lt;/p&gt;

&lt;p&gt;Connect with me on LinkedIn:&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/tarun-baveja-000a9955/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/tarun-baveja-000a9955/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>promptengineering</category>
      <category>generativeai</category>
      <category>chatgpt</category>
      <category>ai</category>
    </item>
    <item>
      <title>A walkthrough of the Gen AI Landscape</title>
      <dc:creator>tbaveja</dc:creator>
      <pubDate>Mon, 22 Dec 2025 09:30:38 +0000</pubDate>
      <link>https://forem.com/tbaveja/a-walkthrough-of-the-gen-ai-landscape-30bl</link>
      <guid>https://forem.com/tbaveja/a-walkthrough-of-the-gen-ai-landscape-30bl</guid>
      <description>&lt;h1&gt;
  
  
  A Simple Walkthrough of the Generative AI Landscape
&lt;/h1&gt;

&lt;p&gt;Generative AI is everywhere right now — from chatbots and code assistants to image and content generation. But beyond the buzzwords, many people still ask a basic question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What exactly is GenAI, and how does it work?&lt;/strong&gt;&lt;br&gt;
This post is a simple walkthrough of the &lt;strong&gt;Generative AI landscape&lt;/strong&gt;, breaking it down into understandable building blocks — without heavy jargon.&lt;/p&gt;




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

&lt;p&gt;Generative AI is a type of artificial intelligence that can create &lt;strong&gt;new and original content&lt;/strong&gt; such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Text
&lt;/li&gt;
&lt;li&gt;Images
&lt;/li&gt;
&lt;li&gt;Music
&lt;/li&gt;
&lt;li&gt;Code
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It does this by learning from the data it was trained on and using that learning to generate new outputs in response to user input.&lt;/p&gt;

&lt;p&gt;At its core, GenAI is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Creative&lt;/strong&gt;
Generates new and original content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contextual&lt;/strong&gt;
Understands user prompts and responds meaningfully.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adaptive&lt;/strong&gt;
Learns from vast amounts of data to improve over time.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Key Components Behind GenAI
&lt;/h2&gt;

&lt;p&gt;Generative AI is not a single technology — it’s an ecosystem of multiple capabilities working together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Machine Learning&lt;/strong&gt; – Learns patterns from data
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep Learning&lt;/strong&gt; – Uses layered models for complex understanding
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Neural Networks&lt;/strong&gt; – Mimics brain-like decision processes
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Natural Language Processing (NLP)&lt;/strong&gt; – Understands and generates language
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computer Vision&lt;/strong&gt; – Interprets visual information
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cognitive Computing&lt;/strong&gt; – Supports reasoning and decision-making
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Together, these components enable AI systems to understand input and generate meaningful output.&lt;/p&gt;




&lt;h2&gt;
  
  
  How Does Generative AI Work?
&lt;/h2&gt;

&lt;p&gt;Although GenAI feels magical, its workflow is structured and logical:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Input / Prompt&lt;/strong&gt;
A user provides a query or instruction to the AI model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Processing&lt;/strong&gt;
The model analyzes the input and references its training data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pattern Recognition&lt;/strong&gt;
Relevant patterns and relationships are identified.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content Generation&lt;/strong&gt;
The AI constructs a new and original output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output Delivery&lt;/strong&gt;
The final content (text, image, code, etc.) is presented to the user.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Ethics and Responsibility in GenAI
&lt;/h2&gt;

&lt;p&gt;With great capability comes great responsibility. Ethical GenAI focuses on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data Privacy&lt;/strong&gt;
Ensuring user data is handled securely and responsibly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bias and Fairness&lt;/strong&gt;
Mitigating biases in training data for equitable outcomes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intellectual Property&lt;/strong&gt;
Respecting ownership and rights of AI-generated content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accountability&lt;/strong&gt;
Making AI decision-making understandable and explainable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Responsible AI is not optional — it’s essential.&lt;/p&gt;




&lt;h2&gt;
  
  
  Generative AI in the Enterprise Ecosystem
&lt;/h2&gt;

&lt;p&gt;In enterprise environments, Generative AI adoption typically includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Secure, in-house AI tools
&lt;/li&gt;
&lt;li&gt;Automation platforms integrated into workflows
&lt;/li&gt;
&lt;li&gt;Strategic partnerships with AI solution providers
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The emphasis is on &lt;strong&gt;scalable, secure, and responsible&lt;/strong&gt; AI implementation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Generative AI is more than a trend — it’s a fundamental shift in how humans interact with technology.&lt;/p&gt;

&lt;p&gt;By understanding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What GenAI is
&lt;/li&gt;
&lt;li&gt;How it works
&lt;/li&gt;
&lt;li&gt;What powers it
&lt;/li&gt;
&lt;li&gt;Why ethics matter
we can move from curiosity to &lt;strong&gt;confident adoption&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This walkthrough aims to simplify the GenAI landscape — one clear step at a time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Learn Together, Grow Together !"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Connect with me on LinkedIn:&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/tarun-baveja-000a9955/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/tarun-baveja-000a9955/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>genai</category>
      <category>ai</category>
      <category>innovation</category>
      <category>promptengineering</category>
    </item>
    <item>
      <title>Javascript Concepts you can't miss to crack the interview (2022)</title>
      <dc:creator>tbaveja</dc:creator>
      <pubDate>Mon, 25 Apr 2022 20:51:35 +0000</pubDate>
      <link>https://forem.com/tbaveja/javascript-concepts-you-cant-miss-to-crack-the-interview-2022-5gbc</link>
      <guid>https://forem.com/tbaveja/javascript-concepts-you-cant-miss-to-crack-the-interview-2022-5gbc</guid>
      <description>&lt;p&gt;Hey JS lovers &amp;lt;3, &lt;/p&gt;

&lt;p&gt;As we all are doing coding in javascript every other day but somehow we all forgot to revisit the nature and basics of javascript which is required to write optimized code. &lt;/p&gt;

&lt;p&gt;Before sharing the JS concepts to crack the interview, one thing I would like to suggest you guys is that don't read the below concepts for the sake of cracking the interview. For everyone, who wants to be a Javascript expert, you need to practice a lot, in a way that you don't need to google the interview questions next time ;)&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;JS Execution Context and Hoisting&lt;/li&gt;
&lt;li&gt;Prototype and Object Inheritance&lt;/li&gt;
&lt;li&gt;ES6 Features - let, const, arrow functions, spread vs rest operator, destructuring, Set etc.&lt;/li&gt;
&lt;li&gt;DOM manipulation&lt;/li&gt;
&lt;li&gt;Array Methods&lt;/li&gt;
&lt;li&gt;String Methods&lt;/li&gt;
&lt;li&gt;undefined vs not defined&lt;/li&gt;
&lt;li&gt;Event Loop&lt;/li&gt;
&lt;li&gt;callback vs promise vs async await&lt;/li&gt;
&lt;li&gt;async vs defer&lt;/li&gt;
&lt;li&gt;this keyword &lt;/li&gt;
&lt;li&gt;Closure&lt;/li&gt;
&lt;li&gt;Currying&lt;/li&gt;
&lt;li&gt;High Order functions and pure functions&lt;/li&gt;
&lt;li&gt;call, bind and apply&lt;/li&gt;
&lt;li&gt;setTimeout vs setInterval&lt;/li&gt;
&lt;li&gt;Memoization&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;Apart from the above concepts, one should also focus on JS design patterns so that you can make the overall system easier to understand and maintain.&lt;/p&gt;

&lt;p&gt;There are number of design patterns available on Google which are majorly divided in three categories:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Creational&lt;/li&gt;
&lt;li&gt;Structural&lt;/li&gt;
&lt;li&gt;Behavioral&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;Revisit the above concepts and start learning. If you face any issues, feel free to reach me on LinkedIn :)&lt;br&gt;
I will be more than happy to help.&lt;/p&gt;

&lt;p&gt;Feel free to add your inputs in the comments.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Learn Together, Grow Together !"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>GraphQL vs REST -  Conclusion</title>
      <dc:creator>tbaveja</dc:creator>
      <pubDate>Mon, 28 Jun 2021 20:09:09 +0000</pubDate>
      <link>https://forem.com/tbaveja/graphql-v-s-rest-conclusion-2mfk</link>
      <guid>https://forem.com/tbaveja/graphql-v-s-rest-conclusion-2mfk</guid>
      <description>&lt;p&gt;Often developers tend to feel a constant pull from REST while using GraphQL and vice-versa because of their similarities and functionalities, through this article I hope to help you find the best fit for your app depending upon your use-case and tailor made requirements. Let's start !&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;If you're not aware of GraphQL, I would highly recommend you to checkout one of the below:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;a href="https://www.linkedin.com/learning/learning-graphql" rel="noopener noreferrer"&gt;Awesome crash course&lt;/a&gt; by &lt;a class="mentioned-user" href="https://dev.to/eveporcello"&gt;@eveporcello&lt;/a&gt; on Linkedin Learning&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;a href="https://www.youtube.com/watch?v=Y0lDGjwRYKw&amp;amp;list=PL4cUxeGkcC9iK6Qhn-QLcXCXPQUov1U7f" rel="noopener noreferrer"&gt;GraphQL Tutorial&lt;/a&gt; by Net Ninja on Youtube&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Similarities between GraphQL and REST
&lt;/h2&gt;

&lt;p&gt;GraphQL and REST essentially accomplish the same task, i.e., communicate with a server and retrieve data. Here are a few similarities between the two:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Both GraphQL and REST are based on the concept of a resource, and they specify IDs for those resources.&lt;/li&gt;
&lt;li&gt;Both GraphQL and REST rely on frameworks and libraries to handle the tiny networking details.&lt;/li&gt;
&lt;li&gt;Both can differentiate if an API request is intended to read data or write it.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;&lt;strong&gt;1. One Unique Endpoint:&lt;/strong&gt; GraphQL exposes a single endpoint that allows you to access multiple resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. One request, Many resources:&lt;/strong&gt; Query one or more resources in the same request. This will avoid making multiple API calls for an operation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. No Over Fetching or Under Fetching:&lt;/strong&gt; The main advantage of GraphQl over REST is that REST responses contain too much data or sometimes not enough data, which creates the need for another request. GraphQL solves this problem by fetching only the exact and specific data in a single request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Extending APIs:&lt;/strong&gt; Adding functionality wouldn't affect existing client GraphQL queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Bandwidth:&lt;/strong&gt; If your API is intended to be used on a mobile application or a large application like Facebook Newsfeed, use GraphQL since it offers better bandwidth usage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why REST over GraphQL ?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Handling complex queries:&lt;/strong&gt; We have to specify everything we want to bring. “. If you’re not careful, a few big queries can bring your server down to its knees. In that sense, GraphQL’s greatest strength can also be its greatest weakness.”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Code vulnerability in GraphQL:&lt;/strong&gt; If an attacker wants to carry out a DDoS (Denial-of-service-attack) to an unprotected server, all he has to do is execute an expensive nested query to overload your server. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. HTTP Caching:&lt;/strong&gt; REST allows data to be cacheable, which might improve performance and scalability whereas, GraphQL uses a single endpoint and custom requests, so caching is complicated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Error Reporting:&lt;/strong&gt; With REST, you can use API responses and build a monitoring system for error messages. But error reporting in GraphQL leaves a lot to be desired, with the ubiquitous “200 K Error — Something went wrong” message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Data Formats:&lt;/strong&gt; REST APIs support various data formats (XML, JSON, HTML, plain text, etc.) whereas, GraphQL only supports JSON.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Rate Limiting:&lt;/strong&gt; Another problem with GraphQL is rate-limiting. In REST API, you can simply specify that we allow only this amount of requests in one day", but in GraphQL, it is difficult to specify this type of statement.&lt;/p&gt;

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

&lt;p&gt;If your API is intended to be used on a mobile application or a large application like Facebook Newsfeed, use GraphQL since it offers better bandwidth usage. Or, applications where we usually need nested data to be fetched. i.e. blog posts with their comments and people details.&lt;/p&gt;

&lt;p&gt;If you need caching and monitoring facilities in your API, use REST. Or, public APIs where we want to determine what to expose to the clients.&lt;/p&gt;

&lt;p&gt;You can also use a combination of GraphQL and REST for a project. It all depends on your data and performance requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Must Read:
&lt;/h2&gt;

&lt;p&gt;Always try to follow and learn from case studies. Below are the case studies from Netflix Tech Blog:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://netflixtechblog.com/how-netflix-scales-its-api-with-graphql-federation-part-1-ae3557c187e2" rel="noopener noreferrer"&gt;https://netflixtechblog.com/how-netflix-scales-its-api-with-graphql-federation-part-1-ae3557c187e2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://netflixtechblog.com/our-learnings-from-adopting-graphql-f099de39ae5f" rel="noopener noreferrer"&gt;https://netflixtechblog.com/our-learnings-from-adopting-graphql-f099de39ae5f&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Learn Together, Grow Together !"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;.&lt;br&gt;
That's It ! And don't forget to explore various tools available for GraphQL !&lt;br&gt;
&lt;a href="https://media.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%2Feq2zal0878wp735byq1c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Feq2zal0878wp735byq1c.png" alt="Cheers"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>graphql</category>
      <category>rest</category>
      <category>webservices</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Implement reverse scrolling effect on webpage</title>
      <dc:creator>tbaveja</dc:creator>
      <pubDate>Mon, 21 Jun 2021 18:52:59 +0000</pubDate>
      <link>https://forem.com/tbaveja/implement-reverse-scrolling-effect-on-webpage-58g0</link>
      <guid>https://forem.com/tbaveja/implement-reverse-scrolling-effect-on-webpage-58g0</guid>
      <description>&lt;p&gt;Hey guys, when you create a website, the browser loads it at the top of your design, and viewers scroll down. But what if your design is more interesting the other way around? What if you'd like a page to start at the bottom and scroll up?  In this blog you'll learn how to implement reverse scrolling on your website in just 3 steps...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Start with just 7 lines of HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Create panels/ sections inside one main container. I created 5 but you can create as per requirement.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="panelCon"&amp;gt;
   &amp;lt;div id="pane-5" class="panel"&amp;gt;Section 5&amp;lt;/div&amp;gt;
   &amp;lt;div id="pane-4" class="panel"&amp;gt;Section 4&amp;lt;/div&amp;gt;
   &amp;lt;div id="pane-3" class="panel"&amp;gt;Section 3&amp;lt;/div&amp;gt;
   &amp;lt;div id="pane-2" class="panel"&amp;gt;Section 2&amp;lt;/div&amp;gt;
   &amp;lt;div id="pane-1" class="panel"&amp;gt;Section 1&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Few lines of CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Set the height of each panel to viewport height.&lt;/em&gt; &lt;/li&gt;
&lt;li&gt;&lt;em&gt;Set the position as fixed of main container and bottom as 0. Set the body height as (100*Number of panels)vh.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Below you can see height of body is set as 500vh as I have created 5 panels.&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  margin: 0;
  padding: 0;
  height: 500vh;
}
.panelCon {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 99990;
}
.panel {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  line-height: 35px;
  text-transform: uppercase;
}
#pane-1 {
  background-color: pink;
}
#pane-2 {
  background-color: #e8e8e8;
}
#pane-3 {
  background-color: red;
}
#pane-4 {
  background-color: pink;
}
#pane-5 {
  background-color: yellow;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Finally, just 3 lines of JS:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Inside onScroll function of window, increase the bottom value but in negative&lt;/em&gt; 😉&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$(window).on("scroll", function () {
  $(".panelCon").css("bottom", $(window).scrollTop() * -1);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and you're done.&lt;/p&gt;

&lt;p&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't want to follow the steps? Below is Github link for you :)&lt;/strong&gt;&lt;br&gt;
Demo: &lt;a href="https://tbaveja.github.io/reverse-scrolling/"&gt;https://tbaveja.github.io/reverse-scrolling/&lt;/a&gt;&lt;br&gt;
Code: &lt;a href="https://github.com/tbaveja/reverse-scrolling"&gt;https://github.com/tbaveja/reverse-scrolling&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;.&lt;/p&gt;

&lt;p&gt;Thanks for reading !&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Connect with me on LinkedIn:&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/tarun-baveja-000a9955/"&gt;https://www.linkedin.com/in/tarun-baveja-000a9955/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>css</category>
      <category>scrolling</category>
    </item>
  </channel>
</rss>
