Jump to content


Repeat Code

  • Please log in to reply
7 replies to this topic

#1 steelmanronald06

  • Staff Alumni
  • Advanced Member
  • 2,004 posts
  • LocationOk

Posted 24 September 2006 - 12:35 AM

Okay, so when I program something in PHP I normally end up just using the same funtions, but in a better way.  Sometimes this involves me using a new function, but not always.  therefore, here is my question. If all my coding projects use the same funcitons, and I try to use others but sometimes you only have one way to do it, how do you learn new functions?

I have considered taking on some kind of project, a big project, but what? Not another website, but maybe a software?  Forums are out of the question, but perhaps content management?  ideas on what I should do to learn new functions? I figured content managment because there is so much it has to be able to do, right?

#2 jcombs_31

  • Staff Alumni
  • Advanced Member
  • 2,066 posts
  • LocationFL

Posted 24 September 2006 - 01:13 AM

functions aren't something set it stone.  You should be able to program for whatever your current need is.  A function is just a procedure for a certain result.  There are very few things that I use over and over.  I write code according to what my current script needs.  I'm not really sure what you are trying to learn?  How to program?

#3 steelmanronald06

  • Staff Alumni
  • Advanced Member
  • 2,004 posts
  • LocationOk

Posted 24 September 2006 - 01:27 AM

Ha ha. I'm not talking about functions I make myself. I'm talking about PHP's pre-defined functions.  date(), echo(), etc.  I know how to program, but I just find myself using the same pre-defined php functions over and over and over.  I was just wondering how everyone else got to learning some new and different functions that php has to offer.  I know some would say go read the manual, and blah blah, but i learn better from application and I like to apply it to a project or something that will hold my attention and keep me motivated.  Anyone else similar to this?

#4 .josh

  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 24 September 2006 - 06:31 AM

smaller project i'd like to eventually start: making a really really good search engine with 5 million options.

larger project i'd like to eventually start: somehow making a 3d model of the internet. Not necessarily of every website out there, but maybe websites retrieved from a search, or something.  Or maybe of the whole damn thing after all.  I've always dreamed of surfing the internet in 3d.  Gotta love those sci-fi books :)
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#5 redbullmarky

  • Staff Alumni
  • Advanced Member
  • 2,863 posts
  • LocationBedfordshire, England

Posted 24 September 2006 - 10:10 AM

i learnt most of the functions i use from 3rd party software and examples. I first downloaded phpBB and cross-referenced many of the functions i saw with the manual when i wasn't sure. also, when i'm stuck on a problem and see example code as a solution, i'll always make a point of making sure i fully understand how it works before just plonking it into my code.

otherwise, many of the other functions i've learned are from the php.net manual itself - especially from the bit that says 'See also...'. i just come across functions and think 'Ah, that'll be useful for what I'm doing'. I'm not worried though about not having 'mastered' it, as you get to the stage where you have enough under your belt to pretty much achieve anything you want. other functions exist to make things 'better' or 'easier', but there are so many that you can generally complete a good project without even looking at.

one thing i've also noticed in programming/coding is that when you're doing a project, sometimes you do think to yourself "there MUST be a function for this" - and then it's generally just a case of finding out its name and parameters it uses. like you already KNOW what the language can do without yet knowing the details.
"you have to keep pissing in the wind to learn how to keep your shoes dry..."

I say old chap, that is rather amusing!

#6 Kris

  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 24 September 2006 - 06:10 PM

I pretty much consult the manual, if I want to do something with a string, I point my browser at php.net/strings and it lists all of the functions for manipulating strings with a quick description next to each function. If I want to mess around with an array, I go to php.net/array - And so on...

#7 ober

  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 24 September 2006 - 07:20 PM

I'm pretty much the same, but I usually end up getting to the point of saying to myself "there has to be a better way to do X".  So I dig through the manual until I find something that fits and is more efficient than my current method.

The other way I learned more PHP was being pushed by my co-workers to do more and better things.  My first login system was built after a request to have an application that was restricted on many levels.  My first big project in arrays was dealing with a graphing tool that I built to handle several tens of thousands of data points.  My first CMS came about from one of my personal clients wanting a way to update their own content without needing me.  Etc, etc.

Info: PHP Manual

#8 Jocka

  • Members
  • PipPipPip
  • Advanced Member
  • 344 posts
  • LocationDallas, Texas

Posted 25 September 2006 - 03:20 AM

A friend of mine just creates free stuff just so he can learn the functions. Example, I helped him with some forum software. He then went on to create a smaller and 'cleaner' looking mysql admin system kind of like phpMyAdmin.. but like i said, much smaller. Then he created this mail thing for free for people to check their mail on their own site without having to leave.
He learned more MYSQL functions and SMTP functions by doing this. I still know basically nothing about SMTP and didn't even think about just doing it for kicks.
If your a hands on person that learns better by 'doing' rather than 'reading' then it'd be easier and better if you just created applications around certain functions. That way you learn every inch of the functions use.. or so you think :-P

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users