Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      June 2, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      June 2, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 2, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 2, 2025

      How Red Hat just quietly, radically transformed enterprise server Linux

      June 2, 2025

      OpenAI wants ChatGPT to be your ‘super assistant’ – what that means

      June 2, 2025

      The best Linux VPNs of 2025: Expert tested and reviewed

      June 2, 2025

      One of my favorite gaming PCs is 60% off right now

      June 2, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      `document.currentScript` is more useful than I thought.

      June 2, 2025
      Recent

      `document.currentScript` is more useful than I thought.

      June 2, 2025

      Adobe Sensei and GenAI in Practice for Enterprise CMS

      June 2, 2025

      Over The Air Updates for React Native Apps

      June 2, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      You can now open ChatGPT on Windows 11 with Win+C (if you change the Settings)

      June 2, 2025
      Recent

      You can now open ChatGPT on Windows 11 with Win+C (if you change the Settings)

      June 2, 2025

      Microsoft says Copilot can use location to change Outlook’s UI on Android

      June 2, 2025

      TempoMail — Command Line Temporary Email in Linux

      June 2, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Tech & Work»Coded Smorgasbord: The Saddest Words: What If

    Coded Smorgasbord: The Saddest Words: What If

    January 8, 2025

    Conditional statements, we would hope, are one of the most basic and well understood constructs in any programming language. Hope, of course, is for fools and suckers, so let’s take a look at a few short snippets.

    Our first installment comes from Jonas.

    if (!checkAndDelete(Definitions.DirectoryName, currentTime)); //Empty statement
    

    I appreciate the comment, which informs us that this empty statement is intentional. Why it’s intentional remains mysterious.

    Jonas found this while going through linter warnings. After fixing this, there are only 25,000 more warnings to go.

    Brodey has a similar construct, but from a very different language.

    If (Session.Item(Session.SessionID & "Origional") IsNot Nothing) Then
    End If
    

    I have to give bonus points for the origional spelling of “original”. But spelling aside, there’s a hint of something sinister here- we’re concatenating strings with the SessionId– I don’t know what is going wrong here, but it’s definitely something.

    Our last little snippet comes from Midiane. While not a conditional, it shows a misunderstanding of either booleans or comments.

    $mail->SMTPAuth = false; // turn on SMTP authentication
    

    The comment clearly is out of date with the code (which is the main reason we shouldn’t repeat what is in the code as a comment). At least, we hope the comment is just out of date. A worse scenario is that setting the flag equal to false enables it.

    [Advertisement] Picking up NuGet is easy. Getting good at it takes time. Download our guide to learn the best practice of NuGet for the Enterprise.

    Source: Read More 

    Hostinger
    news
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleXbox and Microsoft pledge to double down on Windows improvements for gamers, as Valve’s Steam OS turns up the heat — now faced with real competition, it’s time for Windows change
    Next Article Ubisoft breaks down the fundamentals of parkour for Assassin’s Creed Shadows

    Related Posts

    Tech & Work

    Sunshine And March Vibes (2025 Wallpapers Edition)

    June 2, 2025
    Tech & Work

    The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

    June 2, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    How eBay built a bridge between brand and product with Figma

    Web Development

    CVE-2025-2069 – FileZ Cross-Site Scripting (XSS)

    Common Vulnerabilities and Exposures (CVEs)

    What are important test scenarios specific to Universal Windows Platform (UWP) application?

    Development

    CVE-2025-48377 – DNN Cross-Site Scripting Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    Empower Users to Create Better Content

    August 16, 2024

    Learn how to integrate Adobe Express’ editing and Firefly-powered AI capabilities into your own web…

    Xiaomi Android Devices Hit by Multiple Flaws Across Apps and System Components

    May 6, 2024

    Massive AT&T Data Breach: Call and Text Records of ‘Nearly All’ Customers Compromised

    July 12, 2024

    CVE-2025-36521 – MicroDicom DICOM Viewer Out-of-Bounds Read Vulnerability

    May 1, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.