Welcome! Log In Create A New Profile

Advanced

Programming Mind

Posted by 77553055 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar Programming Mind
April 21, 2012 11:42PM
Here is something I came up with and am sure it will be useful to everyone that reads it. smile
I started this course with an open mind and no idea about what the language PHP is all about. Starting with the echo and print, I realized it was going to be interesting and I knew I had to be dedicated to actually understand the language. The tut101 was quite explanatory and i love that book! PHP5, APACHE, MYSQL WEB DEVELOPMENT. Following each step and examples that I came across built my knowledge more and more.

I believe in patience! hmmn... Yes patience is an important key in dealing with coding. Because if you are not patient, you will get frustrated and all worked out due to the fact that you can not figure out what is actually wrong with your codes all in the name of progress.
Another thing that is very essential is you thinking deep about what next to be done to make your a application a finished project and a better application. It is not over until it is over! You might think you are done and all you want to do is relax but I tell you friend... You not done yet! Take your time to review your codes and am sure you will find something stupid that you have done so as to make corrections.
For example:
Language: PHP
echo "<table>"; echo "<tr>"; echo "<td>"; echo "</td>"; echo "</tr>"; echo "</table>";
Why not
Language: PHP
echo "<table> <tr> <td> </td> </tr> </table>";
Am sure you understand what am driving at!
Not to stress you with the numerous words of mine,
The programming mind is powerful only if you adapt to this rules
1. Patience
2. Dedication
3. Research
4. Consciousness towards the main target/goal
5. High level of Interest in code discussions

I am quite positive that with these points and so many others you can find out there, the practical and other projects you intend doing will be less stressful and successful.
Wishing you all success. Still coding though... lol! *Happy coding* smileys with beer
avatar
Mac
Re: Programming Mind
April 23, 2012 08:30AM
Funnily enough, after 12 years of programming I have in fact returned to echoing on more lines...

This is useful when you may want to comment out parts, which you need to do because your code is not correct and it is easier than deleting... only to have to code it back again later. For example, a table layout can become quite complex, so it is easier to comment out a single line than having to delete sections

Language: PHP
echo "<table>"; echo "<tr>"; echo "<td>"; echo "</td>"; //echo "<td>"; // easier to comment out and uncomment later if you change your mind //echo "</td>"; echo "</tr>";   echo "</table>";
avatar Re: Programming Mind
April 23, 2012 10:31AM
You right big mac... I get your point. I just tot its less stressful making use of few echos, quotes and apostrophe... Now that you've opened more light on where there could be danger coding it that way, I guess its time to revert. Thanks a lot!
Re: Programming Mind
April 23, 2012 11:41AM
Hi guys, thanks for intuitive topic.

For me i intend using heredoc to some part of the application.

Language: PHP
$header = <<<ABC Register Student | Manage Student .... ABC;

And echo this in the header and in the footer.
avatar Re: Programming Mind
April 23, 2012 01:37PM
Nice innocent! You such a genius! smile
Sorry, you do not have permission to post/reply in this forum.