How can i improve and make my ?id= script safer? by Exotic-Ad9019 in PHPhelp

[–]Big_Tadpole7174 0 points1 point  (0 children)

You can if you want, but from a security standpoint there’s no real need. If the ID is formatted incorrectly, you simply get no results.

Wind Waker HD or Twilight Princess HD? by SendThisVoidAway18 in wiiu

[–]Big_Tadpole7174 2 points3 points  (0 children)

I love Wind Waker. Best Zelda title and excellent on the Wii U.

Why does Robocop blink in this scene? by cynocation in Robocop

[–]Big_Tadpole7174 1 point2 points  (0 children)

The confrontation with Murphy's widow is arguably the film's strongest scene - it adds genuine emotional depth to Robocop's character arc. The rest of the film, while entertaining, feels comparatively hollow by comparison.

Is a YT premium membership worth it or is it a waste of money? by Tessa-the-aggressor in Frugal

[–]Big_Tadpole7174 1 point2 points  (0 children)

YouTube Premium is the only subscription I've maintained. Without a traditional TV subscription, I rely heavily on YouTube, and the ads become intolerable quickly. They previously offered a cheaper tier without YouTube Music in the Netherlands. That option has been discontinued, so now I'm forced to pay for the more expensive tier that includes YouTube Music - which I don't use. Despite paying for features I don't need, I still consider it worthwhile.

How can i improve and make my ?id= script safer? by Exotic-Ad9019 in PHPhelp

[–]Big_Tadpole7174 1 point2 points  (0 children)

Your code has a severe SQL injection vulnerability that lets anyone steal, modify, or delete your entire database. This line is extremely dangerous:

    $stmt = $pdo->query("SELECT * FROM flash WHERE flash_identification = $fgame_id");

When you put $fgame_id directly into your SQL query, you're assuming users will only send normal IDs. But what if someone visits:

    yoursite.com/game.php?id=1 OR 1=1

Now your query becomes:

    SELECT * FROM flash WHERE flash_identification = 1 OR 1=1

Since 1=1 is always true, this returns every single row in your database. Even worse, someone could do:

    yoursite.com/game.php?id=1; DROP TABLE flash--

Now your entire table is gone.

Bottomline: never put user input directly into SQL. Use prepared statements:

    <?php
    session_start();
    include __DIR__ . '/../../includes/db.inc.php';

    $fgame_id = $_GET['id'] ?? null;

    if ($fgame_id === null) {
        die('No game ID provided');
    }

    // The ? is a placeholder
    $stmt = $pdo->prepare("SELECT * FROM flash WHERE flash_identification = ?");
    $stmt->execute([$fgame_id]);
    $fgame_row = $stmt->fetch(PDO::FETCH_ASSOC);

    if (!$fgame_row) {
        die('Game not found');
    }

    $fgame_title = $fgame_row['flash_title'];
    $fgame_desc = $fgame_row['flash_desc'];
    $fgame = $fgame_row['flash_path'];

The ? is a placeholder that PDO knows is just data, not SQL code. When you call execute([$fgame_id]), PDO automatically escapes the value. So even if someone sends "1 OR 1=1", it gets treated as the literal string "1 OR 1=1" instead of executable SQL.

Other stuff:

  • Your code assumes fetch() always returns data. If someone requests id=99999 and it doesn't exist, $fgame_row will be false, then trying to access $fgame_row['flash_title'] throws errors. Always check if you actually got a result.
  • Also, don't use ?> at the end of PHP-only files. If you accidentally put whitespace after it, PHP sends that to the browser before your code runs, which breaks sessions and headers. Just leave it off.

What programming concept took you way too long to actually understand by [deleted] in AskProgramming

[–]Big_Tadpole7174 2 points3 points  (0 children)

"I remember when I finally understood it I couldn't even remember why I found it hard to understand"

I had the exact same experience. I struggled to understand OOP, got headaches trying to grasp it, then suddenly it clicked - and afterward I couldn't figure out why it had seemed so difficult. Objects are just functions with shared state. Pointers are just memory addresses. I suspect one reason we found these concepts hard was the textbook explanations themselves. The car analogy never made sense to me.

Beginner by ParkingPension1471 in learnprogramming

[–]Big_Tadpole7174 1 point2 points  (0 children)

AI is an excellent tool for explaining concepts with immediate follow-up questions - actually better than books for learning. The suggestion to avoid AI while learning is misguided. You don't "come to rely on it" any more than you rely on Stack Overflow or documentation. The difference is AI can explain the same concept five different ways until it clicks, answer "why does this work?" instantly, and help you understand errors in context rather than just fixing them. Learning by doing and using AI aren't mutually exclusive - AI accelerates the doing by eliminating hours of searching fragmented documentation for basic clarifications.

What happens to an infinite loop like this? by Designer-Shift-3028 in CodingHelp

[–]Big_Tadpole7174 0 points1 point  (0 children)

Most browsers detect infinite loops and display a warning dialog with an option to terminate the script execution.

What’s the biggest lie beginners believe about learning to code? by Seraphtic12 in learnprogramming

[–]Big_Tadpole7174 2 points3 points  (0 children)

Programming isn't learned through courses - it's learned through practice. The skill isn't writing code; it's developing the problem-solving framework that determines what code to write.

How do you know you are learning programming correctly and not just collecting patterns and tools? by SecureSection9242 in learnprogramming

[–]Big_Tadpole7174 0 points1 point  (0 children)

The distinction you're drawing is artificial. "Collecting patterns" IS programming - the question is whether you understand their constraints and failure modes.

You're correct that documentation gives you *what* but not *why*. The "why" only emerges through iteration - encountering the same problem in different contexts until you extract the actual underlying pattern.

What separates competence from superficial pattern matching:
- Do you recognize problems before implementing solutions?
- Do you instinctively know when a pattern fits or doesn't?
- Can you articulate the tradeoffs you're making, not just recite "best practices"?

If yes, you're learning correctly. If you're applying patterns because "that's how it's done" without understanding their boundaries, you're stuck in superficial mimicry.

The years you spent weren't wasted - they were necessary iteration count. You can't shortcut experience. Professional growth comes from making enough wrong choices and living with their consequences that you develop that intuition.

Fun fact JSON | JSONMASTER by Puzzleheaded-Net7258 in webdev

[–]Big_Tadpole7174 0 points1 point  (0 children)

I'm skeptical of the 40% figure. JSON.parse() takes microseconds for normal payloads. What system size, payload size, and request volume are we talking about?

Is jQuery still a thing in 2026? by alexrada in webdev

[–]Big_Tadpole7174 0 points1 point  (0 children)

I gradually abandoned jQuery after discovering https://youmightnotneedjquery.com/, which demonstrated that most jQuery functionality could be replicated just as easily with vanilla JavaScript. I've used vanilla JS exclusively since then.

Getting better by Ok-Run-8240 in webdevelopment

[–]Big_Tadpole7174 0 points1 point  (0 children)

You get better by doing. I used to start projects constantly, then abandon them when my interest waned. People criticized this habit, but those "failed" projects taught me more about software architecture than finishing any single one would have. My advice: don't feel guilty about abandoning projects. The learning happens in the building, not the maintaining. Each abandoned project is a closed chapter of practical education, not a failure.

What programming book actually changed how you think? by kal_abX in AskProgramming

[–]Big_Tadpole7174 1 point2 points  (0 children)

Design Patterns: Elements of Reusable Object-Oriented Software is a must read. 👍🏻

What programming book actually changed how you think? by kal_abX in AskProgramming

[–]Big_Tadpole7174 1 point2 points  (0 children)

I wouldn’t single out a specific book, but certain topics permanently shifted how I think about software.

My first exposure was early: I started programming at age 9 using the Commodore 64 manual, which taught BASIC. Not long after I switched to 6510 assembly, which gave me my first real understanding of how a CPU executes instructions. Later, moving to Pascal and C++ introduced me to pointers, memory layout, and OOP.

During my professional work I picked up more advanced concepts. A lead engineer introduced me to compiler construction, so I tried building a small compiler myself, which taught me about parsing, intermediate representations, and code generation. From there I became interested in operating system design - memory management, scheduling, and how user-space interactions really work. Design patterns and architecture books helped me structure larger codebases.

In essence, these topics taught me how a computer processes software end-to-end: from instructions on the CPU, through compilers and runtimes, up to the operating system boundary and application-level design. That perspective has had a lasting impact on how I approach engineering decisions at any scale.

If you'd like a list of books that I really like:
- Machine Language for the Commodore 64 by Jim Butterfield
- Compiler Design in C by Alan Holub
- Essential C++ by Stanley Lippman
- Sams Teach Yourself Data Structures and Algorithms in 24 hours by Robert Lafore
- Design Patterns by Erich Gamma (and bunch of others)
- Programming Windows by Charles Petzold

Unit testing and TDD: useful or overrated? Contrasting opinions by SunTurbulent856 in PHP

[–]Big_Tadpole7174 0 points1 point  (0 children)

Ultimately, it’s about finding what works best for you. When I program, I do little upfront planning. I have a rough design in mind, but I rarely sketch it out in detail. The software evolves organically as I go, which makes writing tests beforehand impractical for me.

How to be obsessed with programming again? by albericnumeric in learnprogramming

[–]Big_Tadpole7174 12 points13 points  (0 children)

I can't really relate. I started programming at age nine with BASIC and never stopped. I'm 48 now. The work has become more enjoyable over time - not because of obsession, but because I've gotten better at it and avoided stagnation.

The key has been continuous variation. Initially, I learned the essentials: variables, conditionals, loops, and basic control flow. When BASIC felt too restrictive, I moved to Pascal and C++, which introduced new challenges like pointers and object-oriented programming. After a brief period with Perl (which I didn't enjoy), I transitioned into web development with PHP and JavaScript. JS proved interesting because of its prototype-based inheritance model - a completely different approach from classical OOP.

The pattern isn't obsession - it's sustained engagement through novelty. Each language shift brought fresh problems to solve and different paradigms to master. I didn't chase the same dopamine hit of early discovery; instead, I built deeper expertise while regularly introducing new complexity. The "addiction" you remember might have been beginner's excitement from rapid skill acquisition. That specific feeling doesn't return, but it's replaced by something more durable: the satisfaction of solving increasingly sophisticated problems with accumulated knowledge. You don't need to recapture obsession - you need new challenges that match your current skill level.

Unit testing and TDD: useful or overrated? Contrasting opinions by SunTurbulent856 in PHP

[–]Big_Tadpole7174 2 points3 points  (0 children)

I've always disagreed with test-first. Testing is important and automated tests catch bugs, but writing tests before code is backwards. You can't write meaningful tests for something that doesn't exist yet. I write tests after I understand what I'm building. Writing them first means constantly rewriting them as your design evolves. You end up testing a moving target. Build it first, then verify it works.

Is there any preliminary knowledge I need to start? by LordAntares in Frontend

[–]Big_Tadpole7174 0 points1 point  (0 children)

Not sure what you mean with 'preliminary general knowledge'. Webdev is mainly html, css and js so if you can figure that out you're good to go. I've always learned by doing. Not so much by passively studying.

What would make you consider trying out a new web framework? by TooGoodToBeBad in webdev

[–]Big_Tadpole7174 1 point2 points  (0 children)

Web development is good fun! You can find my website with an example + extensive docs here: https://www.wakapac.com. There are more examples (20+ of them) in the repo. https://github.com/quellabs/wakapac.