Say Hi to Trevor for me and ask him when is CPIT going to provide a room for
that PHP group meeting that was posted about by me a while ago (come on Trev
where are the coffee and biscuits). Trevor should have access to helpful
links and although he is very busy he is also very approachable so I would
just email him. 

Good luck with the project. 

 

Andrew McMurtrie 

 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Johari
Sent: Thursday, 23 October 2008 10:49 a.m.
To: [email protected]
Subject: [phpug] Re: Efficient way to write PHP codes

 

Thanks to Andrew, Sid, Dominic and phlux0r for your quick reply.

Actually I have setup a wamp server in my laptop. As the project has
similarity with my first PHP assignment, I thought by uploading directly
will save me time but it proved me wrong! Another challenge for me is that
I'm still studying PHP (now in my second term, and my PHP assignment 2 is
not due yet - just to show that I'm still at beginners level) and my project
requires me to use PHP which I had accepted the challenge.

As battling for help, taking 1 1/2 days include the time googling the web,
and trying another solution. I left the "problems" codes and try to write
for another queries. Only when the "blank" pages appear again and again
start worrying me. I normally try to find out myself first before pushing
the "panic" button as I would learn more from the mistakes.

As for Cake/Zend, I don't think we are allowed to use that for our project
as we are supposed to hard-coded most of the things so that we can learn in
the process. And yes, like Andrew's suggestion, I'm documenting all my
significant errors during coding and should write in my final report for the
project. I'm not really familiar with Dr Mike Lance (met him once during
initial meeting for the project) but my Academic Supervisor, Trevor Nesbitt
had helped me a lot (I try not to bother him a lot as he is a very busy
man).

Anyway, thank you very much for the responses ( 4 in about 15 minutes is
very GOOD!).

Cheers,

Johari
p/s: I'm replying this email while downloading eclipse (123MB).

On Thu, Oct 23, 2008 at 10:27 AM, Andrew McMurtrie <[EMAIL PROTECTED]>
wrote:

Eclipse with PDT is a good platform to code on
http://www.eclipse.org/pdt/downloads 123MB download . Best bet is not to
test on the server you are uploading to, setup a wampp (Apache) install on
your local machine to test on and once it is working as you expect then
upload it with the altered config to match the other server. The wampp setup
will have debugging outputted to the browser and your server might not
making it harder to debug. As you code identify your common errors and check
for them before testing is a good strategy as you are learning. Dr Mike
Lance (CPIT) should be able to give you a site to visit on common coding
errors. Try not to write it all from scratch and reinvent the wheel, look
for a framework or library you can reuse like cake or zend for starters.

Set a time limit on how long you will battle with something before getting
help, 1/4 hr to find a missing ; should worrying you because it would an
employer let alone a 1 ½ days. Use Google a lot (search = "PHP then the
thing I am looking for").

 

Andrew 

 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Johari
Sent: Thursday, 23 October 2008 9:48 a.m.
To: [email protected]
Subject: [phpug] Efficient way to write PHP codes

 

Hi,

I'm still new to this forum. Currently I'm at final Semester in CPIT doing
Grad Dip in ICT. My project is to build an e-commerce website and I have
done the E-R diagram, Data Dictionary, etc for the database. I was given a
space at Techlabs Server and I had created a database tables and inserted
sample data. I had finished testing all type of SQL queries needed and
tested directly with the MySQL Database Server. It's all fine even though I
had few difficulties at first.

The "real" problem started when I used PHP to communicate with the MySQL
Server. When I uploaded my finished "test" version and run it in my browser,
I get a blank page - obviously it's not running as expected, and I didn't
know what's wrong with my code. I use Notepad++ to configure the codes. 

Therefore, I had to re-code again.... and check my codes line by line
comparing to the working codes just to find out what had went wrong. Then I
found out that I missed the (;) in one of the codes. This problems, took me
1 1/2 days. That's a setback since I was thinking to write the PHP codes and
upload it to the server bit by bit. Now maybe I have to do everything
locally, and only upload the final one. But I also want to make sure that it
will work with the server (as part of my QA plan).

I have read few books and I was told how to write a good code, but not
really how to write it efficiently... so, while I'm still googling around to
find an efficient way to write a good code, can anyone can give me some
advise based on your experience dealing with PHP horrors?

Thank you very much for your time.

Johari

 

 





--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Reply via email to