Archive - Apr 2007 - Blog entry

Date

Tom's Hardware

Toms Hardware Logo

Are you a fan of building your own computers? Just an enthusiastic gamer that wants a hot-rod of a machine? I'll have to refer you over to Toms Hardware. Tom's Hardware has many useful resources and things that may be useful to you in your next computer build. I didn't think toms hardware would be very informative to me, although I proved myself wrong when I went and started reading up on some of the posts they had made. I learned so much! Once again I say, if you are a machine enthusiast, head on over to tom's hardware! I'll for sure be building my next machine from information gathered here.

Interesting PHP related sites for April 2007

I'm showing my deepest RESPECT for the 2 site below.
Alexis Ulrich promotes his esoteric codes by using the common easy to understand PHP. His Brainfuck and PATH is as enjoyable as his serious libraries like XML Parser, .eml viewer and Stemmer.

TheWorldsEnd.Net's knows networking. 3 Networking related PHP scripts: php-ping, php-trace and snmp-collector have combined of over 20000 downloads.

Get the file name without the directories

in

Shocking! This tutorial teaches people very inefficient codes!
Mountains of inefficientness running though every line of the tutorial! AHHHHHhhh
I'm not going to criticize not using __FILE__ part, since sometimes, $_SERVER["SCRIPT_NAME"] can be different from __FILE__.
$file = $_SERVER["SCRIPT_NAME"];
but I have to say something about how to get the a file name without the directories.

$file = $_SERVER["SCRIPT_NAME"];
$break = Explode('/', $file);
$pfile = $break[count($break) - 1];

Build ups of this kind of small unpolished gears could end up with huge performance hit(even though it's usually not noticeable among the users).
I suggest a MUCH faster method:
$pfile = basename(__FILE__);

Note for April 29

in

"I have reason for using computer this time in the day, I'm writing a book report...yes... it's facebook."

I used 4 hours to make my dinner:
1. 10 minute preparing(pealing potatoes, frozen foods, etc.)
2. 3 hour healing the wound from pealing potatoes and chopping vegs. (ZOMG blood everywhere situation isn't fun)
3. 49 minute get the pork chop ready.
4. Cursing for 1 minute because I got burnt...
Check out the result

Pork!
I learned a lesson:
No matter how good I am in PHP, I could still die in the kitchen.

Finally my room is back to the original state, yeeeah!
Messy than ever!

Dapper: The Data Mapper

in

I was always thinking about:
"IF, just if, one day, the world using a standard to store data and user can chose the presentation, the life is going to be SOOOO good because I see everything MY way.."
Dapper made a small step toward this goal.
Dapper follows these rules to make any site's content into a pure data format like XML or RSS:
1. Find similar pages though out a website
2. Dapper will compare them and found out what is data and what is presentation(cooool)
3. You decide what to keep

Honey Pot that kill bots