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

      Representative Line: Brace Yourself

      September 18, 2025

      Beyond the Pilot: A Playbook for Enterprise-Scale Agentic AI

      September 18, 2025

      GitHub launches MCP Registry to provide central location for trusted servers

      September 18, 2025

      MongoDB brings Search and Vector Search to self-managed versions of database

      September 18, 2025

      Distribution Release: Security Onion 2.4.180

      September 18, 2025

      Distribution Release: Omarchy 3.0.1

      September 17, 2025

      Distribution Release: Mauna Linux 25

      September 16, 2025

      Distribution Release: SparkyLinux 2025.09

      September 16, 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

      AI Momentum and Perficient’s Inclusion in Analyst Reports – Highlights From 2025 So Far

      September 18, 2025
      Recent

      AI Momentum and Perficient’s Inclusion in Analyst Reports – Highlights From 2025 So Far

      September 18, 2025

      Shopping Portal using Python Django & MySQL

      September 17, 2025

      Perficient Earns Adobe’s Real-time CDP Specialization

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

      Valve Survey Reveals Slight Retreat in Steam-on-Linux Share

      September 18, 2025
      Recent

      Valve Survey Reveals Slight Retreat in Steam-on-Linux Share

      September 18, 2025

      Review: Elecrow’s All-in-one Starter Kit for Pico 2

      September 18, 2025

      FOSS Weekly #25.38: GNOME 49 Release, KDE Drama, sudo vs sudo-rs, Local AI on Android and More Linux Stuff

      September 18, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»CodeSOD: Stop Being So ####

    CodeSOD: Stop Being So ####

    June 18, 2025

    Many a network admin has turned to the siren song of Perl to help them automate managing their networks. Frank‘s predecessor is no exception.

    They also got a bit combative about people critiquing their Perl code:

    <span class="hljs-comment"># COMPLEX SUBNET MATH</span>
    <span class="hljs-comment"># Looking up a value in an array was faster than any mathematical solution. Yes, it's hard coded, but these values won't ever change anyway. Stop being so #### about it.</span>
    $Subnets = @(<span class="hljs-string">"0.0.0.0"</span>,<span class="hljs-string">"128.0.0.0"</span>,<span class="hljs-string">"192.0.0.0"</span>,<span class="hljs-string">"224.0.0.0"</span>,<span class="hljs-string">"240.0.0.0"</span>,<span class="hljs-string">"248.0.0.0"</span>,<span class="hljs-string">"252.0.0.0"</span>,<span class="hljs-string">"254.0.0.0"</span>,<span class="hljs-string">"255.0.0.0"</span>,<span class="hljs-string">"255.128.0.0"</span>,<span class="hljs-string">"255.192.0.0"</span>,<span class="hljs-string">"255.224.0.0"</span>,<span class="hljs-string">"255.240.0.0"</span>,<span class="hljs-string">"255.248.0.0"</span>,<span class="hljs-string">"255.252.0.0"</span>,<span class="hljs-string">"255.254.0.0"</span>,<span class="hljs-string">"255.255.0.0"</span>,<span class="hljs-string">"255.255.128.0"</span>,<span class="hljs-string">"255.255.192.0"</span>,<span class="hljs-string">"255.255.224.0"</span>,<span class="hljs-string">"255.255.240.0"</span>,<span class="hljs-string">"255.255.248.0"</span>,<span class="hljs-string">"255.255.252.0"</span>,<span class="hljs-string">"255.255.254.0"</span>,<span class="hljs-string">"255.255.255.0"</span>,<span class="hljs-string">"255.255.255.128"</span>,<span class="hljs-string">"255.255.255.192"</span>,<span class="hljs-string">"255.255.255.224"</span>,<span class="hljs-string">"255.255.255.240"</span>,<span class="hljs-string">"255.255.255.248"</span>,<span class="hljs-string">"255.255.255.252"</span>,<span class="hljs-string">"255.255.255.254"</span>,<span class="hljs-string">"255.255.255.255"</span>)
    

    I believe them when they say that the lookup array is faster, but it leaves me wondering: what are they doing where performance matters that much?

    I don’t actually think this ascends to the level of a WTF, but I do think the defensive comment is funny. Clearly, the original developer was having a time with people complaining about it.

    Frank notes that while Perl has a reputation as a “write only language,” this particular set of scripts was actually quite easy to read and maintain. So yes, I guess we should stop being so #### about it.

    [Advertisement] Plan Your .NET 9 Migration with Confidence
    Your journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleSecuronis Linux – privacy and security-focused distribution
    Next Article CVE-2025-4955 – Tarteaucitron.io WordPress Stored Cross-site Scripting Vulnerability

    Related Posts

    News & Updates

    Distribution Release: Security Onion 2.4.180

    September 18, 2025
    News & Updates

    Distribution Release: Omarchy 3.0.1

    September 17, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    CVE-2025-45474 – Maccms SSRF Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    RIP Hulkamania – Hulk Hogan 1953 – 2025 Shirt

    Web Development

    Tariff war has tech buyers wondering what’s next. Here’s what we know

    News & Updates

    Millions of new materials discovered with deep learning

    Artificial Intelligence

    Highlights

    Kodeco Podcast: Kotlin Symbol Processing – Podcast V2, S3 E4 [FREE]

    May 8, 2025

    Cut boilerplate, boost build times, and get real about Kotlin Symbol Processing with Android pro…

    CVE-2025-4447 – Eclipse OpenJ9 OpenJDK Stack Buffer Overflow

    May 9, 2025

    How Remix is shaking things up

    May 30, 2025

    CVE-2025-30018 – SAP SRM Information Disclosure

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

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