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

      Tiny Screens, Big Impact: The Forgotten Art Of Developing Web Apps For Feature Phones

      July 16, 2025

      Kong AI Gateway 3.11 introduces new method for reducing token costs

      July 16, 2025

      Native vs hybrid vs cross-platform: Resolving the trilemma

      July 16, 2025

      JetBrains updates Junie, Gemini API adds embedding model, and more – Daily News Digest

      July 16, 2025

      Cyberpunk 2077 Update 2.3 is bringing more vehicle customization, photo mode options, and one amazing new feature — launching this week

      July 16, 2025

      The cheapest place to get my games just got even cheaper — get an extra 10% off while you can

      July 16, 2025

      Destiny 2: The Edge of Fate reviews open ‘Mixed’ on Steam, with a player count only a fraction of The Final Shape’s — I’m surprised it’s this low after a new expansion

      July 16, 2025

      A rare opportunity is here to get an HP gaming laptop for only $500 — NVIDIA RTX graphics and a 144Hz display at a bargain price

      July 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

      The details of TC39’s last meeting

      July 17, 2025
      Recent

      The details of TC39’s last meeting

      July 17, 2025

      Vector Search Embeddings and RAG

      July 16, 2025

      Python Meets Power Automate: Trigger via URL

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

      FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

      July 17, 2025
      Recent

      FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

      July 17, 2025

      Cyberpunk 2077 Update 2.3 is bringing more vehicle customization, photo mode options, and one amazing new feature — launching this week

      July 16, 2025

      The cheapest place to get my games just got even cheaper — get an extra 10% off while you can

      July 16, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»CodeSOD: Recasting the Team

    CodeSOD: Recasting the Team

    May 29, 2025

    Nina‘s team has a new developer on the team. They’re not a junior developer, though Nina wishes they could replace this developer with a junior. Inexperience is better than whatever this Java code is.

    Object[] test = (Object[]) options;
    List<SchedulePlatform> schedulePlatformList = (List<SchedulePlatform>)((Object[])options)[0];
    List<TableColumn> visibleTableCols = (List<TableColumn>)((Object[])options)[1];
    

    We start by casting options into an array of Objects. That’s already a code stench, but we actually don’t even use the test variable and instead just redo the cast multiple times.

    But worse than that, we cast to an array of object, access an element, and then cast that element to a collection type. I do not know what is in the options variable, but based on how it gets used, I don’t like it. What it seems to be is a class (holding different options as fields) rendered as an array (holding different options as elements).

    The new developer (ab)uses this pattern everywhere.

    [Advertisement]
    ProGet’s got you covered with security and access controls on your NuGet feeds. Learn more.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleCVE-2025-3755 – Mitsubishi Electric Corporation MELSEC iQ-F Series CPU modules Index Validation Bypass
    Next Article TUXEDO Stellaris 16 Gen7: il nuovo laptop GNU/Linux con 128 GB di RAM e schermo HDR

    Related Posts

    News & Updates

    Cyberpunk 2077 Update 2.3 is bringing more vehicle customization, photo mode options, and one amazing new feature — launching this week

    July 16, 2025
    News & Updates

    The cheapest place to get my games just got even cheaper — get an extra 10% off while you can

    July 16, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    Get a Galaxy S25 phone, Watch, and Tab free from Verizon – here’s how

    News & Updates

    The next big HDMI leap has arrived – here’s how these 16K cables will shake things up

    News & Updates

    CVE-2025-24022 – iTop Server Code Execution Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Map Eloquent Attributes into an Object Using the Collection Cast in Laravel 12.10

    Development

    Highlights

    News & Updates

    Tony Hawk’s Pro Skater 3 + 4 is coming to Xbox Game Pass soon — and one of the service’s biggest-ever hits is returning, too

    July 1, 2025

    Tony Hawk’s Pro Skater 3 + 4 is coming to Xbox Game Pass soon, while…

    Challenges of Performance Testing: Insights from the Field

    April 9, 2025

    AlmaLinux 10: Guida post installazione

    May 31, 2025

    CVE-2025-5599 – PHPGurukul Student Result Management System SQL Injection Vulnerability

    June 4, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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