best coding techniques

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • frostymarvelous
    replied
    Originally posted by CreativityKills View Post
    ?? I still dont get you
    Take a Look at any of the scripts I posted above. When you look at them, look at the organisation.
    The folder structure. The way they use functions. Generally, the way they create includes.
    I'm sure its some kind of fallback from c++ or more advanced coding language experience.
    The thing is, php just does not encourage good programming skills. Its like html. Almost anything will parse.

    Leave a comment:


  • CreativityKills
    replied
    ?? I still dont get you

    Leave a comment:


  • frostymarvelous
    replied
    That's not what I actually mean. Though that's seriously advisable as well as commenting.

    To get an idea of what I mean, take a look at yourls, sphider or php search. There's this level of organisation I can't seem to muster. Yourls is cool, I code like that now but the others including CF image hosting codefuture.co.uk/projects/imagehost/ is just extreme.

    Leave a comment:


  • CreativityKills
    replied
    To write cleaner codes i use tabs for indentation not spaces.
    I do
    if( ! $arg === TRUE)
    {
    {TAB HERE}echo $arg;
    }

    makes it easy to find missing closing braces. I use caps for php constants like:
    AND, NULL, FALSE, TRUE, OR etc. I also make sure that i do stuff like:

    function ego($ego)
    {
    {tab here}return isset($ego);
    }

    not

    function ego($ego)
    {
    {tab here}return isset($ego) ? true : false;
    }

    Leave a comment:


  • frostymarvelous
    replied
    Thanks. Lemme check.

    Khan. I know. What I need is a title or something. There's a lot of junk out there.

    Leave a comment:


  • metulj
    replied
    Originally posted by frostymarvelous View Post
    Ok. I know these are skills you gain with experience because I can see my code is more organised and cleaner than it was a year ago when I started.
    I however see better code everyday and wish to get better.
    Is there some kind of document with guidelines? For those of us who are self taught, I think this would be a great asset.
    There is only so much you can learn from reading code.
    Thanks.
    check link in my signature...
    you might find some usefull ebook...

    Leave a comment:


  • khan
    replied
    try ebooks. There is lotsa ebooks online

    Leave a comment:


  • frostymarvelous
    started a topic best coding techniques

    best coding techniques

    Ok. I know these are skills you gain with experience because I can see my code is more organised and cleaner than it was a year ago when I started.
    I however see better code everyday and wish to get better.
    Is there some kind of document with guidelines? For those of us who are self taught, I think this would be a great asset.
    There is only so much you can learn from reading code.
    Thanks.
Working...
X