<?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: Shawon Saha</title>
    <description>The latest articles on DEV Community by Shawon Saha (@shawon).</description>
    <link>https://dev.to/shawon</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%2F399456%2F87b0cbaa-1502-4945-9e07-aa6ff80420c7.png</url>
      <title>DEV Community: Shawon Saha</title>
      <link>https://dev.to/shawon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shawon"/>
    <language>en</language>
    <item>
      <title>The "Windows Update Ate My Grub" Fix: A One-Line Lifesaver</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Tue, 07 Apr 2026 22:09:53 +0000</pubDate>
      <link>https://dev.to/shawon/the-windows-update-ate-my-grub-fix-a-one-line-lifesaver-4334</link>
      <guid>https://dev.to/shawon/the-windows-update-ate-my-grub-fix-a-one-line-lifesaver-4334</guid>
      <description>&lt;p&gt;It’s a tale as old as time (or at least as old as UEFI). You spend your morning updating Windows, hit restart, and instead of your familiar GRUB menu offering a choice between Linux and Windows, you’re booted straight into Windows. &lt;/p&gt;

&lt;p&gt;Your Linux partition isn't gone, and your files are safe—Windows has simply "reclaimed" the boot priority, effectively hiding the door to your Ubuntu installation.&lt;/p&gt;

&lt;p&gt;While many guides suggest booting from a Live USB and re-installing GRUB (which takes ages), there is a &lt;strong&gt;surgical, one-line fix&lt;/strong&gt; you can run right from inside Windows.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Magic Command
&lt;/h3&gt;

&lt;p&gt;If you are using Ubuntu (or most Ubuntu-based distros like Mint or Pop!_OS), open the &lt;strong&gt;Command Prompt as Administrator&lt;/strong&gt; and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bcdedit /set {bootmgr} path \efi\ubuntu\grubx64.efi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What does this actually do?
&lt;/h3&gt;

&lt;p&gt;Windows uses a tool called &lt;code&gt;bcdedit&lt;/code&gt; (Boot Configuration Data editor) to manage how the computer starts. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;{bootmgr}&lt;/code&gt;&lt;/strong&gt;: This targets the Windows Boot Manager.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;path \efi\ubuntu\grubx64.efi&lt;/code&gt;&lt;/strong&gt;: This tells the Windows Boot Manager that instead of looking for the Windows startup file, it should point directly to the GRUB bootloader file located on your EFI partition.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step-by-Step Guide
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Boot into Windows:&lt;/strong&gt; Since GRUB is missing, you’re likely already here.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Open CMD as Admin:&lt;/strong&gt; Press the &lt;code&gt;Win&lt;/code&gt; key, type &lt;code&gt;cmd&lt;/code&gt;, right-click it, and select &lt;strong&gt;Run as Administrator&lt;/strong&gt;. This is crucial; the command will fail without elevated permissions.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Run the Command:&lt;/strong&gt; Copy and paste the command above and hit Enter. You should see a message saying "The operation completed successfully."&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Restart:&lt;/strong&gt; Reboot your machine. Your GRUB menu should reappear, giving you back access to your Linux world.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  "It didn't work!" (Troubleshooting)
&lt;/h3&gt;

&lt;p&gt;If the command runs but nothing changes, or if you get an error, check these two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Secure Boot:&lt;/strong&gt; Sometimes Secure Boot prevents the handoff to GRUB. Try disabling it in your BIOS/UEFI settings if the problem persists.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Path Variation:&lt;/strong&gt; If you aren't using Ubuntu, the folder name might be different. For example, Fedora users would likely use &lt;code&gt;\efi\fedora\grubx64.efi&lt;/code&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why does this happen?
&lt;/h3&gt;

&lt;p&gt;Windows updates occasionally overwrite the "Boot Order" stored in your motherboard’s NVRAM to ensure Windows remains the default OS. By running this command, you aren't "breaking" Windows; you're just politely telling the motherboard that GRUB is the rightful conductor of the orchestra.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pro-tip:&lt;/strong&gt; Keep this command in a Note or a physical sticky note. Windows updates are inevitable, and having this shortcut saves you from a 30-minute troubleshooting session down the road!&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>How to Check the Number of Lines Changed in Your Current Git Branch Compared to Main</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Mon, 24 Nov 2025 10:48:29 +0000</pubDate>
      <link>https://dev.to/shawon/how-to-check-the-number-of-lines-changed-in-your-current-git-branch-compared-to-main-3m6m</link>
      <guid>https://dev.to/shawon/how-to-check-the-number-of-lines-changed-in-your-current-git-branch-compared-to-main-3m6m</guid>
      <description>&lt;p&gt;When working with Git, developers often need to understand how much their current branch differs from the main branch. This can help in assessing the scope of changes, planning reviews, or making decisions before merging. One useful metric is the total number of lines added and removed between branches.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Check Lines of Diff?
&lt;/h3&gt;

&lt;p&gt;Counting the lines of code changed gives a quick snapshot of the volume of work done. It helps to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gauge the size of your feature or fix.&lt;/li&gt;
&lt;li&gt;Estimate code review effort.&lt;/li&gt;
&lt;li&gt;Track progress against expectations.&lt;/li&gt;
&lt;li&gt;Identify large or complex changes that might require extra testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Using Git to Check Line Differences
&lt;/h3&gt;

&lt;p&gt;The Git command line provides simple ways to check these differences precisely.&lt;/p&gt;

&lt;p&gt;The most straightforward command is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git diff --shortstat main...HEAD
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here’s how it works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git diff&lt;/code&gt; shows changes between commits or branches.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;main...HEAD&lt;/code&gt; compares your current branch (&lt;code&gt;HEAD&lt;/code&gt;) with the main branch.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--shortstat&lt;/code&gt; gives a brief summary report with the total files changed, and lines added and deleted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, running this command might show:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3 files changed, 45 insertions(+), 20 deletions(-)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means across 3 files, you've added 45 lines and removed 20 lines compared to main.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting More Detailed Line Counts
&lt;/h3&gt;

&lt;p&gt;If you want to see the exact line changes per file, you can use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git diff main...HEAD --numstat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command outputs a list where each line contains the number of added and deleted lines per file. It’s handy for deeper inspection or for scripting purposes.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
    </item>
    <item>
      <title>How to Disable Automatic Rearrangement of Desktops (Spaces) on Mac</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Fri, 21 Nov 2025 09:58:59 +0000</pubDate>
      <link>https://dev.to/shawon/how-to-disable-automatic-rearrangement-of-desktops-spaces-on-mac-50kn</link>
      <guid>https://dev.to/shawon/how-to-disable-automatic-rearrangement-of-desktops-spaces-on-mac-50kn</guid>
      <description>&lt;p&gt;macOS offers a powerful feature called Spaces, which allows users to organize their open applications across multiple virtual desktops or workspaces. This helps maintain an organized workflow by separating projects or tasks into distinct environments. However, a feature that automatically rearranges these desktops based on your recent app usage can sometimes disrupt this organization. If you prefer your desktops to remain in a fixed order, it is essential to disable this auto-rearrangement.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Desktop (Spaces) Auto Rearrangement?
&lt;/h3&gt;

&lt;p&gt;By default, macOS reorders your desktops (also called Spaces) so that the most recently used desktop appears next to your current one. While this can be useful for some people to quickly switch between frequently used spaces, it often causes confusion and breaks your muscle memory of where apps or documents reside.&lt;/p&gt;

&lt;p&gt;For instance, if you have Chrome on Desktop 2 and a document on Desktop 3, after switching between them, macOS might shuffle these desktops, making it hard to keep track of your workspace layout.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Disable Auto Rearrangement?
&lt;/h3&gt;

&lt;p&gt;Disabling this feature locks your desktops in the order you set, avoiding unexpected shuffling and helping maintain a consistent workflow. It is especially helpful for users who rely heavily on multiple desktops or workspaces for different tasks, making navigation predictable and stable.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Disable Auto Rearrangement of Desktops on macOS
&lt;/h3&gt;

&lt;p&gt;The process to disable automatic rearrangement is straightforward and involves adjusting the Mission Control settings from System Settings. Here’s how:&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%2Fdud48qs775z4kjluxeu7.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%2Fdud48qs775z4kjluxeu7.png" alt=" " width="800" height="1047"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click the Apple menu () and open &lt;strong&gt;System Settings&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the sidebar, select &lt;strong&gt;Desktop &amp;amp; Dock&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Scroll down to the &lt;strong&gt;Mission Control&lt;/strong&gt; section.&lt;/li&gt;
&lt;li&gt;Find the option labeled &lt;strong&gt;"Automatically rearrange Spaces based on most recent use"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Toggle this option &lt;strong&gt;off&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once disabled, macOS will no longer move your desktops around based on usage, preserving the custom order you prefer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Tips
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This setting is relevant for macOS Ventura and later. On older macOS versions, look for the similar option under &lt;strong&gt;System Preferences &amp;gt; Mission Control&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Disabling this feature does not affect your ability to create or delete desktops; it only stops the system from rearranging existing ones.&lt;/li&gt;
&lt;li&gt;If you use full-screen apps, they will still create new spaces as usual, just without automatic reshuffling.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The automatic rearrangement of deskspaces can disrupt productivity and cause frustration for users accustomed to a set order of virtual desktops. Thankfully, macOS allows you to disable this feature easily, giving you control back over your workspace organization. By following the steps outlined above, you can keep your desktops locked in place and enjoy a more stable and predictable workflow.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>tutorial</category>
      <category>ux</category>
    </item>
    <item>
      <title>How to Reset a Remote Git Repository to Match Your Local State: A Careful Approach</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Wed, 17 Sep 2025 09:04:02 +0000</pubDate>
      <link>https://dev.to/shawon/how-to-reset-a-remote-git-repository-to-match-your-local-state-a-careful-approach-4ld0</link>
      <guid>https://dev.to/shawon/how-to-reset-a-remote-git-repository-to-match-your-local-state-a-careful-approach-4ld0</guid>
      <description>&lt;p&gt;Working with Git and GitHub is great until a mistake or unwanted commit is pushed to the remote repository. Sometimes, you need to undo those mistakes and force the remote repository to match your corrected local state. This must be done carefully to avoid disrupting collaborators and losing important work.&lt;/p&gt;

&lt;p&gt;This guide will walk you through the safest and most effective way to reset a remote repository to a specific commit in your local repository while highlighting important precautions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Backup Your Current State
&lt;/h2&gt;

&lt;p&gt;Before making any changes that rewrite history, always take a backup of your current local branch. This protects you from accidental data loss and allows you to recover changes if needed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git branch backup-before-force-push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a new branch &lt;code&gt;backup-before-force-push&lt;/code&gt; that preserves your current state.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Fetch Latest Changes from Remote
&lt;/h2&gt;

&lt;p&gt;Make sure your local Git repository has the latest information from the remote repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git fetch origin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This updates all remote tracking branches without modifying your local branch or working directory.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Reset Your Local Branch to the Desired Commit
&lt;/h2&gt;

&lt;p&gt;Identify the commit hash you want to reset to (the last known good state). Then, reset your local branch hard to that commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git reset &lt;span class="nt"&gt;--hard&lt;/span&gt; &amp;lt;good-commit-hash&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;&amp;lt;good-commit-hash&amp;gt;&lt;/code&gt; with the actual commit ID. This moves your branch pointer and makes your working directory match the specified commit exactly.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Force Push to Overwrite Remote History
&lt;/h2&gt;

&lt;p&gt;Now that your local branch is at the correct commit, you need to force push to update the remote repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;--force-with-lease&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command overwrites the remote branch &lt;code&gt;main&lt;/code&gt; with your local branch state.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;--force-with-lease&lt;/code&gt; is safer than a simple force because it checks if the remote branch has changed since you last fetched, preventing you from accidentally overwriting someone else's work.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Replace &lt;code&gt;main&lt;/code&gt; with your branch name if different.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Important Warnings and Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Communicate with your team:&lt;/strong&gt; If working with collaborators, notify them before rewriting history. They will need to sync their local repositories afterwards to avoid conflicts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Backup important changes:&lt;/strong&gt; Double-check you have saved any work that shouldn't be lost, as &lt;code&gt;git reset --hard&lt;/code&gt; and force push discard changes from both local and remote.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Force push carefully:&lt;/strong&gt; Rewriting history can cause confusion if done without care, so use &lt;code&gt;--force-with-lease&lt;/code&gt; whenever possible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prepare collaborators to reset their local branches:&lt;/strong&gt; Anyone who pulled the previous commits will need to reset or reclone to align with the rewritten history.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Resetting a remote Git repository to match a clean local state involves:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Backing up your current local branch&lt;/li&gt;
&lt;li&gt;Fetching the latest changes from remote&lt;/li&gt;
&lt;li&gt;Hard resetting your local branch to a known good commit&lt;/li&gt;
&lt;li&gt;Force pushing your rebased branch to remote with &lt;code&gt;--force-with-lease&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By following these steps carefully and communicating effectively, you can safely undo mistakes pushed to GitHub and maintain clean project history.&lt;/p&gt;




&lt;p&gt;This approach ensures your local and remote repositories are perfectly aligned while minimizing risks associated with overwriting shared history.&lt;/p&gt;

&lt;p&gt;If unsure, always make backups and coordinate with your team!&lt;/p&gt;




</description>
      <category>git</category>
      <category>github</category>
      <category>development</category>
      <category>programming</category>
    </item>
    <item>
      <title>How To Suppress Build Errors in Next.js with TypeScript</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Wed, 17 Sep 2025 08:47:49 +0000</pubDate>
      <link>https://dev.to/shawon/how-to-suppress-build-errors-in-nextjs-with-typescript-1dnl</link>
      <guid>https://dev.to/shawon/how-to-suppress-build-errors-in-nextjs-with-typescript-1dnl</guid>
      <description>&lt;p&gt;In the fast-paced world of web development, minimizing roadblocks during prototyping or initial integration can be useful. Suppressing build errors is one way to keep your pipeline moving, especially when integrating large third-party libraries. Here’s how it’s commonly done in a Next.js project with TypeScript—and why you need to be careful.&lt;/p&gt;




&lt;h3&gt;
  
  
  Suppressing TypeScript Build Errors in &lt;code&gt;next.config.ts&lt;/code&gt; or &lt;code&gt;next.config.mjs&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Next.js provides a straightforward way to ignore TypeScript build errors by updating the &lt;code&gt;next.config.ts&lt;/code&gt;/&lt;code&gt;next.config.mjs&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// next.config.ts/mjs&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;typescript&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;ignoreBuildErrors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Setting &lt;code&gt;ignoreBuildErrors&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; tells Next.js to proceed with the build even if TypeScript finds type errors.&lt;/p&gt;




&lt;h3&gt;
  
  
  Disabling Strict Type Checking in &lt;code&gt;tsconfig.json&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Another approach is to loosen TypeScript’s strictness in your &lt;code&gt;tsconfig.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compilerOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"strict"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Turning off &lt;code&gt;"strict"&lt;/code&gt; disables a suite of advanced type-checking features, which can make builds pass more easily but also reduces the safety and reliability of your codebase.&lt;/p&gt;




&lt;h3&gt;
  
  
  When and Why You Might Do This
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rapid prototyping&lt;/strong&gt;: When integrating complex packages or fast-tracking proof-of-concept work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3rd-party code&lt;/strong&gt;: Some external libraries might introduce type errors you can’t immediately address.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Legacy code&lt;/strong&gt;: Migrating older codebases where fixing all type errors upfront is impractical.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Best Practices and Warnings
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Temporary measure&lt;/strong&gt;: Only suppress errors short-term. Plan to re-enable strict checking before major releases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track suppressed errors&lt;/strong&gt;: Maintain a list of known issues to avoid introducing new bugs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code review required&lt;/strong&gt;: All uses of suppressed errors should be reviewed, and a plan for resolution should be in place.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Suppressing errors can unblock your workflow, but always treat it as a temporary solution. Ultimately, type errors exist to prevent runtime bugs—ignoring them for too long can lead to greater technical debt.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://nextjs.org/docs/pages/api-reference/next-config-js/typescript" rel="noopener noreferrer"&gt;Next.js Documentation&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.typescriptlang.org/tsconfig" rel="noopener noreferrer"&gt;TypeScript Compiler Options&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;This approach helps you move quickly—just remember to address the root issues when possible!&lt;/p&gt;




</description>
      <category>nextjs</category>
      <category>typescript</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Streamlining Your Git Workflow: A Developer's Guide to Efficient Branch Creation</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Wed, 28 May 2025 05:26:28 +0000</pubDate>
      <link>https://dev.to/shawon/streamlining-your-git-workflow-a-developers-guide-to-efficient-branch-creation-35c2</link>
      <guid>https://dev.to/shawon/streamlining-your-git-workflow-a-developers-guide-to-efficient-branch-creation-35c2</guid>
      <description>&lt;p&gt;As developers, we've all been there – repeatedly typing the same sequence of Git commands every time we want to start working on a new feature. The traditional workflow of checking out main, pulling the latest changes, and then creating a new branch feels unnecessarily verbose. Let's explore how to make this process more efficient and developer-friendly.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Traditional Approach and Its Pain Points&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Most developers are familiar with this common pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout main
git pull 
git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; new-feature-branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While this approach works, it has several drawbacks that can slow down your development workflow. You're forced to switch contexts by checking out the main branch first, potentially interrupting your current work. If your local main branch has uncommitted changes, you might encounter conflicts or need to stash your work. Additionally, this three-step process simply takes more time and mental overhead than necessary.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Modern Solution: Direct Branch Creation from Remote&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The most elegant solution is to create your new branch directly from the remote main branch without switching to it locally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; new-feature-branch origin/main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This single command accomplishes everything the traditional three-step process does, but more efficiently. It creates a new branch called &lt;code&gt;new-feature-branch&lt;/code&gt; based on the latest state of &lt;code&gt;origin/main&lt;/code&gt; and immediately switches to it. The beauty of this approach is that it works with the remote reference directly, ensuring you always start with the most up-to-date code.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Alternative Approaches for Different Scenarios&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Using Git Switch for Modern Workflows&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you're using a newer version of Git, the &lt;code&gt;git switch&lt;/code&gt; command offers a more intuitive syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git switch &lt;span class="nt"&gt;-c&lt;/span&gt; new-feature-branch origin/main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;git switch&lt;/code&gt; command was introduced to make branch operations more explicit and user-friendly. The &lt;code&gt;-c&lt;/code&gt; flag creates a new branch, similar to &lt;code&gt;checkout -b&lt;/code&gt;, but with clearer intent.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Fetch-First Approach&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For teams working in fast-moving environments where the remote repository changes frequently, you might want to ensure you have the absolute latest changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git fetch origin
git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; new-feature-branch origin/main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This two-step process first fetches all the latest changes from the remote repository, then creates your branch from the most current state. While it's one extra command compared to the direct approach, it guarantees you're working with the freshest possible codebase.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Understanding Why These Methods Work Better&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;These streamlined approaches offer several advantages over the traditional workflow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reduced Context Switching&lt;/strong&gt;: You don't need to leave your current branch to create a new one, which is particularly valuable when you're in the middle of debugging or reviewing code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cleaner Local Repository&lt;/strong&gt;: Your local main branch remains untouched, avoiding potential merge conflicts or the need to stash uncommitted work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Faster Execution&lt;/strong&gt;: Reducing three commands to one or two saves time, especially when repeated multiple times throughout the day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remote-First Thinking&lt;/strong&gt;: By working directly with remote references, you develop better habits around distributed version control and reduce the likelihood of working with stale local branches.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;When to Use Each Approach&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The choice between these methods depends on your specific workflow and team practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use &lt;code&gt;git checkout -b new-feature-branch origin/main&lt;/code&gt;&lt;/strong&gt; for most scenarios where you want maximum efficiency&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use &lt;code&gt;git switch -c new-feature-branch origin/main&lt;/code&gt;&lt;/strong&gt; if your team has adopted modern Git practices and prefers explicit command semantics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use the fetch-first approach&lt;/strong&gt; in high-velocity environments where remote changes happen frequently&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>gitlab</category>
    </item>
    <item>
      <title>How to Automatically Disable Bluetooth and WiFi on MacBook Sleep</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Sat, 22 Feb 2025 17:54:09 +0000</pubDate>
      <link>https://dev.to/shawon/how-to-automatically-disable-bluetooth-and-wifi-on-macbook-sleep-17o9</link>
      <guid>https://dev.to/shawon/how-to-automatically-disable-bluetooth-and-wifi-on-macbook-sleep-17o9</guid>
      <description>&lt;p&gt;Are you tired of your MacBook maintaining Bluetooth and WiFi connections when it's supposed to be sleeping? This can lead to unnecessary battery drain and potential security risks. In this guide, we'll walk you through a simple yet effective solution using SleepWatcher to automatically disable both Bluetooth and WiFi when your MacBook goes to sleep.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Disable Bluetooth and WiFi on Sleep?
&lt;/h2&gt;

&lt;p&gt;When your MacBook goes to sleep, it often keeps Bluetooth and WiFi active. While this is convenient for quick wake-ups or maintaining network connections, it can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Drain your battery unnecessarily.&lt;/li&gt;
&lt;li&gt;Keep your Mac connected to devices or networks when it's not in use.&lt;/li&gt;
&lt;li&gt;Pose potential security risks by leaving your wireless interfaces active.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By disabling both Bluetooth and WiFi during sleep, you can conserve battery life and improve security.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Install SleepWatcher and Blueutil
&lt;/h2&gt;

&lt;p&gt;To get started, you'll need two tools: &lt;strong&gt;SleepWatcher&lt;/strong&gt; (to run scripts when your Mac sleeps or wakes) and &lt;strong&gt;Blueutil&lt;/strong&gt; (to control Bluetooth via the command line).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Terminal.&lt;/li&gt;
&lt;li&gt;Install both tools using Homebrew:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   brew &lt;span class="nb"&gt;install &lt;/span&gt;sleepwatcher blueutil
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will install SleepWatcher and Blueutil into the &lt;code&gt;/opt/homebrew&lt;/code&gt; directory.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 2: Create Sleep and Wake Scripts
&lt;/h3&gt;

&lt;p&gt;SleepWatcher works by running custom scripts when your Mac sleeps or wakes. You'll create two scripts: one for sleep (to disable Bluetooth and WiFi) and one for wake (to re-enable them).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create the &lt;strong&gt;sleep&lt;/strong&gt; script using &lt;code&gt;Terminal&lt;/code&gt; in &lt;code&gt;~home&lt;/code&gt; directory:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"/opt/homebrew/bin/blueutil -p 0"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; ~/.sleep
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"networksetup -setairportpower Wi-Fi off"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.sleep
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create the &lt;strong&gt;wake&lt;/strong&gt; script using &lt;code&gt;Terminal&lt;/code&gt; in &lt;code&gt;~home&lt;/code&gt; directory:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"/opt/homebrew/bin/blueutil -p 1"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; ~/.wakeup
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"networksetup -setairportpower Wi-Fi on"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.wakeup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Make these scripts executable:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x ~/.sleep ~/.wakeup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 3: Configure SleepWatcher
&lt;/h3&gt;

&lt;p&gt;Start the SleepWatcher service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew services start sleepwatcher
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 4: Make SleepWatcher Start at Login
&lt;/h2&gt;

&lt;p&gt;To ensure SleepWatcher runs automatically whenever you log in, follow these steps:&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 1: Use Login Items &amp;amp; Extensions (GUI Method)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;System Settings&lt;/strong&gt; on your Mac.&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;General &amp;gt; Login Items &amp;amp; Extensions&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Login Items&lt;/strong&gt;, click the &lt;strong&gt;+&lt;/strong&gt; button.&lt;/li&gt;
&lt;li&gt;Navigate to &lt;code&gt;/opt/homebrew/Cellar/sleepwatcher/[version]/sbin/&lt;/code&gt; (replace &lt;code&gt;[version]&lt;/code&gt; with the installed version of SleepWatcher, e.g., &lt;code&gt;2.2.1&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;sleepwatcher&lt;/code&gt; and click &lt;strong&gt;Add&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This will add SleepWatcher as a login item so it starts automatically whenever you log in.&lt;/p&gt;




&lt;h2&gt;
  
  
  Testing Your Setup
&lt;/h2&gt;

&lt;p&gt;To ensure everything is working correctly:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Close your MacBook lid&lt;/li&gt;
&lt;li&gt;Wait a few seconds&lt;/li&gt;
&lt;li&gt;Open the lid&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both Bluetooth and WiFi should turn off when the lid is closed and turn back on when opened.&lt;/p&gt;




&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;p&gt;If you encounter any issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make sure SleepWatcher is running: &lt;code&gt;brew services list&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Check your script permissions: &lt;code&gt;ls -l ~/.sleep ~/.wakeup&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Review system logs for any error messages&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;By following this guide, you've successfully automated the process of disabling Bluetooth and WiFi whenever your MacBook goes to sleep—and re-enabling them upon waking up! With SleepWatcher configured to start at login, you can enjoy improved battery life, enhanced security, and peace of mind knowing that your wireless interfaces are inactive when not in use.&lt;/p&gt;

&lt;p&gt;Remember, you can always modify the sleep and wake scripts to include additional actions or fine-tune the behavior to suit your specific needs.&lt;/p&gt;

&lt;p&gt;Happy automating! 😊&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Manually Approve LuLu Network Extension on Mac</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Sun, 29 Dec 2024 08:59:29 +0000</pubDate>
      <link>https://dev.to/shawon/how-to-manually-approve-lulu-network-extension-on-mac-plo</link>
      <guid>https://dev.to/shawon/how-to-manually-approve-lulu-network-extension-on-mac-plo</guid>
      <description>&lt;p&gt;If you're using LuLu, a popular open-source firewall for macOS, you might encounter a message stating that extensions must be manually approved via the Security and Privacy settings. This guide will walk you through the steps to approve the LuLu network extension, ensuring that your firewall is fully operational and protecting your system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why You Need to Approve Extensions
&lt;/h2&gt;

&lt;p&gt;macOS has strict security measures in place to prevent unauthorized software from modifying system settings. As a result, certain applications, like LuLu, require manual approval for their network extensions. This process helps maintain the integrity of your system while allowing trusted applications to function properly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step-by-Step Guide to Approve LuLu's Network Extension
&lt;/h2&gt;

&lt;p&gt;Follow these simple steps to manually approve the LuLu network extension on your Mac:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Open System Settings
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Click on the &lt;strong&gt;Apple menu&lt;/strong&gt; in the top-left corner of your screen.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;System Settings&lt;/strong&gt; from the dropdown menu.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 2: Navigate to Login Items &amp;amp; Extensions
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;In the System Settings sidebar, click on &lt;strong&gt;General&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Scroll down and select &lt;strong&gt;Login Items &amp;amp; Extensions&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 3: Locate Network Extensions
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Under the &lt;strong&gt;Extensions&lt;/strong&gt; section, find &lt;strong&gt;Network Extensions&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click on the &lt;strong&gt;(i)&lt;/strong&gt; button next to it for more details.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 4: Enable LuLu
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;If LuLu is listed among the network extensions, toggle it on.&lt;/li&gt;
&lt;li&gt;If you do not see LuLu, try running another application that uses network extensions (like DNSMonitor) from the Terminal to trigger the approval prompt.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 5: Authenticate Changes
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;You may be prompted to enter your administrator password to authenticate these changes.&lt;/li&gt;
&lt;li&gt;Once authenticated, your settings should be updated.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Troubleshooting Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If you do not see LuLu or any related prompts in the Security &amp;amp; Privacy settings, ensure that you have installed the latest version of LuLu.&lt;/li&gt;
&lt;li&gt;Check if your macOS version supports LuLu; compatibility issues may prevent it from appearing.&lt;/li&gt;
&lt;li&gt;In some cases, reinstalling LuLu may help trigger the necessary approval prompts.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Manually approving network extensions like LuLu is an essential step in ensuring that your firewall functions correctly on macOS. By following these steps, you can enhance your system's security and maintain control over your network traffic. If you have any further questions or run into issues, feel free to reach out for assistance!&lt;/p&gt;

&lt;p&gt;Happy browsing!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Fixing GRUB: A Guide to Dual Booting Windows and Linux on UEFI GPT Systems</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Sun, 03 Nov 2024 09:52:56 +0000</pubDate>
      <link>https://dev.to/shawon/fixing-grub-a-guide-to-dual-booting-windows-and-linux-on-uefi-gpt-systems-24gi</link>
      <guid>https://dev.to/shawon/fixing-grub-a-guide-to-dual-booting-windows-and-linux-on-uefi-gpt-systems-24gi</guid>
      <description>&lt;p&gt;Dual booting Windows and Linux can be a great way to enjoy the best of both operating systems. However, issues can arise, particularly with the GRUB bootloader, which is essential for selecting which OS to boot into. If you find that your computer boots directly into Windows without showing the GRUB menu, you may need to fix GRUB. This blog post summarizes a helpful video guide on how to resolve this issue using Ubuntu installation media.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Problem
&lt;/h2&gt;

&lt;p&gt;When you install both Windows and Linux on a single hard drive, the GRUB bootloader should allow you to choose between the two operating systems at startup. However, sometimes GRUB can go missing or fail to display due to various reasons, such as system updates or changes in boot order. In this case, the computer boots straight into Windows, leaving you unable to access your Linux installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step-by-Step Guide to Fixing GRUB
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Boot into Ubuntu Installation Media
&lt;/h3&gt;

&lt;p&gt;To begin fixing GRUB, you will need to boot from an Ubuntu installation media (USB or DVD). You can download the latest Ubuntu ISO from the official website. Once you have created your installation media:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Insert it into your computer and restart.&lt;/li&gt;
&lt;li&gt;Select "Try Ubuntu" when prompted.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Open Terminal and Mount Partitions
&lt;/h3&gt;

&lt;p&gt;Once you're in the live session of Ubuntu:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a terminal window by searching for "Terminal" in the applications menu.&lt;/li&gt;
&lt;li&gt;First, you need to identify your partitions by running:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;sudo &lt;/span&gt;fdisk &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will display your drive structure. You’ll typically see partitions like &lt;code&gt;/dev/sda1&lt;/code&gt; for EFI and &lt;code&gt;/dev/sda5&lt;/code&gt; for your Linux filesystem.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next, mount the necessary partitions. For example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;sudo &lt;/span&gt;mount /dev/sda1 /mnt
  &lt;span class="nb"&gt;sudo &lt;/span&gt;mount /dev/sda5 /mnt/ubuntu
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This mounts your EFI partition and your Linux filesystem so that you can make changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Install and Update GRUB
&lt;/h3&gt;

&lt;p&gt;Now that your partitions are mounted, you can install GRUB:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Change root into your mounted directory:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;sudo chroot&lt;/span&gt; /mnt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Install GRUB on your disk (usually &lt;code&gt;/dev/sda&lt;/code&gt;):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  grub-install /dev/sda
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you encounter a warning about EFI variables not being set, ensure that you've correctly mounted the EFI partition.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After successfully installing GRUB, update it with:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  update-grub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command scans for installed operating systems and generates a new configuration file for GRUB.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Verify Boot Entries
&lt;/h3&gt;

&lt;p&gt;To ensure that everything is set up correctly, check the EFI boot manager:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;efibootmgr &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see an entry for Ubuntu in the boot order. If it’s not there or not prioritized correctly, you may need to adjust it using &lt;code&gt;efibootmgr&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Reboot and Test
&lt;/h3&gt;

&lt;p&gt;After completing these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Exit the terminal and reboot your computer.&lt;/li&gt;
&lt;li&gt;Remove the installation media when prompted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Upon rebooting, you should see the GRUB menu allowing you to select either Ubuntu or Windows.&lt;/p&gt;

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

&lt;p&gt;Fixing GRUB in a dual-boot setup with Windows and Linux can seem daunting, but following these steps can help restore access to your Linux installation. By using Ubuntu installation media and executing a few commands in the terminal, you can resolve boot issues and enjoy seamless switching between operating systems.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Zr9oyWjD6IA"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;For detailed visual guidance, check out the video linked above. Happy dual booting!&lt;/p&gt;

</description>
      <category>linux</category>
      <category>dualboot</category>
      <category>linuxmint</category>
      <category>ubuntu</category>
    </item>
    <item>
      <title>How to Fix "LuLu's Network Extension Is Not Running" on Mac</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Sat, 02 Nov 2024 07:37:23 +0000</pubDate>
      <link>https://dev.to/shawon/how-to-fix-lulus-network-extension-is-not-running-on-mac-4j0g</link>
      <guid>https://dev.to/shawon/how-to-fix-lulus-network-extension-is-not-running-on-mac-4j0g</guid>
      <description>&lt;p&gt;If you're encountering the message&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;LuLu's Network Extension Is Not Running. Extensions must be manually approved via Security &amp;amp; Privacy System Preferences&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;when trying to open LuLu on your Mac, don't worry! This guide will walk you through the steps to manually approve the extension via System Preferences.&lt;/p&gt;

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

&lt;p&gt;LuLu is a free, open-source firewall for macOS that aims to block unauthorized outgoing connections. It uses a network extension to monitor and control these connections, which sometimes requires manual approval from the user.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps to Approve LuLu's Network Extension
&lt;/h2&gt;

&lt;p&gt;Follow these steps to enable LuLu's network extension:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Open System Settings&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on the Apple menu in the top-left corner of your screen and select &lt;strong&gt;System Settings&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Navigate to Login Items &amp;amp; Extensions&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the System Settings sidebar, click on &lt;strong&gt;General&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Scroll down and select &lt;strong&gt;Login Items &amp;amp; Extensions&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Locate Network Extensions&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Under the Extensions section, find &lt;strong&gt;Network Extensions&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click on the &lt;strong&gt;(i)&lt;/strong&gt; button next to it to access more details.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Enable LuLu&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If LuLu is listed, toggle it on. If it does not appear, you may need to run another application that uses network extensions (like DNSMonitor) from the Terminal to trigger the approval prompt.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Authenticate Changes&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You might be prompted to enter your administrator password to authorize changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Restart LuLu&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After enabling the extension, restart LuLu to ensure it is running properly.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Additional Troubleshooting
&lt;/h2&gt;

&lt;p&gt;If you do not see LuLu in the Network Extensions list, consider running DNSMonitor as a workaround. Here’s how:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download DNSMonitor from GitHub.&lt;/li&gt;
&lt;li&gt;Open Terminal and execute the following commands:&lt;/li&gt;
&lt;/ol&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
bash
   cd /Applications/DNSMonitor.app/Contents/MacOS/
   ./DNSMonitor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>Claude prompting guide - General tips for effective prompting</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Wed, 30 Oct 2024 05:19:16 +0000</pubDate>
      <link>https://dev.to/shawon/claude-prompting-guide-general-tips-for-effective-prompting-5hi5</link>
      <guid>https://dev.to/shawon/claude-prompting-guide-general-tips-for-effective-prompting-5hi5</guid>
      <description>&lt;h3&gt;
  
  
  1. Be clear and specific
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Clearly state your task or question at the beginning of your message.&lt;/li&gt;
&lt;li&gt;Provide context and details to help Claude understand your needs.&lt;/li&gt;
&lt;li&gt;Break complex tasks into smaller, manageable steps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
   &lt;br&gt;
   "Help me with a presentation."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
   &lt;br&gt;
   "I need help creating a 10-slide presentation for our quarterly sales meeting. The presentation should cover our Q2 sales performance, top-selling products, and sales targets for Q3. Please provide an outline with key points for each slide."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Why it's better: The good prompt provides specific details about the task, including the number of slides, the purpose of the presentation, and the key topics to be covered.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Use examples
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Provide examples of the kind of output you're looking for.&lt;/li&gt;
&lt;li&gt;If you want a specific format or style, show Claude an example.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
   &lt;br&gt;
   "Write a professional email."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
   &lt;br&gt;
   "I need to write a professional email to a client about a project delay. Here's a similar email I've sent before:&lt;/p&gt;

&lt;p&gt;'Dear [Client],&lt;br&gt;
   I hope this email finds you well. I wanted to update you on the progress of [Project Name]. Unfortunately, we've encountered an unexpected issue that will delay our completion date by approximately two weeks. We're working diligently to resolve this and will keep you updated on our progress.&lt;br&gt;
   Please let me know if you have any questions or concerns.&lt;br&gt;
   Best regards,&lt;br&gt;
   [Your Name]'&lt;/p&gt;

&lt;p&gt;Help me draft a new email following a similar tone and structure, but for our current situation where we're delayed by a month due to supply chain issues."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Why it's better: The good prompt provides a concrete example of the desired style and tone, giving Claude a clear reference point for the new email.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Encourage thinking
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;For complex tasks, ask Claude to "think step-by-step" or "explain your reasoning."&lt;/li&gt;
&lt;li&gt;This can lead to more accurate and detailed responses.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
   &lt;br&gt;
   "How can I improve team productivity?"&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
   &lt;br&gt;
   "I'm looking to improve my team's productivity. Think through this step-by-step, considering the following factors:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Current productivity blockers (e.g., too many meetings, unclear priorities)&lt;/li&gt;
&lt;li&gt;Potential solutions (e.g., time management techniques, project management tools)&lt;/li&gt;
&lt;li&gt;Implementation challenges&lt;/li&gt;
&lt;li&gt;Methods to measure improvement&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For each step, please provide a brief explanation of your reasoning. Then summarize your ideas at the end."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Why it's better: The good prompt asks Claude to think through the problem systematically, providing a guided structure for the response and asking for explanations of the reasoning process. It also prompts Claude to create a summary at the end for easier reading.&lt;/p&gt;
&lt;h3&gt;
  
  
  4. Iterative refinement
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;If Claude's first response isn't quite right, ask for clarifications or modifications.&lt;/li&gt;
&lt;li&gt;You can always say "That's close, but can you adjust X to be more like Y?"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
   &lt;br&gt;
   "Make it better."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
   &lt;br&gt;
   "That’s a good start, but please refine it further. Make the following adjustments:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make the tone more casual and friendly&lt;/li&gt;
&lt;li&gt;Add a specific example of how our product has helped a customer&lt;/li&gt;
&lt;li&gt;Shorten the second paragraph to focus more on the benefits rather than the features"
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why it's better: The good prompt provides specific feedback and clear instructions for improvements, allowing Claude to make targeted adjustments instead of just relying on Claude’s innate sense of what “better” might be — which is likely different from the user’s definition!&lt;/p&gt;
&lt;h3&gt;
  
  
  5. Leverage Claude's knowledge
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Claude has broad knowledge across many fields. Don't hesitate to ask for explanations or background information&lt;/li&gt;
&lt;li&gt;Be sure to include relevant context and details so that Claude’s response is maximally targeted to be helpful&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
   &lt;br&gt;
   "What is marketing? How do I do it?"&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
   &lt;br&gt;
   "I'm developing a marketing strategy for a new eco-friendly cleaning product line. Can you provide an overview of current trends in green marketing? Please include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Key messaging strategies that resonate with environmentally conscious consumers&lt;/li&gt;
&lt;li&gt;Effective channels for reaching this audience&lt;/li&gt;
&lt;li&gt;Examples of successful green marketing campaigns from the past year&lt;/li&gt;
&lt;li&gt;Potential pitfalls to avoid (e.g., greenwashing accusations)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This information will help me shape our marketing approach."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Why it's better: The good prompt asks for specific, contextually relevant  information that leverages Claude's broad knowledge base. It provides context for how the information will be used, which helps Claude frame its answer in the most relevant way.&lt;/p&gt;
&lt;h3&gt;
  
  
  6. Use role-playing
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Ask Claude to adopt a specific role or perspective when responding.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
   &lt;br&gt;
   "Help me prepare for a negotiation."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
   &lt;br&gt;
   "You are a fabric supplier for my backpack manufacturing company. I'm preparing for a negotiation with this supplier to reduce prices by 10%. As the supplier, please provide:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Three potential objections to our request for a price reduction&lt;/li&gt;
&lt;li&gt;For each objection, suggest a counterargument from my perspective&lt;/li&gt;
&lt;li&gt;Two alternative proposals the supplier might offer instead of a straight price cut&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then, switch roles and provide advice on how I, as the buyer, can best approach this negotiation to achieve our goal."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Why it's better: This prompt uses role-playing to explore multiple perspectives of the negotiation, providing a more comprehensive preparation. Role-playing also encourages Claude to more readily adopt the nuances of specific perspectives, increasing the intelligence and performance of Claude’s response.&lt;/p&gt;
&lt;h2&gt;
  
  
  Task-specific tips and examples
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Content Creation
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Specify your audience&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Tell Claude who the content is for.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
   &lt;br&gt;
   "Write something about cybersecurity."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
   &lt;br&gt;
   "I need to write a blog post about cybersecurity best practices for small business owners. The audience is not very tech-savvy, so the content should be:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Easy to understand, avoiding technical jargon where possible&lt;/li&gt;
&lt;li&gt;Practical, with actionable tips they can implement quickly&lt;/li&gt;
&lt;li&gt;Engaging and slightly humorous to keep their interest&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Please provide an outline for a 1000-word blog post that covers the top 5 cybersecurity practices these business owners should adopt."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Why it's better: The good prompt specifies the audience, desired tone, and key characteristics of the content, giving Claude clear guidelines for creating appropriate and effective output.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Define the tone and style&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Describe the desired tone.&lt;/li&gt;
&lt;li&gt;If you have a style guide, mention key points from it.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
   &lt;br&gt;
   "Write a product description."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
   &lt;br&gt;
   "Please help me write a product description for our new ergonomic office chair. Use a professional but engaging tone. Our brand voice is friendly, innovative, and health-conscious. The description should:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Highlight the chair's key ergonomic features&lt;/li&gt;
&lt;li&gt;Explain how these features benefit the user's health and productivity&lt;/li&gt;
&lt;li&gt;Include a brief mention of the sustainable materials used&lt;/li&gt;
&lt;li&gt;End with a call-to-action encouraging readers to try the chair&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Aim for about 200 words."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Why it's better: This prompt provides clear guidance on the tone, style, and specific elements to include in the product description.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Define output structure&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Provide a basic outline or list of points you want covered.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
   &lt;br&gt;
   "Create a presentation on our company results."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
   &lt;br&gt;
   "I need to create a presentation on our Q2 results. Structure this with the following sections:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Overview&lt;/li&gt;
&lt;li&gt;Sales Performance&lt;/li&gt;
&lt;li&gt;Customer Acquisition&lt;/li&gt;
&lt;li&gt;Challenges&lt;/li&gt;
&lt;li&gt;Q3 Outlook&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For each section, suggest 3-4 key points to cover, based on typical business presentations. Also, recommend one type of data visualization (e.g., graph, chart) that would be effective for each section."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Why it's better: This prompt provides a clear structure and asks for specific elements (key points and data visualizations) for each section.&lt;/p&gt;
&lt;h3&gt;
  
  
  Document summary and Q&amp;amp;A
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Be specific about what you want&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ask for a summary of specific aspects or sections of the document.&lt;/li&gt;
&lt;li&gt;Frame your questions clearly and directly.&lt;/li&gt;
&lt;li&gt;Be sure to specify what kind of summary (output structure, content type) you want&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use the document names&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Refer to attached documents by name.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Ask for citations&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Request that Claude cites specific parts of the document in its answers.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is an example that combines all three of the above techniques:&lt;/p&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
   &lt;br&gt;
   "Summarize this report for me."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
   &lt;br&gt;
   "I've attached a 50-page market research report called 'Tech Industry Trends 2023'. Can you provide a 2-paragraph summary focusing on AI and machine learning trends? Then, please answer these questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What are the top 3 AI applications in business for this year?&lt;/li&gt;
&lt;li&gt;How is machine learning impacting job roles in the tech industry?&lt;/li&gt;
&lt;li&gt;What potential risks or challenges does the report mention regarding AI adoption?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Please cite specific sections or page numbers when answering these questions."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Why it's better: This prompt specifies the exact focus of the summary, provides specific questions, and asks for citations, ensuring a more targeted and useful response. It also indicates the ideal summary output structure, such as limiting the response to 2 paragraphs.&lt;/p&gt;
&lt;h3&gt;
  
  
  Data analysis and visualization
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Specify the desired format&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Clearly describe the format you want the data in.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
   &lt;br&gt;
   "Analyze our sales data."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
   &lt;br&gt;
   "I've attached a spreadsheet called 'Sales Data 2023'. Can you analyze this data and present the key findings in the following format:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Executive Summary (2-3 sentences)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Key Metrics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Total sales for each quarter&lt;/li&gt;
&lt;li&gt;Top-performing product category&lt;/li&gt;
&lt;li&gt;Highest growth region&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Trends:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;List 3 notable trends, each with a brief explanation&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Recommendations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provide 3 data-driven recommendations, each with a brief rationale&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After the analysis, suggest three types of data visualizations that would effectively communicate these findings."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Why it's better: This prompt provides a clear structure for the analysis, specifies key metrics to focus on, and asks for recommendations and visualization suggestions for further formatting.&lt;/p&gt;
&lt;h3&gt;
  
  
  Brainstorming
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Use Claude to generate ideas by asking for a list of possibilities or alternatives.

&lt;ul&gt;
&lt;li&gt;Be specific about what topics you want Claude to cover in its brainstorming&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
   &lt;br&gt;
   "Give me some team-building ideas."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
   &lt;br&gt;
   "We need to come up with team-building activities for our remote team of 20 people. Can you help me brainstorm by:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Suggesting 10 virtual team-building activities that promote collaboration&lt;/li&gt;
&lt;li&gt;For each activity, briefly explain how it fosters teamwork&lt;/li&gt;
&lt;li&gt;Indicate which activities are best for:
  a) Ice-breakers
  b) Improving communication
  c) Problem-solving skills&lt;/li&gt;
&lt;li&gt;Suggest one low-cost option and one premium option."
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why it's better: This prompt provides specific parameters for the brainstorming session, including the number of ideas, type of activities, and additional categorization, resulting in a more structured and useful output.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Request responses in specific formats like bullet points, numbered lists, or tables for easier reading.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Bad Prompt:&lt;br&gt;
   &lt;br&gt;
   "Compare project management software options."&lt;br&gt;
   &lt;/p&gt;

&lt;p&gt;Good Prompt:&lt;br&gt;
   &lt;br&gt;
   "We're considering three different project management software options: Asana, Trello, and Microsoft Project. Can you compare these in a table format using the following criteria:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Key Features&lt;/li&gt;
&lt;li&gt;Ease of Use&lt;/li&gt;
&lt;li&gt;Scalability&lt;/li&gt;
&lt;li&gt;Pricing (include specific plans if possible)&lt;/li&gt;
&lt;li&gt;Integration capabilities&lt;/li&gt;
&lt;li&gt;Best suited for (e.g., small teams, enterprise, specific industries)"
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why it's better: This prompt requests a specific structure (table) for the comparison, provides clear criteria, making the information easy to understand and apply.&lt;/p&gt;
&lt;h2&gt;
  
  
  Troubleshooting, minimizing hallucinations, and maximizing performance
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Allow Claude to acknowledge uncertainty&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tell Claude that it should say it doesn’t know if it doesn’t know. Ex. “If you're unsure about something, it's okay to admit it. Just say you don’t know.”&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Break down complex tasks&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If a task seems too large and Claude is missing steps or not performing certain steps well, break it into smaller steps and work through them with Claude one message at a time.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Include all contextual information for new requests&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude doesn't retain information from previous conversations, so include all necessary context in each new conversation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Example good vs. bad prompt examples
&lt;/h2&gt;

&lt;p&gt;These are more examples that combine multiple prompting techniques to showcase the stark difference between ineffective and highly effective prompts.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example 1: Marketing strategy development
&lt;/h3&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
&lt;br&gt;
"Help me create a marketing strategy."&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
&lt;br&gt;
"As a senior marketing consultant, I need your help developing a comprehensive marketing strategy for our new eco-friendly smartphone accessory line. Our target audience is environmentally conscious millennials and Gen Z consumers. Please provide a detailed strategy that includes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Market Analysis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Current trends in eco-friendly tech accessories&lt;/li&gt;
&lt;li&gt;2-3 key competitors and their strategies&lt;/li&gt;
&lt;li&gt;Potential market size and growth projections&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Target Audience Persona:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Detailed description of our ideal customer&lt;/li&gt;
&lt;li&gt;Their pain points and how our products solve them&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Marketing Mix:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Product: Key features to highlight&lt;/li&gt;
&lt;li&gt;Price: Suggested pricing strategy with rationale&lt;/li&gt;
&lt;li&gt;Place: Recommended distribution channels&lt;/li&gt;
&lt;li&gt;Promotion: 
a) 5 marketing channels to focus on, with pros and cons for each
b) 3 creative campaign ideas for launch&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Content Strategy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;5 content themes that would resonate with our audience&lt;/li&gt;
&lt;li&gt;Suggested content types (e.g., blog posts, videos, infographics)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;KPIs and Measurement:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;5 key metrics to track&lt;/li&gt;
&lt;li&gt;Suggested tools for measuring these metrics&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Please present this information in a structured format with headings and bullet points. Where relevant, explain your reasoning or provide brief examples.&lt;/p&gt;

&lt;p&gt;After outlining the strategy, please identify any potential challenges or risks we should be aware of, and suggest mitigation strategies for each."&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Why it's better: This prompt combines multiple techniques including role assignment, specific task breakdown, structured output request, brainstorming (for campaign ideas and content themes), and asking for explanations. It provides clear guidelines while allowing room for Claude's analysis and creativity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 2: Financial report analysis
&lt;/h3&gt;

&lt;p&gt;Bad prompt:&lt;br&gt;
&lt;br&gt;
"Analyze this financial report."&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Good prompt:&lt;br&gt;
&lt;br&gt;
"I've attached our company's Q2 financial report titled 'Q2_2023_Financial_Report.pdf'. Act as a seasoned CFO and analyze this report and prepare a briefing for our board of directors. Please structure your analysis as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Executive Summary (3-4 sentences highlighting key points)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Financial Performance Overview:&lt;br&gt;
a) Revenue: Compare to previous quarter and same quarter last year&lt;br&gt;
b) Profit margins: Gross and Net, with explanations for any significant changes&lt;br&gt;
c) Cash flow: Highlight any concerns or positive developments&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Key Performance Indicators:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;List our top 5 KPIs and their current status (Use a table format)&lt;/li&gt;
&lt;li&gt;For each KPI, provide a brief explanation of its significance and any notable trends&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Segment Analysis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Break down performance by our three main business segments&lt;/li&gt;
&lt;li&gt;Identify the best and worst performing segments, with potential reasons for their performance&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Balance Sheet Review:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Highlight any significant changes in assets, liabilities, or equity&lt;/li&gt;
&lt;li&gt;Calculate and interpret key ratios (e.g., current ratio, debt-to-equity)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Forward-Looking Statements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Based on this data, provide 3 key predictions for Q3&lt;/li&gt;
&lt;li&gt;Suggest 2-3 strategic moves we should consider to improve our financial position&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Risk Assessment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identify 3 potential financial risks based on this report&lt;/li&gt;
&lt;li&gt;Propose mitigation strategies for each risk&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Peer Comparison:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compare our performance to 2-3 key competitors (use publicly available data)&lt;/li&gt;
&lt;li&gt;Highlight areas where we're outperforming and areas for improvement&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Please use charts or tables where appropriate to visualize data. For any assumptions or interpretations you make, please clearly state them and provide your reasoning.&lt;/p&gt;

&lt;p&gt;After completing the analysis, please generate 5 potential questions that board members might ask about this report, along with suggested responses.&lt;/p&gt;

&lt;p&gt;Finally, summarize this entire analysis into a single paragraph that I can use as an opening statement in the board meeting."&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Why it's better: This prompt combines role-playing (as CFO), structured output, specific data analysis requests, predictive analysis, risk assessment, comparative analysis, and even anticipates follow-up questions. It provides a clear framework while encouraging deep analysis and strategic thinking.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>promptengineering</category>
      <category>claude</category>
    </item>
    <item>
      <title>Overcoming Upload Limits: A Guide for WordPress Developers Using MAMP</title>
      <dc:creator>Shawon Saha</dc:creator>
      <pubDate>Sat, 26 Oct 2024 09:17:42 +0000</pubDate>
      <link>https://dev.to/shawon/overcoming-upload-limits-a-guide-for-wordpress-developers-using-mamp-h3i</link>
      <guid>https://dev.to/shawon/overcoming-upload-limits-a-guide-for-wordpress-developers-using-mamp-h3i</guid>
      <description>&lt;p&gt;As a WordPress developer, you've likely encountered the frustrating "413 Request Entity Too Large" error or a similar message about exceeding upload limits. This issue often crops up when trying to upload large themes or plugins, and it can bring your workflow to a screeching halt. But fear not! In this post, we'll walk through the steps to increase your upload limits and get you back to building amazing websites.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Problem
&lt;/h2&gt;

&lt;p&gt;The root of this issue lies in the default settings of your server environment. Both NGINX (the web server) and PHP (the scripting language) have their own file size limits, which can be quite restrictive out of the box. When you try to upload a file that exceeds these limits, you'll encounter errors like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"413 Request Entity Too Large" (from NGINX)&lt;/li&gt;
&lt;li&gt;"POST Content-Length of X bytes exceeds the limit of Y bytes" (from PHP)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Solution: Adjusting Server Configurations
&lt;/h2&gt;

&lt;p&gt;To resolve this issue, we need to modify both NGINX and PHP configurations. Here's a step-by-step guide:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Increase NGINX File Size Limit
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open your NGINX configuration file. In MAMP, it's typically located at:&lt;br&gt;
&lt;code&gt;/Applications/MAMP/conf/nginx/nginx.conf&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the following line within the &lt;code&gt;http&lt;/code&gt; block:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   client_max_body_size 64M;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows file uploads up to 64 megabytes. Adjust the value as needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Modify PHP Settings
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Locate your &lt;code&gt;php.ini&lt;/code&gt; file. In MAMP, you'll find it at:&lt;br&gt;
&lt;code&gt;/Applications/MAMP/bin/php/phpX.X.XX/conf/php.ini&lt;/code&gt;&lt;br&gt;
(Replace X.X.XX with your PHP version)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find and modify these lines:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   upload_max_filesize = 64M
   post_max_size = 64M
   max_execution_time = 300
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If these lines don't exist, add them. The max_execution_time setting allows for longer upload times.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Increase WordPress Memory Limit
&lt;/h3&gt;

&lt;p&gt;For an extra boost, you can increase WordPress's PHP memory limit:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your &lt;code&gt;wp-config.php&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Add this line:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   define('WP_MEMORY_LIMIT', '256M');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;After making these changes, restart MAMP to apply the new settings. You should now be able to upload larger files without encountering those pesky size limit errors.&lt;/p&gt;

&lt;p&gt;Remember:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Increasing these limits can be helpful for &lt;strong&gt;development purposes&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Consider &lt;strong&gt;security and performance implications&lt;/strong&gt; when setting up a production server&lt;/li&gt;
&lt;li&gt;Always &lt;strong&gt;consult with your hosting provider&lt;/strong&gt; or system administrator before making similar changes on a live site&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Takeaways:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Modify NGINX configuration to increase &lt;code&gt;client_max_body_size&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Adjust PHP settings in &lt;code&gt;php.ini&lt;/code&gt; for larger uploads and longer execution times&lt;/li&gt;
&lt;li&gt;Optionally increase WordPress memory limit in &lt;code&gt;wp-config.php&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>wordpress</category>
    </item>
  </channel>
</rss>
