<?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: Coder Pink</title>
    <description>The latest articles on DEV Community by Coder Pink (@coderpink).</description>
    <link>https://dev.to/coderpink</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%2F854258%2Fadb4ab30-c0fa-4c15-af17-cee789d1ad4a.jpeg</url>
      <title>DEV Community: Coder Pink</title>
      <link>https://dev.to/coderpink</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/coderpink"/>
    <language>en</language>
    <item>
      <title>Monolithic vs Microservices Architecture: Which One Should You Choose?</title>
      <dc:creator>Coder Pink</dc:creator>
      <pubDate>Sun, 31 May 2026 04:14:27 +0000</pubDate>
      <link>https://dev.to/coderpink/monolithic-vs-microservices-architecture-which-one-should-you-choose-2dkg</link>
      <guid>https://dev.to/coderpink/monolithic-vs-microservices-architecture-which-one-should-you-choose-2dkg</guid>
      <description>&lt;p&gt;If you've been learning software development, you've probably heard the terms Monolithic Architecture and Microservices Architecture.&lt;/p&gt;

&lt;p&gt;Many beginners get confused because both are used to build applications, but they work very differently.&lt;/p&gt;

&lt;p&gt;In this blog, we'll understand both architectures in simple words, compare them, and see when to use each one.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Software Architecture?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Think of software architecture as the blueprint of a building.&lt;/p&gt;

&lt;p&gt;Before constructing a house, an engineer decides how rooms, doors, and utilities will be organized.&lt;/p&gt;

&lt;p&gt;Similarly, software architecture defines how different parts of an application are structured and communicate with each other.&lt;/p&gt;

&lt;p&gt;Two of the most popular approaches are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monolithic Architecture&lt;/li&gt;
&lt;li&gt;Microservices Architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's understand them one by one.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Monolithic Architecture?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A Monolithic Application is built as a single unit.&lt;/p&gt;

&lt;p&gt;All features such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User Authentication&lt;/li&gt;
&lt;li&gt;Product Management&lt;/li&gt;
&lt;li&gt;Orders&lt;/li&gt;
&lt;li&gt;Payments&lt;/li&gt;
&lt;li&gt;Notifications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;are part of one large codebase and are deployed together.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Imagine an online shopping application.&lt;/p&gt;

&lt;p&gt;Everything runs inside a single application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;E-Commerce App
 ├── Login
 ├── Products
 ├── Cart
 ├── Orders
 ├── Payments
 └── Admin Panel

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

&lt;/div&gt;



&lt;p&gt;If you want to update one feature, you usually redeploy the entire application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of Monolithic Architecture
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Easy to Develop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Beginners can easily understand the project structure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Simple Deployment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Only one application needs to be deployed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Easier Testing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Testing is straightforward because everything exists in one place.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Faster Initial Development&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Perfect for startups and small projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Disadvantages of Monolithic Architecture
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Becomes Large Over Time**&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As the application grows, the codebase becomes difficult to manage.&lt;br&gt;
**&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Slower Development**&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Multiple developers working on the same codebase can create conflicts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Scaling Problems&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If only one feature needs more resources, the entire application must be scaled.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Single Point of Failure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A bug in one module can affect the whole application.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Microservices Architecture?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Microservices Architecture breaks a large application into multiple small services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Each service has its own:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Codebase&lt;br&gt;
Database (optional)&lt;br&gt;
Deployment process&lt;br&gt;
Responsibility&lt;/p&gt;

&lt;p&gt;Every service focuses on doing one job well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The same e-commerce application can be divided into:&lt;/p&gt;

&lt;p&gt;User Service&lt;br&gt;
Product Service&lt;br&gt;
Order Service&lt;br&gt;
Payment Service&lt;br&gt;
Notification Service&lt;/p&gt;

&lt;p&gt;These services communicate through APIs.&lt;/p&gt;

&lt;p&gt;Instead of one giant application, you have multiple independent applications working together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of Microservices Architecture
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Independent Development&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Teams can work on different services simultaneously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Better Scalability&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Only the service under heavy load needs scaling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If product searches increase, scale only the Product Service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Easier Maintenance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Smaller codebases are easier to understand and update.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Technology Flexibility&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Different services can use different technologies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;User Service → Node.js&lt;br&gt;
Payment Service → Java&lt;br&gt;
Analytics Service → Python&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Improved Reliability&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If one service fails, the entire system may continue running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Disadvantages of Microservices Architecture
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Higher Complexity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Managing many services is more difficult than managing one application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Deployment Challenges&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every service needs deployment and monitoring.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Communication Overhead&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Services communicate through APIs, which introduces network delays.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. More Infrastructure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requires tools like:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Docker&lt;br&gt;
Kubernetes&lt;br&gt;
API Gateway&lt;br&gt;
Monitoring Systems&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Real-World Examples&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Applications That Started as Monoliths&lt;/p&gt;

&lt;p&gt;Many successful companies initially used monolithic architecture because it helped them move fast.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples include:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Netflix (early stage)&lt;br&gt;
Amazon (early stage)&lt;br&gt;
Shopify (early stage)&lt;br&gt;
Companies Using Microservices&lt;/p&gt;

&lt;p&gt;As these companies grew, they adopted microservices.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;p&gt;Netflix&lt;br&gt;
Amazon&lt;br&gt;
Uber&lt;br&gt;
Spotify&lt;/p&gt;

&lt;p&gt;Microservices helped them handle millions of users and scale efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which Architecture Should You Choose?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Choose Monolithic Architecture If:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You're building a small project&lt;/li&gt;
&lt;li&gt; You're a solo developer&lt;/li&gt;
&lt;li&gt; Your startup is in the early stage&lt;/li&gt;
&lt;li&gt; You want faster development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The application requirements are simple&lt;br&gt;
Choose Microservices Architecture If:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your application is growing rapidly&lt;/li&gt;
&lt;li&gt;Multiple teams work on the project&lt;/li&gt;
&lt;li&gt;You need independent scaling&lt;/li&gt;
&lt;li&gt;High availability is important&lt;/li&gt;
&lt;li&gt;The system has many complex features&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;A Common Mistake Developers Make&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Many beginners think:&lt;br&gt;
&lt;em&gt;"Big companies use microservices, so I should too."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is often a mistake.&lt;/p&gt;

&lt;p&gt;Microservices add significant complexity.&lt;/p&gt;

&lt;p&gt;For most startups, student projects, and MVPs, a monolithic architecture is usually the better choice.&lt;/p&gt;

&lt;p&gt;A good strategy is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start with a monolith.&lt;/li&gt;
&lt;li&gt;Validate your product.&lt;/li&gt;
&lt;li&gt;Scale when needed.&lt;/li&gt;
&lt;li&gt;Gradually move to microservices.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach saves time, money, and development effort.&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;/p&gt;

&lt;p&gt;There is no "best" architecture.&lt;/p&gt;

&lt;p&gt;The right choice depends on your project size, team, and future growth.&lt;/p&gt;

&lt;p&gt;Monolithic Architecture is simple, fast, and perfect for small to medium applications.&lt;/p&gt;

&lt;p&gt;Microservices Architecture offers flexibility, scalability, and reliability for large applications but comes with additional complexity.&lt;/p&gt;

&lt;p&gt;The smartest approach for most developers is:&lt;/p&gt;

&lt;p&gt;Start simple with a monolith and move to microservices only when your application truly needs it.&lt;/p&gt;

&lt;p&gt;What architecture are you currently using in your projects? Let me know in the comments.&lt;/p&gt;

&lt;p&gt;#SoftwareArchitecture #Microservices #MonolithicArchitecture #WebDevelopment #BackendDevelopment #SystemDesign #Programming #SoftwareEngineering #Developer&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Web Development Summer Training 2026 – Registration Open</title>
      <dc:creator>Coder Pink</dc:creator>
      <pubDate>Sat, 30 May 2026 14:43:53 +0000</pubDate>
      <link>https://dev.to/coderpink/web-development-summer-training-2026-registration-open-2eng</link>
      <guid>https://dev.to/coderpink/web-development-summer-training-2026-registration-open-2eng</guid>
      <description>&lt;p&gt;Are you a student looking to start your journey in web development?&lt;/p&gt;

&lt;p&gt;Coder-Pink is launching an Online Web Development Summer Training Program designed for beginners and students who want to build real-world skills and projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You'll Learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;HTML5&lt;/li&gt;
&lt;li&gt;CSS3&lt;/li&gt;
&lt;li&gt;JavaScript&lt;/li&gt;
&lt;li&gt;Bootstrap&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What You'll Get
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Live Online Sessions&lt;/li&gt;
&lt;li&gt;Hands-on Project Development&lt;/li&gt;
&lt;li&gt;Mentor Guidance&lt;/li&gt;
&lt;li&gt;Certificate of Completion&lt;/li&gt;
&lt;li&gt;Portfolio Projects&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Who Can Join?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;B.Tech Students&lt;/li&gt;
&lt;li&gt;BCA/MCA Students&lt;/li&gt;
&lt;li&gt;Beginners Interested in Web Development&lt;/li&gt;
&lt;li&gt;Anyone Looking to Learn Frontend Development&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Training Details
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Mode: Online&lt;/li&gt;
&lt;li&gt;Duration: 6 weeks&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Registration
&lt;/h2&gt;

&lt;p&gt;Register here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://forms.gle/s1NDnPk7hWR5pKP78" rel="noopener noreferrer"&gt;https://forms.gle/s1NDnPk7hWR5pKP78&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Contact
&lt;/h2&gt;

&lt;p&gt;📧 &lt;a href="mailto:coderpink1722@gmail.com"&gt;coderpink1722@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Limited seats available. Looking forward to helping the next generation of developers build their first web applications.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>coding</category>
    </item>
    <item>
      <title>CSS interview question and answer in brief.</title>
      <dc:creator>Coder Pink</dc:creator>
      <pubDate>Thu, 06 Mar 2025 09:52:54 +0000</pubDate>
      <link>https://dev.to/coderpink/css-interview-question-and-answer-in-brief-1i6b</link>
      <guid>https://dev.to/coderpink/css-interview-question-and-answer-in-brief-1i6b</guid>
      <description>&lt;p&gt;As a web developer, understanding CSS is very essential. CSS (Cascading Style Sheets) is the language used to style and format the layout of web pages. In this blog, we'll explore some common CSS interview questions and their answers to help you ace your next interview. These questions not only test your knowledge but also assess how well you can apply CSS in real-world situations.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What is the difference between class and id selectors in CSS?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Class:&lt;/strong&gt; A class selector targets elements that share the same class attribute. Multiple elements can have the same class, and a class can be used more than once in the CSS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.example { color: blue; }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;id: An ID selector is unique and targets only one element with that specific ID. It can only be used once per page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#example { color: red; }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  2. What is the box model in CSS?
&lt;/h2&gt;

&lt;p&gt;The CSS box model describes the rectangular boxes generated for elements on a web page. Each box consists of four areas:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Content:&lt;/strong&gt; The actual content of the element.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Padding:&lt;/strong&gt; Clears an area around the content (inside the border).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Border:&lt;/strong&gt; A border surrounding the padding.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Margin:&lt;/strong&gt; Clears an area outside the border, creating space between elements.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  3.  Explain the difference between inline, block, and inline-block elements.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;inline:&lt;/strong&gt; The element does not start on a new line and only takes up as much width as necessary.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;block:&lt;/strong&gt; The element starts on a new line and takes up the full width of its container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;inline-block:&lt;/strong&gt; Combines both behaviors: the element is inline but also respects width and height properties.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. What is the difference between em, rem, and px units in CSS?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;px:&lt;/strong&gt; A fixed-size unit, relative to the resolution of the display.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;em:&lt;/strong&gt; A relative unit that depends on the font size of the element itself or its parent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;rem:&lt;/strong&gt; A relative unit, but it depends on the root element’s font size, making it more predictable than em.&lt;/p&gt;




&lt;h2&gt;
  
  
  5.  What are CSS pseudo-classes and pseudo-elements?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Pseudo-classes:&lt;/em&gt;&lt;/strong&gt; Used to define the special state of an element. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;:hover:&lt;/strong&gt; Applied when the user hovers over an element.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;:focus:&lt;/strong&gt; Applied when an element gains focus. %}&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Pseudo-elements:&lt;/em&gt;&lt;/strong&gt; Used to style specific parts of an element. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;::before: Inserts content before an element.&lt;/li&gt;
&lt;li&gt;::after: Inserts content after an element.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. What are the different types of CSS positioning?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;static:&lt;/strong&gt; Default positioning, elements are positioned according to the normal document flow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;relative:&lt;/strong&gt; Elements are positioned relative to their normal position.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;absolute:&lt;/strong&gt; Positioned relative to the nearest positioned ancestor (not static).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;fixed:&lt;/strong&gt; Positioned relative to the viewport, meaning it stays in place even when the page is scrolled.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;sticky:&lt;/strong&gt; Acts like relative until it reaches a defined scroll position, then it behaves like fixed.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. What is Flexbox and how does it work?
&lt;/h2&gt;

&lt;p&gt;Flexbox is a layout model that allows for the easy arrangement of elements within a container. It enables you to align items horizontally or vertically with ease.&lt;/p&gt;

&lt;p&gt;Key properties include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;display:&lt;/strong&gt; flex on the container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;justify-content&lt;/strong&gt; to align items horizontally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;align-items&lt;/strong&gt; to align items vertically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;flex&lt;/strong&gt; on items to control their growth and shrinkage within the container.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. What are media queries and how do they work?
&lt;/h2&gt;

&lt;p&gt;Media queries allow you to apply different styles to elements based on the characteristics of the device (e.g., screen width, height, orientation, print). Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@media (max-width: 768px) {
  body { background-color: lightblue; }
}

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

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;This will change the background color of the body element on devices with a screen width of 768px or less&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  11. How can you create a responsive design using CSS?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use flexible grids or Flexbox for layout.&lt;/li&gt;
&lt;li&gt;Apply relative units like em, rem, % instead of fixed units like px.&lt;/li&gt;
&lt;li&gt;Utilize media queries to adjust styles based on different screen sizes.&lt;/li&gt;
&lt;li&gt;Ensure that images are responsive using max-width: 100% to prevent overflow.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  12.  What is the z-index property and how does it work?
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;z-index&lt;/strong&gt; property controls the stacking order of elements. Elements with a higher z-index are stacked in front of elements with a lower z-index. It only works on positioned elements (those with position: relative, absolute, fixed, or sticky).&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>css</category>
      <category>beginners</category>
    </item>
    <item>
      <title>JavaScript Strings and String Methods as a Beginners you should know</title>
      <dc:creator>Coder Pink</dc:creator>
      <pubDate>Wed, 03 Jan 2024 06:07:16 +0000</pubDate>
      <link>https://dev.to/coderpink/javascript-strings-and-string-methods-as-a-beginners-you-should-know-2ckc</link>
      <guid>https://dev.to/coderpink/javascript-strings-and-string-methods-as-a-beginners-you-should-know-2ckc</guid>
      <description>&lt;h2&gt;
  
  
  String:
&lt;/h2&gt;

&lt;p&gt;String is basically a sequence of characters that is used for storing and managing text data. JavaScript String is primitive data types and are immutable(means you cannot change the original string).There are two ways to create a string.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using String Literals&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let name = "Hello World";&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;here you have to enclosed the text inside the double or single quotes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using String Object&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let name = new String("Hello World");&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  String Methods :
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;charAt Method:&lt;/strong&gt; returns the character from a specified index.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let name = "Hello World";
let value = name.charAt(1);
console.log(value);
//value = e
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;concat method:&lt;/strong&gt; Join two or more string together&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let str = "Hello ";
let str1 = "World";
let total = str.concat(str1);
console.log(total);
//total = Hello World
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;replace method:&lt;/strong&gt; replace the given string with specified replacement values&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let str = "Your name";
let replaceValue = str.replace("Your", "My");
console.log(replaceValue);
//My name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;search method:&lt;/strong&gt; It searches a string against a specified values or regular expressions&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let text = "Please keep quiet!";
console.log(text.search("keep"));
console.log(text.search(/quiet/));
// 7
//12
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;note:&lt;/em&gt; it will return the first occurrence of the string.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;indexOf method:&lt;/strong&gt; It return the index of first occurrence of the string. It cannot take regular expression values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let text = "Move ahead!";
let index = text.indexOf("ahead");
console.log(index);
//5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;split method:&lt;/strong&gt; convert a string into array&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let text = "Move ahead!";
let value = text.split(" ");
console.log(value);

//[ 'Move', 'ahead!' ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;slice method:&lt;/strong&gt;  extracts a part of a string and returns the extracted part in a new string.&lt;br&gt;
it takes start position and end position(not included) in parameter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let text = "Move ahead!";
let value = text.slice(6, 10);
console.log(value);

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Hope you find this helpful&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Learn Ajax in simple way for Beginners (part - a)</title>
      <dc:creator>Coder Pink</dc:creator>
      <pubDate>Tue, 04 Apr 2023 05:51:15 +0000</pubDate>
      <link>https://dev.to/coderpink/learn-ajax-in-simple-way-for-beginners-part-a-4dc0</link>
      <guid>https://dev.to/coderpink/learn-ajax-in-simple-way-for-beginners-part-a-4dc0</guid>
      <description>&lt;h2&gt;
  
  
  So Here is our question arise what is ajax and how it is work?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ajax stands for &lt;em&gt;Asynchronous  JavaScript and XML&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ajax is used  to exchange  data  with a  web server &lt;br&gt;
asynchronously.&lt;em&gt;(asynchronously means  it send and receive data in background and do not reload the page every time in doing so)&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The reason ajax  is famous, for it only change the parts of the page which we are updating or changing instead of reloading the whole web page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ajax support &lt;em&gt;non-blocking calls&lt;/em&gt; means codes can run simultaneously.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When we are  using ajax , JavaScript will make a request to the server and after getting response from server, it will interpret the response and update or  show the result on the user  screen.&lt;/p&gt;

&lt;p&gt;ajax asynchronously communicate with server using &lt;em&gt;XMLHttpRequest&lt;/em&gt;.&lt;br&gt;
example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let ajaxXhr  = new XMLHttpRequest();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;here XMLHttpRequest() is object request we have  created and stored  it in variable name ajaxXhr.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How ajax Works :&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When an event(means like a user  click a button, hover a mouse etc.) occurred on a webpage. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;then this awakes the ajax engine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ajax engine send the XMLHttpRequest to the server. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;then server give the response to the ajax engine in the format of JSON or XML. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;after getting the response it will update the webpage(not whole).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;easy example of ajax running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;btn.addEventListener("click", ajaxRun);

function ajaxRun(){
let xhr = new XMLHttpRequest();
xhr.open("GET", "file.txt", true);
xhr.send();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;from above example, we add a event listener to button (btn), means when we click btn , it will run ajaxRun function.&lt;br&gt;
in ajaxRun function, it will create a &lt;em&gt;new XMLHttpRequest()&lt;/em&gt; object,&lt;br&gt;
and store it in xhr variable.&lt;br&gt;
then we use object method on xhr for further action.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;we use open method in which we have three parameter &lt;br&gt;
open(method, URL , async) i.e it tells where we are transmitting the data. (talk about detail in next part).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;send method tells us that the request is send.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use of Ajax :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;it is used for creating dynamic Web apps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;with ajax, we can send and receive data without reloading the webpage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It makes our web apps interactive and faster &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;Hope it help... we talk about it more in ajax part-b&lt;/code&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>ajax</category>
    </item>
    <item>
      <title>Things to know as a Beginner in JSON.</title>
      <dc:creator>Coder Pink</dc:creator>
      <pubDate>Fri, 03 Feb 2023 17:27:17 +0000</pubDate>
      <link>https://dev.to/coderpink/things-to-know-as-a-beginner-in-json-4fec</link>
      <guid>https://dev.to/coderpink/things-to-know-as-a-beginner-in-json-4fec</guid>
      <description>&lt;h2&gt;
  
  
  Things to remember...
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;JSON stands for JavaScript Object Notation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON is very lightweight as compared to XML.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is text format for storing and retrieving data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is human readable and easy to understand.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is very good to use JSON rather than XML.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;With JSON, can easily integrate with JavaScript.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The file type for JSON files is ".json"&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;example of JSON...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'{"name":"Tae", "age":26, "bike":null, "isGood" : true}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in the above example, we can see that JSON is like an object that has key-value pairs. you have to enclose the JSON object with backticks(``).&lt;/p&gt;

&lt;p&gt;It can take  values as numbers, strings, null, Boolean, array and object.&lt;br&gt;
You can also store an array in array, object in arrays as long as it is readable.&lt;/p&gt;

&lt;p&gt;``&lt;br&gt;
&lt;/p&gt;

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

newJson = '{"name":"Tae", "age":26, "bike":null, "isGood" : true}'

//'{"name":"Tae", "age":26, "bike":null, "isGood" : true}'

parsedJson = JSON.parse(newJson)

// {name: 'Tae', age: 26, bike: null, isGood: true}

parsedJson['age']

//26

parsedJson["isGood"]

//true


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

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
``&lt;/p&gt;

&lt;p&gt;Store json object in new variable named newJson.&lt;/p&gt;

&lt;p&gt;parse the jSON object so that you will get the JavaScript object and can access JavaScript object.&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>ethereum</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>Scope in JavaScript (Block Scope and Function Scope)</title>
      <dc:creator>Coder Pink</dc:creator>
      <pubDate>Mon, 05 Sep 2022 08:56:50 +0000</pubDate>
      <link>https://dev.to/coderpink/scope-in-javascript-block-scope-and-function-scope-eg7</link>
      <guid>https://dev.to/coderpink/scope-in-javascript-block-scope-and-function-scope-eg7</guid>
      <description>&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%2Fjvhx5ajbn8pl8flo1v26.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%2Fjvhx5ajbn8pl8flo1v26.png" alt=" " width="225" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Scope... Scope determines the accessibility of variables.
&lt;/h4&gt;

&lt;p&gt;In JavaScript we'll create variable with var, let, and const keyword. they will create scope, that means we can only access the variable within the scope.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Block Scope:&lt;/strong&gt;  &lt;em&gt;let&lt;/em&gt; and &lt;em&gt;const&lt;/em&gt; create Block Scope. When we create a variable with &lt;em&gt;let&lt;/em&gt; and &lt;em&gt;const&lt;/em&gt;, they will create &lt;strong&gt;block scope&lt;/strong&gt; means they can only access the block they are declared or created in. &lt;/p&gt;

&lt;p&gt;So let's take a look at the example below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (true) {
    let one = "one";
    console.log(one); // "one"
}

console.log(one); // Uncaught Reference Error: one is not defined

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

&lt;/div&gt;



&lt;p&gt;From the above example... we can see that we get an error when we console.log to the variable one outside the if statement.&lt;br&gt;
Because variable one is declared within the if statement... its scope is only limited to the if statement. and we cannot access the let one outside the if statement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Function Scope:&lt;/strong&gt;  Variable that are declared inside of a function will create a &lt;em&gt;function scope&lt;/em&gt;. this means you can only access the value within the function there or the parent function.&lt;/p&gt;

&lt;p&gt;Let's take a look at the example below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function fun(b) {
  var a = 12;
  return a + b;
}

fun(5);// 17  fun is being called
console.log(a); // Uncaught Reference Error: a is not defined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From the above example...  we can see that we get an error when we were trying to access the variable a outside the function that says a is not defined as we read above. &lt;br&gt;
So remember when you put or declared a variable inside the function, then it is only local to that function.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
