Notes on writing phpt tests

May 30th, 2006, 12:48 am by lig

Notes to self for writing phpt tests (so far):

  • Doc page on writing phpt tests - http://qa.php.net/write-test.php
  • basic format of a phpt:
  • PHP:
    1. -- TEST --
    2. One line only description of test
    3. -- FILE --
    4. <?php
    5. ?>
    6. -- EXPECT --

  • try to break the function. That is the purpose of the tests after all.
  • use var_dump instead of print_r - it shows the differences between null, empty strings and what nots.
  • if you are using the latest cvs checkouts (have unicode support) - in the -- INI-- part set unicode-semantics=1
  • in cases where you are expecting to generate an error - use the -- EXPECTF-- instead of the -- EXPECT--
  • add a marker (Ex:'===DONE===') after the closing ?> to catch if the script continues after it
del.icio.us:Notes on writing phpt tests  digg:Notes on writing phpt tests  furl:Notes on writing phpt tests  reddit:Notes on writing phpt tests

Yahoo, eBay join forces in defense against Google

May 26th, 2006, 6:22 am by lig

Yahoo, eBay join forces in defense against Google

Hmm.. Interesting how the Internet biggies are positioning themselves.

del.icio.us:Yahoo, eBay join forces in defense against Google  digg:Yahoo, eBay join forces in defense against Google  furl:Yahoo, eBay join forces in defense against Google  reddit:Yahoo, eBay join forces in defense against Google

hubby hurting

May 26th, 2006, 2:03 am by lig

Poor Jason. He woke up Saturday in so much pain that he could barely move. He messed up his back somehow that night. It has only taken this long for him to start to move freely again (that an flexerill). Hopefully he will be out of pain soon. I hate seeing him in pain.

del.icio.us:hubby hurting  digg:hubby hurting  furl:hubby hurting  reddit:hubby hurting

updating to PHP 5.1.4

May 19th, 2006, 6:54 am by lig

OK - was writing a few phpt tests when I came across a function that required I have PHP v 5.1 or higher. Well I only had an older version of PHP5 (5.0.5 to be exact) so I decided to upgrade. Now my work computer is a M$ box (XP SP2) so I go to the manual page for a windows install to see how to do an upgrade... No love - it only says how to do a clean install.

Crap - I don't want to go through a full install.. I have my php set up just the way I want it. So I cheated and reread the manual pages for a manual install - just to make sure I remember everything... downloaded the new binaries in zip, unzip in my C:php directory (older version is in C:phpphp5.0.5....), copy and paste the old php.ini, alter my paths in the php.ini and http.conf to point to the right places, alter my computer's path, restart apache... and tada it worked. Granted I had to go back and adjust my extensions paths and I reran the go-pear.php from the command line rather then simply copy and pasting from the older edition (wanted the newest files) but hey... it worked and all in all was a lot easier then the first time I installed PHP5 (back when it was still shiny and new - and so was was I...) .

I later went back and sent the old version to the trash... but don't worry - this is M$ - If I need to look at it again in the future (for whatever reason) - it will still be sitting in my trash.

del.icio.us:updating to PHP 5.1.4  digg:updating to PHP 5.1.4  furl:updating to PHP 5.1.4  reddit:updating to PHP 5.1.4

What OS are you?

May 19th, 2006, 3:42 am by lig

Took a personality test at BBspot that matches your personality to an OS. The results:

del.icio.us:What OS are you?  digg:What OS are you?  furl:What OS are you?  reddit:What OS are you?

How I work

May 17th, 2006, 6:04 am by lig

Been noticing on the Planet MySQL feed a lot of these. Seems that someone at Info World (Dave Rosenberg) put out a request to see how people work.

Now I fully admit to being a nub in the IT world (I'm only a lower level coder), unlike many of the others doing this. But I still found the concept interesting... So here it goes.

What is your role?
I am a programmer for a small company. I am the only one at my site - the other coders work on different island and in Japan. I deal primarily with with the LAMP stack and do everything from making simple graphics to coding - with plenty of research (personal and the company's) thrown into the mix.

What is your computer setup?
I have a Windows machine at the office and a Compaq lappy that has Ubuntu on it at home (slowly learning more about how to do things in it).

What desktop software applications do you use daily?
Thunderbird, Firefox, Open Office, gvim, WSFTP, Chatzilla, Photoshop, some kind of IM, and the mysql client
Edit: God - Can't beleive I forgot putty...

What websites do you visit every day?
RSS feed for many of the personal blogs of PHP people, PlanetPHP, and PlanetMySQL. Actual sites I go to every day - google (couldn't live with out it), google news, codewalkers.com, php.net manual, mysql.com manual, theDailyWTF.com

What mobile device or cell phone do you use?
Yeah - I have one of those... Don't know what it is since I never use the dang thing... I like being out of communication sometimes - and my job doesn't require that I have to have one.

Do you use IM?
All the time. Primarily MSN, though also have the Y! IM and Skype. This is the primary means of communication with the other coders.

Do you use a VoIP phone?
yes and no. I have Skype but I hate talking into the microphone/headphone (always feel funny since I am the only one doing it in an open office). Everyone pretty much at this point has figured out that to talk to me - it is better to simply IM or email me.

Do you have a personal organization/time management theory?
When needed I am big into scheduling.. color coding to help organize a schedule, early planning, finalizing the big stuff - but leaving wiggle room for the little stuff. And making sure I have time to simply stop. When it isn't needed - simple lists work for me.

Anything else?
As a "lone coder" at my site - I absolutely couldn't survive without IRC. Being able to ask a question and usually finding an answer is indispensable (boss typically isn't available and many of the other coders either do not speak English well or aren't interested in discussing multiple ways of doing something to find the "best" - they just want to get it done). That is where I have found my mentors. And I thank goodness for them every day.

del.icio.us:How I work  digg:How I work  furl:How I work  reddit:How I work

Weekly Summery - Biggies

May 15th, 2006, 4:58 am by lig

1) Ha - my eyes hadn't deceived me - Register globals and magic quotes has been removed from PHP6.

2) And goto has been finally accepted after a vote on the internals list that allowed for 4 options (1 including not doing anything). The final tally clearly showed that goto in it's full glory is to be implimented.

3) The current standing of Mike Lively's late static binding patch. Not quite in there yet. :S

4) And the fact that PHP 5.0 is no longer under active development. Only PHP 5.1 is open for play.

OT
Well this isn't a biggy - but I still found it pretty interesting.
Rasmus posting to the internals list a "little primer" on performance tuning.

del.icio.us:Weekly Summery - Biggies  digg:Weekly Summery - Biggies  furl:Weekly Summery - Biggies  reddit:Weekly Summery - Biggies

Weekly Summeries Caught up

May 15th, 2006, 4:27 am by lig

Woot! Steph Fox has somehow caught the Weekly Summeries for the Internals list back up... 1 big Thanks out to Steph for doing it. Lots of reading to do now... so leave me alone for a bit. Will post up the "big" things that I find - or at least find interesting. :)

del.icio.us:Weekly Summeries Caught up  digg:Weekly Summeries Caught up  furl:Weekly Summeries Caught up  reddit:Weekly Summeries Caught up

CNN.com - Bush says U.S. not ‘trolling through personal lives’ - May 11, 2006

May 12th, 2006, 1:56 am by lig

CNN.com - Bush says U.S. not 'trolling through personal lives' - May 11, 2006

This simply scares the crap out of me...

del.icio.us:CNN.com - Bush says U.S. not 'trolling through personal lives' - May 11, 2006  digg:CNN.com - Bush says U.S. not 'trolling through personal lives' - May 11, 2006  furl:CNN.com - Bush says U.S. not 'trolling through personal lives' - May 11, 2006  reddit:CNN.com - Bush says U.S. not 'trolling through personal lives' - May 11, 2006

myConfig.php

May 11th, 2006, 7:32 am by lig

Finally got my baby myConfig class to work. Only took 2 days and about 5 other people looking at it to get it to work correctly. Seems I had a fundemental mistake in my thought processes while making the class. Once Pollita kindly pointed it out to me and how to fix it - it was a piece of cake for the testing script.

del.icio.us:myConfig.php  digg:myConfig.php  furl:myConfig.php  reddit:myConfig.php

Google Trends

May 11th, 2006, 3:20 am by lig

found a new toy - Google Trends. and I have to admit - it seems pretty dang cool.

With Google Trends, you can compare the world's interest in your favorite topics. Enter up to five topics and see how often they've been searched for on Google over time. Google Trends also displays how frequently your topics have appeared in Google News stories, and which geographic regions have searched for them most often.

Check out the comparison of Java, PHP, ASP, .NET, and Ruby on Rails

del.icio.us:Google Trends  digg:Google Trends  furl:Google Trends  reddit:Google Trends

Missing the “PHP Weekly Summery”

May 9th, 2006, 4:31 am by lig

Sigh - it seems like forever since the last time Steph Fox released a "PHP Weekly Summery" (Feb 27th to be exact). Especially miss the "Short Version" - short, concise and more often then not rather humorous. Translating some of the internals threads into something relatively understandable (never mind humorous) to the rest of us... Well let me say - I couldn't do it.

And I have to admit - to me at least - until it makes it in the Weekly Summery - it just isn't official that something has been "completed" inthe internals.. Yeah I read about it in the message threads.. but it just isn't the same.

del.icio.us:Missing the   digg:Missing the   furl:Missing the   reddit:Missing the

life as fiction

May 8th, 2006, 2:56 am by lig

Jason and I were talking yesterday about how incredably lucky we have been in our lives with the opportunities and travels we have had. Hell - most people have books written about lives like ours. We admit it - we are natural wanderers.

Lets see - we have lived in California, Florida, Italy and Guam were we have had homes from rural country living to a condo on the Med. We have traveled on vacations that for most only being to one would be a life fulfilling dream - but we have 3 including Rome and the Vatican (to see the Coliseum, Forum, catacombs, Sistine Chapel, Peita, Vatican museums, Panthion, Spanish Steps, Swiss Guards and so much more) , Bejing, China (Walking the Great Wall, going to the Forbidden City and the Summer Palace, shopping the small side streets with the incredable vitality, walking Tianamin Square, and do I really need to mention the food) and in a few months we are going to Australia where we plan to dive the Great Barrier Reef.

Between us we have been to over 20 different countries in the world (some multiple times) were we have walked the streets, ate the local food by using gesturing to get our point across (Coke-a-Cola and Budweiser are internationally understood), looked at signs that we had no clue what they meant, and basically explored new cultures so very different from the US. Granted not all are common tourist areas (like Jaba Ali, UAE or Sasabo, Japan) but many were - Hong Kong, Singapore, Bali, Phuket- Thailand...

And that still doesn't take into account the traveling we have done in the US... Between us we have been to Hawaii (least 8 times), Alaska, up and down the East and West Coasts, and some of the middle sections. We have seen the Mojave Desert and the Grand Canyon during sunset - watched the sun rise over the Atlantic Ocean, it set over the Pacific - swam and played in both. Seen the beautiful quiltwork pattern of the fields in Oklahoma, listened to country music in Nashville, watched the sun play on the Rocky and the Adirondeck Mountains, gambled in Las Vegas and Atlantic City.

Man have we been blessed. LOL - funny part is there is still so much we want to do. After going to Australia - we're thinking of taking an African Safari... granted it will be a number of years before we can even consider it... But it is a dream to shoot for. And I also want to live in Australia or New Zealand for a while... Maybe we can fit that in somewhere along the line too.

So what is your 1 dream? What is it that you want to do sometime in your life before you die? We have both been lucky enough to do ours already... so what is yours?

del.icio.us:life as fiction  digg:life as fiction  furl:life as fiction  reddit:life as fiction

Daddy Gone

May 8th, 2006, 12:55 am by lig

Well my Dad has flown out to go back to the Philippines. He should be staying there for about 10 more days and then he goes back home to Florida.

It was great having him out here to visit. I had forgotten how much I miss being around my family. We managed to see just about everything and still not do a single tourist attraction.

I'll be missing him.

del.icio.us:Daddy Gone   digg:Daddy Gone   furl:Daddy Gone   reddit:Daddy Gone

Fishing

May 3rd, 2006, 11:31 pm by lig

Went fishing with my dad yesterday (only working half days while he is out here) - and for the first time in my life - I out fished him... kinda.

We started out in Inarajan by a coral drop off that led into a bay. There should be some big fish rinning in and out of the bay through this small opening. Only 1 small problem - we are on land and it is a shear drop off about 25 feet out. When all was said and done - I had cast out ~10 times and lost all my gear (hook and sinker) at least 4 times. My dad was losing his gear 2 out of every 3 casts (he can cast farther then I can and was making it over the coral reef edge).

Next we went down to Malesso (Merizo) and fished off of the pier. The water was deep but we had missed the tides and at got there in the heat of the day... We stayed there for about 3 hours. Luckily we did catch a few fish. Dad caught a small gobi and threw it back, and a small snapper that we kept for dinner. I caught a decent size red wrasse that also was eaten for dinner.

So how did I out fish my dad? Well to be generous - my dad would have needed 3 snappers to come close to the size of my 1 fish. and I admit - I am "bragging too much" - as he would say.

del.icio.us:Fishing  digg:Fishing  furl:Fishing  reddit:Fishing