silverglade Posted July 3, 2010 Share Posted July 3, 2010 hi, i have a registration form, and i have to do a regular form. the problem is, im not good enough to code the regular form from my head, and the registration form is already finished so i started copying and pasting parts of the registration into the form.php page. and im just getting a negative feeling about it. do you think i should just type the registration.php form over and over enough so that i have it memorized so i can code the regular form totally from my head without looking at other code? any advice from the gurus greatly appreciated. thanks. derek Link to comment https://forums.phpfreaks.com/topic/206622-question-about-reusing-copying-pasting-code/ Share on other sites More sharing options...
Garethp Posted July 3, 2010 Share Posted July 3, 2010 No. Not at all. It's true that most experienced coders can code straight from their head, but the single most useful skill you can have is knowing how to find the code you want. You can't memorize every single piece of code, that's why we have a manual. But once you make enough projects, you remember them without having to parrot learn the code. Remember, a registration form is just a login form with differences, which is a comment for with differences, which is a blog post form with differences. Any form that enters things in the database is essentially the same, so as long as you do a few good sized projects, you'll get there Link to comment https://forums.phpfreaks.com/topic/206622-question-about-reusing-copying-pasting-code/#findComment-1080643 Share on other sites More sharing options...
silverglade Posted July 3, 2010 Author Share Posted July 3, 2010 thanks. im doing this tutorial now ill post it on a new post. i cant figure out why its not going into the database or why its not echoing out "added to database!" hehe. Link to comment https://forums.phpfreaks.com/topic/206622-question-about-reusing-copying-pasting-code/#findComment-1080656 Share on other sites More sharing options...
robert_gsfame Posted July 3, 2010 Share Posted July 3, 2010 No. Not at all. It's true that most experienced coders can code straight from their head, but the single most useful skill you can have is knowing how to find the code you want. You can't memorize every single piece of code, that's why we have a manual. But once you make enough projects, you remember them without having to parrot learn the code. Remember, a registration form is just a login form with differences, which is a comment for with differences, which is a blog post form with differences. Any form that enters things in the database is essentially the same, so as long as you do a few good sized projects, you'll get there totally agree with Garethp Link to comment https://forums.phpfreaks.com/topic/206622-question-about-reusing-copying-pasting-code/#findComment-1080661 Share on other sites More sharing options...
Mchl Posted July 3, 2010 Share Posted July 3, 2010 That's why IDEs offer you 'snippets'. You can define pieces of code you use very often and then paste them with a single click whenever you need them. Link to comment https://forums.phpfreaks.com/topic/206622-question-about-reusing-copying-pasting-code/#findComment-1080679 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.