My cousin showed this to me, thought I'd share for laughs. Check out the chimp with the Gumby's shirt. Didn't know Japan had Gumby's!
Tuesday, October 30, 2007
Random Video
Posted by
V.M.
at
6:35 PM
0
comments
Labels: Comedy
Thursday, October 25, 2007
Trojans? Whatever...I use Nirodh
I finally figured out what I'm going to be for Halloween
Posted by
V.M.
at
9:25 PM
1 comments
Labels: Comedy
Tuesday, October 16, 2007
Monday, October 15, 2007
40 Tips For Optimizing PHP Code
I know nobody really cares, but I'm posting anyway because some of these tips are going to make me change some of the coding I've done.
- If a method can be static, declare it static. Speed improvement is by a factor of 4.
- echo is faster than print.
- Set the maxvalue for your for-loops before and not in the loop.
- Unset your variables to free memory, especially large arrays.
- Avoid magic like __get, __set, __autoload
- require_once() is expensive
- Use full paths in includes and requires, less time spent on resolving the OS paths.
- If you need to find out the time when the script started executing, $_SERVER[’REQUEST_TIME’] is preferred to time()
- See if you can use strncasecmp, strpbrk and stripos instead of regex
- str_replace is faster than preg_replace, but strtr is faster than str_replace by a factor of 4
- If the function, such as string replacement function, accepts both arrays and single characters as arguments, and if your argument list is not too long, consider writing a few redundant replacement statements, passing one character at a time, instead of one line of code that accepts arrays as search and replace arguments.
- Error suppression with @ is very slow.
- $row[’id’] is 7 times faster than $row[id]
- Error messages are expensive
- Do not use functions inside of for loop, such as for ($x=0; $x <>
- Incrementing a local variable in a method is the fastest. Nearly the same as calling a local variable in a function.
- Incrementing a global variable is 2 times slow than a local var.
- Incrementing a object property (eg. $this->prop++) is 3 times slower than a local variable.
- Incrementing an undefined local variable is 9-10 times slower than a pre-initialized one.
- Just declaring a global variable without using it in a function also slows things down (by about the same amount as incrementing a local var). PHP probably does a check to see if the global exists.
- Method invocation appears to be independent of the number of methods defined in the class because I added 10 more methods to the test class (before and after the test method) with no change in performance.
- Methods in derived classes run faster than ones defined in the base class.
- A function call with one parameter and an empty function body takes about the same time as doing 7-8 $localvar++ operations. A similar method call is of course about 15 $localvar++ operations.
- Surrounding your string by ' instead of " will make things interpret a little faster since php looks for variables inside "..." but not inside '...'. Of course you can only do this when you don't need to have variables in the string.
- When echoing strings it's faster to separate them by comma instead of dot. Note: This only works with echo, which is a function that can take several strings as arguments.
- A PHP script will be served at least 2-10 times slower than a static HTML page by Apache. Try to use more static HTML pages and fewer scripts.
- Your PHP scripts are recompiled every time unless the scripts are cached. Install a PHP caching product to typically increase performance by 25-100% by removing compile times.
- Use memcached - memcached is a high-performance memory object caching system intended to speed up dynamic web applications by alleviating database load
- Use ip2long() and long2ip() to store IP addresses as integers instead of strings in a database. This will reduce the storage space by almost a factor of four (15 bytes for char(15) vs. 4 bytes for the integer), make it easier to calculate whether a certain address falls within a range, and speed-up searches and sorts (sometimes by quite a bit).
- Partially validate email addresses by checking that the domain name exists with checkdnsrr(). This built-in function checks to ensure that a specified domain name resolves to an IP address. A simple user-defined function that builds on checkdnsrr() to partially valid email addresses can be found in the user comments section in the PHP docs. This is handy for catching those occasional folks who think their email address is ‘joeuser@wwwphp.net’ instead of ‘joeuser@php.net’.
- If you’re using PHP 5 with MySQL 4.1 or above, consider ditching the mysql_* functions for the improved mysqli_* functions. One nice feature is that you can use prepared statements, which may speed up queries if you maintain a database-intensive website. Some benchmarks.
- Learn to love the ternary operator.
- If you get the feeling that you might be reinventing the wheel during a project, check PEAR before you write another line. PEAR is a great resource that many PHP developers are aware of, yet many more are not. It’s an online repository containing over 400 reusable snippets that can be dropped right into your PHP application. Unless your project is trully unique, you ought to be able to find a PEAR package that saves at least a little time. (Also see PECL)
- Automatically print a nicely formatted copy of a page’s source code with highlight_file().This function is handy for when you need to ask for some assistance with a script in a messageboard, IRC, etc. Obviously, some care must be taken not to accidently show your source when it contains DB connection information, passwords, etc.
- Prevent potentially sensitive error messages from being shown to users with the error_reporting(0) function. Ideally error reporting should be completely disabled on a production server from within php.ini. However if you’re on a shared webhost and you aren’t given your own php.ini, then your best bet is to add error_reporting(0); as the first line in each of your scripts (or use it with require_once().) This will prevent potentially sensitive SQL queries and path names from being displayed if things go awry.
- Use gzcompress() and gzuncompress() to transparently compress/decompress large strings before storing them in a database. These built-in functions use the gzip algorithm and can compress plaintext up to 90%. I use these functions almost everytime I read/write to a BLOB field within PHP. The only exception is when I need full text indexing capabilities.
- Return multiple values from a function with “by reference” parameters. Like the ternary operator, most PHP developers who come from a more formalized programming background already know this one. However, those who’s background is more HTML than Pascal, probably have wondered at one time “how do I get multiple values back from a function I wrote, even though I can only use one return value?” The answer is that you precede a variable with “&” and use it “by reference” instead of “by value”.
- Fully understand “magic quotes” and the dangers of SQL injection. I’m hoping that most developers reading this are already familiar with SQL injection. However, I list it here because it’s absolutely critical to understand. If you’ve never heard the term before, spend the entire rest of the day googling and reading.
- When working with strings and you need to check that the string is either of a certain length you'd understandably would want to use the strlen() function. This function is pretty quick since it's operation does not perform any calculation but merely return the already known length of a string available in the zval structure (internal C struct used to store variables in PHP). However because strlen() is a function it is still somewhat slow because the function call requires several operations such as lowercase & hashtable lookup followed by the execution of said function. In some instance you can improve the speed of your code by using a isset() trick.
Ex.
if (strlen($foo) <> - When incrementing or decrementing the value of the variable $i++ happens to be a tad slower then ++$i. This is something PHP specific and does not apply to other languages, so don't go modifying your C or Java code thinking it'll suddenly become faster, it won't. ++$i happens to be faster in PHP because instead of 4 opcodes used for $i++ you only need 3. Post incrementation actually causes in the creation of a temporary var that is then incremented. While pre-incrementation increases the original value directly. This is one of the optimization that opcode optimized like Zend's PHP optimizer. It is a still a good idea to keep in mind since not all opcode optimizers perform this optimization and there are plenty of ISPs and servers running without an opcode optimizer.
- Excellent Article about optimizing php by John Lim
Posted by
V.M.
at
7:31 PM
0
comments
Labels: Programming
Friday, October 12, 2007
2007 Nissan Intima Concept
I was browsing online and ran into a car site which stopped me in my tracks. I didn't think Nissan was coming out with a concept for a typical 4 door family car but they have. Introducing the Nissan "Intima", I guess it's like my Nissan Altima but more intimate?
I always had a thing for Nissan cars and suicide doors and now I have both. Check out the interior.


Don't ask me what those torpedo like breasts are on the bottom are for. One can only imagine the possibilities. Anyhow, if you dig this then there are more photos here: http://www.seriouswheels.com/cars/2007/top-2007-Nissan-Intima-Concept.htm
Posted by
V.M.
at
8:39 PM
1 comments
Labels: Cars
It Was That Easy
I spent over 10 years of my life trying to figure this out and the answer was in front of me the whole time.
Posted by
V.M.
at
5:54 PM
1 comments
Labels: Comedy
Thursday, October 11, 2007
Where's McLovin?
The McLovin saga has been temporarily removed and placed on hold until further notice...
Posted by
V.M.
at
12:05 PM
0
comments
Labels: V.M.
Wednesday, October 10, 2007
McLovin: "like DAMNNN that's HOT!"
I was chillin at McLovin's.
McLovin: "Hey I got a song I want you to hear"
Me: "(thinking) fuck.....what is it now..."
---
You need to get if he don't wanna
Love you the right way he ain't gonna
It ain't where he's at its where he
Where he wanna be
(Huh huh oooh)
(Huh huh oooh)
(Huh huh oooh)
(Huh huh)
[Missy Elliott]
(I don't want yo man)
Cause I got it like that
But it ain't even gotta be like that
(Eh he he he he)
Yo man he be callin me back
Cause see I'm fine and a matter of fact
(Eh he he he he)
He asked how I do dat dat
Fit my jeans over baby fat
Listen
I don't know the type of tricks he playin
But I should warn you I don't want ya man
[Keyshia Cole]
I understand why you wanna try
Make him stay home late at night
But if wanna go he'll be gone no lie
I can't explain how many times I tried
How many times I cried
Thinkin about mine and where he might be
Remember when I gave everything I got
Couldn't get deep down inside
How ya love someone who didn't love me
But now I get if he don't wanna
Love you the right way he ain't gonna
It ain't where he's at it's where he
Where he wanna be
[Chorus:]
If he ain't gonna love you
The way he should
Then let it go
If he ain't gonna treat you
The way he should
Then let it go
If he ain't gonna love you
The way he should
Then let it go
If he ain't gonna treat you
The way he should
Then let it go
[Missy Elliott]
When this song come on in the club
They gon be like
Damn that's hot
And when they play it in they car
They gon drop they tops like
Damn that's hot
They gon mix it wit Biggie "It was all a dream" like
Damn that's hot
Me and Keyshia won't stop
Til the tick don't tock like
Damn that's hot
[Keyshia Cole]
Now understand why I take my time
Cause you come wit alibis
Trynna get me to see thats where you trynna be
But I dont want yo man
Yo mans been callin me
Trynna get me to see
That he wants me to be wit him
But he ain't the one for me
And if you only knew
You would
Do what you had to
Finally see that
You need to get if he don't wanna
Love you the right way he ain't gonna
It ain't where he's at its where he
Where he wanna be
[Chorus:]
If he ain't gonna love you
The way he should
Then let it go
If he ain't gonna treat you
The way he should
Then let it go
If he ain't gonna love you
The way he should
Then let it go
If he ain't gonna treat you
The way he should
Then let it go
[Lil’ Kim]
Here's a little lesson Lil Kim don't stress em
Kick em all straight to the curb like Beckham
Broke up wit my Ex he wit her for now but
Little do she know she just a rebound
Callin my phone she so outta pocket
I been there before o'girl you need to stop it
Trickin on me when he tell you he ain't got it
You don't get the picture
My pictures in his wallet
Never ever thought I would leave him alone
But I let a dog roam now he wanna come home
But I
Don't trust him
Though I still love him
No longer want him
Lookin at his cousin
Kinda buzzin
Loose off the goose
Got him on a chase like cranberry juice
When he's wit you he's wishin it was me
You might be where he's at but I'm where
He wanna be (Baby Baby!)
Let it go
Let it go, let it go, let it go
Let it go, let it go, let it go
Let it go, let it go, let it go
[Chorus:]
If he ain't gonna love you
The way he should
Then let it go
If he ain't gonna treat you
The way he should
Then let it go
If he ain't gonna love you
The way he should
Then let it go
And if he ain't gonna treat you
The way he should
Then let it go
[Missy Elliott]
When this song come on in the club
They gon be like
Damn that's hot
And when they play it in they car
They gon drop they tops like
Damn that's hot
They gon mix it wit Biggie "It was all a dream" like
Damn that's hot
Me Kim and Keyshia don't stop
Til the tick don't tock like
Damn that's hot
---
Mable, please do us all a favor and put out soon.
Posted by
V.M.
at
5:34 PM
1 comments
Labels: McLovin Saga
Friday, October 5, 2007
McLovin: "I'm going to go tanning once a week"
enough said.
Posted by
V.M.
at
5:57 PM
0
comments
Labels: McLovin Saga
Wednesday, October 3, 2007
McLovin vs. Justin Timberlake
For today's match up, we have going head to head, the "hopeless romantic" McLovin and "heartthrob" Justin Timberlake.
I know what you're thinking... out of the one trillion pictures out there of Justin Timberlake, why did you have to pick this one? Well, I plead the 5th.... Nah just playing. It was just the first one on google image search. Anyhow, you must be wondering what JT has anything to do with this. Dialog begins here.
McLovin: "(gazes into my cube) So I found something out last night."
Me: "Oh yea? What's that?"
McLovin: "I found out Mable might have another potential interest."
Me: "How do you know? Did she tell you?"
McLovin: "No I....."
---
Before I continue you should know that social networking sites like Facebook, Xanga, MySpace, and Friendster both McLovin and I are not too fond of. Blogspot is the exception for me however. A few days ago my cousin came over to check his Facebook account. He asked me if there was anyone I wanted to look up. Just for kicks I said let look Mable up. My cousin asked what her last name was. I said "Syrup". Surprisingly enough her profile populated and she was under a network that we could get access to, sweet.... I look at the pictures of course and note a shit ton of guys, and I know she only has one brother. I see the walls on her page are plastered with spanks and images of lips and panties. What happened to the poking I once knew? I smelled barney rubble........TROUBLE! I decide not to break the news to McLovin until the following morning.
The bastard calls me up the next morning and wakes me up. I hate getting waken up because I enjoy my sleep time. Since he fucked with my sleep, I dropped the bomb on him first thing. He didn't believe me at first what I was telling him. As I was describing what I saw he was already on stalker mode and creating an account. You have to understand how much McLovin HATES Facebook. It's like a KKK mentality but just geared towards social networks. I couldn't believe what he was doing. He let the worst get the best of him. After a few hundred "These guy's look like douchebags!!!" from McLovin, he finally canceled his account. Good for you McLovin. You got the curiosity out of you, it's time to put this behind us....
---
McLovin: "...renabled my Facebook account"
Me: "WTF??? I thought you canceled that shit?"
McLovin: "I did but I can't have her doing shady shit behind my back."
Me: "You should have more confidence man. Even if she is you guys are just dating."
McLovin: "Yea and we made it clear that dating meant seeing no one else."
Me: "Ok, so what did you find out?"
McLovin: "I noticed on the wall of remarks that someone commented about a guy hanging around Mable's desk"
---
Mable's boss has a daughter who is friends with her. She is the one commenting on Mable's wall. The boss apparently tell hers daughter everything that goes on at work and from there the daughter validates the statements with Mable.
---
Me: "A guy? Stupid it must be you."
McLovin: "No it can't be...she said he looks like Justin Timberlake, and I look nothing like him...."
---
At this point, laughter was just building up in my stomach
---
Me: "HAHAHAHAHAHAHAHAHAHAHAHAHAHAHA you sure dont!!!"
---
McLovin and I were continuously laughing pretty hard for about 5 mins over the thought of how stupid that sounded.
---
McLovin: "There's rumors that Justin Timberlake has a kid too."
Me: "Is there now?.... I wouldn't worry about it too much, it's probably just talk."
McLovin: "True, and if i need to, I found out it's pretty easy to activate/deactivate an account."
Posted by
V.M.
at
11:02 PM
1 comments
Labels: McLovin Saga
Tuesday, October 2, 2007
McLovin Gettin' No Lovin
My two readers have been asking where the updates have been. Honestly, there hasn't been enough fuel feeding the fire. I'll still go head and jot something down though.
So I really like to visualize in my head what's going on whenever I hear a story. Now I will grant myself that wish. Let me go ahead and introduce the cast of the story...
Here's McLovin. Again, a good lookin' fella with a sense of style. But what the fuck is up with the hair and bushy eyebrows?
Next, we have Mable. She's a looker isn't she? Yeahhh she is...![]()
Okay, I won't be mean. Here's Mable. I would be mean and say the above is her, but I don't want to hear McLovin whine more than he is already. Just kidding, take a joke McLovin.
What would a story be without some friends. So here's jdm and a buddy of ours who I'll call 'Shits a Lot'.
And how could anything be possible without yours truly...me. Helllrowwww!!!
So we left off last with McLovin not getting some. Guess what? He still ain't gettin none. Is it his fault that he's not getting any? Sure. Is there possibly something wrong with her that's preventing her from putting out? Yes. No one can really be to blame, but I do know that behaviors can change to induce heightened sexual stimulation. How you may ask? Here's how...
One day I was practicing on my piano and McLovin's situation popped in my head. I thought to myself: "There's something lacking in that relationship. There's no passion, no stimulation, how can I help?"
From there I devised a brilliant plan of attack, and if executed precisely, McLovin will finally feel the release.
I wanted my plan executed in stages. Stage 1: Assemble my crew. I would go to the local bar to search for buddy 'Shits a Lot'.
I would finally got a hold of him after reciting "Mohammad Jihad" a million times. Since he doesn't like to be surprised I don't think he would be too happy when I found him.
But after describing my plan he would be all for it. At this time I would already have buddy jdm working undercover for me.
Stage 2: Execution. This is when I strike!! 'Shits a Lot's' role will be to kidnap Mable's father. Once I got a hold of him I would feed him to my pet shark.
Remember how I had jdm undercover? Well by now he would have become best friends with Mable's brother. From there he would lure her brother to a helicopter tour of the city and fucking toss his ass out. Ahhhh!!!
That leaves just Mable's mother. My plan is to send her to a free trip to Paris one week prior to these events. Then I would raise hell on Paris so that she is stranded without food and water, left with the only option of licking the chocolate off the kid's lips for any sort of nutrients.

With the obstacles out the way I would simply wait until Mable gets off work and lure her to my palace. Then when she leasts expects it I tie her up on a chair and gaze at her for hours like a pervert.
Of course McLovin would be in on this plot and ready to make his grand entrance. As always, before he sees Mable he pretends to work out to get the blood following in his biceps to give the illusion of big muscles (something he actually does by the way).
From there he would walk in my palace, "take out" my guards (who would all be playing dead when he got there), and go up stairs and rescue Mable. I guess I would act like I'm taking a shit or something, so I didn't know McLovin was here saving the day.
As they are leaving I would then come out of the bathroom and look angry like McLovin had just made a fool of me.
By then the adrenaline should be pumping in their hearts, something they've never felt before. Stimulation would finally be at its peak and all McLovin has to do is make the first move...
Then we all know who's going to come in and ruin the moment...
Posted by
V.M.
at
6:18 PM
1 comments
Labels: McLovin Saga



