Virtual pets and Sim games community

Would you like to become a member of the most successful virtual pets and sim games community on the internet? Virtual pet list has been opened since 2011 and we've been providing game developers(owners), artists, players and writers with the most relevant, up to date, quality and in depth content covering the entire online pet games, sim games and browser based games industry. So, if if you're interested in discussing virtual pet games, game development or online sims, our flourishing forum is perfect for you. Our sneak peeks forum is designed for new owners to showchase their upcoming in development games.

You can learn how to manage, make money and learn all aboutonline pet game management or discuss the best ways of developing a sim game. Find new sites to play in our online games directory. Currently, there's a total of over 80 pet games and over 70 sim games in our directory. So, feel free to post a review, a comment, or leave a like on any online game that we have listed. If you like a game that we have listed, please help us out by sharing it on social media.

  1. An upcoming virtual pet site that's owned by one of our moderators, Pepper-headIn icey them pet game Kaylune, a virtual pet site Breed online pet eliyo
    Managed Web Hosting by Liquid Web breed horses on this very active sim game

    Browse our Online Games Directory
    Admin and webmasters community - Browser games Beastkeeper
    Gaming Reinvented

Enclosing code in quotes.

Discussion in 'Programming General' started by SpotOnTech, Jun 28, 2012.

  1. While working on my newest client's site I noticed that most (almost all) of the code I saw in the files was formatted like this:

    No braces, no quotes. Although somewhat functional, there were more errors when I set the ini to display all errors than I care to mention. As I closed tags, removed print and changed it to echo I noted that all the errors cleared out. This is truly a sign of not only a beginning programmer, but a lazy one as well. Quotes are your friend, as are braces (and include files). 153 files in the root with no include files. Quite frustrating to say the least.

    Secondary rant: indenting. Indent your code, people. It makes going back over your code at a later date and makes your (or the next programmer's) life much easier.
    origins virtual pet site origins kickstarter
    Yet another rant: comments. Comments are your friend.

    Yep, one more: non-escaped $_GET and $_POST. $_GET is fine if you HAVE to make the URL show data (user profiles and search results are a good example), but $_POST is best. It's harder to hijack, looks nicer when the whole site isn't set with ?action and ?id tags on the end of the URL.

    Source: 16 years as a programmer in Python, RoR, PHP/MySQL/MySQLi, ASSEMBLY, PERL, HTML/XHTML, CSS, Java, Javascript and BASIC (yes, BASIC).
    #1 SpotOnTech, Jun 28, 2012
    Last edited: Jun 28, 2012
    • Like Like x 1
    origins virtual pet site origins kickstarter

    Your banner/button can be located here for an entire month or year, please see our advertising on virtualpetlist thread for more information.

  2. I've only been programming for a little over four years. And I'll admit I'm self taught. But it was interesting to see the turning point where I felt as though I was no longer a newbie at programming. When I started fixing code that was terrible. I not only could recognize it, I could fix it. When I first realized that it was a big deal and I was so proud that I was better at someone else in programming.

    Now, I wish all programmer's were perfect gods so I wouldn't have to fix all their dumbass mistakes. >.> Amazing how the times change.
  3. I've been programming a little over 6 years now, and to all the people who code like the example given in the OP:


    It just simply should not be done, especially if it's for commercial purposes.
  4. Here's a snippet of code from the contact form that I haven't gone over yet. By the time you read this, it'll be fixed since it's open in Notepad++, but this is as it stands as of posting:



    $subject "Contact Form";
    $body "From: $name\nSubject: $subject\nEmail Address: $emailaddy\n\n

    $from_header="From: [REDACTED]";

    "Email successfully sent.";

    "<form method=post action=contact.php?email=yes>
    Your Name: <input type=text name=name><br>
    Your Email: <input type=text name=emailaddy><br>
    Subject: <input type=text name=subject><br>
    <textarea rows=20 cols=30 name=email>Email content here.</textarea><br>
    <input type=submit name=submit value='Send Email'></form>"

    Oh, and no, it was not indented. Personally I enclose all my functions with parentheses to make it explicit. aka: echo("foo"); include("foo"); and I don't use print for anything.
  5. Not only will it throw warning, but it also executes a lot slower (approximately 4x).

    Speed test ...

    isset / empty should be used instead of forcing a hard read of the variable (i.e. isset($_POST['foo']) instead of $_POST['foo']). This is just wrong ...

  6. ...and that's exactly what I'm running into with over 20k lines of code in this site. I should have charged my per/hr rate instead of a flat fee.

    Edit: Also, since there are multiple arrays being passed, I usually cross-check it since say, if(isset($_GET['foo']) && $_GET['foo'] == "bar"). I'm not sure who the coders were of this site, but I'd like to hit them with my old Windows 3.11 manual.
    #6 SpotOnTech, Jun 28, 2012
    Last edited: Jun 28, 2012

Share This Page

  • About VPL, the #1 forum for pet sites, and online sims

    We are an online community of passionate artists, writers, game developers and general users who have a vested interest in virtual pet games, game dev & sim games. Our members are from different backgrounds and yet we group together with one goal, to ensure our pet games, game dev, and sims forum is one of the best!
  • Like VPL on Facebook!

  • Support VPL

    If you love our community and you'd like to help us cover our monthly costs, we'd greatly appreciate it if you could help us out by supporting us! If you can't donate, we totally understand. You can also support us by using our social media sharing buttons or by writing about us on other sites.

    Donate to VPL!