Man it feels good to be able to shorten code
Moderator: General Moderators
Man it feels good to be able to shorten code
well, it's about 5am eastern time here right now, but it was well worth it. I just shortened one of my 420 line scripts down to 205 lines
might not be a lot to some of the guru's, but to me, i'm feeling like it's nuddy bar time.
I can make any script to just one line.
You know how?
mwhahahha, beat you! 
-Nay
You know how?
Code: Select all
<?php include("that_script.php"); ?>-Nay
well, i can do one with a few less chars :
now, i j0r master. lol, seriously though, i just found [php_man]array_search[/php_man] a few minutes ago. take another 20 lines off my code
i'm getting tired though
Code: Select all
<? include'that_script.php'; ?>i'm getting tired though
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Modularising and shortening code is very gratifying. I try and go through my own code regularily to see where I can put repeated tasks into functions and get rid of uneccassary re-inventions of the wheel. Currently I'm doing the same on another developers code, which is always interesting, I'm adding lots of comments like I would do for someone in the forums so they can get it a bit more efficient and meet the team standards.
Mac
Mac
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
You guys are talking about [google]Refactoring[/google].
A good book on this topic from Martin Fowler can be found here:
http://www.amazon.com/exec/obidos/tg/de ... 201485672/
A good book on this topic from Martin Fowler can be found here:
http://www.amazon.com/exec/obidos/tg/de ... 201485672/
ooo...........jason with the correct terms
....
oh yea, one thing. is it just me or at geekcomplete.com, the XML feed link is http://phpcomplete.com/newsfeed.php instead of http://geekcomplete.com/newsfeed.php...
O_o
-Nay
oh yea, one thing. is it just me or at geekcomplete.com, the XML feed link is http://phpcomplete.com/newsfeed.php instead of http://geekcomplete.com/newsfeed.php...
O_o
-Nay