<?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: Kaleem Elahi</title>
    <description>The latest articles on DEV Community by Kaleem Elahi (@kaleemelahi).</description>
    <link>https://dev.to/kaleemelahi</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%2F61635%2Ff650e26a-a47f-4c8b-b4c9-adda85a9eb5e.jpg</url>
      <title>DEV Community: Kaleem Elahi</title>
      <link>https://dev.to/kaleemelahi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kaleemelahi"/>
    <language>en</language>
    <item>
      <title>🧠 2 Easy Ways to Rename a Git Commit Message (GUI or CLI)</title>
      <dc:creator>Kaleem Elahi</dc:creator>
      <pubDate>Thu, 10 Jul 2025 12:06:34 +0000</pubDate>
      <link>https://dev.to/kaleemelahi/2-easy-ways-to-rename-a-git-commit-message-gui-or-cli-5fbk</link>
      <guid>https://dev.to/kaleemelahi/2-easy-ways-to-rename-a-git-commit-message-gui-or-cli-5fbk</guid>
      <description>&lt;p&gt;Ever made a typo in your commit message 😅 or forgot to follow proper commit message standards (like I did)? Don’t worry — renaming commits is easier than you think!&lt;/p&gt;

&lt;p&gt;✅ 1. Using Fork (Interactive Rebase – GUI method)&lt;/p&gt;

&lt;p&gt;1️⃣ Open the repository in Fork &lt;br&gt;
2️⃣ Right-click the commit you want to rename&lt;br&gt;
3️⃣ Select Interactive Rebase &amp;gt; "Reword Message.." &lt;br&gt;
This will open a dialog to edit the message and select &lt;code&gt;rework&lt;/code&gt; instead of &lt;code&gt;pick&lt;/code&gt;.&lt;br&gt;
4️⃣ Save changes and push with &lt;code&gt;--force&lt;/code&gt; if it was already pushed&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft5kf6skkwbx71hks1355.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%2Ft5kf6skkwbx71hks1355.png" alt=" " width="632" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✨ Super simple — perfect for visual thinkers, right?&lt;br&gt;
Download: &lt;a href="https://git-fork.com/" rel="noopener noreferrer"&gt;https://git-fork.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✅ 2. Using Git commands (Terminal)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbdlly2xa3ex6jayb6iix.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%2Fbdlly2xa3ex6jayb6iix.png" alt=" " width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔄 To rename the most recent commit:&lt;br&gt;
&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;🧹 To rename older commits (via rebase):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git rebase -i HEAD~5  # Change 5 to however many commits you want to edit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;    Replace &lt;code&gt;pick&lt;/code&gt; with &lt;code&gt;reword&lt;/code&gt; for the commits you want to rename&lt;/li&gt;
&lt;li&gt;    Then press: &lt;code&gt;Esc → :wq → Enter&lt;/code&gt; to save and exit&lt;/li&gt;
&lt;li&gt;    Git will then prompt you to &lt;strong&gt;edit&lt;/strong&gt; each commit message&lt;/li&gt;
&lt;li&gt;    After you're done:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push --force
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ Don’t forget the &lt;code&gt;--force push&lt;/code&gt; — if you skip this, your branch may get out of sync or duplicate commits may appear.&lt;/p&gt;

&lt;p&gt;💬 Have you tried the Fork method or the command line? Which one works better for you?&lt;/p&gt;

&lt;h1&gt;
  
  
  Git #GitTips #CommitMessages #ForkGit #CleanCode #100DaysOfCode #FrontendDev #DeveloperTools #Rebase
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Frontend intern Interview Q/A</title>
      <dc:creator>Kaleem Elahi</dc:creator>
      <pubDate>Fri, 17 Jan 2025 15:52:00 +0000</pubDate>
      <link>https://dev.to/kaleemelahi/frontend-intern-interview-qa-joc</link>
      <guid>https://dev.to/kaleemelahi/frontend-intern-interview-qa-joc</guid>
      <description>&lt;p&gt;Here are some potential interview questions and answers to help you prepare for this Frontend Developer Intern (with Bootstrap) role based on the job description:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tell us about yourself and your experience with frontend development.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Answer:&lt;br&gt;
“I am a frontend developer with experience in creating responsive web designs using HTML, CSS, and Bootstrap. I have worked on various projects, including building user-friendly interfaces and converting design mockups into pixel-perfect web pages. I am passionate about improving user experiences and staying updated on the latest frontend trends. I also have hands-on experience in collaborating with teams and solving UI/UX issues effectively.”&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is Bootstrap, and why do you prefer using it?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Answer:&lt;br&gt;
“Bootstrap is a popular frontend framework used for building responsive and mobile-first websites. I prefer using it because it provides pre-designed components like grids, buttons, and navigation, which save development time. It also ensures consistent design across different browsers and devices, making it ideal for responsive web development.”&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How do you ensure a web page is responsive?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Answer:&lt;br&gt;
“I ensure responsiveness by using a mobile-first approach, applying Bootstrap’s grid system, and using media queries to handle different screen sizes. I also test the page across various devices and browsers to confirm that the layout and functionality adapt seamlessly.”&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How do you convert design mockups into functional web pages?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Answer:&lt;br&gt;
“I start by analyzing the design mockup to understand the layout and components. Then, I structure the HTML and use CSS and Bootstrap for styling and responsiveness. Finally, I test the page to ensure pixel-perfect alignment with the mockup and verify its functionality on various devices.”&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Can you explain the Bootstrap grid system?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Answer:&lt;br&gt;
“The Bootstrap grid system uses a 12-column layout to create flexible and responsive designs. By defining rows and columns, I can control how content is arranged. For example, I use classes like col-, col-sm-, col-md-, etc., to adjust the layout for different screen sizes.”&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How do you debug UI/UX issues?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Answer:&lt;br&gt;
“I use browser developer tools to inspect elements, check for CSS conflicts, and test responsiveness. If there are UX issues, I collaborate with the design team to address user feedback and iterate on the design. Additionally, I test using tools like Lighthouse to identify performance and accessibility issues.”&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What are media queries, and how do you use them?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Answer:&lt;br&gt;
“Media queries are CSS rules that apply styles based on device characteristics like screen width or resolution. I use them to customize the layout for different devices. For example:&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; (max-width: 768px) {&lt;br&gt;&lt;br&gt;
  .container {&lt;br&gt;&lt;br&gt;
    flex-direction: column;&lt;br&gt;&lt;br&gt;
  }&lt;br&gt;&lt;br&gt;
}&lt;br&gt;
&lt;/p&gt;

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

### **8. Describe your experience working in a team environment.**
**Answer:**  
"I have collaborated with design and backend teams on several projects. I prioritize communication and use tools like Git for version control to streamline teamwork. By discussing issues and sharing updates regularly, I ensure the project stays on track."

---

### **9. What tools or technologies do you use to optimize web pages?**
**Answer:**  
"I optimize web pages by:  
- Compressing images using tools like TinyPNG.  
- Minifying CSS and JavaScript files.  
- Using lazy loading for images.  
- Implementing caching strategies for better performance.  
- Testing with tools like Google PageSpeed Insights and Lighthouse."

---

### **10. Why should we hire you for this role?**
**Answer:**  
"I am a dedicated frontend developer with hands-on experience in Bootstrap and responsive design. My ability to convert design mockups into functional web pages, solve UI/UX issues, and collaborate effectively makes me a strong fit for this internship. I am eager to contribute to your platform and learn from this opportunity."


Here’s a mix of technical and behavioral interview questions with answers to help you prepare further:

Technical Questions

1. Explain the difference between relative, absolute, and fixed positioning in CSS.

Answer:
    • Relative: Positions the element relative to its normal position in the document flow.
    • Absolute: Positions the element relative to its nearest positioned (non-static) ancestor. If none, it uses the document body.
    • Fixed: Positions the element relative to the viewport and doesn’t move when the page is scrolled.

2. What are the differences between em, rem, and px in CSS?

Answer:
    • px: Defines an absolute unit of measurement.
    • em: Relative to the font size of its nearest parent element.
    • rem: Relative to the root element’s font size (usually &amp;lt;html&amp;gt;).

3. What are some common CSS frameworks apart from Bootstrap?

Answer:
“Some popular CSS frameworks include:
    • Tailwind CSS
    • Foundation
    • Bulma
    • Materialize
These frameworks simplify responsive design and provide reusable components.”

4. How do you implement a sticky navigation bar using CSS?

Answer:
“To make a navigation bar sticky, I use the position: sticky property with a top value. For example:

nav {  
  position: sticky;  
  top: 0;  
  background: white;  
  z-index: 1000;  
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
"&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;5. What are the advantages of using SVGs over PNG or JPG images?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
"SVGs are vector graphics, which means they scale without losing quality, unlike PNG or JPG. They are lightweight, support animations, and can be styled with CSS. However, they are best suited for icons and illustrations, not photographs."&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;6. What is the difference between inline, block, and inline-block elements?&lt;/strong&gt;
&lt;/h3&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inline:&lt;/strong&gt; Does not start on a new line and only takes up as much width as necessary (e.g., &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Block:&lt;/strong&gt; Starts on a new line and takes up the full width available (e.g., &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inline-block:&lt;/strong&gt; Combines characteristics of both: inline layout but allows setting width and height.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;7. How would you improve a website’s performance?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
"I would:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minimize HTTP requests by combining files.
&lt;/li&gt;
&lt;li&gt;Use Content Delivery Networks (CDNs).
&lt;/li&gt;
&lt;li&gt;Optimize images with modern formats like WebP.
&lt;/li&gt;
&lt;li&gt;Use code-splitting in JavaScript.
&lt;/li&gt;
&lt;li&gt;Implement lazy loading for non-critical assets."&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;8. What is the difference between &lt;code&gt;class&lt;/code&gt; and &lt;code&gt;id&lt;/code&gt; in HTML?&lt;/strong&gt;
&lt;/h3&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Class:&lt;/strong&gt; Can be reused across multiple elements and is prefixed with &lt;code&gt;.&lt;/code&gt; in CSS.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ID:&lt;/strong&gt; Must be unique within the document and is prefixed with &lt;code&gt;#&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Behavioral Questions&lt;/strong&gt;
&lt;/h3&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;1. How do you handle tight deadlines?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
"I prioritize tasks based on their urgency and importance. I communicate with the team to divide responsibilities effectively and focus on delivering high-quality results. I also ensure to maintain transparency about progress and challenges."&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;2. Can you describe a time when you solved a UI/UX problem?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
"In a recent project, the navigation bar wasn’t displaying properly on mobile devices. I debugged it and realized the issue was with a CSS media query. I updated the query to handle small screen widths and tested it on multiple devices, resolving the issue effectively."&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;3. How do you stay updated with the latest trends in frontend development?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
"I regularly read blogs like Smashing Magazine and CSS-Tricks, follow forums like Stack Overflow, and participate in communities on GitHub. I also experiment with new tools and frameworks to keep my skills sharp."&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;4. How do you handle feedback on your code?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
"I view feedback as an opportunity to learn and improve. I carefully review the suggestions, ask for clarification if needed, and implement the changes while ensuring I understand why the feedback was given."&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;5. Describe a challenging project and how you managed it.&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
"In one project, I had to create a responsive dashboard within a week. I broke the tasks into smaller pieces, prioritized them, and used Bootstrap for quick styling. By staying focused and collaborating with the team, I delivered the dashboard on time and with great performance."&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Why and What is Clean Code ?</title>
      <dc:creator>Kaleem Elahi</dc:creator>
      <pubDate>Tue, 03 Dec 2024 08:21:38 +0000</pubDate>
      <link>https://dev.to/kaleemelahi/clean-code-summary-2gpi</link>
      <guid>https://dev.to/kaleemelahi/clean-code-summary-2gpi</guid>
      <description>&lt;p&gt;Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;General rules&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;    Follow standard conventions.&lt;/li&gt;
&lt;li&gt;    Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.&lt;/li&gt;
&lt;li&gt;    Boy scout rule. Leave the campground cleaner than you found it.&lt;/li&gt;
&lt;li&gt;    Always find root cause. Always look for the root cause of a problem.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Design rules&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;    Keep configurable data at high levels.&lt;/li&gt;
&lt;li&gt;    Prefer polymorphism to if/else or switch/case.&lt;/li&gt;
&lt;li&gt;    Separate multi-threading code.&lt;/li&gt;
&lt;li&gt;    Prevent over-configurability.&lt;/li&gt;
&lt;li&gt;    Use dependency injection.&lt;/li&gt;
&lt;li&gt;    Follow Law of Demeter. A class should know only its direct dependencies.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Understandability tips&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;    Be consistent. If you do something a certain way, do all similar things in the same way.&lt;/li&gt;
&lt;li&gt;    Use explanatory variables.&lt;/li&gt;
&lt;li&gt;    Encapsulate boundary conditions. Boundary conditions are hard to keep track of. Put the processing for them in one place.&lt;/li&gt;
&lt;li&gt;    Prefer dedicated value objects to primitive type.&lt;/li&gt;
&lt;li&gt;    Avoid logical dependency. Don't write methods which works correctly depending on something else in the same class.&lt;/li&gt;
&lt;li&gt;    Avoid negative conditionals.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Names rules&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;    Choose descriptive and unambiguous names.&lt;/li&gt;
&lt;li&gt;    Make meaningful distinction.&lt;/li&gt;
&lt;li&gt;    Use pronounceable names.&lt;/li&gt;
&lt;li&gt;    Use searchable names.&lt;/li&gt;
&lt;li&gt;    Replace magic numbers with named constants.&lt;/li&gt;
&lt;li&gt;    Avoid encodings. Don't append prefixes or type information.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Functions rules&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;    Small.&lt;/li&gt;
&lt;li&gt;    Do one thing.&lt;/li&gt;
&lt;li&gt;    Use descriptive names.&lt;/li&gt;
&lt;li&gt;    Prefer fewer arguments.&lt;/li&gt;
&lt;li&gt;    Have no side effects.&lt;/li&gt;
&lt;li&gt;    Don't use flag arguments. Split method into several independent methods that can be called from the client without the flag.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Comments rules&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;    Always try to explain yourself in code.&lt;/li&gt;
&lt;li&gt;    Don't be redundant.&lt;/li&gt;
&lt;li&gt;    Don't add obvious noise.&lt;/li&gt;
&lt;li&gt;    Don't use closing brace comments.&lt;/li&gt;
&lt;li&gt;    Don't comment out code. Just remove.&lt;/li&gt;
&lt;li&gt;    Use as explanation of intent.&lt;/li&gt;
&lt;li&gt;    Use as clarification of code.&lt;/li&gt;
&lt;li&gt;    Use as warning of consequences.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Source code structure&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;    Separate concepts vertically.&lt;/li&gt;
&lt;li&gt;    Related code should appear vertically dense.&lt;/li&gt;
&lt;li&gt;    Declare variables close to their usage.&lt;/li&gt;
&lt;li&gt;    Dependent functions should be close.&lt;/li&gt;
&lt;li&gt;    Similar functions should be close.&lt;/li&gt;
&lt;li&gt;    Place functions in the downward direction.&lt;/li&gt;
&lt;li&gt;    Keep lines short.&lt;/li&gt;
&lt;li&gt;    Don't use horizontal alignment.&lt;/li&gt;
&lt;li&gt;    Use white space to associate related things and disassociate weakly related.&lt;/li&gt;
&lt;li&gt;    Don't break indentation.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Objects and data structures&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;    Hide internal structure.&lt;/li&gt;
&lt;li&gt;    Prefer data structures.&lt;/li&gt;
&lt;li&gt;    Avoid hybrids structures (half object and half data).&lt;/li&gt;
&lt;li&gt;    Should be small.&lt;/li&gt;
&lt;li&gt;    Do one thing.&lt;/li&gt;
&lt;li&gt;    Small number of instance variables.&lt;/li&gt;
&lt;li&gt;    Base class should know nothing about their derivatives.&lt;/li&gt;
&lt;li&gt;    Better to have many functions than to pass some code into a function to select a behavior.&lt;/li&gt;
&lt;li&gt;    Prefer non-static methods to static methods.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Tests&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;    One assert per test.&lt;/li&gt;
&lt;li&gt;    Readable.&lt;/li&gt;
&lt;li&gt;    Fast.&lt;/li&gt;
&lt;li&gt;    Independent.&lt;/li&gt;
&lt;li&gt;    Repeatable.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Code smells&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;    Rigidity. The software is difficult to change. A small change causes a cascade of subsequent changes.&lt;/li&gt;
&lt;li&gt;    Fragility. The software breaks in many places due to a single change.&lt;/li&gt;
&lt;li&gt;    Immobility. You cannot reuse parts of the code in other projects because of involved risks and high effort.&lt;/li&gt;
&lt;li&gt;    Needless Complexity.&lt;/li&gt;
&lt;li&gt;    Needless Repetition.&lt;/li&gt;
&lt;li&gt;    Opacity. The code is hard to understand.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's much i think, But there's more. &lt;br&gt;
Do Read the full book.&lt;/p&gt;

&lt;p&gt;Thanks for reading the Summary, Hope it helps.&lt;/p&gt;

&lt;p&gt;Website:&lt;br&gt;
&lt;a href="https://kaleemelahi.co" rel="noopener noreferrer"&gt;https://kaleemelahi.co&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Buy Me A CoFee:&lt;br&gt;
&lt;a href="https://buymeacoffee.com/kaleemelahi" rel="noopener noreferrer"&gt;https://buymeacoffee.com/kaleemelahi&lt;/a&gt;&lt;/p&gt;

</description>
      <category>100daysofcode</category>
      <category>javascript</category>
      <category>typescript</category>
      <category>cleancode</category>
    </item>
    <item>
      <title>Tailwind tip: Managing a long list of utility classes in a single line of code</title>
      <dc:creator>Kaleem Elahi</dc:creator>
      <pubDate>Mon, 11 Nov 2024 08:34:06 +0000</pubDate>
      <link>https://dev.to/kaleemelahi/tailwind-tip-managing-a-long-list-of-utility-classes-in-a-single-line-of-code-5dh7</link>
      <guid>https://dev.to/kaleemelahi/tailwind-tip-managing-a-long-list-of-utility-classes-in-a-single-line-of-code-5dh7</guid>
      <description>&lt;p&gt;Managing a long list of utility classes in a single line can become unwieldy.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Here is Tailwind's built-in feature &lt;a class="mentioned-user" href="https://dev.to/apply"&gt;@apply&lt;/a&gt; that can help make your code more readable and manageable:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use &lt;code&gt;@apply&lt;/code&gt; in Custom CSS&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;With Tailwind's &lt;a class="mentioned-user" href="https://dev.to/apply"&gt;@apply&lt;/a&gt; directive, you can create reusable CSS classes by grouping multiple Tailwind utilities. This helps reduce the number of classes in your HTML and keeps your components more organized.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&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;/* styles.css */
.btn-primary {
  @apply bg-blue-500 text-white font-bold py-2 px-4 rounded;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can then use this new &lt;code&gt;.btn-primary&lt;/code&gt; class in your HTML &lt;strong&gt;instead of repeating&lt;/strong&gt; the Tailwind utilities:&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;button class="btn-primary"&amp;gt;Primary Button&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it helped you, you can support:&lt;br&gt;
&lt;a href="https://buymeacoffee.com/kaleemelahi" rel="noopener noreferrer"&gt;https://buymeacoffee.com/kaleemelahi&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Follow for more:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/kaleem-elahi" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/kaleem-elahi" rel="noopener noreferrer"&gt;GIthub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>css</category>
      <category>uidesign</category>
    </item>
    <item>
      <title>4 JavaScript Code Snippets to Solve Your Everyday Problems 👻</title>
      <dc:creator>Kaleem Elahi</dc:creator>
      <pubDate>Thu, 17 Jun 2021 07:48:43 +0000</pubDate>
      <link>https://dev.to/kaleemelahi/kaleem-elahi-shaikh-54b</link>
      <guid>https://dev.to/kaleemelahi/kaleem-elahi-shaikh-54b</guid>
      <description>&lt;p&gt;Let's start 😎&lt;/p&gt;

&lt;p&gt;1) How To Get A Random Number In A Range of Values&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const getRandomIntInRange = (min, max) =&amp;gt;
Math.floor(Math.random() * (max - min + 1)) + min;

getRandomIntInRange(2, 20) // 8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2) How To Create A Random String&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const generateRandomString = (length) =&amp;gt;
Math.random().toString(20).substr(2,length);

generateRandomString(5) // 9d8c2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) How To Set A Value If The Variable is null or Undefined&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
const foo = null ?? 'default string';
const baz = ?? 42;

foo; // default string
baz; // 0

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

&lt;/div&gt;



&lt;p&gt;4) How To Implement A Sleep Function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
const sleep = (ms) =&amp;gt; new Promise( (resolve) =&amp;gt; setTimeout(resolve, ms));

(async() &amp;gt; {

console.log(new Date()) // ? Mon Jun 14 2021 01:35:25 GMT+0300

await sleep(3000);

console.log(new Date()) // ? Mon Jun 14 2021 01:35:28 GMT+0300
})()

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

&lt;/div&gt;



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

&lt;blockquote&gt;
&lt;p&gt;Add comments if you get stuck or find any issue implementing it&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
