SitePoint Sponsor

User Tag List

Page 2 of 4 FirstFirst 1234 LastLast
Results 26 to 50 of 98
  1. #26
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm very much a beginner with almost all web technologies. Most important of those to me is PHP, because I've a software-as-a-service offering that I want to build eventually, based on an idea I had at my last job.
    I'm very much an entrepreneur who wants to be a programmer.
    I will do some freelance work, but mostly I'll be working on the dozen or so projects I've planned for the future.

    Back to the question though, I'm learning through several methods.
    I use Safari Books Online. That's a subscription service which allows you to access books from publishers such as O'reilly, Sitepoint, Wiley and others through your browser. It's pretty good.
    I also use a site called PHP Video Tutorials, which offers entire projects(such as an e-commerce site, a job site, blogging system etc) for one-off purchasing or through a subscription.
    Finally, I recently discovered Sitepoint and bought the Javascript, CSS and PHP Live courses.

    We're in an age where you can, as a solo developer, build a web application, host it from one of many cloud hosting providers and so long as you don't need to offer loads of support or have sales teams, essentially run the entire company yourself.
    Whilst freelance works great for some people, it's not what I'm aiming for.

  2. #27
    SitePoint Zealot
    Join Date
    Oct 2009
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm self taught and without a formal education in programming learning good coding practices helps a lot. Try working on a project after a month and see if you can recollect what you were trying to do and where you left off. ehehe.

    Also, I discovered there any number of patterns to organizing your code. I suspect they come from different languages or disciplines (coding a game versus multi-user info site). Each has its own way of organizing its code. Frequently I will research a solution for a problem and discover the simplest way to accomplish a task and I'll find a different solution. The one I'll use will typically be the most self-explanatory chunky monkey.
    Dinopad R40 - F15/XP
    APACHE 2
    MYSQL 5
    PHP 5

  3. #28
    SitePoint Guru rageh's Avatar
    Join Date
    Apr 2006
    Location
    London, Formerly Somalia
    Posts
    612
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One advice that has not been given so far is that allocate some time(couple of hours per day) to work on pure php coding(some project to focus your mind on a particular task). Doing it regularly is the way to learn coding. The worse thing to do is to code few hours today and never do it again until week or two weeks later. You have to be regular. Only then will your mind get adjusted to the world of coding. You have to simply ask yourself this question: how did coding gurus have achieved that knowledge? By doing it again and again and regularly. That is the secret if ever there was one.
    ------------------

  4. #29
    SitePoint Guru marcel's Avatar
    Join Date
    Nov 2000
    Posts
    920
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use it for real business applications .
    Make sure you apply good database normalization rules.

  5. #30
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,498
    Mentioned
    164 Post(s)
    Tagged
    1 Thread(s)
    Ironically enough, I actually learned quite a lot from tutorials when I first started learning PHP. Why? Because most of them had bugs! If most of them had "worked" I wouldn't have learned nearly as much as I did by trying to debug them so they would do what they said they would do.

    After the initial entry, most of my learning has been on an "as needed" basis. I set a goal for myself and then work through the steps needed to get there. I like tearing apart various apps like WordPress, but I think I learn more by "reinventing the wheel".

    In my user profile's About Me under Skillset, I have
    Proficient? Compared to what?

    By that I mean that compared to some of the gurus here at SitePoint my skills are like that of a struggling newbie. Yet to other members I may know more about something than they do. IMHO even though we all have our strengths and weaknesses, nobody knows everything about everything. And we can all help somebody no matter how we feel about our own level of skill.

  6. #31
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,234
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)
    I don't do any PHP at all. However, I'm learning Javascript and the same questions are there (they are for every language, aren't they?):

    I'm not completely clueless, I just don't have that gut feeling of what's right and what's bad practice.
    When I write code, I don't know if I'm doing it the best way possible.
    I know enough to get the job done, I don't know if I'm getting it done right.
    I don't know if my applications would scale, I don't know if I have security holes. I don't know how to squeeze every bit of performance juice out of an application.
    I know how to design a basic application, I could write a blog, but I have no idea how, say, Drupal works....
    I'm not even that far yet, but if I write something that works, I have the same questions.

    One thing I do is post my *working* code on a forum like SitePoint and ask for tips, tricks, and gotcha's. This code works, but what's wrong with it? This alongside posting code that doesn't work and asking why not, but when it works maybe you learn even more.

    Another thing I do is read online articles people post about programming. Not only Javascript, but for some reason I read people commenting on Perl code regularly. Sometimes it's someone wrote some code and asked about how to make it better on PerlMonks, and sometimes it's someone talking on a Perl blog about a particular function they first learned to write in some other language and then Perl, or other way around, and how they were different. People talking about issues they ran into doing an install, running CGI, grabbing modules, writing regexen, etc... all to tell others what they found.

    For example, an article like this at Opera talks about common Javascript optimisations, or this article about common mistakes. I've seen the same type of thing for Ruby, Perl, Java, and C#... surely the same thing exists regarding PHP. Especially PHP— people using all the other languages are always complaining about bad PHP code, insecure PHP code, bloated PHP code... therefore it stands to reason there are articles from the PHP community talking about these points regularly and often and how to write correct, secure and lean code. Also articles discussing what's new and what's gone in newly-released version of PHP, and what's planned for upcoming releases (PHP6 for example).

    One of the bigger benefits of the community surrounding a language is that the cultural norms are often a form of determining "best practice" for that language.

  7. #32
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    For me it came fairly quickly because I had been programming computers for some two decades prior to even HEARING about PHP. I already knew most of the good and bad coding practices and how to apply them to interpreted, compiled or native code - and what's a good practice in one is often a bad practice in another. For example security information should never be contained in global variables in a scripting language, things that should be secure like database access also should not be global, or even that script libraries and includes that handle database interaction (the 'model' in MVC as it were) should NEVER output ANYTHING if called directly and have ALL of their functionality wrapped in ... functions - something 99% of CMS systems out there drop the ball on before they're even done with their first include!

    My existing programming knowledge had me really skeptical at first because it's an interpreted language - and no amount of bytecode calculation or JIT compilation can truly overcome that shortcoming - it's why I'm not a fan of java and it's kine.

    But what made PHP different for me was so much of the stuff I'm used to having to brute force code already exists as functions - and that's the key to using scripted language is as much as possible you should be using the in-built functions to handle things instead of large amounts of brute-force coding. The paranoia about regex being slow for example; certainly in some cases where a simple str_replace or substr function will do the same job, that will be faster - but if it's the choice between php code involving a complex loop with four or five variables and nested IF statements and calling regex - I'm willing to bet regex isn't just faster, but cleaner code too... especially if you need to process a whole slew of conditions like in turning bbCode into markup.

    It's a mistake programmers coming from other AT&T syntax languages like C or Java often make - stuff they expect to have to hard-code, ESPECIALLY when it comes to things like string processing already exist as single functions in PHP.

    One of the biggest things you'll see though is not thinking about reducing your calculations or cleaning up your code. It's like working with algebra when it comes to reducing an equation.

    For example about four years ago I was recoding a site for a client that had this bit of code. Their former programmer came from the VB/Javascript world of doing things and never bothered cleaning up after himself.

    Code:
    function Decode($strValueIn) {
    //Do not modify this function!
    $intX = 0;
    $intY = 0;
    $Temp = "";
    $Mod = "";
    $intMod =0;
    $intTemp = 0;
    $ValueOut = "";
    $intY = 1;
    $strValueOut="";
    for ($intX=1; $intX<=((strlen($strValueIn)/2)/2); $intX=$intX+1) {
        $strTemp="";
        $strMod="";
        if (($intX % 2)==0) {
          $strMod=substr(substr($strValueIn,$intY-1,4),0,2);
          $strTemp=substr(substr($strValueIn,$intY-1,4),strlen(substr($strValueIn,$intY-1,4))-(2));
        } else {
          $strMod=substr(substr($strValueIn,$intY-1,4),strlen(substr($strValueIn,$intY-1,4))-(2));
          $strTemp=substr(substr($strValueIn,$intY-1,4),0,2);
        }
        $intMod=hexdec($strMod);
        $intTemp=hexdec($strTemp);
        $intTemp=$intTemp-$intMod;
        $strValueOut=$strValueOut.chr($intTemp);
        $intY=$intY+4;
      }
      return $strValueOut;
    }
    Not only are over two-thirds the variables not even unused, not only is it filled with calls to the same functions and results over and over - but it's filled with nonsense like SUBSTR of a SUBSTR and wasting an extra counter when it has a index.

    My rewrite of that same code came out thus:

    Code:
    function myDecode($inString) {
    	$result='';
    	$t=0;
    	while ($t<strlen($inString)) {
    		$top=hexdec(substr($inString,$t,2));
    		$t+=2;
    		$bottom=hexdec(substr($inString,$t,2));
    		$t+=2;
    		$result.=chr(($t%8)==0 ? $bottom-$top : $top-$bottom);
    	}
    	return $result;
    }
    Before I realized that what was being send 'encoded' to the user as a hidden input was information that should have been kept server side in the first damned place, so said code was unnecessary.

    You see those types of mistakes or errors in thinking all the time. On a pascal website for example someone was asking how to do this faster:

    Code:
      if drawGrid then
        for lv:=myCanvas.ClipRect.Left to myCanvas.ClipRect.Right div C_Workspace_Grid_XSize + 1 do
        for lv2:=myCanvas.ClipRect.Top to myCanvas.ClipRect.Bottom div C_Workspace_Grid_YSize + 1 do
        myCanvas.Pixels[
          lv*C_Workspace_Grid_XSize + ViewOffset.X mod C_Workspace_Grid_XSize,
          lv2*C_Workspace_Grid_YSize + ViewOffset.Y mod C_Workspace_Grid_YSize]:=C_Color_Grid;
    Which is a train wreck if you think about it. All the code is supposed to do is draw a grid inside a constrained viewport. My rewrite was thus:

    Code:
    if drawgrid then begin
    	xOffset:=ViewOffset.X mod C_Workspace_Grid_XSize;
    	yOffset:=ViewOffset.Y mod C_Workspace_Grid_YSize;
    	yPos:=myCanvas.ClipRect.Top+yOffset;
    	repeat
    		xPos:=myCanvas.ClipRect.Left+xOffset;
    		repeat
    			myCanvas.Pixels[xPos,yPos]:=C_Color_Grid;
    			xPos:=xPos+C_Workspace_Grid_XSize;
    		until xPos>myCanvas.ClipRect.Right;
    		yPos:=yPos+C_Workspace_Grid_YSize;
    	until yPos>myCanvas.ClipRect.Bottom;
    end;
    Which runs about thirty times faster since the innermost loop only has one addition in it to his two additions and two multiplies along with two counters. I could make that even faster by putting in one more variable and directly accessing the framebuffer instead of calling the mapped array.

    Back on topic, the other thing that made php a standout for me is that unlike EVERY other language out there it's white-space nuetral, single-quotes preserve white-space allowing you to have the output formatted (making life easier on debugging the output), and best of all, THE BEST DAMNED LANGUAGE REFERENCE I'VE EVER SEEN in the form of PHP.NET. It's like a trip in the wayback machine to the old Borland language reference books of the 80's - and for once that's not a bad trip at all.

    Though even after eight years of coding with it, I'm still learning new functions and new ways of doing things. I set aside time before bed each night to read three pages of php.net's function reference including all of the comments. I figure I'll have read the entire site sometime around 2012.

    It's like the old saying goes, the day you think there's nothing new to learn is the day the rest of the world leaves you behind.

    I mean hell, in trying to secure a CMS I've been working on, I ended up doing this:

    Code:
    function common_include($includeName) {
    	require_once($includeName);
    }
    ... and yes there's a legitimate reason to do that, and bonus points to whoever out there knows WHY. It's a new trick in my arsenal - and I JUST learned it.

    Eight years, and I'm STILL learning new tricks.

  8. #33
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by deathshadow60 View Post
    Code:
    function common_include($includeName) {
    	require_once($includeName);
    }
    I'm curious... scope?

  9. #34
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Immerse View Post
    I'm curious... scope?
    Got it in one!

    Yup. I have something declared as a local variable that I do not want passed as a global to the include...

    For example if you had:

    function main() {
    $myPassword='noneOfYerDamnedBusiness';
    require_once('somefile.php');
    }

    and somefile.php read:

    <? echo $myPassword; ?>

    It would actually echo out 'noneOfYerDamnedBusiness' even though it's a local variable to the main() function. That's bad. It's also how many code appendage attacks (like the one that struck SMF six months ago or the ones that keep hitting wordpress) function when they go after the files said systems tell you to leave as 775 or 777 like 'settings.php'. (which is also just **** stupid... my approach is going to have the CMS ftp into itself to make changes to the settings file if desired.)

    I mean, if I can get elevated execution privileges, or WORSE find some way to upload a file like an attachment or avatar and get it to run - Well, look at wordpress... All I have to do is:

    include('wp-config.php');
    echo DB_PASSWORD;

    ... and poof, I've got the database username, password, table name, host connection address... and most EVERY existing CMS and Forum is THAT WIDE OPEN! There is NOTHING to stop you from accessing ANY of that!!! MEIN GOTT!!! All you need to do is get code to execute, and you've got ALL the information you need to hack the hell out of it! Yeah, let's make those WORSE than global variables, let's make them DEFINES - *** BRILLIANT.

    Of course you REALLY want your brain to explode:
    Code:
    define('AUTH_KEY', 'put your unique phrase here');
    define('SECURE_AUTH_KEY', 'put your unique phrase here');
    define('LOGGED_IN_KEY', 'put your unique phrase here');
    define('NONCE_KEY', 'put your unique phrase here');
    Wordpress, you know them, safety forced. Flawed from a security standpoint BY DESIGN.

    Which is why allowing things like the mySQL connection to be global access by using the mySQL functions, or storing the connection info in a global variable like $settings... is a REALLY bad idea. It's what I like to call "rookie mistakes common to experienced developers."

    Some systems try to alleviate that by constantly opening and closing the connection - but that has nothing to do with the actual login info. Also I've found that properly written php should take so little time processing information, that constantly opening and closing the connection takes longer and creates MORE server load than just making one connection at the start of your data handling. (which is the opposite of what opening and closing the connection for each request is usually sold to programmers as the point of doing!)

    I'll share with you folks a watered down version of the index.php in my "in progress" CMS.

    Code:
    <?
    /* no need to wrap these, nothing declared yet */
    require_once('settings.php');
    require_once('libraries/common.php');
    require_once('libraries/db.php');
    
    function main() {
    
    	/* START CONTROLLER */
    
    	/* 
    		function in settings.php, calls a routine that ONLY
    		allows the function to be run if called from the main()
    		function in the parent index.php!
    	*/
    	$db=dbSettings();
    	
    	/* 
    		by loading the result of our PDO creation into $db
    		we erase the connection info
    	 */
    	$db=createPDO($db); 
    	
    	/* 
    		pull appropriate settings from database, put them in a local.
    	*/
    	
    	$data['settings']=$db->pullSettings();
    	/*
    		break up the URL into a suitable array while stripping
    		any attempts at code injection or so forth.
    	*/
    	
    	/* load the theme */
    	common_include($data['settings']['themeDir'].'index.template.php');
    	
    	$data['action']=common_processURL();
    	/* 
    		slices the URL up into an array, verifies action[0] is valid
    	*/
    
    	$target='modules/'.$data['action'][0].'.module.php');
    	
    	if (file_exists($target)) {
    		common_include($target);
    	} else {
    		common_include('modules/404.module.php');
    	}
    	
    	/* END CONTROLLER, START MODEL */
    	
    	if (function_exists('module_buildContent')) {
    		module_buildContent($data,$db);
    	}
    	
    	unset($db); 
    	/* nothing past this point has any legitimate reason to need to go to the database */
    	
    	/* END MODEL, START VIEW */
    	
    	common_httpResponseHeaders($data);
    	theme_header($data);
    	page_showContent($data);
    	theme_middle();
    	page_showSideBar($data);
    	theme_footer($data);
    }
    
    main();
    
    ?>
    You'll notice I'm building using the MVC concept despite being mostly procedural. There's a pretty good thread on the merits of the MVC approach going on right now - though some people seem to think MVC means objects... You don't need objects to do model/view/controller.

    Though I prefer to think of it as Controller/Data Manipulation/Template - or at least that's how I build it. The controller directing traffic and determining what's needed, the Data manipulation part doing the real grunt work, and the template existing for the sole purpose of making it pretty.

    BTW, this is my settings.php
    Code:
    <?php
    function dbSettings() {
    	
    	dbSettingsSecurity();	
    	
    	$settings['type']='mysql';
    	$settings['server']=''; /* most cases localhost, leave empty if using unix_socket */
    	$settings['unix_socket']='/opt/lampp/var/mysql/mysql.sock'; 
    	$settings['port']=''; /* if empty should use proper default */
    	$settings['dbname']='jake';
    	$settings['username']='jake';
    	$settings['password']='********';
    	$settings['tablePrefix']='paladin_';
    	
    	return $settings;
    }
    
    function dbSettingsSecurity() {
    	/* 
    		extra security to prevent injected scripts from reading this file
    		This code will not allow this script to run from anything but the
    		index.php in the root directory. (or appropriate parent directory)
    		
    		The version here is more robust because of the nature of data stored
    		in this function!
    	*/
    	$includeList=get_included_files();
    	/*
    		Swap slashes so our check works in winblows
    	*/
    	$fixedInclude=str_replace('\\','/',$includeList[0]);
    	$fixedFile=str_replace('\\','/',__FILE__);
    	$self=str_replace(dirname($fixedInclude),'',$fixedFile);
    	$compare=str_replace($self,'/index.php',$fixedFile);
    	$debug=debug_backtrace();
    	$last=str_replace('\\','/',$debug[count($debug)-1]);
    	if (
    		($compare!=$fixedInclude) ||
    		($compare!=$last['file']) ||
    		($last['function']!='main') ||
    		defined('dbInfoDefined')
    	) {
    		Die('Hacking attempt detected. direct calls to this file are not permitted!');
    	}
    	define('dbInfoDefined',true);
    	/* end security check */
    }
    
    ?>
    You try to define the function before including, it'll throw because you can't re-define a function. (the full version sets an error handler before the function is declared, that way you can't override error handling to make attempts at function overloading go silent), it will throw if the parent include file is not index.php, the calling function isn't called main(), it will throw if the getSettings function has already been called... and it returns the connection info as a result - which is loaded into a local variable that is overwritten the moment we connect to the database; the very next step.

    Now THAT's how you do security.

  10. #35
    @php.net Salathe's Avatar
    Join Date
    Dec 2004
    Location
    Edinburgh
    Posts
    1,396
    Mentioned
    55 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    Quote Originally Posted by deathshadow60 View Post
    Now THAT's how you do security.
    Maybe you glossed over it (or I did) but you're only trying to prevent re-execution of that one file? If an attacker has access to include it, they can readfile it as well. I don't think your comparison with how Wordpress does things is necessarily all that strong. Not that restricting the visibility and/or scope of sections of your script isn't a good thing; I wish more people would consider it, just for tidiness sake or, like yourself, to keep things separate that really should be kept separate.
    Salathe
    Software Developer and PHP Manual Author.

  11. #36
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    Quote Originally Posted by Salathe View Post
    Maybe you glossed over it (or I did) but you're only trying to prevent re-execution of that one file? If an attacker has access to include it, they can readfile it as well.
    Yer right, I failed to mention disabling readfile, exec and other insecure functions using disable_functions in the php.ini

    http://us2.php.net/manual/en/ini.cor...able-functions

  12. #37
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,692
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Trial and error, really. My first actual programming was done in Javascript (with which I once build my old pseudo-database structure and made a horrendous Javascript-powered dynamic site). I wrote my first programming logic much earlier, though, at the age of 8 or so.

    When I first started doing PHP, I really just wanted to do some includes. It quickly evolved, though, until I ended up building advanced content management systems with freakish RegEx and image generation. No idea how came from A to B, but I sure am looking forward to go to C and beyond.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  13. #38
    SitePoint Zealot
    Join Date
    Jan 2006
    Location
    Gold Coast, Australia
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I gave my answer regarding PHP earlier. However, I'm also in the process of learning Python at the moment. So far these few sites have really helped me.

    1. Project Euler - a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

    Project Euler, some may argue relies too much on the math aspect of programming. However, I'm currently up to problem 13 on it and so far I have learnt a considerable amount of Python.

    2. http://www.stackoverflow.com - programming Q & A site that's free. Free to ask questions, free to answer questions, free to read and free to index.

    Stack Overflow has had a HUGE influence on my programming, even though I just came across it a few months back. The collective knowledge of the group is astounding and they talk about every programming language under the sun. From Brain**** to Golfscript and even low level languages such as Assembly.

  14. #39
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,234
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)
    Stack Overflow has had a HUGE influence on my programming, even though I just came across it a few months back. The collective knowledge of the group is astounding and they talk about every programming language under the sun. From BrainF*ck to Golfscript and even low level languages such as Assembly.
    As with any resource, you need to already have some knowledge before using it, otherwise you'll ask stupid questions and get stupid answers.
    http://www.doxdesk.com/updates/2009....0091116-jquery Now I thought that was hilarious, and it's not a real question, but lots of questions like that get asked anywhere there are people asking and answering questions. If you already know *something*, then you have the ability to weed out bad answers in the first place.

    Off Topic:

    Hey good luck with Python... if you notice any excellent Python resources you've used (books, sites, whatever), please add them to the old Python sticky in Perl, Python and other languages forum, since it's about to get updated!

  15. #40
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deathshadow60 View Post
    function main() {
    $myPassword='noneOfYerDamnedBusiness';
    require_once('somefile.php');
    }

    and somefile.php read:

    <? echo $myPassword; ?>

    It would actually echo out 'noneOfYerDamnedBusiness' even though it's a local variable to the main() function. That's bad.
    It depends. I mean, obviously if that was a real code the programmer should be taken to the backroom with a pistol to put himself out of his misery.

    However, you don't always want to stop an include reading your data. For example if you have a object with certain properties, and inside the class definition you have a method which outputs a certain template file, then that file will want to be able to read those properties and use the methods.

    If you're worried about what's inside your own files, chances are you need a better host or any knowledge of file permissions. Incorporating that into PHP is overkill (in my opinion), it's like putting a cement mixer on the back of your car just incase the road is incomplete - your car (PHP) is just a small part of a bigger system (the server) which should be dealing with this stuff in the first place!
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  16. #41
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jake Arkinstall View Post
    It depends. I mean, obviously if that was a real code the programmer should be taken to the backroom with a pistol to put himself out of his misery.

    However, you don't always want to stop an include reading your data. For example if you have a object with certain properties, and inside the class definition you have a method which outputs a certain template file, then that file will want to be able to read those properties and use the methods.

    If you're worried about what's inside your own files, chances are you need a better host or any knowledge of file permissions. Incorporating that into PHP is overkill (in my opinion), it's like putting a cement mixer on the back of your car just incase the road is incomplete - your car (PHP) is just a small part of a bigger system (the server) which should be dealing with this stuff in the first place!
    I was going to say something to similar effect, but I figured it would be best to just let it slide, as deathshadow60 honestly seems to be rambling and incoherent for the sake of being rambling and incoherent.

  17. #42
    SitePoint Member
    Join Date
    Jun 2010
    Location
    United States
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wackyjoe View Post
    Build something that is beyond your skill level. Don't give up on it, persevere till you figure out how it is done and go forth and build it.

    Through this process you will realize how much you are capable off, and what you can accomplish. To reiterate the fact, do not build something that you are familiar with. You need to throw yourself in the deep end.
    I agree, Go beyond your skill set gradually, that is, change your direction slightly but beyond your skills. This way you'll get the best out of yourself.

  18. #43
    SitePoint Member
    Join Date
    Jun 2010
    Location
    United States
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dahouse View Post
    Hey,

    I've read a few books and built a few sites but I still feel clueless.

    How did you guys develop competence?

    What did you practice? What opportunities presented themselves? What path did you take to (partial) mastery?

    I'm debating contributing to a few Open Source projects to get my chops up. Any other ideas?
    For a quick learning, check out this for your best help. http://www.w3schools.com/php/default.asp

    Regards,

  19. #44
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Best thing to do is buy a book on the very basics of PHP programming so you will get to know what PHP is and does.

    Then start a project, a large one and start building using basic PHP. This will help you get use to using php and how to control it.

    After some time, buy another book on advanced php (OOP) and begin to learn that. Because you have learned the basics learning OOP will make it a bit easier to understand.

    Another top tip, don't rush.

  20. #45
    SitePoint Evangelist optl's Avatar
    Join Date
    Oct 2004
    Location
    Washington DC
    Posts
    415
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like any language it takes a few years to really get good at it. Like others said you really need to throw yourself out there and program some stuff you are unfamiliar with.

    IMO PHP is the easiest language out there and is notorious for helping beginner programmers develop bad habits. It happened to me and took me awhile to unlearn them. I would suggest starting with a a stricter language just to until you develop your "programming mind".
    For the phrase "Bethesda home architect", my clients
    websites occupy 6 of the first 8 results
    on the 1st page of Google. My Secret SEO Strategy Revealed

  21. #46
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I learned on my own, but I already knew ASP, ASP.Net, and Visual Basic. There is always something to learn in this field, and nobody knows everything. That is what makes programming so much fun.

  22. #47
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One way that I know would work is if you get a job as PHP programmer. I observed people with minimum programming skills and a college degree can achieve reasonable PHP programming skills by working in a company as PHP programmers for about a year. Usually, one would be able to do 2 to 3 PHP projects during this period.

  23. #48
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are many tutorials you can use to learn about PHP and how to execute scripts on your server. You can also try professional Web Design companies that offer training services. I learnt with one and since then, I have used PHP as an alternative to Perl. I now work as a freelance developer.
    Last edited by spikeZ; Jun 17, 2010 at 06:56.

  24. #49
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I started a great PHP tutorial for people wanting a gentle introduction:

    http://www.stedetroisi.com/tutorials/php-made-easy

    There are probably more books on PHP than PHP developers. There are also schools like the Learning Tree. Lets not forget colleges and universities. Heck even high school teaches programming today.

    The biggest problem today is supply. There is not enough interest in people wanting to become developers worldwide compared to demand. People are either not interested, don't like it when they learn it, or give up when they face reality in the business world. There are too many reasons to list.

    - Stede

  25. #50
    SitePoint Enthusiast v1rgil's Avatar
    Join Date
    Dec 2008
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you need curiosity and patience to become competent.
    the more problems you encounter, the better chance of improving your skills


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •