If you searched for my full name in Google for the past 3 weeks or so, you might have noticed that my site completely disappeared from the famous search engine. The reason it disappeared was probably due to my domain expiring and parked, but after 3 weeks of checking and waiting, it appears my site is once again, back on top. There’s a certain about of pride we web-programmers have in regards to our stuff being on top. I shall enjoy it while it lasts.
Archive for May, 2009
There really is no particular order in this list:
- Randy Pausch
- Albert Einstein
- Stephen Hawking
- Sun Tzu
- Bruce Lee
- Jet Li
- Stephen Chow
Today, I after watching Stephen Hawking lecture on “The Big Question”, I found a new appreciation for this man. He can only communicate through twitching his cheek, the other parts of his body is rendered completely useless. This man takes roughly 7 minutes to write 20 words. Yet, he finds the ability to give full-blown lectures, books, and to be optimistic about his situation. He states that his conditions actually gives him a lot of freedom to pursue one of his greatest interest in life; Solving the mysteries of the universe. I admire this man not only for his intellect, but his bright-facing outlook, and his ability deal with the countless problems in his day to day life. People like Stephen Hawking make me realize how strong humans can be, how they look adversity in the face and overcome it.
The question is “How does this tie into programming?” If Stephen Hawking can overcome the challenges he faces, the problems we face in the computer world seems trivial in comparison. Men like Stephen Hawking gives me strength tackle monstrous applications and crazy product requirements with great confidence that the problems I face can be overcome.
There already tons and tons of articles on this topic, but I think this knowledge is definitely nifty, so I decided to repeat this information in my blog.
A tracking pixel is a script that is disguised as an image. Each time the image loads, the script does whatever it was coded to do, but at the same time returns an image. This image doesn’t need to be a pixel, but a pixel is the smallest graphical information you can return. The pixel doesn’t need to be transparent either, but I just think it’s annoying to see an out of place pixel sitting on the edge of the page. So for all those who are like me, we like to implement something called a transparent pixel. Without further ado here is the php code for a transparent pixel:
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " PST");
$img = imagecreatetruecolor(1,1);
$color = imagecolorallocate($img, 0, 0, 0);
The header code is telling the browser that the file is a gif and to not cache it. If you want your tracking pixel to work well, it’s best for you to include it.
For those hardcore nerds out there, you can save the generated gif into a file, check if the file is there, and if it exists, use that existing gif instead of creating a new one. Not only does this method prevent regeneration of the gif, it also allows you to pass file size information through the headers.
For those even more hardcore nerds out there, you can simply print the string that represents a transparent pixel, it’ll save you all that image creation code. Although you’ll sacrifice readability, since only a handful of us can look at a string of bytes and is able to tell exactly its supposed to be.
I know flash objects could be listed on MySpace pages for quite some time, but I didn’t really understand what this meant for MySpace pages until I went to a friend’s site. I’ve noticed that my friend’s MySpace on, well, MySpace looked and behaved absolutely different than any other MySpace I’ve seen so far. Being the code monkey I am, I decided to investigate. It turns out, her MySpace page has been pretty much replaced by a massive flash file, and everything else is hidden away. I thought this was very interesting, and opens a lot of possibilities for further development of MySpace pages.
I love tinkering with the technology and creating my own version of it, but for those who don’t want to do that, here’s a link to the page that does it for you: http://www.lovemyflash.com/