+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
Like Tree1Likes

Thread: Add friend script

  1. #11
    theone48's Avatar
    theone48 is offline x10 Sophmore theone48 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    221

    Lightbulb Re: Add friend script

    Can't things be done any easier? Why don't you guys just give him the code to put in, or whatever it is? You tell him where to put it and he's all ready to go. Can't get any easier than that. He might understand the thing better if he saw it, too.
    T1 Need Help? Add me to your friend's list & message anytime!
    If you believe this a good post, please click the star icon below. Thanks!
    Remember, help is only a step away in the forums or on Live Chat.

  2. #12
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Add friend script

    Because:
    • Answers that simply give teh codez aren't actually helpful. Answer seekers must develop the skills to write the code themselves. Unless you're familiar enough with programming and development, it's hard to learn the proper concepts & abstractions from reading code. If you are familiar enough, you likely don't need code. It's far better to teach someone to fish than to give them a fish.
    • The requirements aren't specific enough to write any code.
    • It's extremely unlikely that any posted code could work without alteration, since it must interact with the OP's current code base.
    • The OP asked for tips, not a complete solution.

    Code may accompany an explanation as an illustration, but that's about as far as it can usefully go.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  3. #13
    theone48's Avatar
    theone48 is offline x10 Sophmore theone48 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    221

    Unhappy Re: Add friend script

    That implies if I wanted to program a really cool site, I'd have to learn programming first. From scratch. For someone who knows more about m theory than c++, that sounds too far-fetched. So many progs, so many types of langs, so many commands and definitions. There's got to be an easier way and still be able to have something self-done.
    T1 Need Help? Add me to your friend's list & message anytime!
    If you believe this a good post, please click the star icon below. Thanks!
    Remember, help is only a step away in the forums or on Live Chat.

  4. #14
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,153

    Re: Add friend script

    Quote Originally Posted by theone48 View Post
    There's got to be an easier way and still be able to have something self-done.
    Not really, and that's why there's a market for shrinkwrapped software (and why there are open-source projects, etc.). And there are open-source "social networks". The problem is that they are either too vast or too narrow in scope, and will rarely be exactly what you need. They're either going to cover every possible dream and desire, or they're going to be missing features.

    Only you really know what you need, and there is no general-purpose solution to a sui generis problem. The problem has to be properly defined before a solution can be found. In a case like this, that means defining what "friend" means, and what relationship it implies. Keep in mind that we're talking about sharing data. Are all friendships equal? Or should there be more or less restrictive sharing relationships?

    For the most part, coding anything more involved than a blog about cats is a matter of defining and structuring the data and the security around it -- who should be able to read what, who can modify it when, how do the different chunks of data interact and intertwine. That's really the "hard part" of coding a website or application. Turning your data into HTML according to the rules you establish is really pretty easy -- I can teach anybody of average intelligence and who is motivated enough about PHP to build a site in a day or two, and getting it from a book (if you do the exercises) is almost as fast. Doing a slick, AJAX-y front end is only a little more effort -- it involves learning both CSS and JavaScript, although something like jQuery or YUI makes that a lot easier than it used to be. But if the data structure is wrong, no amount of code can make it right.

    Programming -- expressing a procedure in a formal, restricted, artificial language -- is really a lot easier than most people think it's going to be. It's getting a good mental picture of what the procedure is that's hard. And it really doesn't matter how big the bricks are if you don't know what the house is supposed to look like, so even if there were a simple drag-and-drop, picture-based coding environment that you could use, it wouldn't make any difference if you can't really explain the details of what you want to do. If you can explain the details, then it's usually pretty darned easy to translate that into a high-level programming language like PHP.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  5. #15
    theone48's Avatar
    theone48 is offline x10 Sophmore theone48 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    221

    Arrow Re: Add friend script

    Maybe so but I wouldn't know. I'm used to the shrinkwrapped methods. By the way, is PHP top programming language of choice now? There are so many of them, I've lost track.
    T1 Need Help? Add me to your friend's list & message anytime!
    If you believe this a good post, please click the star icon below. Thanks!
    Remember, help is only a step away in the forums or on Live Chat.

  6. #16
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,153

    Re: Add friend script

    Actually, PHP is something that most "elite" programmers look down upon in scorn. And, to an extent, they have a point. PHP started off as something very small, and sort of grew organically over the years. Some parts are maddeningly inconsistent, though there are plans afoot to eliminate that over the next few releases. Data typing is both dynamic and weak, so it's nearly impossible to prove that a program is correct. And there's no good way to separate the layers* (the data layer, the "rules" layer and the HTML).

    That said, PHP is ubiquitous -- it's really, really hard to find a web hosting provider that doesn't support PHP and MySQL. It doesn't matter how snobbish you want to be about programming languages or database ACID compliance if deploying a site is going to cost more than you can reasonably afford. Want to do Ruby on Rails? Well, a Heroku instance starts at about $US50/month. Haskell? Racket? Common Lisp? You'll need a VPS of some sort for them. Scala? Clojure? Java-based hosting isn't free either. Python? You'll probably end up going beyond the free quota on the Google AppEngine quickly, especially on the datastore side. All of those are arguably "better" languages. All of them are excellent choices for creating a business ready to take over the world, especially when they're combined with a database that can shard, replicate and scale. And none of them will let you run a site on a host that charges four bucks a month all in, let alone run to any real size for free.

    PHP is incredibly easy to learn. That's one of the things that has led to its poor reputation -- like Visual Basic on Windows, the bar to entry is very low, so there is an abundance of horrible code out there, cut-and-pasted from equally horrid "tutorials" by people who never took the time to learn what they were doing. (Many of the tutorial writers seem not to have taken the time either, for that matter.) And a lot of the best-known open source PHP projects should have been rewritten years ago rather than just having more and more features added.

    Just because you can write bad code in PHP, though, doesn't mean you have to. It really isn't hard to do it right. You can start getting your feet wet on your own machine (if you're a Windows user, then WampServer or XAMPP is just a download away -- the "AMP" is Apache, MySQL and PHP). Misson has pointed to a lot of excellent tutorials (and given good reasons for staying far away from others). The PHP documentation is pretty darned good as these things go (second, in my opinion, only to the programmer documentation for Lotus Notes and Domino). And there's always plenty of help here (and elsewhere) if you're willing to learn.
    _________
    * There are ORMs (object/relational managers) and templating engines available for PHP that are intended to let you separate the layers, but they drastically reduce efficiency while providing only a modest reduction in complexity. They're great for what they're great for -- but that doesn't include trying to run a site on the cheap.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  7. #17
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Add friend script

    Quote Originally Posted by theone48 View Post
    That implies if I wanted to program a really cool site, I'd have to learn programming first. From scratch.
    Point 1 addresses requests for programming help, while points 2-4 specifically address the OP's post, not running websites in general. Thus the post doesn't imply programming knowledge is required in general to build a site. Since the OP already has a custom code base, anything that's tightly coupled to existing structure must be highly customized, which means he will need to do a fair bit of programming.

    However, if you want to program anything, by definition you'll need to know how to program.

    Quote Originally Posted by theone48 View Post
    So many progs, so many types of langs, so many commands and definitions.
    You only need one.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Help my friend please :)
    By 3dhomejoe in forum Off Topic
    Replies: 0
    Last Post: 10-25-2010, 11:09 PM
  2. referral friend script problem
    By relisys in forum Scripts & 3rd Party Apps
    Replies: 5
    Last Post: 08-14-2008, 06:30 PM
  3. hello! new friend
    By hotstar in forum Introductions
    Replies: 0
    Last Post: 11-01-2006, 05:17 AM
  4. Tell a Friend
    By o0slowpaul0o in forum Tutorials
    Replies: 1
    Last Post: 06-16-2005, 05:36 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers