<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Dhenmark Arquiza</title>
    <description>The latest articles on Forem by Dhenmark Arquiza (@arquizade).</description>
    <link>https://forem.com/arquizade</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%2F332373%2F031925ee-96e5-4e54-a679-09bd7c7539b6.jpeg</url>
      <title>Forem: Dhenmark Arquiza</title>
      <link>https://forem.com/arquizade</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/arquizade"/>
    <language>en</language>
    <item>
      <title>Practices for Descriptive Naming Conventions in PHP: A Guide for Writing Clean and Readable Code</title>
      <dc:creator>Dhenmark Arquiza</dc:creator>
      <pubDate>Thu, 05 Sep 2024 10:56:46 +0000</pubDate>
      <link>https://forem.com/arquizade/practices-for-descriptive-naming-conventions-in-php-a-guide-for-writing-clean-and-readable-code-1cji</link>
      <guid>https://forem.com/arquizade/practices-for-descriptive-naming-conventions-in-php-a-guide-for-writing-clean-and-readable-code-1cji</guid>
      <description>&lt;p&gt;Descriptive naming conventions help make your code more readable, maintainable, and self-documenting. By using names that clearly communicate the purpose of variables, functions, and classes, you help both yourself and others understand your code without needing extra comments or explanation.&lt;/p&gt;

&lt;p&gt;Here’s how you can adopt descriptive naming conventions with practical guidelines and examples in PHP:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Use Nouns for Class Names
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Class names should represent the entities they manage. A descriptive class name clarifies the role of the class in your system.&lt;/li&gt;
&lt;li&gt;Use PascalCase for class names.&lt;/li&gt;
&lt;li&gt;Use names that reflect the object or responsibility of the class.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Examples:
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;UserAccountManager&lt;/code&gt;: A class responsible for managing user accounts.&lt;br&gt;
&lt;code&gt;InvoiceGenerator&lt;/code&gt;: A class that handles the generation of invoices.&lt;br&gt;
&lt;code&gt;ShoppingCart&lt;/code&gt;: A class that represents the shopping cart system.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Use Verbs for Function and Method Names
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Methods perform actions, so they should be named with verbs or verb phrases that describe what they do.&lt;/li&gt;
&lt;li&gt;Use camelCase for method and function names.&lt;/li&gt;
&lt;li&gt;Prefix with verbs like &lt;code&gt;get&lt;/code&gt;, &lt;code&gt;set&lt;/code&gt;, &lt;code&gt;create&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt;, &lt;code&gt;delete&lt;/code&gt;, &lt;code&gt;is&lt;/code&gt;, &lt;code&gt;has&lt;/code&gt;, etc., for clarity.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Examples:
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;createUser()&lt;/code&gt;: Clearly states that this function creates a user.&lt;br&gt;
&lt;code&gt;calculateTotalAmount()&lt;/code&gt;: Describes the action of calculating the total amount.&lt;br&gt;
&lt;code&gt;isUserLoggedIn()&lt;/code&gt;: A method that checks whether the user is logged in.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Be Specific with Variable Names
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Variables should indicate what they store or represent.&lt;/li&gt;
&lt;li&gt;Avoid short or ambiguous names like &lt;code&gt;$x&lt;/code&gt;, &lt;code&gt;$val&lt;/code&gt;, &lt;code&gt;$data&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Use camelCase for variable names.&lt;/li&gt;
&lt;li&gt;Think about scope and intent of the variable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Examples:
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$totalOrderAmount&lt;/code&gt;: Stores the total amount for an order.&lt;br&gt;
&lt;code&gt;$userEmailAddress&lt;/code&gt;: Clearly shows it holds the email address of a user.&lt;br&gt;
&lt;code&gt;$invoiceItems&lt;/code&gt;: Represents the items in an invoice, not just generic $items.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Avoid Overly General Names
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Avoid names like &lt;code&gt;$data&lt;/code&gt;, &lt;code&gt;$info&lt;/code&gt;, &lt;code&gt;$result&lt;/code&gt; unless they are exceptionally meaningful in that context.&lt;/li&gt;
&lt;li&gt;Provide specific context where appropriate, such as &lt;code&gt;$userData&lt;/code&gt;, &lt;code&gt;$productInfo&lt;/code&gt;, or &lt;code&gt;$searchResult&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Boolean Variables Should Ask a Question
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If a variable is boolean, its name should reflect a true/false question.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;is&lt;/code&gt;, &lt;code&gt;has&lt;/code&gt;, &lt;code&gt;should&lt;/code&gt;, &lt;code&gt;can&lt;/code&gt; as prefixes to make it clear it’s a boolean.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Examples:
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$isActive&lt;/code&gt;: Clearly suggests it's a boolean for checking if something is active.&lt;br&gt;
&lt;code&gt;$hasAccess&lt;/code&gt;: Checks whether a user has access to a resource.&lt;br&gt;
&lt;code&gt;$canEdit&lt;/code&gt;: Indicates whether the current user can edit an item.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Constants Should Be Descriptive and Specific
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Constants should reflect immutable values and be written in UPPERCASE_SNAKE_CASE.&lt;/li&gt;
&lt;li&gt;Avoid generic names like &lt;code&gt;DEFAULT_VALUE&lt;/code&gt;, and prefer more descriptive ones.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Examples:
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;MAX_LOGIN_ATTEMPTS&lt;/code&gt;: Clearly describes the maximum allowed login attempts.&lt;br&gt;
&lt;code&gt;DEFAULT_CURRENCY_CODE&lt;/code&gt;: Describes the currency code used in transactions.&lt;br&gt;
&lt;code&gt;ERROR_CODE_INVALID_EMAIL&lt;/code&gt;: A descriptive error code that relates to email validation failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Collection Naming
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If a variable represents a collection (e.g., an array of items), make it clear by using plural nouns or adding the word list.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Examples:
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$userList&lt;/code&gt;: A collection of users.&lt;br&gt;
&lt;code&gt;$products&lt;/code&gt;: A collection of product objects.&lt;br&gt;
&lt;code&gt;$orderItems&lt;/code&gt;: An array of items in an order.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ShoppingCart&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nv"&gt;$cartItems&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nv"&gt;$totalCartValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;addItemToCart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$productId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$quantity&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nv"&gt;$itemPrice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getProductPriceById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$productId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;cartItems&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="s1"&gt;'productId'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$productId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s1"&gt;'quantity'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$quantity&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s1"&gt;'price'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$itemPrice&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>php</category>
      <category>development</category>
      <category>code</category>
      <category>writing</category>
    </item>
    <item>
      <title>Setup your laravel 11 in windows</title>
      <dc:creator>Dhenmark Arquiza</dc:creator>
      <pubDate>Thu, 05 Sep 2024 09:05:59 +0000</pubDate>
      <link>https://forem.com/arquizade/setup-your-laravel-11-in-windows-3445</link>
      <guid>https://forem.com/arquizade/setup-your-laravel-11-in-windows-3445</guid>
      <description>&lt;p&gt;Before you start crafting your masterpiece, let's ensure your development environment is shipshape! In this guide, we'll walk you through setting up your workspace for the latest version of Laravel.&lt;/p&gt;

&lt;p&gt;Think of it as prepping your canvas before painting your next masterpiece! We'll make sure all the tools and dependencies are in place for a smooth sail.&lt;/p&gt;

&lt;h3&gt;
  
  
  First, set up your terminal using WSL
&lt;/h3&gt;

&lt;h4&gt;
  
  
  a. Enable WSL2 Feature
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Open PowerShell as Administrator.&lt;/li&gt;
&lt;li&gt;Run the following command to enable the Virtual Machine Platform feature:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  b. Download and Install Ubuntu from Microsoft Store:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Open the Microsoft Store.&lt;/li&gt;
&lt;li&gt;Search for "Ubuntu" and select the version you want (e.g., Ubuntu 20.04 LTS).&lt;/li&gt;
&lt;li&gt;Click "Install" and wait for the installation to complete.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  c. Initialize Ubuntu:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Launch Ubuntu from the Start menu or use windows terminal.&lt;/li&gt;
&lt;li&gt;Wait for the installation to complete, then create a new user and password when prompted.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  d. Update and Upgrade Packages:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Run the following commands to update the package lists and upgrade existing packages:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>laravel</category>
      <category>wsl</category>
      <category>windows</category>
    </item>
    <item>
      <title>Why brave browser?</title>
      <dc:creator>Dhenmark Arquiza</dc:creator>
      <pubDate>Thu, 28 Mar 2024 22:22:28 +0000</pubDate>
      <link>https://forem.com/arquizade/why-brave-browser-3j9h</link>
      <guid>https://forem.com/arquizade/why-brave-browser-3j9h</guid>
      <description>&lt;p&gt;TL;DR: After using Brave for a month, I'm impressed. It's like a fresh take on the familiar Chromium technology I was used to with Chrome. But let's reminisce about the old days of Internet Explorer, Firefox's vibrant interface, and Chrome's blazing speed (even if it sometimes overheated my PC). Now, with web3 tech on the rise, Brave caught my attention with its cool look and helpful features for everyday tasks. Let's dive into the details of why Brave is worth your attention.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Brave Browser?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Brave Browser is a fast, secure, and privacy-focused web browser built on the Chromium engine.&lt;/li&gt;
&lt;li&gt;It offers a range of features designed to enhance user experience and protect privacy.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Ad Blocking: Brave blocks intrusive ads and trackers by default, resulting in a cleaner and faster browsing experience.&lt;/li&gt;
&lt;li&gt;Brave Rewards: Users can opt into Brave Rewards to earn cryptocurrency for viewing privacy-respecting ads, providing a new way to support content creators.&lt;/li&gt;
&lt;li&gt;Privacy Protection: Built-in features such as HTTPS Everywhere and fingerprinting protection ensure user data remains private and secure.&lt;/li&gt;
&lt;li&gt;Speed and Efficiency: By blocking unnecessary scripts and trackers, Brave Browser delivers lightning-fast browsing speeds while reducing data usage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why Choose Brave?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Privacy: Brave prioritizes user privacy, ensuring that personal data is protected from third-party tracking and surveillance.&lt;/li&gt;
&lt;li&gt;Performance: With its ad-blocking capabilities and focus on efficiency, Brave Browser offers a faster and smoother browsing experience compared to traditional browsers.&lt;/li&gt;
&lt;li&gt;Innovation: Brave Rewards introduces a new model for online advertising, empowering users to control their browsing experience while supporting content creators.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  As a developer, Brave Browser has become my go-to choice for a few key reasons:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;No Interruptions: When I'm coding, music keeps me in the zone. With Brave's adblocker, I can listen without any annoying interruptions. Plus, when I'm learning from YouTube tutorials, I can focus better without those pesky ads popping up.&lt;/li&gt;
&lt;li&gt;Familiar Tools, Better Experience: I was pleasantly surprised to find that Brave's DevTools are just like Chrome's. So, I get all the benefits I'm used to, but with Brave's added features and speed.&lt;/li&gt;
&lt;li&gt;No Need for Extra Extensions: Brave comes with all the essential extensions built-in, so I don't have to clutter up my browser with extras. It's convenient and saves me time.&lt;/li&gt;
&lt;li&gt;Earn While You Browse: One of the coolest things about Brave is its rewards system. Just by using the browser, I can earn cryptocurrency through BAT. It's like getting a little bonus for doing what I'd be doing anyway.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short, Brave Browser is a game-changer for developers like me. It's simple, efficient, and adds a little extra perk to my browsing experience.&lt;/p&gt;

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

&lt;p&gt;Brave Browser offers a compelling combination of privacy, speed, and innovation that makes it the browser of choice for users seeking a better online experience. Whether you're concerned about privacy, tired of intrusive ads, or simply looking for a faster browsing experience, Brave Browser has something to offer. Join me in making the switch to Brave and experience the future of browsing today.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>browser</category>
      <category>productivity</category>
      <category>development</category>
    </item>
  </channel>
</rss>
