Jump to content

Need advice on how to read code


OM2

Recommended Posts

I'm not sure if this is a dumb question... but I thought I'd ask anyway!!

 

How do I read code?

 

OK, so let's say you have index.php, which requires a.php, b.php and c.php, which in turn require more files x.php, y.php, z.php etc

 

When I read some code and come across a function being called, I wanted to know what that function does and how it's supposed to work

 

If there is a function call in index.php called strangeWeirdFunction() and is passed a multitude of parameters, I'm left scratching my head trying to think what it might be there to do

 

I find myself having to wingrep to find other files that reference the file

 

All of this wastes loads of time    :(

 

Or maybe my approach is wrong?

 

I thought an IDE like Netbeans would help in some way - I thought when I highlighted a function, it might give me links to where it was declared - unfortunately, this doesn't happen!

 

Writing code from scratch + reading small amounts of code - I'm OK doing

But, when it comes to a large project, I find it really daunting and always get lost in the spaghetti of code

 

Just looking for general advice

 

Thanks

 

 

OM

 

Link to comment
Share on other sites

sorry for being dumb, i've only just scan read - but i don't see how this helps?

thanks

I use Eclipse PDT and it does just that.

 

When I start typing the function name, it's in the auto-complete list with the file name it was declared in.

 

functionName($args) - originatingfile.php

great. just googled and tried finding a download

does it still exist?

i saw the following:

 

Looking for the Eclipse for PHP Developers Package?

Due to lack of a package maintainer for the Indigo release there will be no PHP (PDT) package. If you would like to install PDT into your Eclipse installtion you can do so by using the Install New Software feature from the Help Menu and installing the PHP Development Tools (PDT) SDK Feature from the Eclipse Indigo Repo >> http://download.eclipse.org/releases/indigo

 

Link to comment
Share on other sites

thorpe, that's awesome

it's not shift, it's ctrl

 

OMG, this is more awesome than i thought!

one thing that i always stumble on is functions that are php functions

when u ctrl click a php function, it opens up the php file where it was declared!

 

yee ha!

 

thanks!!

 

:) :)

Link to comment
Share on other sites

netbeans = free

komodo = expensive, you have to pay money!

netbeans = not as good because it's free!

komodo = much much better because it's commercial?

 

is the above correct?

if better how much better? (not sure how one can quantify that!)

 

been to the activestate website. i must have spent 5 min looking around for the price. i'm sure it's there somewhere

can u tell me how much? i couldn't find myself

 

thanks

Link to comment
Share on other sites

eclipse is free?

i've heard it mentioned plenty of other places before

downloading now

 

i'm on a mission to become a competent php coder - so trying out the different packages is great for me

 

also, PDT stands for what?

i didn't want to ask such a dumb question, so i googled

and all i got was: Pacific Daylight Time :)

it must mean something else obviously!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.